Merge multiple photos into a panorama

18.02.2011
A panoramic photo, printed and framed, can be the ultimate memory of a far-flung journey or can simply re-create something interesting that you see every day. All you need is a digital camera and some creative vision. Here's how to make panoramas using Adobe Photoshop CS4 or CS5 or Photoshop Elements 8 or 9. If you don't have any of those programs, you can also create panoramic photos with shareware such as DoubleTake ($25) or freeware like Hugin.

Start with a photo series

The most important step in creating a panoramic image is taking good set of photos (usually three to six images) shot with your panorama in mind. Among other things, each photo must overlap with its neighboring photos, and it should also match its neighbors in both exposure and white balance. Try your best to adhere to these guidelines:

1. Use a tripod. The completed panoramic image will look better if each picture is taken from a consistent and level position, and the best way to ensure this is to use a tripod. Take a photo, nudge the camera to the left (or right), and repeat.

2. Use a consistent zoom level. It's very important to keep the same focal length from photo to photo, so do not adjust the camera's zoom between shots.

3. Use a consistent white balance. Unless programmed otherwise, most cameras are configured to use automatic white balance. The trouble is that depending on what the camera sees, the white balance can change from photo to photo and cause exposure and color variations. Set your camera's white balance to daylight (or whatever is appropriate).

4. Use a consistent exposure. Almost all cameras are configured to automatically adjust exposure of the photo depending on lighting conditions, and so as you move the camera from left to right, it may adjust the exposure each time. Photoshop can correct minor differences in exposure, but it will struggle with broader variations. You can avoid this by using the camera in manual mode and locking down both the aperture and exposure.

5. Use manual focus. In normal circumstances your camera is probably set to auto-focus, which is fine if everything you're photographing is 50 feet (or further) from you. However, if you're taking photos where there may be foreground elements, the camera may lock its focus to those objects instead, resulting in a blurred background. You can avoid this by using manual focus, or alternatively, setting the focal method to Landscape (available on many point and shoot cameras).

6. Overlap your photos. In order for Photomerge to determine where a photo belongs in the panorama, you must have generous overlap in each of your photos. So if there's a street sign at the far right of one photo, it should be fully visible on the left side of the next photo. Adobe recommends a 40 percent overlap between each photo for best results.

Construct your panorama

Once you've chosen your photos and placed them together in a folder, constructing the panorama is quite easy. All the heavy lifting is done by an extension called Photomerge, which is essentially identical across Photoshop CS4 and CS5 and Photoshop Elements versions 8 and 9 (except for one additional option provided within Elements). In Photoshop, choose File -> Automate -> Photomerge; in Photoshop Elements, choose File -> New -> Photomerge Panorama. A Photomerge window will appear, and you'll see two key sections: Layout and Source Files. Layout lets you select from several different methods of blending the panorama together; of these, I recommend Automatic and Cylindrical. However, let's take a closer look at what you can expect from each layout method:

1. Automatic. This setting automatically selects the best of the first three methods; typically Perspective, that will result in the best-looking panoramic image from your pictures.

2. Perspective. This option blends photos together with perspective but without curvature. The center image is used as the focal point and neighboring images are bent outwards, which results in somewhat of a bow-tie effect with a compressed center and wide edges. It may look a little odd at first, but it's visually consistent with what you'd expect from a very wide-angle camera lens.

3. Cylindrical. This setting dramatically reduces the bow-tie effect by blending together photos with curvature. In this case the curvature is cylindrical, bowing out at the center and tapering off towards the sides. (Curvature cancels out the bow-tie effect.) The resulting panorama is usually excellent, lacking the typical left- and right-distortion you see with a wide-angle camera lens. On the other hand, it can also have the opposite problem--the panorama may seem too bowed in the middle.

4. Spherical. This option also blends photos with curvature, but unlike the cylindrical option, the curvature here is spherical. Photos are blended together as though they're being carefully pasted onto a beach ball, making this a perfect option for merging photos of the night sky (or any collection of photos that extend in two dimensions). Unfortunately, the Spherical option usually results in the obvious curvature of straight lines, and as a result it's not ideal for wide, flat scenes.

5. Collage. This setting scales, rotates, and blends photos together, but does not apply any perspective or curvature. Panoramas created with this option have no obvious distortion at the edges, but you'll also notice areas where the blends don't quite line up. Use this option with caution.

6. Reposition. This setting simply positions photos so that they're in roughly the right location, without scaling or rotation. This restriction makes it much harder to line up every element in the photos, so errors are even more apparent than with Collage. Consider this option only for open vistas and other scenes where finer details (signage and power lines, for example) aren't a factor.

7. Interactive Layout. (Default in Elements, downloadable for CS4/CS5). This setting allows you to have a measure of control in the construction of the panorama. Once the application has assembled a rough composite, you'll be able to choose between two layout methods: Reposition Only and Perspective. Reposition Only is notable because it actually blends photos together with greater accuracy than the previously mentioned Collage and Reposition options. Perspective offers a new wrinkle: the ability to manually set the vanishing point. Choose the vanishing point tool and click the canvas in the desired spot, and within seconds the image will warp around that point. And with either method, you also have the option to rotate any photo in the panorama (though you will likely never need to use this option).

The completed panorama can be breathtaking, but you'll need to crop it tighter to eliminate the irregular edge.

Source, predictably, lets you select the photos to use in your panorama. Choose Folder from the Use pop-up menu and then click Browse. Choose the Panorama folder you created and click Open; you'll then see the list of photos appear in the source field. Just below the field, you'll also notice three options: Blend Images Together, Vignette Removal, and Geometric Distortion Correction. The first option should always be checked, but you'll only need to invoke the other options if your photos are prone to dark corners (vignetting) or warping at the edges (which can happen at the widest angle of some camera lenses).

Click OK to create your panorama, and you'll soon be presented with an amazing panoramic photo. However, the completed panorama will have irregular, transparent edges. (Photoshop Elements will ask if you want to fill in the edges, but it doesn't do a very good job; moreover, with larger panoramas, it's likely to give you an out-of memory error.)

Thankfully, you can easily eliminate this transparent area with a tighter crop. First, choose Layer -> Flatten Image; the transparent areas around the image will then appear white. Now choose the Crop tool, adjust it to avoid the white areas, and crop. Then save your panorama to your hard disk.

Here you see four photos stitched together with Photoshop CS5's Photomerge feature. Once combined, transparent edges were trimmed from the image using the Crop tool.

Print and frame

One of the biggest challenges with panoramas is that they're usually an odd size, much wider than they are tall. You can print the panorama yourself to the largest paper your printer will accept, and then set out looking for an appropriate frame. On the other hand, it may be best to consult with a professional print shop who will be able to print the panorama at a far larger size and, in most cases, will offer custom framing. Your final task is to either hang it on your wall or that of a friend, or find wrapping paper that's large enough to cover this exceptionally cool gift!

[Chris McVeigh is an author, illustrator and toy photographer who lives in Halifax, Nova Scotia.]