An Introduction to Hugin – My Favorite Photo Stitching Tool

Desert Bar

Here’s a post that is a bit different for this blog. I don’t typically post about photography, but in this case it’s more about image manipulation. Photography is one of my hobbies, and especially panoramic photography. Some of the image straightening techniques explored here can also be used to prepare textures for use in 3D, so it’s still relatively relevant to this blog.

Introduction

I’ve been using a tool called Hugin (I believe it’s pronounced hyoo-gin) since 2007 when I shot one of my first panoramas; the USS Midway here in San Diego. Since capturing that shot, and being amazed at the power of Hugin’s toolchain (more on that later) I’ve used its basic features and the built in wizard to stitch the occasional set of photos. More recently I purchased a fisheye lens for my Micro Four Thirds camera and discovered a whole new set of features that Hugin has to offer.

Before moving on, it’s important to note that Hugin is free, open-source software built by a team of wonderful folks who have created quite possibly; the best panorama stitching and manipulation tool out there. In addition, almost everything I’ve learned about Hugin is documented in the built-in help or the tutorial page on Hugin’s site. Many of the demos and features I’m going to explore were inspired by the tutorials on the aforementioned page.

The Goal of These Videos

This post is a rather long one, and contains a lot of video. My goal is to get you to the point where you can download and install Hugin, stitch your first panorama (I’ve provided some images), and see a few of Hugin’s pixel-bending abilities when it’s used on fisheye photos. If after seeing how easy it can be to stitch photos in Hugin you don’t feel to go out and shoot a collection of photos and try it yourself, then I may have failed.

Overview and Stitching 3 Photos

This first video is an overview of the Hugin user interface, and an example of how to use the alignment and stitching wizard. We start off by stitching three photos of a city street corner, taken with my 20mm (40mm equivalent) lens and Hugin basically does everything for us. Once it’s done, I do my best to explain what Hugin actually did when it ran all of those command-line programs automatically for us.

Here are the source images for this three image stitch: East Village Panorama Images

De-Fishing an Image and Straightening a Pattern

The second video handles a less well known use of Hugin, and it involves loading a single image and distorting it. Hugin has an amazing model for handling lens distortions and can make a fisheye image straight again, or a series of images appear to have originated from a fisheye or ultra wide-angle lens. In addition, we will also look at straightening an image that appears to be straight, but is not.

Here are the source images for the brick wall exercise: Brick Wall Images. You can also try straightening this house using the horizontal and vertical lines technique that we used on the brick wall.

De-Fishing an Image With Different Projections

Hugin can help you straighten and De-Fish images, but in doing so it also allows you to apply different projections to your images. While this feature is likely in existence for panorama mapping, it can create some very cool looking images if used correctly.

Here is the source image for this exercise (and a bonus image): Mural Fisheye

Here are some of the different projections from the last exercise, and the panorama of The Desert Bar in Arizona (created with Hugin).

I plan to create more Hugin tutorials, and I have some challenging ideas lined up. One of my ideas is based on this Hugin tutorial, and I’ve written a story about it on 500px. I’m looking forward to the response from this post, and if you have any feedback for me then please leave a comment and let me know.

21 thoughts on “An Introduction to Hugin – My Favorite Photo Stitching Tool”

  1. Thanks for the great information. I don’t actually like to turn my fisheye
    shots rectilinear as it crops so much of the image, however using the other
    projections as you described works really well, particularly “Thoby
    Projection”.

  2. Hey, I haven’t watched your other 2 videos on Hugin yet so apologies if
    it’s covered but I’m wondering how you can tell it not to do anything about
    exposure except on the stitch zones. I have a panorama of the night sky
    from a beach that looks ok coming out of PTGUI where the colour is close to
    the individual images but I wanted to try the interface of Hugin for
    straightening the horizon and the very convenient crop feature but it seems
    to want to always unecessarily change the exposure/colour of the whole
    image to lighter. I can’t work out how to tell it not to try to be too
    smart!

  3. Thanks much for the very helpful video tutorials — the app is fairly inscrutable to me but your clear examples have helped me make some sense out of Hugin. Thanks again!

  4. Thank you for this most welcome tutorial. I look forward to reading additional materials you may publish on the subject of panoramic photography.

    Respectfully,

    Jocelynne Littlebear

Leave a Reply

Your email address will not be published. Required fields are marked *