Creating Panoramas With hugin Photo Stitcher

0Comments

hugin-icon Recently I posted the article 8 Guidelines To Taking Panoramic Photos With Any Camera followed by 20 Great Stitched Panorama Examples, both of which garnered a fair amount of “But what do you use to create them?” questions.  While I have typically used commercial ($$$) software, a number of readers pointed out the virtues of a freeware program called hugin.

I’m all for using free software when available but at times it can be lacking compared to commercial counterparts.  I’m very pleased to report this is not the case with hugin.  Robust beyond my simple means, this program should be in every digital photographers virtual toolkit.  It’s easy to use, has a lot of room for manual modification and produces excellent panoramic images.

This post will center on the insanely simple task of creating a panorama from pictures shot with a Canon SD630 point and shoot camera.  While the program has many advanced features, I’d like to show just how easy it is to get started creating panoramas on your computer.  And one great thing about hugin is it works on Windows, Mac OSX and Linux!  Screen shots for this demonstration will be done on a PC.  Let’s get started!!

First, you’ll need to download hugin.  The download page can be found here.  After downloading, install the program according to your operating system’s instructions.  Upon starting up hugin (and clearing the hints pop-up) you will see the simplistic screen below. (click image for full size view)

Start page

It’s simple and ready to go out of the box.  Click “1. Load images….” and a file selection box will appear.  Simply click on the first photo in the panorama set, hold down <shift> and click on the last photo you’d like included.  Then click “Open” (I know, Windows is still backwards that way as you’re not really opening anything, just selecting).  Your images will be loaded and checked for lens type, camera type , focal length and focal length multiplier. 

Just a few steps left!! Click “2. Align….” and hugin will start a process to evaluate your images and find control points.  Control points are points found in an image that hugin can identify as mostly unique.  It uses these control points to match up photos.  In the 8 Guidelines post I mentioned an ideal overlap of 30%.  This is where that overlap comes into play.  The more overlap, the more control points hugin can match between the two images and correct for camera orientation or lens curvature.  This step is automated (and you can go back later to select or remove your own control points) and a new screen will pop up telling you how many points were found, like this:

finding control points

Depending on a number of factors such as computer speed, file sizes and location, number of images selected and available processor power, hugin will chug through your pictures one at a time.  At this point, if you have a lot of data to crunch, it might be a good time to go grab a bite to eat or get some other work done.  The panorama I am using as my example, which contains 12 images taken with a 6MP point and shoot, took about 15 minutes on a 2.8GHz Windows XP machine, for what that’s worth. 

When hugin is done, it will tell you how many points it can connect and if it thinks things will work well.  If there aren’t enough points, you may have to set some manually.  To do this, click on the “Control Points” tab, then select an image for each window (left and right) for which you want to match points.  If hugin has found some points already, you’ll be greeted with a very colorful window like this:

control points tab

Now, click on any point on the left image.  Hugin will zoom in allowing you to more precisely position the crosshairs on your target.  Once elected, hugin will attempt to find the same spot on the image in the right window, displaying its best guess.  If that guess is not good enough, manually click and drag the crosshairs to the desired spot.  This zoom gets down to a pixel by pixel locating and can be very precise.  Click the “Add” button on the bottom right of the screen and your new points are added (you an also check the box  for “auto add” if you find hugin is doing a good job of matching your selections and don’t wish to click “Add” each time).

It’s time to click back to the “Assistant” tab and let hugin create your panorama!!  Click on “3. Create panorama….” and after you tell hugin where to save the finished file, you’ll get another screen letting you know the status of the process.  It can have some crazy stuff as seen below:

doin' the stitich

And that’s all there is to it!! Ok, there’s actually one more step depending on the output of the file.  In the most basic mode, you will still need to crop the image.  Initial output will look something like this:

Uncropped

I personally like having more control over my crop and don’t mind this raw stitch look.  It’s fairly simple to import the image into my favorite photo editing software and crop to my liking.  It also gives options to change things up a bit as seen in the final image options below:

Crop1 crop2

And there you have it!  Panoramas made easy and free!  Hugin has a wealth of tools to help manipulate the stitch process including the ability to auto level for exposure and angles.  Luckily the folks who have worked on hugin have also put out a good users manual, located here, that will help explain the ins and outs of all the tabs and tools in hugin.

If you’re looking for further encouragement on what hugin can produce, check out the flickr tag hugin for over 14,000 examples!

Read more from our Post Production category

Peter West Carey leads photo tours and workshops in Nepal, Bhutan, Morocco, Seattle, Los Angeles and more. He is also the creator of 31 Days to Better Photography & 31 Days of Photography Experiments, web-based tutorials taking curious photographers on a fun ride through the basics of learning photography.

  • I used this wonderful software to create a panoramic photo of a deployment ceremony last fall at Ft. Riley, KS. I was not in the ideal position to shot a pano…I was at the left end of the entire formation, I didn’t have a tripod, and I had a very energetic 4 year-old tugging at me. Still, I managed to get a 9 shot series of the field, from the band on the left, to the Cavalry unit on the right. I threw it into the Hugin software and was highly pleased at how it stitched everything together. It found enough points to match everything; it was crisp, you can’t see any different stitch areas, either. And in the end, the angle I shot from was very unique and I have been able to sell this photo (I created a poster, with border and text) to several of the soldiers’ families who were there at the ceremony wishing their loved ones Godspeed.

  • Hugin is a great app, I have used it with sucess quite a few times, to think I used to do this all manually in photoshop.

  • How does this compare to bundled software, i.e. Canon’s photostitch? I find that using their program is way seamless… you don’t have to set your own points. However, it’s good to see free software being as robust as hugin though. The question is, will it replace my bundled software?

  • After reading your helpful post on how to take photos for a panorama I tried 3 bits of software: Hugin, DoubleTake and Calico (all for Mac). My write-up is here:

    http://knowit.co.nz/2009/05/on-choosing-panorama-software

    The upshot: I bought Calico yesterday.

    And, BTW: your tips on shooting images for a panorama were enormously helpful. Thank you.

    Cheers,

    Miraz

  • @YEAHmanh:
    Programs like Photostitch won’t blend the images together, and won’t handle lens distortion very well.

    Hugin for example uses another program called Enblend which results in much more seamless stitching and matching of slight exposure differences between the overlapping areas of the different images.

    As long as you’ve maintained a reasonable overlap when you shot the images, most of the time you shouldn’t have to create extra control points on top of the ones that Hugin automatically generates.

    Without a doubt, it should replace your bundled software. 😉

  • Here’s a much more in-depth tutorial I wrote about Hugin:

    http://www.ralree.com/2009/04/26/creating-beautiful-panoramas-easily-in-linux/

  • Andrew Seidl

    In addition to Enblend, there is a program called SmartBlend that does a pretty good job at taking care of parallax issues/slight movement. Newer versions of Enblend can also do this, but in my opinion SmartBlend is faster and gives slightly better results. Unfortunately it can be a bit of a pain to set up, especially with newer versions of Hugin (0.8). For the Linux and Mac users: it works great via WINE, though you might have some dll issues at first.

  • If I didn’t own Autopano Giga, I’d use Hugin, it’s the next best option

    but Autopano is insane (in a good way)

  • Reid

    I find creating manual control points gives better results, though it is a lot more work. You don’t need too many… something like 5-8 per image pair works great, and the software automatically fine-tunes the points to get a precise match.

    You can also add vertical and horizontal control lines — for example, there’s a number of verticals in the example panorama which didn’t come out vertical. You can do better. Perhaps your experiences with commercial panorama stitchers have lowered your expectations? 🙂

  • The freeware Autostitch also works very well for stitching multiple photos, and doesn’t require you to set control points – it figures out how to stitch the photos itself.

  • Will hughes

    Whats with the Windows dig?

    It’s hardly Windows’ fault the developer chose to use a File Open dialog (part of the standard controls) rather than a file selection dialog of some kind.

    Other than that – interesting looking app. I’ve used Autostitch before, but it often has problems.

  • For those looking for a Mac solution, you might check out Calico. It’s a $25-ish shareware application that works quite well.

  • Thanks for this article… but I am afraid that the final image looks horrible. I am pretty sure Hugin is capable of much better results, you forgot to add perspective correction to your workflow. And that is a sin, as Hugin is precisely one of the best tools to do perspective correction.

    There are a couple of tutorials on perspective correction on Hugin’s website; please, take a look on them. Basically, you just need to define some vertical and / or horizontal lines and re-optimize your project.

  • SebD

    @Martin
    Hugin also has an automatic control point generator. You don’t have to set control points manually if you don’t want to.

    @sandro
    For those looking for a mac solution : hugin too ;). Its $0-ish unless you want to make a donation 🙂

  • I kind of like the perspective distortion in the example photos, though it’s good to know that hugin can correct it when it’s not desired. I also happen to like the jagged edges of the “raw” output file. The thing that surprised me most is that it appears hugin can do both horizontal and vertical stitching at the same time with the same set of originals? That’s cool!

  • Peter Teuben

    A deliberately crooked approach can also give wonderful effects. Google’s picasa program (freely available for Mac, Linux and Windows) has an option to make a collage. This is like putting a bunch of pictures together like a puzzle.If you take your pictures deliberatly not exactly aligned with the horizon, it can give a wonderful effect. The collage method even has an option to create white borders, simulating as if you have the pictures layed out on a table and your ‘stitching’ them together.

  • Awesome! I have been hearing more and more about Hugin. I think I may try a panorama with it today!

  • Brandon Cage

    Great tutorial. I am eager to create my first panoramic. However, I do have a question. Given that this procedure will likely cause larger size photos (LxW) how do you print them? Other articles referenced above have rather parge print sizes. Can you pre-determine the size of the print you want before the stiching begins. Any light one can share would be great. This looks like fun and I may want to print one of my projects someday…thanks all.

  • Hugin 0.7 is also quite good at creating HDR photos. It uses enfuse just in the same way that it uses enblend for panorama stitching. The HDRs that come out are very realistically looking and IMO much better than the results I get from Photomatix or qtpfsgui

  • koushik

    Windows Live Photo Gallery has the option to create panoramas and it works like a charm!

  • DavidM

    Peter, Thank you for your helpful “nod” to a free/inexpensive application – with a good, concise guide. I am a new member & seek to learn more. I use Realviz Stitcher v 3.1 but it is mainly used to generate QuickTime cubic [3D] panoramas, after some “self-learning”. The concept of printing to A3/A4 [with edited background] appeals to me.
    I do also recognise constructive input from others on the “replies”.
    Best wishes to all on this site,
    David

  • Barry Bradfield

    I am a new user of this site and am enjoying it greatly. I have had a play with the Panorama program Hugin and my question is how do you print the panorama after you have completed it.
    Barry

  • Andrew Seidl

    Barry, there are (or at least were) a couple companies around that will print panoramas. Only one I can think of right now is ezprints (http://ezprints.com/Prints/panoramas/default.aspx). You choose the height that you want and the price is based off however long the panorama is.

    Otherwise you could either have multiple panoramas printed on a single poster and cut them out later (could be expensive), or cut the panorama into 4×6 pieces (or whatever size you want), have those printed, and put them together afterwards.

  • Barry and everyone, I’ll be posting a follow up to this post which will include some options for printing, either at home or through a commercial printer.

  • Brandon Cage

    Thanks a million Peter!!! To you as well Andrew seidl!!

Some Older Comments

  • Brandon Cage June 16, 2009 04:16 am

    Thanks a million Peter!!! To you as well Andrew seidl!!

  • Peter Carey June 16, 2009 03:21 am

    Barry and everyone, I'll be posting a follow up to this post which will include some options for printing, either at home or through a commercial printer.

  • Andrew Seidl June 16, 2009 02:53 am

    Barry, there are (or at least were) a couple companies around that will print panoramas. Only one I can think of right now is ezprints (http://ezprints.com/Prints/panoramas/default.aspx). You choose the height that you want and the price is based off however long the panorama is.

    Otherwise you could either have multiple panoramas printed on a single poster and cut them out later (could be expensive), or cut the panorama into 4x6 pieces (or whatever size you want), have those printed, and put them together afterwards.

  • Barry Bradfield June 15, 2009 11:05 pm

    I am a new user of this site and am enjoying it greatly. I have had a play with the Panorama program Hugin and my question is how do you print the panorama after you have completed it.
    Barry

  • DavidM June 13, 2009 12:38 am

    Peter, Thank you for your helpful "nod" to a free/inexpensive application - with a good, concise guide. I am a new member & seek to learn more. I use Realviz Stitcher v 3.1 but it is mainly used to generate QuickTime cubic [3D] panoramas, after some "self-learning". The concept of printing to A3/A4 [with edited background] appeals to me.
    I do also recognise constructive input from others on the "replies".
    Best wishes to all on this site,
    David

  • koushik June 12, 2009 04:08 pm

    Windows Live Photo Gallery has the option to create panoramas and it works like a charm!

  • Sybren A. Stüvel June 12, 2009 04:10 am

    Hugin 0.7 is also quite good at creating HDR photos. It uses enfuse just in the same way that it uses enblend for panorama stitching. The HDRs that come out are very realistically looking and IMO much better than the results I get from Photomatix or qtpfsgui

  • Brandon Cage June 12, 2009 02:10 am

    Great tutorial. I am eager to create my first panoramic. However, I do have a question. Given that this procedure will likely cause larger size photos (LxW) how do you print them? Other articles referenced above have rather parge print sizes. Can you pre-determine the size of the print you want before the stiching begins. Any light one can share would be great. This looks like fun and I may want to print one of my projects someday...thanks all.

  • Eric Mesa June 12, 2009 01:10 am

    Awesome! I have been hearing more and more about Hugin. I think I may try a panorama with it today!

  • Peter Teuben June 11, 2009 11:08 pm

    A deliberately crooked approach can also give wonderful effects. Google's picasa program (freely available for Mac, Linux and Windows) has an option to make a collage. This is like putting a bunch of pictures together like a puzzle.If you take your pictures deliberatly not exactly aligned with the horizon, it can give a wonderful effect. The collage method even has an option to create white borders, simulating as if you have the pictures layed out on a table and your 'stitching' them together.

  • Jeffrey Kontur June 11, 2009 10:48 pm

    I kind of like the perspective distortion in the example photos, though it's good to know that hugin can correct it when it's not desired. I also happen to like the jagged edges of the "raw" output file. The thing that surprised me most is that it appears hugin can do both horizontal and vertical stitching at the same time with the same set of originals? That's cool!

  • SebD June 11, 2009 06:28 pm

    @Martin
    Hugin also has an automatic control point generator. You don't have to set control points manually if you don't want to.

    @sandro
    For those looking for a mac solution : hugin too ;). Its $0-ish unless you want to make a donation :)

  • Eduardo Pérez June 11, 2009 05:36 pm

    Thanks for this article... but I am afraid that the final image looks horrible. I am pretty sure Hugin is capable of much better results, you forgot to add perspective correction to your workflow. And that is a sin, as Hugin is precisely one of the best tools to do perspective correction.

    There are a couple of tutorials on perspective correction on Hugin's website; please, take a look on them. Basically, you just need to define some vertical and / or horizontal lines and re-optimize your project.

  • Sandro June 11, 2009 02:53 pm

    For those looking for a Mac solution, you might check out Calico. It's a $25-ish shareware application that works quite well.

  • Will hughes June 11, 2009 01:38 pm

    Whats with the Windows dig?

    It's hardly Windows' fault the developer chose to use a File Open dialog (part of the standard controls) rather than a file selection dialog of some kind.

    Other than that - interesting looking app. I've used Autostitch before, but it often has problems.

  • Martin June 11, 2009 10:05 am

    The freeware Autostitch also works very well for stitching multiple photos, and doesn't require you to set control points - it figures out how to stitch the photos itself.

  • Reid June 11, 2009 08:04 am

    I find creating manual control points gives better results, though it is a lot more work. You don't need too many... something like 5-8 per image pair works great, and the software automatically fine-tunes the points to get a precise match.

    You can also add vertical and horizontal control lines -- for example, there's a number of verticals in the example panorama which didn't come out vertical. You can do better. Perhaps your experiences with commercial panorama stitchers have lowered your expectations? :)

  • Layo June 11, 2009 08:03 am

    If I didn't own Autopano Giga, I'd use Hugin, it's the next best option

    but Autopano is insane (in a good way)

  • Andrew Seidl June 11, 2009 07:58 am

    In addition to Enblend, there is a program called SmartBlend that does a pretty good job at taking care of parallax issues/slight movement. Newer versions of Enblend can also do this, but in my opinion SmartBlend is faster and gives slightly better results. Unfortunately it can be a bit of a pain to set up, especially with newer versions of Hugin (0.8). For the Linux and Mac users: it works great via WINE, though you might have some dll issues at first.

  • Hank June 11, 2009 07:46 am

    Here's a much more in-depth tutorial I wrote about Hugin:

    http://www.ralree.com/2009/04/26/creating-beautiful-panoramas-easily-in-linux/

  • Conor Boyd June 11, 2009 07:19 am

    @YEAHmanh:
    Programs like Photostitch won't blend the images together, and won't handle lens distortion very well.

    Hugin for example uses another program called Enblend which results in much more seamless stitching and matching of slight exposure differences between the overlapping areas of the different images.

    As long as you've maintained a reasonable overlap when you shot the images, most of the time you shouldn't have to create extra control points on top of the ones that Hugin automatically generates.

    Without a doubt, it should replace your bundled software. ;-)

  • Miraz Jordan June 11, 2009 07:03 am

    After reading your helpful post on how to take photos for a panorama I tried 3 bits of software: Hugin, DoubleTake and Calico (all for Mac). My write-up is here:

    http://knowit.co.nz/2009/05/on-choosing-panorama-software

    The upshot: I bought Calico yesterday.

    And, BTW: your tips on shooting images for a panorama were enormously helpful. Thank you.

    Cheers,

    Miraz

  • YEAHmanh June 11, 2009 06:54 am

    How does this compare to bundled software, i.e. Canon's photostitch? I find that using their program is way seamless... you don't have to set your own points. However, it's good to see free software being as robust as hugin though. The question is, will it replace my bundled software?

  • tyler June 11, 2009 06:52 am

    Hugin is a great app, I have used it with sucess quite a few times, to think I used to do this all manually in photoshop.

  • Linda June 11, 2009 06:25 am

    I used this wonderful software to create a panoramic photo of a deployment ceremony last fall at Ft. Riley, KS. I was not in the ideal position to shot a pano...I was at the left end of the entire formation, I didn't have a tripod, and I had a very energetic 4 year-old tugging at me. Still, I managed to get a 9 shot series of the field, from the band on the left, to the Cavalry unit on the right. I threw it into the Hugin software and was highly pleased at how it stitched everything together. It found enough points to match everything; it was crisp, you can't see any different stitch areas, either. And in the end, the angle I shot from was very unique and I have been able to sell this photo (I created a poster, with border and text) to several of the soldiers' families who were there at the ceremony wishing their loved ones Godspeed.

Join Our Email Newsletter

Thanks for subscribing!


DPS offers a free weekly newsletter with: 
1. new photography tutorials and tips
2. latest photography assignments
3. photo competitions and prizes

Enter your email below to subscribe.
Email:
 
 
Get DAILY free tips, news and reviews via our RSS feed