Some common problems you will encounter when photographing buildings is a combination of perspective errors and barrel distortion from the camera. Fortunately this is easy to fix. All it takes is some time and patience.
First off, we will look at an image with a combination barrel distortion and perspective errors.
The simplest way to fix the barrel distortion is to make use of the Lens Correction filter which accesses profiles of different cameras and will apply that profile to the image you have.
After that, we will fix the perspective distortion. To get started, go to Filter>Lens Correction.
In the Lens Correction dialog box you see a preview of your image before any correction has been applied. Directly below the image is important information about the make and model of camera you used, as well as the type of lens model.
This information can be used to load the camera profile to correct the barrel distortion. You will notice two options: Preview and Show Grid. Enable both and set the grid color to something which is easy to see against the image. You can leave the size at the default of 64.
On the far right panel there are two tabs: Auto Correction and Custom. At the top, you will notice that the Correction section has Geometric Distortion enabled but the entire section is grayed out.
Directly below that, the Auto Scale Image checkbox is enabled by default, as is Transparency next to the Edge option. Below that you will see a tiny box next to Search Criteria. When you click on the box you have a choice of Match Image Sensor Size and Prefer RAW Profiles.
Since my camera doesn't support Camera RAW, Match Sensor Image Size is enabled. Below that is the camera settings where you select the camera make, model and lens model. If yours isn't listed, you have two options, to search the lens profiles or to click on the Search online button at the bottom.
When I went through the built-in list, there was no profile for my camera, so I clicked on the Search Online button to find my camera profile. Unfortunately I couldn't find one, which is probably due to the age of my camera. Fortunately there is another option, the Custom tab where you remove barrel distortion and perspective errors manually.
As you can see, there are many options here, but we will only use a few of them, which are the Remove Distortion and the Transform controls.
To get started use Settings>Default Correction. To the right of that setting is a small pop-up box where you can load or save settings. Now it's time to remove the distortion and fix the leaning of the building. This is where the grid we added to the image comes into play.
It will help determine when the barrel distortion has been removed. After that, you can correct the perspective of the building. You will probably find that you will need to go back and forth between the settings because as you correct the perspective, this will also affect the barrel distortion.
Here is the result in the dialog box. As you can see, this is a fast and easy way to correct barrel distortion and perspective errors.
Here is an example of a building with perspective issues.
To fix the perspective, go to Edit>Perspective Warp. When you do so, the cursor becomes a different icon. When you click in the image, it creates a grid made up of nine sections.
Manipulate the control points of the grid (on each corner) and draw the grid so what it encases the entire building. Once you finish that, go to the menu bar and click on the Warp button.
The grid will vanish and the control pins will become active, allowing you to drag them and straighten the building. For extra accuracy, use guidelines (as in the screen shot above).
When you are satisfied with your changes, click on the checkmark icon in the menu bar.
Photoshop will apply your changes to the image.
Sometimes you will have an image with multiple perspective issues like the one above. You will still use the Perspective Warp tool but more control pins will be involved.
To make this work, you will need to draw out three quad shapes as above.
Next, pick one corner control pin and move it so it overlaps the control pin of another quad shape. The shapes will highlight. When you release the mouse button, the two quad shapes will snap together as one.
Repeat this process with the third quad shape and all three will be joined together. Now you are ready to fix the perspective.
The control points are in position, along with guidelines to improve the accuracy.
With an image of this type, correcting the perspective can be a bit tricky. The guidelines help a lot with that, though. As you move the mouse to drag the control pins you might find they move too much.
If that's the case, make sure the control pin is active, then use the arrow keys on your keyboard for precise positioning.
Once you are satisfied with your adjustments, click on the checkmark in the menu bar to apply the changes. You might need to crop the image afterwards.
You now know of several ways to fix barrel distortion and/or perspective errors. If necessary, you might have to combine techniques to get the results you seek.
Words: Nathan Segal