Following the previous article about making a simple script in Linux for Enfuse, you probably would like to align images to, because Enfuse is not only for blending images, but also for merging images with different depth of field – or stacking.
To do this,you need a command line program named Align_Image_Stack,
which is also part of Hugin – other programs might use it to.
What I didn’t mention in my previous writing is that the best way of finding out if or if not a program is installed, is to search for it in your file manager (Nautilus, Thunar…), when you do so, you immediately also know it’s path – which is another thing I forgot to mention before.
Programs that are installed can be started thru terminal command by entering it’s name or preceded by ./
If not, it’s because it’s not part of the system’s path.
It is possible to add a program ( it’s directory ) to the system’s path thru terminal command, but because we are going to use a batch file, it’s easier to add it in the script.
At this point we are only writing simple scripts, but the purpose of this all is to learn a bit of scripting, and maybe learning to write a few scripts of your own. In the end I want to come to more complex automated scripts with choices. Just like the Bat files I wrote for Windows.
Here I made a test with the same images as before with the Enfuse script.
/usr/bin/align_image_stack -a aligned_ -v -v testimage1.jpg testimage2.jpg
First the path to the Align_Image_Stack file, then -a aligned to add a prefix to the new images, double -v ( I read the more -v’s, the more verbose – so i did ) followed by the path of the two images.
And here it goes :