Hugin: How to photo stitch digitally?
by Cory Rauch 2008-09-17 Category: Software-Graphics

Have you have ever seen those awesome panorama pictures and wondered how you could do with out spending tons of money on photography hardware? Well, In this article I am going to cover using the photo stitcher program called Hugin, which can stitch multiple images together seamlessly into a continuous panorama picture. You will need just a standard digital camera and a computer running Windows, Mac, or Linux.

What is Hugin?
Hugin is a open source photo stitcher program that can seamlessly merge multiple images of a scene into a panorama picture. It can do this by either automatically detecting or you manually telling Hugin multiple "control point", which are points that have corresponding matching "control points" in one or more other pictures in the set of supplied photos. Hugin uses these points to understand how each picture fits together with the set of pictures supplied and then blend the photos together in a perspectively correct way.

To get started, download Hugin for your respective OS at http://hugin.sourceforge.net/

Note: For the examples I will being using Mac OS X but they should work for other platforms since the program works the same way.

How Should I Take The Pictures?
Just take pictures that overlap, the Hugin website recommend that they overlap by at least 20-30%. You will also want to make sure there is little blur in the photos so you may find using a tripod necessary if you cannot get a steady shot by hand. I have found that trees, people, and animals can some times leave ghost traces in panoramas if they are on the move when you take a picture, so watch out for that.

Any Camera Requirements?
Well, I used a simple $100 digital camera from HP and it gave me decent results. You will also need to know two settings on your camera, Focal Length and Crop Factor. You can usually find these with both your lens and camera spec sheets. If your camera stores EXIF data then you may not need these settings since the needed HFOV setting will be stored in the picture file. If you have a simple pocket camera like I do with a fixed lens, you maybe able to fudge the settings as I will show below.

Step 1 - Load The Pictures
Load up the Hugin application and click "Load Images" located right on the first tab of the UI. It will present your OSes usual file browse box, simply select your picture files (You will need to select multiple pictures files here, I recommend keeping all the pictures that make up your panorama in one folder) and click OK. A dialog box will pop-up asking either for the HFOV setting or the Focal Length and Crop Factor (see above for how to get these). If you are unable to locate these and you have a simple pocket camera, you could try 50 for the HFOV setting.

Step 2 - Control Points
This is the part where you may want to experiment. You have two options, you could let Hugin try to automatically find control points in your photos (This works sometimes). Or you could manually select the control point yourself ( This usually results in the best quality panorama, and really is not that hard ). I will cover both methods below.

Automatic Selection of Control Points
This is the simplest method, since its one click. Simply click "Align" and Hugin will attempt to find the control points automatically.

Manual Selection of Control Points
To manually select control points, click the "Control Points" tab in the main window. In the top bar of the window you will have two drop down lists that will list all the pictures in the set of pictures you loaded in the prior step. One by one select a picture on each side to view the pictures side by side. Next, click an area in the one picture you want to designate as a "control point". Then find the same point in the other photo. Finally, click the "Add" button on the bottom to save the control point. You should see the control pointed added to the list below (See Fig. 1 below). Repeat these steps until you have at least 3 or 4 control points, then move on to the next two pictures. Remember its kind of like a chain too, so each photo should have control points linking it to the next photo in the chain and also the prior photo in the chain (Except for maybe the two end photos in the panorama which will only be linked by control points to one photo).

Fig. 1 - Adding a control point

After you have finished creating control points, you need to run two steps manually. First go to the "Optimizer" tab, and click "Optimize Now". Accept changes it recommends. Next, go to the "Exposure" tab, select "Low Dynamic Range", and then click "Optimize Now". Accept the changes it recommends.

Align The Photo
You need to also align the panorama photo. If you have allowed Hugin to automatically select the control points, the window that allows you to align the panorama photo will automatically pop-up. If you have manually created your control points go back to the first tab, "Assistant" and click "Align". A window will pop-up with a preview of you panorama picture. You may need to center the photo by click on the photo where you believe the center should belong. Next, click the "Straighten" button at top to automatically straighten the photo. You can also adjust the horizontal and vertical field of view. When done, click "Update" at top and close this window.

Step 3 - Create The Panorama
To finish creating the panorama, click the "Create Panorama" button located under the "Assistant" tab. It will output a TIFF image, which maybe quite large just to warn (I have had some in the 100mb+ range). Below is an example I created from a bunch of photos I snapped of the water way in front of Universal Studios in Orlando, FL.

Other ImprovedSource Articles:
10 Mac Applications You Need
Beware: Microsofts latest online map software may mislead you
MSNs Mis-Travels

Valid HTML 4.01 Transitional