Correcting Linear Distortion

Several types of common optical distortions can be easily corrected in Photoshop (the simple steps shown below use Photoshop 7 commands and menus, but many other image editing programs have equivalent commands). At the wide angle focal length, most Coolpix models exhibit barrel distortion, while pin cushion distortion is sometimes found at the telephoto end. Add-on converters often increase the visible distortion. Barrel and pincushion distortion make straight lines turn into curved ones.

Note: More recent versions of Photoshop and Lightroom have additional features in terms of lens corrections, and a wide range of correction files for common lenses.

Another type of optical distortion occurs with perspective. If you tilt a wide angle lens up from horizontal to photograph a building, the resulting image makes the walls appear to “tilt” back. 

The simplest steps you can use to correct all these distortions are similar:

  1. Open the image you want to correct. Choose Open from the File menu.
  2. Give yourself some room to work. Choose Canvas Size from the Image menu. Specify a square size that is 25% larger than the biggest dimension (e.g., if the longest dimension is 2048 pixels, enter 2560 for both horizontal and vertical size). Make sure that you’re creating the extra space on all sides of your original image (i.e., Anchor shows that the center is chosen for the position of your original). If you don't make the canvas square and the image centered, your subsequent actions will be "lopsided." Don’t worry about how large this step makes your image. We’ll trim it back down to size in Step 5.
  3. Look at the image with a grid applied. Pick Show Grid from the View menu. This applies a set of light gray lines over your image that will help you evaluate how much change you need to make. If straight lines bow outward from the grid at the edges, you’re seeing barrel distortion. If straight lines bow inward from the grid at the edges, you have pin cushion distortion. If horizontal lines are straight, but vertical lines converge towards the center at the top, then you’ve got a tilt (perspective) distortion.
  4. Apply the appropriate transformation. For barrel distortion, choose the Spherize filter from the Distort submenu on the Filter menu and enter a negative value (usually no more than –25; typically in the -5 to -10 range for Coolpix lenses). Use lines that should be straight in the image to evaluate the amount of distortion to use. For pin cushion distortion, choose the Spherize filter from the Distort submenu on the Filter menu and enter a positive value (usually no more than +25; again typically less than +10 for Coolpix lenses). Use lines that should be straight in the image to evaluate the amount of distortion to use. To correct tilt, first select the pixel-portion of your image (i.e., not the extra canvas space you made), and then choose Distort from the Transform submenu on the Edit menu. Grab the corner handles that appear to distort the image to form a quadrangle.
  5. Trim to taste. Use the rectangle selection tool to select the portion of the image you want to retain. Choose Crop from the Image menu to remove the extraneous sections. 
  6. Save your work. Select Save As from the File menu, and save the file under a new name.

If you've got a more recent version of Photoshop, say CS5 or CS6, you'll find some dedicated capabilities that will help you do an even better job: on the Filter menu you'll find a new facility called Lens Correction. Within the dialog that appears you can let the software perform an automatic correction or you can create a custom one. You should always try the automatic corrections first (make sure the Camera Model and Lens Model pop-ups are set to the equipment you used). If your lens isn't in the list, note that on the Adobe site you can find additional user-contributed lens corrections (search for "Lens Profile Downloader") and even a way to create your own. Lightroom shares these capabilities (Lens Corrections panel in the Develop module).

Third party programs exist that provide more automated and sophisticated distortion correction abilities: the two most often mentioned are a free tool written by Helmut Dersch, and Andromeda Software has a Photoshop filter called LensDoc that is also quite helpful.

text and images © 2017 Thom Hogan
portions Copyright 1999-2016 Thom Hogan-- All Rights Reserved
Follow us on Twitter: @bythom, hashtags #bythom, #dslrbodies