Why does align_image_stack fail on handheld macro focus-stacking shots?
Asked 1/2/2022
5 views
2 answers
0
I tried to make a focus stack from a short handheld burst of macro photos taken without a tripod or image stabilization. The subject and background may both have moved slightly, and some frames may also include perspective changes from hand movement. Using align_image_stack gave a result that looked worse than the originals.
Example command:
align_image_stack -v -t48 -m -a out- image1.JPG image2.JPG image3.JPG
Why would align_image_stack fail in this situation, and is there a better way to align and stack these images?
Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0
Photography Stack Exchange contributor
4y ago
2 Answers
9
When stacking (and stitching)...
Decide what you want to achieve.
- Increase depth of field?
- Remove unwanted people or objects?
- Reduce noise?
- HDR?
- Increase resolution? (This doesn't really work unless you have a camera with pixel shift.)
Shooting conditions:
- Use a tripod.
- Bracket (exposure, focus, etc), if needed.
Control points:
- Make sure they are on the subject of interest.
- When removing people, make sure there are no control points on the people.
- In your sample, it looks like you're mainly interested in the berry (?).
- Make sure the points are accurate.
- The
-tflag reduces accuracy of the control points. (Avoid it.) - Use the
-pflag to create.ptofiles so you can review the control points in Hugin. Or just use Hugin directly. For your set of images, the CPFind+Celeste method works well. - Review the control points to remove extraneous points. Then optimize positions and barrel distortion.
- The
- Make sure they are on the subject of interest.

Originally by user75526. Source · Licensed CC BY-SA 4.0
user75526
4y ago
0
Generated from our catalog & community — verify before relying on it.
align_image_stack can struggle when the images differ by more than simple focus changes. In your case, handheld macro shots likely include translation, rotation, perspective/parallax changes, and possibly subject/background movement. Those differences can confuse automatic alignment, especially if the background moves differently from the subject.
A few practical points:
- For focus stacking, a tripod is strongly preferred.
- If possible, decide the goal first: focus stacking, removing objects, HDR, etc., because alignment strategy differs.
- Avoid using
-there; it reduces control-point accuracy. - Use
-pto save a.ptoproject and inspect the control points in Hugin, or use Hugin directly. - In Hugin, generate control points, then delete points on the background so only the main subject is used for alignment.
- If fusing in Hugin, use exposure fusion settings appropriate for focus stacking, such as contrast-only weighting.
So the main issue is not that the software is broken; it’s that the image set is too inconsistent for fully automatic alignment. Manual control of control points in Hugin gives you a better chance, but if the subject itself moved, even that may not produce a useful stack.
Recommended products
UniqueBot
AI4y ago
Your Answer
Related Questions
Can you focus stack handheld macro shots, or do you need a tripod/support?
Why did my star-stack fail, and how should I align astrophotos properly?
Can you stack burst shots for noise reduction if the subject moves slightly between frames?
For macro focus stacking, is it better to move the camera or refocus the lens?
Why is my focus-stacked TIFF so large after saving from Photoshop?