PDA

View Full Version : 14mm Perspective Correction Tutorial


Tom V
September 20th, 2002, 08:37 PM
I needed to shoot a model home for a home builder. He wanted the fence cropped out that runs along the front sidewalk. I used a 14mm lens (equiv to 21mm on a film camera) on my S2, mounted on a tripod, up about 7 feet off the sidewalk, using the self-timer shooting RAW and RGB.tif files. I held my hat out to shade the lens from sunlight falling directly on it. The image was worked on in Photoshop to retouch out some bad sod and the holes where the builder's sign was, and to correct the perspective. In a full-size image, you could see some jagged diagonal lines (siding on the side of the house) caused by the sensor array.

Mike Flood
September 24th, 2002, 05:58 AM
Actually Tom I think you have it backward.
The 14mm is 14mm on a film camera and effectively 21mm on your S2.

Mike:rolleyes:

SSonnentag
September 24th, 2002, 06:38 AM
Not to nit pick, but you're both saying the same thing on the lens issue.

Tom, how do you correct perspective using PhotoShop? I haven't been able to figure out an easy way to correct for barrel or pincushion distortion. Is that what you mean by perspective correction?

Shawn

memobug
September 24th, 2002, 10:46 AM
The most objectionable distortion in architectural photography is the "falling over backward" appearance that results from converging parallel lines. In the absence of a shift (perspective control) lens, you can help correct that by doing a transformation in your image control program to help restore the converging lines to parallel

(look at the Capitol building towards the bottom of this link: http://www.uscoles.com/pclens.htm )

You might look here for more info on barrel and pincushion:

http://www.dpreview.com/learn/Image_Techniques/Barrel_Distortion_Correction_01.htm

and Helmut Dersch's Panorama Tools website, which is slated to reopen Sept 20. I think he keeps getting sued by IPIX.

http://www.fh-furtwangen.de/%7Edersch/

Tom V
September 24th, 2002, 08:21 PM
Right.

My 14mm lens works just like a 14mm lens on my film camera. The same 14mm lens on my digital S2 presents an image that is equivalent to a 21mm lens on my film camera. It still is a 14mm lens on the digital camera, it is just that I only see the middle 66% of the image. My 14mm lens does not focus on my Nikon N8008s, which has suprised me.

Perspective and distortion are two different things (as I see it). Perspective is caused by the film plane not being parallel to the subject plane. For instance, to have the vertical lines of a building not converge toward the top of an image, you need to hold the camera vertical (film and building parallel). With a good lens, straight lines remain straight and it is easy to correct perspective errors in Photoshop. If the lens is not able to keep straight lines straight, you have distortion (Fisheyes, zooms and other lenses of lesser quality, etc.), which is very hard to correct in Photoshop. To correct perspective in Photoshop, make sure the image is level, thne make your selection, EDIT menu > Transform > Perspective, and pull the corner control handles around. If you turn on the grid guides, it makes it easier to align everything.

I did not shoot the house with the camera vertical because I wanted more yard and less sky. I knew that I could tip the camera down (and having the verticals converge) and be able to correct the perspective in Photoshop later. Keeping the sun off the lens, and waiting for no cars on the highway in the background were the biggest concerns. Perspective can be fixed far easier than content.

I have seen distortion correction Photoshop plugins specifically made for fixing images that have pincushion or barrel distortion. Photoshop's built-in Spherize or Distort filters work the middle of the image, not the edges where lens distortions show up.

PaulN
September 30th, 2002, 10:34 PM
Originally posted by SSonnentag
Not to nit pick, but you're both saying the same thing on the lens issue.

Tom, how do you correct perspective using PhotoShop? I haven't been able to figure out an easy way to correct for barrel or pincushion distortion. Is that what you mean by perspective correction?

Shawn

Well, in answer to your question, no. Barrel or pincushion distortion is much harder to correct in Photoshop, although there's some actions and plug-ins that you can buy to help you. The following can be used to correct up to a moderate error. You would correct perspective distortion by making your image on the screen about half monitor size, then draging out the window size some. Select all (Cmd/Ctr A), then go to Edit>Transform>Distort. If for example the building is falling over backwards (vertical lines converging at the top), hold down the shift key and pull out the handles one at a time from the top corners of the picture. Go slowly a little bit at a time on either side until the lines look about vertical. You hold the shift key to constrain your line pulling to only horizontal. When it looks about right hit enter. It won't look perfect until then because as you're draging the lines you only have a preview image. After you practice a bit it's really a cool trick. My view camera friends wouldn't believe it until I showed them. Good luck.

Tom V
October 1st, 2002, 07:34 AM
Here is how I correct perspective for one direction in Adobe Photoshop 6.01 on Macintosh. Other versions and platforms are similar. This method is quick and gives very realistic results. This method corrects the falling-backward vertical perspective.

1) Make sure the picture is vertical. If the image is not, you'll never get the perspective right. Find a straight line that is supposed to be vertical near the center of the image. Use the ruler tool to draw along your line. Go to IMAGE > ROTATE CANVAS > ARBITRARY. The box that appears shows the measurement from the Ruler Tool. Click OK and the image rotates, and the center line that you measured with the Ruler Tool should now be vertical. If it is not, UNDO and try to be more accurate.

