Assembling Panoramic Photos in Stitcher

By Peet Simard
Adapted from Assembling Panoramic Photos: A Designer's Notebook (O'Reilly)

Dateline: June 17, 2005
Versions: Photoshop CS, Debarrelizer plugin, Stitcher 4.01, iView MediaPro 2

More Digital Photography tips
Discuss this in the Digital Photography forum

When taking photographs with regular cameras, I’ve often been frustrated by their narrow field of view. Since I didn’t want to have to use a swing-lens camera like a Noblex, I turned to panoramic assembly techniques to create this picture, which is part of a series of photographs I took of Paris at dusk.

I’ve always wanted to photograph this intersection of two of Paris’s great Haussman-era boulevards, especially from a low angle and with a field of about 200º. But I couldn’t do it, neither with a Hasselblad XPan (no perspective correction lens; field of view too narrow) nor a Sinar (no wide-angle lens wide enough). I tried and failed with a 15mm fisheye lens on my Canon 1Ds: I used the Imaging Factory’s Debarrelizer plugin to turn the resulting picture into a horizontal, but the edges were too stretched and the picture wasn’t sharp enough to blow up. (The photograph had to be printed in very large format for an exhibition).

To solve the problem, I turned to assembly techniques. RealViz’s Stitcher program is excellent, because it can assemble low-angle pictures shot with a wide-angle lens while straightening perspectives and correcting optical distortion. (Mac and Windows demo versions are available for download on the RealViz site.)

Panoramic assembly completes a landscape photographer’s panoply of
shooting techniques, and does so without requiring awkward or costly equiment.

Stage 1: Taking the Pictures
I started by scouting the best location for my camera, deciding on the focal length, and choosing the hour when the light would be at its most magical. I settled on 20 minutes before total darkness in late March, right after the streetlights came on. I set up my tripod, adjusted the panoramic head so the horizontal rotation axis was level, clamped the camera on, set it in portrait mode, and framed the scene.

To take the photos, I tilted the camera about 20º upward. I left plenty of empty space above the building in the center of my scene, knowing that when Stitcher straightened the perspectives, it would chop the tops off the low-angle pictures in the center of the series. I set the focal length at 19mm to completely fill the 24 x 36mm frame.

I made sure that the ball head was set so the camera would rotate around the lens entry point. Using the click stops on the pan head’s rotation ring, I overlapped the pictures by about 20%.

Settings for the shots:

  • Exposure: 3 seconds at f-9.0, ISO 100
  • White balance: tungsten
  • Format: RAW with simultaneous small JPEGs

I then measured the light with a 1º spot meter. As often occurs in night photography, parts of the building facades were overexposed. In order to have a choice of material to work with, you can take one “normal” shot and a second one underexposed by about two f-stops. Later, you can put them on separate layers in Photoshop and use a layer mask to integrate the shot with the highlights with one that was properly exposed.

In this case, I didn’t bother. The hot spots on the main building were fairly small, and they were surrounded by cornices and other details that would provide enough texture. Besides, night was falling and I didn’t have the time.

Stage 2: Preparing and Loading the Files
I loaded the source files into iView MediaPro, a media management program, to sort the photos. I had to shoot each picture several times, and often out of sequence, because whenever a car drove by, its headlights swept across the scene, ruining my shot.

Once I had chosen a set of pictures, I copied the files, arranged them in montage order from left to right in a new folder, and renamed them so they would appear in the proper sequence for Stitcher.

To get a quick preview of the assembly, I started by working with the 8 MB JPEG pictures that my camera produces at the same time as the 32 MB RAW files. I saved them in TIFF format since I would probably have to modify them a few times. (JPEGs degrade after being saved repeatedly.)

In the photos at each end of the series, the sky looked much darker than in the middle shots. That’s because the narrow building in the center was due west of my shooting position, and I was taking pictures at 7:55 in the evening. It would be interesting to see how Stitcher managed to balance the gaps before I had to intervene with Photoshop.

I closed Photoshop to free up memory and then launched Stitcher, giving it 80% of available RAM—about 750 MB. I then moved the images directly from iView into Stitcher, where they appeared in the Image Strip window. I started the assembly by dragging a picture of the central building into Stitcher’s workspace.

Assembling Panoramic Photos in Stitcher

Stage 3: Calibration
I dragged the second image of the central building next to the first one and matched them as best I could, using the image rotation function (Display > Rotation).

Before I assembled these first two images (by clicking the Stitch icon), the program calculated focal length and corrected optical distortion for all the pictures in the project. This makes an assembly much easier when a short focal length has been used, and in this case, it was essential.

