Do you know any open source tool to automatically align images, similar to the auto align feature in Photoshop?
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
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_0002.tif, which will be well aligned. Now the images are ready to be, for instance, enfused:
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.
If this is in order to get a nice animation of the images, you can use Google Photos. Then, once they are in your library, select the images you want, click the big plus in upper right, and select
Animation. A few seconds later, you have an animation of the aligned images.
This is as of 10/01/2017
"Autostitch uses methods known as SIFT and RANSAC. This program differs from some other image stitching software in that it automatically stitches together even unaligned or zoomed photographs seamlessly without user input, whereas others often require the user to highlight matching areas for the photographs to merge properly. The only requirement is that all photographs be taken from a single point."
Free demo for Windows (which works seamlessly on Linux under Wine) is available, and I never needed another tool for stitching of pics.
As mattdm correctly wrote above (in comment), this is similar question: Which tools are good for creating panoramas/stitching multiple photos? and autostitch is also there one of the answers. I love (and prefer) it for two reasons: - simple installation (one exe file, nothing to install) - simple to use - choose input pics, choose size of output image, and other settings you do not need to set/change if you don't want to
So it's not exactly open source, but it is free (demo), simple and works fine both on Windows and Linux.
align_image_stack has arguments for dealing with stereo pairs. You need to experiment with the settings, particularly the grid subdivision count
-g, the point count
-c and the prescale
-s (larger images need to be scaled down more for the point detector to work reliably). Also make sure you pass in the FOV with
-f. Here's a command line that generates a super-excellent stereo pair from two 1920x2560 images:
align_image_stack -f 35.09 -p stereotest.pto -a stereotest -v -g 3 -c 16 -i -d -s 3 -S -C -A -P P9010741.JPG P9010742.JPG