2) Prepare to Correct the perspective. Turn on the grid lines: VIEW > SHOW > GRID. If the grid is too dense, change the grid spacing default in EDIT > PREFERENCES > GUIDES & GRIDS, (I have mine at 1 gridline per inch, 1 subdivision)- or - change the image resolution in IMAGE > IMAGE SIZE (Resolution: 72 pixels per inch & Resample Image UNCHECKED!). Reduce the view of your image so you can see the whole image with some space around the edges. On Macintosh, the F key changes the background from scroll bars > gray background > black background. You can just pull out the window edges to give your image window some working space around your image.

3) Correct the Perspective. Go to SELECT > ALL (using keyboard commands will save you time!) and then go to IMAGE > TRANSFORM > PERSPECTIVE. This puts handles on the corners of your selected image. Click-drag an upper corner handle out and the image will distort symetrically allowing you to align the vertical lines with the grid. Hold the SHIFT key to constrain your click-drag movement. If you click along the sides of the selection, you can skew the image, which may or may not be a good thing. Click ENTER and your transformation is applied.

4) Clean up the image. The rotation and transformation probably left you with some non-image blank area around your image. Use the crop tool to remove as much of this as you want. You may want to keep some areas to make composition frame well, requiring some retouching or cloning to fix edges of the sky, grass, etc. Change the resolution back if you need to.

The attached image shows a mock-up of the above. The vertical line in the center was used to determine rotation. The transform handles are simulating being pulled onto the working space outside the image. The grid is simulated.

(Added later): Actually, I think you should correct the perspective before you correct the rotation, or better yet, do them at the same time. If the amounts are minor, it probably doesn't matter too much which order you do it in.)

SSonnentag
October 1st, 2002, 09:14 AM
Thanks, Tom! I found your little tutorial extremely useful. :)

Shawn

Eddie
October 26th, 2002, 04:56 PM
Hi guys,

Shooting with anything to be described as a wide-angle attached to my S2, i always use a simple but very helpfull device (kaiser-made) mounted on the accessory shoe: a level. I prefer this method more than using the on demand grid.

Tom V
October 3rd, 2003, 09:11 PM
I asked Shawn to dig this out and put it in the PS/E forum. And I could not resist not bringing it up to the top.

The house shown here was photographed down in Pauly's neck of the woods.

minotauro
October 6th, 2003, 03:15 AM
Thank you Tom for this and other great tutorials.
I'd just like to add that the trasform commands tend to softnen the image a little, after one applies them it is necessary to fix usm.

pauly99
October 6th, 2003, 08:17 PM
Tom, thanks for the great tutorial(s). I guess I'll be looking at shooting more verticals in the near future. Never realized the distorted perspective of some of my shots until I gave them a 2nd look after this tutorial.

Tom V
October 6th, 2003, 09:45 PM
Originally posted by minotauro
.... I'd just like to add that the trasform commands tend to softnen the image a little, after one applies them it is necessary to fix usm.

Luigi,

Good point. Every transformation or adjustment squeezes pixels together or apart or changes their value. Everytime two pixels are moved apart, Photoshop has to interpolate a pixel in between. Everytime three pixels are squeezed into the space of two, some blending occurs. The more Photoshop works on your pixels, the more they are not original. You should try to make as many transformations together as possible, so the pixels are processed as little as possible. The only transformation I can think of that is harmless is rotation in 90° increments.

I agree about doing Unsharp Masking (USM) after all your transformations are done.