Stitching seamless panoramas with Hugin
Adding new tools to your free software graphics toolkit
Download the whole article as PDF
- 2007-01-10
- User space | Intermediate
-
Write a full post in response to this!
This content was sponsored by:
We can’t all afford four-figure priced twelve megapixel digital cameras with wide angle lenses. We can, however, all use free software to embellish the photographs taken by our modest equipment and belie their resolution and viewing angle. Set the GIMP aside for a moment and launch Hugin, a powerful cross-platform GTK frontend that will help you quickly and easily stitch individual photographs into one, large, seamless panorama.
Panoramas from start to finish
Panoramas are created by stitching multiple images together. To do this, you must find spots where your images overlap and designate them as control points. Then you will optimize your collection by selecting the best way to rotate, distort, and align these images so that they come together seamlessly. Finally, you will stitch and blend them all together and do some postprocessing.
Taking good panoramic photographs
When composing photographs with the intention of combining them into panoramas, it is best to adhere as closely as possible to the following rules:
- Take all photographs from the same location, using a tripod if possible
- Aim for a 33% overlap between each frame
- Keep the camera’s metering equal between shots
- Keep the white balance equal between shots
You can take vertical panoramas as well as horizontal ones, or even multi-rowed ones
Remember, you can take vertical panoramas as well as horizontal ones, or even multi-rowed ones. Use as many images as you like, but bear in mind that larger and more complex panoramas will take longer to process. Erring in any of these guidelines will not prevent you from composing a brilliant panorama, however it will make it more difficult and may aggravate seams between the individual photographs. Such issues may be fixed with the GIMP or another image manipulation tool after the panorama is stitched, though white balance and color deviation issues should be fixed beforehand.
Introducing Hugin and associated tools
To combine your photographs you can use Hugin, a GPL-licensed frontend to Panorama Tools available for GNU/Linux, Mac OSX, and Windows in several languages. Hugin will let you design your panorama, but you’ll need additional tools to find control points and do the actual image processing. Try Autopano-SIFT for automatically finding control points, though you may also do this manually, and Enblend for blending the images together. Both these tools are also GPL and cross-platform.
Larger and more complex panoramas will take longer to process
You must first configure Hugin to work with the tools you have installed. Access the configuration dialog in File → Preferences. Ignore the first three tabs (“Panotools”, “Finetune”, and “Misc.”), they will most likely have the correct options predefined. In the fourth tab, “Autopano”, make sure Autopano-SIFT is selected, that it is pointing to the correct binary location, and that the Arguments are set to -o %0 %i. In the final tab, “Enblend”, make sure Hugin has found the proper executable and set its arguments to -v -m XYZ, where XYZ is equal to about half your physical RAM (this is how much image cache Enblend will use). You may want to enable the checkboxes in the “Enblend” tab to cut down on temporary file space usage. Make sure these settings are correct each time you launch Hugin.
Finding control points
I have selected six four-megapixel JPEGs that I want to stitch into a horizontal panorama. The images were taken handheld and not well composed. However, Hugin and its tools should have no problems combining them seamlessly.
To begin composing your panorama, drag and drop your images into the “Images” tab or select them using the “Add Individual Images” button. Once your images are listed in the “Images” tab, select whichever photograph will represent the middle of your panorama and click “Anchor this image for position”. The “Camera and Lens” tab is used to correct images for camera error, ignore this since Hugin should have already filled in these variables based on your camera’s EXIF data.
There is a choice to be made now: do you want to trust Autopano-SIFT to choose control points, or would you rather do it yourself? Autopano-SIFT will generally do a good job, but having these complicated decisions made by complex algorithms can be be a very lengthy process, often taking several hours, regardless of your Desktop computer’s processing power. Manually selecting the control points may prove to be far quicker, but will take some experience and perhaps some frustration. Either way, you will probably need to do some manual adjustment to the selected control points based on the preview of your final panorama.
Autopano-SIFT will generally do a good job, but having these complicated decisions made by complex algorithms can be be a very lengthy process
If you choose to let Autopano-SIFT select your control points, click “Create Ctrl Points” on the “Images” tab and go out for some coffee. Read on to learn how to adjust Autopano-SIFT’s selections.
Write a full post in response to this!
Do you like this post?
Vote for it!
Copyright information
This article is made available under the "Attribution-NonCommercial" Creative Commons License 3.0 available from http://creativecommons.org/licenses/by-nc/3.0/.
Biography
Nathan Sanders: Nathan Sanders is an experienced free-software user and frequent contributor to publications concerning open-source software.
- Login or register to post comments
- 18752 reads
- Printer friendly version (unavailable!)




Best voted contents
-
Free software heroes: from Stallman to Google, a list of inspiring individuals who made everything possible
Tony Mobily, 2008-06-15 -
Ian Lynch's take on the BECTA fiasco
Tony Mobily, 2008-06-17 -
The Groklaw effect hits Becta. And yes, I am coining a new term
Tony Mobily, 2008-06-15 -
Mail merge in OpenOffice.org
Michael Crider, 2008-06-17
All news
Other sites
- The Top 10 Everything (Dave). The good, the bad and the ugly.
- Free Software news (Dave & Bridget). All about free software -- free as in freedom!
- Book Reviews: Illiterarty (Bridget). Book reviews, blogs, and short stories.
Hot topics - last 60 days
-
A future without Microsoft
Tony Mobily, 2008-06-08 -
Vienna failed to migrate to GNU/Linux: why?
Tony Mobily, 2008-06-09 -
Free software heroes: from Stallman to Google, a list of inspiring individuals who made everything possible
Tony Mobily, 2008-06-15 -
Dubious ads in Free Software Magazine
Tony Mobily, 2008-05-25 -
The Bizarre Cathedral - 6
Ryan Cartwright, 2008-05-25


Dedicated server
Autostitch
Submitted by Anonymous visitor on Sun, 2007-02-11 04:03.
Vote!Autostitch, can do that with one click, it is a fully functional trialware at
http://www.autostitch.net/
I have tried it and then threw away all Panorama software for good.
Are you kidding?
Submitted by Ian Tester (not verified) on Thu, 2007-05-03 01:28.
Vote!Perhaps you forgot where you are. This the "Free Software Magazine". Sorry to sound rude, but your Windows-only demo of a commercial product is not welcome here.
Besides, I've had pretty bad experiences with "auto stitchers" in the past. The ones I've tried always seemed to choose the worst set of points - leaves on trees for example, or the seemingly featureless centre of a wall instead of the corners. I spend so much time weeding out the bad points or adjusting them, that it's often easier to just do it all manually myself.
The free software tools (huginn, autopano-SIFT, enblend)
Submitted by Anonymous visitor on Wed, 2007-02-28 11:34.
Vote!I have tried many of the tools (PT-gui, autopano etc...) and I must say that this combo work very well.
Enblend at the end can do magic with the final output.
As for all other panorama tools memory is the key.