In The Name of Science

Here's an interesting (to me, anyway) study shot.  It's a HDR panorama.  A panorama is a photograph that has been stitched together from multiple photos resulting in an extremely large, wide-angle image.  The stitching is done by software which analyzes the images, identifies duplicate regions between images (you have to shoot the individual images with some overlap), and attempts to combine the images as seamlessly as possible into a single image.  It's not a perfect process; there are strange optical distortion artifacts from the slightly changed perspective of the lens as you pan the camera (check out the catwalk in the photo!).  And the stitching process can be imperfect as well.  But a good panoramic photographer knows how to take source images that will optimize the process and minimize problems.  I am not a good, or even competent, panoramic photographer.

What's interesting to me is employing both panorama stitching and HDR in a single photo since they both combine multiple images into a single one.  Panoramas combine photos with a different subject and the same exposure to extend the viewing area, and HDR combines photos with the same subject and different exposures to extend the dynamic range.   How do you incorporate both techniques into a single photo?

I'll talk about that after the jump...

First, a bit about the actual shooting.  I used the 18mm focal length on my zoom lens and oriented the camera vertically on the tripod (i.e. portrait orientation) in order to get the widest vertical view possible to go along with the extreme wide horizontal view that would result from the panorama.  I panned the camera 30 degrees for each component of the panorama, spanning a full 180 degrees.  Why 30 degrees?  I chose 30 because it was a nice round number that would be easy to dial up on my tripod and it would result in sufficient overlap in the images to help the panorama software do it's thing.   I guesstimate about 8 degrees of overlap between adjacent images.

Now, since this was also an HDR shot, each angle for the panorama required 3 photos with bracketed exposures.  So in total, the final image was composed of 21 component photos!
  • 3 photos (-2EV, 0EV, +2EV) with camera oriented at 0 degrees
  • 3 photos (-2EV, 0EV, +2EV) with camera oriented at 30 degrees
  • 3 photos (-2EV, 0EV, +2EV) with camera oriented at 60 degrees
  • 3 photos (-2EV, 0EV, +2EV) with camera oriented at 90 degrees
  • 3 photos (-2EV, 0EV, +2EV) with camera oriented at 120 degrees
  • 3 photos (-2EV, 0EV, +2EV) with camera oriented at 150 degrees
  • 3 photos (-2EV, 0EV, +2EV) with camera oriented at 180 degrees

In order to make the panorama stitch as seamless as possible, you have to keep your camera settings (focus, shutter speed, aperture, ISO) consistent for each component image.  This is complicated when it is an HDR shot, which by definition varies the shutter speed.  The trick is to use exactly the same set of shutter speeds for each bracketed set, and keep all the other settings identical.  I used manual exposure mode to make sure the settings stayed where I set them.  Getting good exposure levels for all the photos is a little tricky because the camera pointed at, say, the kitchen would normally require a different exposure than pointed at the living room.  The way I approached this was to first take meter readings (using the camera) at each of the 30 degree points, and then select exposure settings that I thought would be the best compromise of all the readings.  There would be some regions that were over- or under-exposed in the final image, but I wanted to get the optimal overall exposure for the entire image.  Plus, I felt like the HDR process would probably go a long way in reducing or even eliminating the effects of any over- or under-exposed regions (and it turns out I was right on that).

Another question I wrestled with in planning this thing out was which process to perform first -- the panorama stitching, or the HDR processing?  I went with the HDR since, it seemed to me that going the other way would be more problematic since I would have to stitch all the -2EV photos, then all the 0EV photos, and finally all the +2EV photos.  These stitched images would then have to be combined via HDR and if the stitches weren't identical (i.e. if the software made different decisions about how to do the stitch) they most likely wouldn't merge well into an HDR image.  So I went the other way, doing the HDR processing first, and then stitching the HDR images together into a panorama.  In order to do this you have to make sure that the HDR processing is identical for each bracketed set of photos so that the stitch is seamless.  Fortunately this is easy to do with Photomatix since it allows you to save HDR processing settings and even batch process multiple photo series.  So first I selected the bracketed series which seemed the most "representative" of the exposure level of the entire image and I imported those into Photomatix.  When I had settings that I liked for the HDR processing, I saved them and then batch-processed all the photos using those settings.  When the smoke cleared, I had reduced the original 21 images down to 7 HDR images.

The 7 HDR images represent one for each angle used in the panorama.  These 7 images were combined using Hugin, an open source panorama stitcher.  And this is where things got a whole lot less deliberate in my actions.  I chose Hugin because it was free and my Google searches seemed to show a lot of loyal users.  I don't have any particular affinity for the software, but it does seem very sophisticated albeit complicated.  I just used the default settings for everything as I didn't want to spend a lot of time figuring out all the options for what was supposed to be a Will-This-Even-Work experiment.  Well, it did work, and when I saw the resulting image I was very pleased.  BTW, the resulting image is huge -- a 32 megapixel image and the TIFF file is almost 70MB!  You could make a freakin' bus decal from it.

But on closer inspection, I can see that if I want to get serious about panoramas, I'm going to have to invest the time into learning Hugin  (or whatever tool I settle on because I can't help but wonder if there aren't more intuitive options).  Although it makes a good first impression, there are several places in my photo where the stitching is far from seamless.  One glaringly obvious one is the right-hand side of the television set.  (For a photogeek version of Where's Waldo, can you spot the others?)  There are even a couple of M. C. Esher-like optical illusions!  I think these problems can probably be fixed or at least minimized by actually knowing how to use the software (the hell you say!?) and/or planning out the shoot better in order to ensure that seams aren't going to be placed on key objects in the photo.  And it seems to me that doing a panorama of a relatively small interior space exaggerates the perspective differences between the component shots and makes for a much more problematic stitch than, say, a distant landscape.  But all in all, it was a very successful experiment.  I look forward to fooling around with this some more!