Using Puppet Warp to un-distort panoramas

Well… my Death Valley adventure has inspired many discoveries and I thought I’d share one of them for part 3. This takes advantage of the distortion capabilities in Puppet Warp to correct for some common distortions that occur during the stitching process of Photomerge.

Most of the time, when I am shooting multiple frames for a panorama image, I have the camera oriented vertically, and I am careful to rotate the camera around the nodal point of the lens by shooting with a tripod and a pano head. During this last Death Valley trip, I did not carry a tripod with me, and relied on hand holding exclusively. The many scenic vistas of the desert environment were easily contained in a horizontal orientation of the camera, but I still needed to rotate the camera through multiple shots to capture a wide enough view for some of the scenes.

Artist Drive Vista

This colorful vista was captured at the start of artist's drive in Death Valley

The shots above was stitched together from 7 shots. I hand held the camera horizontally and panned left to right, trying to pivot around the camera instead of just swinging from my waist. The trick is to hold the camera directly above the forward foot and pivot over that foot adjusting your stance with the back foot. Even with this approach, it is almost impossible to get perfect alignment from shot to shot. These imperfections are automatically adjusted during the Photomerge process. (see the screenshots below)

to do a Photomerge from Photoshop:

Photo Merge Menu

To create a panorama from multiple shots select Photomerge from the automate menu.

Then select your image files from the resulting dialog:

Photo Merge Dialog

Click the "Browse" button to locate your image files.

These types of landscape panoramas usually look best in “Spherical” layout. You can leave “Blend Images Together” checked but most often “Vignetter Removal” is unnecessary. “Geometric Distortion Correction” is only useful for architectural images and can result in some very unusual distortions if you attempt to use it for landscape panos.

You can enter Photomerge directly from Lightroom through the “Edit In…” menu:

Lightroom "Edit In" menu

You can select multiple image files in Lightroom and then choose "Merge to Panorama in Photoshop" from the "Edit In..." menu.

 Even though Photoshop does a good job of blending the multiple shots together, the mis-alignment that results from handholding will often generate a pano that is bent or not level. The shot above initially merged like this:

Artist Drive Initial Merge

The initial merge of the pano had a pronounced bend up to the left.

I discovered that you can effectively unbend these distortions using Puppet Warp. Puppet Warp is a new Photoshop feature introduced in CS5. To access Puppet warp you have to have a Layer (not a Background or “flat” image) selected then select “Puppet Warp” from the “Edit” menu:

Puppet Warp Menu

Select "Puppet Warp" from the Edit menu.

You then get a window with a 3D mesh overlay. Clicking in this overlay places “pins” that can be used to lock or move portions of the image (drag a pin around to move it)- the mesh flows around the moved point and stays more stationary around a locked point. With a little experimentation you can come up with a combination of locked and move points to unbend the image appropriately.

Panorama Puppet Warp Mesh

The Puppet Warp mesh allows you to unbend the image into a better shape.

The beauty of Puppet Warp is that it can work in multiple directions at once and easily handle complicated distortions to twist images into level. Here are a few more examples:

Bent Pano

A 240° pano as it came out of Photomerge.

Un-bent Pano

The un-bent version after Puppet Warp.

Even more complicated “wavy” distortions can be corrected:

Wavy Pano

The original severely bent pano.

 

Working the Mesh

Unbending often requires multiple move and lock points.

After unbending the panorama you can crop the image into an acceptable horizontal landscape image.

Badwater, Death Valley

The finished panorama of Badwater in Death Valley.

Puppet Warp has now rescued many panorama images that I was having a lot of difficulty with and makes it possible to shoot effectively hand held when you don’t have time to setup a tripod with a pano head. Obviously leveling a tripod and shooting with the proper technique will give superior results but using Puppet Warp in this way can allow for more flexible shooting and give you very useable results under difficult situations where it might be impossible to set up a tripod.