Open-source software to automatically align multiple photos
Asked 6/5/2011
9 views
2 answers
0
I’m looking for an open-source tool that can automatically align several photos, similar to Photoshop’s Auto-Align feature. This would be for image stacks such as focus stacking, HDR, or exposure blending, and possibly for partially overlapping images or panoramas. What open-source options are available?
Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0
Photography Stack Exchange contributor
15y ago
2 Answers
25
Alignment of multiple images taken from the same point
If you are not making a panorama, but just aligning an image stack for focus stacking, exposure fusion or HDR, then align_image_stack from Hugin project is one of the simple yet very useful tools. Hugin is a multiplatform collection of tools that is available for Windows, Mac OS, and Linux.
For example, if your have 3 files a.jpg, b.jpg, c.jpg, to align them you may run:
align_image_stack -a aligned_ a.jpg b.jpg c.jpg
which will produce three TIFF images, aligned_0000.tif, aligned_0001.tif and aligned_0002.tif, which will be well aligned. Now the images are ready to be, for instance, enfused:
enfuse aligned_*.tif
If you prefer the graphical interface, or you want to align only partially overlapping images (like in panoramas), then use Hugin itself, it is a very powerful and flexible software.
Alignment of stereo pairs
From your comments I see, that you want to create stereoscopic images. The keyword to search for is anaglyph, not align.
For this purpose I used Stereo Photo Maker, which is not open source, just a free Windows program. It runs well under wine too. But I almost never used its automatic alignment feature, because I prefer to align images manually, watching the composite 3D image. By aligning the images manually I can also choose what exactly is “in focus” (one cannot align everything in a stereo image).
SPM can also optimize color anaglyphs to reduce ghosting, a very useful feature.
There are some scripts and tutorials for Gimp (e.g. anaglypher, script-fu-make-anaglyph, this short tutorial). It is relatively easy to build a monochrome anaglyph through layer effects and by moving a layer manually, it is not always working well for color anaglyphs.
Finally, there is -stereo option of composite command of ImageMagick, but I didn't use it.
Originally by user1558. Source · Licensed CC BY-SA 4.0
user1558
15y ago
0
Generated from our catalog & community — verify before relying on it.
A strong open-source option is Hugin, which is available for Windows, macOS, and Linux. For image stacks shot from the same viewpoint—such as focus stacking, HDR, or exposure fusion—the included command-line tool align_image_stack is specifically useful.
Example:
align_image_stack -a aligned_ a.jpg b.jpg c.jpg
This creates aligned TIFF files you can then blend, for example with enfuse.
If you prefer a graphical interface, Hugin can also handle partially overlapping images and panorama-style alignment.
One answer also mentions AutoStitch, which is good for stitching photos taken from a single point, but it is not open source, so it doesn’t fit your requirement.
So if you want an open-source equivalent for automatic photo alignment, Hugin / align_image_stack is the clearest match from the suggestions provided.
Recommended products
UniqueBot
AI15y ago
Your Answer
Related Questions
When should you use Lightroom stacks, and when does Auto-Stack by Capture Time help?
Can Windows panorama software stitch Canon CR2/DNG files directly?
What free Mac software can I use to stack astrophotography images?
What’s the best workflow for bracketed-exposure panoramas in Photoshop?
Can panorama stitching software work directly with RAW files, and what should I use?