Thursday, November 23, 2006

Perspective Correction In Photoshop

Perhaps you haven't yet discovered the power of Photoshop to correct an image. First off it's located in the filters menu, select distortion, lens correction. You won't find it if you are working in 8 bit so if that's the case convert the image to 16 bit beforehand.

Lens Correction allows you to correct the look of buildings falling backwards because the top of the building is further away than the bottom. It can correct horizontal perspective in which one corner of the building appears to be further away than the other. It can also correct barrel and pin cushion distortion often present in images created with a zoom lens. It can even correct for chromatic abberation - that red and green fringe thing in (usually wide angle) shots. there is also a control for rotating the image. You might think it is straight but I have found that .2 (thats point two) degrees of rotation can spoil a picture particularly if the vertical is near the edge of the image.

In practice, one has to adjust image rotation, vertical perspective and pin cushion/barrel distortion all at the same time - ie. you have to find the combination of settings that provides the best correction. I usually will correct vertical perspective first (so that verticals are all parallel to each other (even if they are a bit curved at top and bottom), then pin cushion, then rotation. Once rotation has been corrected, I then again adjust the other two and I might go three or four rounds of doing this till I get the best possible correction.

You need to be aware that lensmakers attempt to correct for barrel distortion in wide angle lenses and in doing so unfortunately produce compound curves that have elements of both pin cushion and barrel distortion - ie the lines end up with s curves on either side from centre. This cannot be corrected by this software but fortunately I have found that I can get close enough that it doesn't usually show. Likewise if you are stitching three wide angle images together, each of which has barrel distortion, the resultant stitched result might have straight lines that appear curved and in a pattern across the image that cannot be corrected by this Photoshop filter. Here the trick is to go back to the individual images and manually set the correction for barrel distortion for each image rather than relying on the stitching software to do so. For a given lens and focal length, this will be a constant so once you have it figured for a particular focal lengh on a certain zoom lens, record it for future reference.

Once you have all the settings in 'lens correction' to your satisfaction, click on OK. You will first see the uncorrected image in Photoshop, then the corrected version.

This brings up a point. Some people feel that it is better to correct perspective distortion (falling backwards buildings)with lens shift rather than Photoshop correction, arguing that with shift you don't lose pixels whereas in Photoshop you throw away pixels and stretch others so you get less resolution. They are right, at least in theory, but it must be remembered that in shifting the lens, you are moving further from the centre of the projected image circle and closer to the edge which is never as sharp as the centre - personally I'm quite happy to use Photoshop to do my correction for me.

Next time I'll talk about 'free transform' which can also be used to correct perspective distortion but has better uses.

2 comments:

Anonymous said...

Can I correct verticals with Photoshop Elemnts 4 ? Thanks.

George Barr said...

Not being a user of Elements, I don't know the answer for sure, perhaps someone else can help.

George