Stitching Very Large Panoramas and Mosaics

222 Megapixel Machu Picchu

With new fast computers and cheap memory card storage, capturing and stitching ultra large photographic images has become a snap. In order to get the best possible results you need to plan the image, even before pressing the shutter on your camera. Keep in mind, even though a lot can be post-processed today, it is often faster and yields better results to plan your pictures while you are taking them.

In this short tutorial I am going to show you the steps I used to create my 222 Megapixel Machu Picchu Image. Machu Picchu is a very special travel destination in Peru and I knew that I might never see it again. So I planned to take an ultra high-resolution image. I still go back to that page now and then and zoom around just for fun.

Capturing the Source Images

Even though the tools I use have the capability to automatically adjust exposure and color (white balance) of the source images to yields smooth transitions, it is best to take care of this during the capture process. Capturing a large mosaic (multi row panorama) is not an easy task. The exposure throughout the scene will vary. This has to be taken care of by setting the camera on manual exposure. I usually take several readings across the scene to determine a common average and use these settings.

Secondly you will significantly expand your field of view. Let me explain what’s going on here:

As you may know, different sensor sizes yield different depth of field with the same aperture. The depth of field determines how much is in focus on your picture (actually how deep the focus goes). A camera with a small sensor yields a much greater depth of field at the same aperture setting. Since we are going to break the image down into small pieces that we photograph, we effectively increase the sensor of our image (a lot).

Even though the Machu Picchu Image has a Wide Angle Field of View, I shot it with a telephoto lens. It is important to understand this, so here is another explanation (bear with me)…

Telephoto Lenses are known to compress space and thus depth of field. If I photograph a person in front of a Mountain, I can either use a wide-angle lens and stand close to the person or I can take a zoom lens and stand further away. In the latter case, the mountain will look much bigger. The person will be about the same size (since I stepped away) but in relation to the mountain, my steps hardly make a difference. So the mountain becomes bigger the person doesn’t. Usually it is said, that the telephoto lens “compresses” the space between the mountain and the person. The focal plane of a telephoto lens is much more shallow (less depth of field). This effect is well known to large format photographers, who have larger Film or Digital Sensors and thus need longer lenses.

What Does All This Mean?

Since you will be using a telephoto lens, you need to increase your aperture setting in order to get everything “in focus”. You are creating a virtual very large sensor with a very shallow depth of field. Even with these settings your depth of field will be limited (more than you are used to). This somewhat limits what can be photographed.

If you have any objects in the foreground, you will also have to deal with parallax errors. Parallax errors are caused if the foreground object changes its position in relation to the background. Hold your finger in front of one eye and close the other eye. Now move your head slightly and see how it changes its position in respect to the background. If you turn your camera to take multiple shots, you will experience a similar movement. Parallax errors can be hard to come by and should be avoided (Smartblend can help you somewhat – see Assembling section)

Usually I use a tripod, because this allows me to use longer exposures (required for a smaller aperture – larger aperture number). It is also necessary for large mosaics in order to get your rows straight. If you have a panoramic head (expensive) you have fewer (or no) problems with parallax errors. A panoramic head lets you calibrate how your camera swivels around its optical focal plane (thus avoiding parallax).

Parallax Error Example

In this picture above I am trying to illustrate this effect. Lets assume we take the first picture (left side) and then rotate the camera to the right. If the camera rotates around the optical center (middle), two objects will maintain their relative position on the sensor. If the camera however rotates around a point that is slightly off, the two objects will now appear seperate from each other (hence there will be a difference in the overlap region of the two images). Please note, that even though it may look different, the relative position of the two dots in each of the graphs never changed. The focal point changes with each lens and zoom. I have exaggerated the effect for illustrative purposes. If you have no foreground objects, you don’t need to worry about this (I shoot many panoramics handheld).

So let’s recap quickly…

  • Use manual settings, so all images are exposed equally and can be put together without seams.
  • Either shoot RAW or don’t use automatic white balance (so all images are equal). With RAW you can adjust your white balance later and don’t have to worry so much about “messing it up” in the field. I recommend this option if your camera supports it.
  • Use large aperture and consider your expansion of field of view.
  • Use a tripod and plan your shot ahead (how many rows and columns do you want to shoot).
  • Bring plenty of storage and if you really care about the picture take more than one panorama (mosaic). Sometimes you have less then ideal overlap, making the stitching job hard.
  • You should plan between 15-20% overlap (so the tools can figure out how to put the images together).

Assembling the Images

I have already written a tutorial about the stitching process. Since I wrote this tutorial a few things have changed. In this section I am going to give just a very brief overview and I will explain some of the differences due to tool changes.

