
Use align_image_stack -m when a focus sequence changes magnification as the lens refocuses. The option allows field of view to vary for frames after the reference. Its immediate deliverable is an aligned image sequence, which you should inspect before asking a stacking program to choose sharp regions.
Key Takeaways
- Registration and focus blending are separate stages.
- Changing magnification may need more than a position-only fit.
- A registered outline does not prove the final composite is free of halos.
Recognize a scale difference
Compare two source frames with different focus positions. If one recognizable object grows around a roughly stable center, a translation alone will not make all its edges coincide. Distinguish that behavior from a completely different viewpoint or a moving subject.
A focus series should retain the scene evidence needed for its final use. The macro stacking preparation guide covers that broader capture-to-composite decision. This procedure handles the geometric preprocessing before detail selection.
Do not resample a sequence repeatedly by eye until one edge happens to align. Establish which parameter needs to vary and retain the original frames.
Produce registered intermediates
The official align_image_stack reference documents -m for focus stacks with differing magnification. A proposed command for three explicitly named TIFF inputs is:
align_image_stack --use-given-order -m -a aligned_ -p inspection.pto near.tif middle.tif far.tif
Run this only in a working directory with a suitable new output prefix. It is a documented command construction, not a command executed for this article.
The -a switch requests remapped TIFF images; -p retains a PTO project for investigation. --use-given-order makes the listed sequence intentional instead of relying on the documented default exposure-value sorting. Match output files to their source content before assigning focus labels.
Inspect registration without confusing blur with displacement
Compare stable contours that remain identifiable at the relevant focus positions. A blurred outline has uncertainty, so do not declare a precise subpixel success from a soft region.
Look near the center and edges, then inspect whether parts of the subject moved independently. Per-frame field-of-view optimization does not promise to solve occlusion, subject motion or every depth-dependent discrepancy.
The focus-breathing explanation describes the related capture phenomenon in moving imagery. A finished video crop is not a substitute for registered stills needed by a focus composite.
Pass aligned files to the next stage
Keep the registered sequence distinct from the source capture and the eventual blended image. Only after approving registration should you evaluate how the stacking program selects sharp contributions.
If the composite has a halo but the registered contours align, inspect the blending and occlusion problem rather than repeatedly changing the same geometric fit. Conversely, a visually smooth blend does not excuse displaced product markings.
Accept this stage when the required frames have explainable geometric correspondence and the intermediate identities are known. No alignment run or focus-stack quality result is reported here.
Related tasks
- Should I Focus-Stack Product Macro Photos Before AI Styling?
- Why Does My Reference Video Slightly Zoom When Only the Focus Changes?
Sources and scope
- Hugin align_image_stack manual: -m optimizes field of view except first frame for changing focus magnification; -a writes aligned TIFF sequence; -p writes inspectable PTO; --use-given-order prevents default EV sorting.
Official Hugin manual sections were actually opened and read on October 23, 2026 (Asia/Shanghai). Commands, comparisons and acceptance checks are proposed rather than performed. Historical FAQ descriptions are not claims about every installed release; verify the interface and source version before changing a project.
Prepared by Imagild Editorial, the company editorial team responsible for these guides. AI assisted research and drafting. This is documentation-based guidance with proposed examples, not a claim of hands-on testing or an independent product review. Report a correction.
Cover: Mariya Eskina / Pexels, Pexels License. This is an illustrative source photograph, not an application screenshot or a generated test result.