Friday 25 May 2018

photo editing - What open source software for auto-alignment of photographs?



Do you know any open source tool to automatically align images, similar to the auto align feature in Photoshop?



Answer



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.


No comments:

Post a Comment

Why is the front element of a telephoto lens larger than a wide angle lens?

A wide angle lens has a wide angle of view, therefore it would make sense that the front of the lens would also be wide. A telephoto lens ha...