For my stitching job I usually use the free Panorama Tools Library. At first I was a bit intimidated by the tools, until I found some really excellent front-ends (graphical user interfaces). These tools have come a very long way since I first used them, and in many respects far outperform their commercial counterparts.

One of these counterparts is RealViZ Stitcher. From what I can gather it is not worth the hefty price. I am also against their aggressive patent policy. After adopting and patenting some of the techniques already used by the free panorama tools library, legal pressure has forced the panorama tools website offline. Nevertheless all tools can still be found.

One of the things PTAssembler does much better is the incorporation of the Autopano plugin. With this plugin, it is not necessary to tell the tool how to assemble the images. Simply press a button, and it will automatically find out what image goes where.

Fortunately you can still use the manual mode of setting control points. If you have a large sky area, a large area of water or anything without many features, the tool may have a hard time figuring things out.

Stitching consists of many different processes:

  1. Finding relationships between the images.
  2. Finding control points (same points on two different images that overlap).
  3. Warping the images (Since your sensor is flat, you actually capture a spherical projection of the world onto a flat surface, this means the images won’t fit together unless they are inversely distorted).
  4. Aligning the images and Optimizing the alignment.
  5. Blending.

The process of blending is one of the most important steps. In a perfectly blended Image, you will not see where the pictures overlap anymore (the Machu Picchu Image is blended very well).

For the longest time I have been using Enblend (Blending Plugin for PTAssembler). However I have kept a close eye on Smartblend, a new blending plugin. Ever since Smartblend supports 16-bit TIFF and caching, I have switched my workflow over to Smartlbend. As the name suggests, it is quite a smart tool that can take care of parallax error (to some extend) or duplicates (a person that moved from one picture to another and is in your image twice). Smartblend simply discards the information of one of the pictures before putting them together.

A meaningful caching strategy is very important. While I was stitching the Machu Picchu Image with 16-bit TIFF files, I have had an Enblend Cache of around 30GB. The final image was just under 2GB (zip compressed TIFF).

I took a second picture of Machu Picchu that day with even larger resolution (around 300 Megapixel). However it had some stitching errors (person moving that wasn’t even visible to the naked eye from the distance) and it was larger than 2GB. Previously Photoshop CS2 was limited to 2GB file size for TIFF. I believe this restriction has been removed and Smartblend should be able to take care of the errors.

The stitching process takes approximately 2-3 days on my somewhat outdated 1.6GHz 1GB machine (due to heavy swapping). I use multiple hard drive caching.

Conclusion

I hope I have gotten you interested in trying to push the limits of resolution to new heights. Hopefully you have enjoyed reading the article and maybe it was of some use to you.

I also wish to thank Brian for publishing the article on his fantastic website that I enjoy reading.

Andre Gunther

Share This:

4 comments to Stitching Very Large Panoramas and Mosaics

  • […] a panoramic HDR image taken at night, which doesn’t sound so difficult. I certainly didn’t think it […]

  • […] since I found GigaPan and my friend Andre Gunther wrote his guest article on stitching large panoramas, I’ve wanted to do one.  While in Australia, I found a good subject: The Sydney night […]

  • Richard Palmer (Apapane)

    Brian,

    Did you even look at gigapan.org before posting your image and web site? The image is very nice, and I commend you for it, but your “grueling details” are a bit outdated. A 1.39 gigapixel image is now relatively small. If you go to the gigapan.org web site and sort by size, you’ll find many panoramas (gigapans, as they are called) greater than 1 gigapixel in size. Except for the obvious computer generated images, these gigapans were taken with a GigaPan robotic camera mount and stitched with the GigaPan stitcher, or, on rare occassion, AutoPano Giga. Several of us “Gigapanners” have taken panoramas with more than 1500 individual frames. Of course, with any image that size taken over an extended period of time, any movement can be captured in the sequence of frames, especially when using a long focal length.

    In the Most Popular category, my Hanauma Bay gigapan (5.63 gigapixels) is second only to the Barack Obama inauguration. You can detect movement in both panoramas, but especially in the Hanauma Bay shot, due to moving people, wind, waves, moving clouds, etc.

    I hope you read up on GigaPan and the Global Connection Project based out of Carnegie Mellon University, Pittsburgh, Pennsylvania, and decide to join the endeavor!

    Aloha from Honolulu,
    Richard

  • I believe you meant to post this comment against the latest article: http://www.backgroundexposure.com/blog/index.php/2009/07/11/how-to-create-gigapixel-images/

    I for one am very impressed that a machine took such a large photo as you describe. It must have been an awful lot of work for you to touch a few buttons.

    You should try, sometime, taking a photo in challenging conditions, such as at night, when you actually have to put some effort into making the raw data look anything like what the eye would have seen at the time.

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>