Home    Search    Gallery    How-To    Books    Links    Workshops    About    Contact

Correcting Lens Distortion
© 2006 KenRockwell.com

Please help KenRockwell..com

from camera
corrects for barrel
From camera
Barrel distortion corrected @ +6.00

completely corrected

Corrected for keystoning and barrel distortion.

adorama

INTRODUCTION

This is trivial with Photoshop CS2. This feature isn't in earlier versions of Photoshop.

It works with any image, JPG, RAW, a film scan, or anything.

ABOVE EXAMPLE

Here's what this filter, included free with Photoshop CS2, can do to a bad digital camera image.

The original image, top left, is from a Nikon D70 with an 18 - 70 mm lens set to 18 mm. At 18 mm the 18 - 70 mm not only has barrel distortion, it has complex barrel distortion which is difficult to correct. As you can see even this nonlinear sort of barrel distortion is very well corrected. Most other lenses are even easier to correct. I chose this as the toughest example I could find.

Barrel distortion is what has made the top of the hotel look curved. In the corrected image, made by setting the slider I'll explain below to +6.00, the roof is now straight.

Most amateurs would be happy just getting the curving lines straightened out. Professionals also want the verticals fixed as well. Because I had the camera pointed up the building looks like it's falling backwards. I detail how to correct the converging perspective lines in the final large image here.

Photoshop CS2

From the menu at the top of your screen in CS2 simply choose: FILTER > DISTORT > LENS CORRECTION. Be sure to have the grid turned on for reference.

There are three ways to select the amount of correction:

1.) Type it in the "Remove Distortion" box, or

2.) Move the slider, or

3.) Use the Remove Distortion Tool (D) at the top left of the screen. Select it and grab the middle of a distorted line. Drag it until it looks correct. Release.

Feel free to fine tune as you see fit.

Most lenses only need values between +5 and -3, so go easy here. In my lens tests I'm now listing values to type into the box to save us all time.

Hit OK when you're done fine tuning. Voila!

Before Photoshop CS2

Back in the dark days of Photoshop CS and before I usually used the "Spherize" command under FILTER > DISTORT > SPHERIZE. Increase your canvas size 50 - 100% first so you correct the whole image.

COMPLEX DISTORTIONS

CS2's filter works perfectly for simple first-order linear distortions. These simply curve lines into broad curves.

More complex distortions bend lines into more complex shapes like a moustache. CS2's Lens Distortion filter can't correct those completely.

For complex distortion you might want to try third-party tools I explain here, like DxO and the free Panorama Tools.

Correcting Perspective

Correcting Lateral Chromatic Aberration and Color Fringes

Home     Gallery     How-To     Links    Workshops     About     Contact