I then chose Tools > High Distortion > Calibrate, and noted the settings for this focal length with Tools > High Distortion > Register the Lens Parameters. You can reuse these settings any time you use your lens at that focal length, or when you need to redo the assembly.

Straightening the horizon line is much easier if you do it at this stage than if you have a complete row of pictures. Just press the A key. Later, if some of the buildings are out of kilter, you can straighten them out with the Align the Panorama command.

I assembled the rest of the photos the same way. To avoid having to rotate each picture as I added it, I applied the Tools > Go Back to Defined Horizon command (Command-H) before dragging the new picture into the workspace. The central photograph—the one that showed all of the main building—wasn’t needed for the assembly, so I omitted it.

Stage 5: Retouching
Before proceeding further, I thought it might be useful to take a quick initial peek at the montage. In the Stitching Window, the program displays the assembly projected on the inside of a sphere. If the montage is wider than 120º—as was the case here—you can’t get a complete planar view in the window.

This first look revealed two problems. First, the traffic light was both red and green, because it changed between two of the stitched photos, so I used the Stencil tool to eliminate the green light. Second, there was a lot of color variation in the sky; to smooth this out, I raised the equalization coefficient to the maximum (Preferences > Render > Equalization > 1). To apply it, I selected Render > Equalize All Images.

The Stencil Tool
Stitcher’s new Stencil tool acts on the layer masks of two overlapping images to eliminate elements that may have moved between the shots. You can also use it to erase “ghosts” when an assembly isn’t perfectly aligned. Simply choose an image from the toolbar or the Stitching Window, select Tools > Stencil, and a dialog box appears. Draw a bounding box around the area you want to eliminate or retain, as the case may be.

Stitcher can output the render in Photoshop’s PSD format with layers, so you can use Photoshop to fine tune your creation, working directly on the layer masks that Stitcher creates.

Assembling Panoramic Photos in Stitcher

Stage 5: Rendering the Picture
I created this first render in Stitcher at 100% of the screen height (760 pixels) in Photoshop format, using the Cylindrical projection. I tried the Spherical projection (see below) but it made the central building look too squat.

With the Cylindrical projection, the building was stretched vertically a bit, but I thought it looked more elegant. I could have gotten nice straight perspective lines if I had taken the photos with a perspective correction lens, but Stitcher can’t assemble that kind of picture. After going to Render > Set Render Area, I selected the render area and its size in pixels.

Because Stitcher couldn’t equalize the images as they were, I had to open and modify them in Photoshop. But I first saved this version of my project.

With all the source images open in Photoshop, I selected the sky with the Magic Wand tool and modified its edges on an adjustment layer set in Luminosity mode so the color balance wouldn’t be too uneven. I darkened the sky in the center images a bit and lightened it in others. I saved these images with their adjustment layers intact in another folder. The images were then flattened and again saved in the source folder.

Back in Stitcher, the program integrated these modified images back into the project. Once that was done, I equalized the colors (Menu > Toolbar > Equalize) for a smoother rendering.

Stage 6: Eliminating “Ghost” Images
In Photoshop I looked at the pictures at 100% to see if there were blurry areas at the seams where two linked layers are masked. If there are, you can activate the appropriate layer mask that Stitcher created for the two overlapping layers and paint on it—in white or black—to erase the ghost image on the misaligned layer.

Adjusting Density and Color Balance
In Photoshop, I then created a new layer in Overlay mode with an opacity of 100% and filled it with 50% gray. (Select Edit > Fill from the Use dropdown, select 50% Gray, and select Normal from the Mode dropdown). Painting on this layer with black subtly increases density; painting with white increases brightness. Together, they let me blur some uneven areas in the sky and re-emphasize the buildings.

I applied a Curves adjustment layer to remove a few red spots and add some contrast. I also toned down the brightness of the red traffic light by selecting it and using Images > Adjustments > Hue/Saturation.

The Debarrelizer Plug-in
I first saved one version of the panorama with all its layers, then flattened them and applied the Debarrelizer plug-in to reduce the bulge that is typical with this kind of assembly. The operation clips the edge of the pictures a little, which is why I gave myself plenty of margin at both ends.

When I re-cropped the picture to match my original vision, the photograph was finally finished. The end result was a file assembled from six images that measured 3969 x 10713 pixels (122 MB at 8 bits), or 16.5 by 44.5 in. (42 x 113 cm) at 240 dpi without interpolation.

Click to enlarge

Get the free newsletter in your mailbox each week to ensure you don't miss the next Digital Photography article. Click here to subscribe.

This article is adapted from Assembling Panoramic Photos: A Designer's Notebook (O'Reilly) and is reprinted here by permission. Copyright ©2005, O'Reilly, all rights reserved.