Get stitched up with Hugin
Sunday, March 15, 2009 at 10:57PM
Tux in Hugin, Linux, Linux, Photography, Review, Tips and Tricks, newbie_safe, photo, review, tips

SunsetLinux tip alert! Greetings fellow inmates! Are any of you, like me, totally inept at photography and anything related to it? Well, not totally inept: My photo editing is not too bad, I just can't take any pictures that are worth a damn, so there's not a whole lot to edit.

During my last vacation, I used my trusty 5.1mp point and shoot to take a panorama picture. Being in an adventurous mood, I took a series of five pictures and fully expected to be able to stitch them all nicely together into one big panorama once I got home. This turned out to be a rather too optimistic expectation. After grunting mightily at my gimp window for what seemed like hours in an effort to stitch the five pictures together by hand, I ended up with a panorama that would have made Frankenstein's monster proud.

I set the panorama aside and a few days ago, by chance, I happened upon a program called "Hugin". What Hugin promises to do is to automagically stitch together pictures that you supply to it. I was curious to see if the stitching that Hugin would accomplish automatically would stand up to careful inspection, and whether it would be a good replacement for stitching photos by hand.

So I installed Hugin on my trusty Fedora system, along with the accompanying autopano-sift-C program, like so:

yum install hugin autopano-sift-C

And fired up Hugin by typing "hugin" on the command line. What comes up is a window with a staggering amount of tabs that nevertheless doesn't have a chaotic feel to it. In fact, the tab that Hugin opened up on with me is the "Assistant" tab. This, in my humble opinion, is all you'll really need... as long as you're not a total photo-geek, that is. If you are, feel free to explore further!

DuskIn the assistant window you specify which pictures you want to be stitching together (By clicking on the "1. Load Images" button) and then specify some information about your camera's lens and focal length (I didn't bother with the focal length - I was eager to see the result and couldn't be bothered to check my camera for the details. Despite that, it worked like a charm). Once that's done, option 2 becomes clickable ("2. Align") and when you press this, the magic actually happens.

What is the magic? That's why, in addition to Hugin, we also had to install that Autopano-sift-C program earlier on: Autopano-sift-C takes care of the magical process of finding and defining "control points" in the pictures you supplied to Hugin.Control points are points that two of the neighbouring pictures in the panorama set have in common (Like a tree, a bench, a cruise missile). If you can identify two control points on each side of the picture, in theory, Hugin has enough information to be able to stitch the bordering pictures together because it uses those points to figure out how the pictures have to be modified in order to seamlessly overlap.

Had you not installed Autopano-sift-C, Hugin would have complained at you and you would have had to define the control points yourself. This kind of defeats the purpose of letting a computer do the work, so be sure to hunt around for the program. If Hugin complains and you are sure that Autopano-sift-C is installed, then check Hugin's "preferences" menu item under the "File" menu and make sure that Hugin knows where to find the autopano program (in my case /usr/bin/autopano-sift-c).

Almost nightSo press the "2. Align" button. Depending on how many pictures you have supplied, this process could take a while. I tested a paltry three picture panorama on my quad core beast and it still took about a minute to complete all the calculations. After that, you should be ready to actually create the panorama picture. If you like, you can browse around Hugin's tabs to see what it has done - the Control points tab being the most interesting because it shows the pictures and the control points that were found.

But what you REALLY want, of course, is to press the button that should now be clickable marked "3. Create Panorama". Do that and Hugin asks you for a file name. Choose a nice name and voila! Hugin writes your newly created panorama picture to the disk.

I inspected my panorama skeptically and was - seriously - deeply impressed! Not a discernible fault to be seen with the naked eye. Morerover, a process that would normally take me at least an hour of Pretty darkaggravation is now completed in under five minutes with better results than I could ever accomplish!

Scattered about this blog posting, you may have noticed, are pictures that I stitched together. I didn't do anything special when taking them, didn't even make much of an effort to line them up. The end result was. Well. See for yourself.

The end result using Hugin's photo stitching magic

So my verdict? Yay Hugin! If you have pictures, if you need to stitch them, if you run Linux... Look no further, try Hugin!

Tux lives.

 

Article originally appeared on dutchtechies (http://dutchtechies.com/).
See website for complete article licensing information.