

Post Processing » Using Photoshop and ACR to Straighten an Image
Most photo-editing procedures can be done multiple ways. Here are two ways to straighten a building in post-production. The first method uses Adobe Photoshop CS5 and the second uses Adobe Camera Raw, a plug-in that comes with Photoshop. I am using these programs to straighten a picture of the Mosque of Mohamed Ali in Cairo.
Photo Editing with Photoshop CS5
In this first method, we will need to use guidelines, which come from the rulers on the left side and top of the work area when your image is opened in Photoshop. If your rulers are not visible, click View>Rulers or type Ctrl+R. Click on the vertical ruler and drag it near the edge of the building. Click and drag another guideline to the other side of the building. Guidelines do not become part of the picture. They are not saved with the file. To reposition them, hold the Control key down and click and drag them. If they get in you way, you can hide them or show them by clicking on View>Extras or Ctrl+H.
Position your guidelines near the building.
Select the entire image by clicking on Select>All or Ctrl+A. Notice the 'marching ants' outlining the selection. Apply the transform boxes by clicking on Edit>Free Transform or Ctrl+T.

Select the entire image and apply Free Transform.
Next, hold the Control key down, and click and drag the upper left corner of the transform box to the left, until the left edge of the building is straight. Repeat this procedure on the upper right corner of the transform box. Do this alternately until the building is straight on both sides. Press Enter to complete the transformation, and save your image.
Drag the upper corners of the transform box until the sides of the building looks straight.
While this looks fine for the most part, the problem with this method is that it will slightly distort the image, especially with regard to the height of the building. Our second editing method will provide a more accurate picture.
Photo Editing with ACR
First we will open the image with Adobe Camera Raw (ACR). If you are using a raw image, it will automatically open into ACR when you open it in Photoshop. ACR can also be used for other file types. For example, if you are using a jpg, you can set Photoshop to open all jpgs into ACR using the following method:
In Photoshop, click on Edit>Preference>File Handling. Then click on the Camera Raw Preferences button.
Click on the Camera Raw Preferences button to open an image in ACR.
On the bottom of the Camera Raw Preferences dialog box, drop the JPEG menu down and select the Automatically open all supported JPEGs option.
Select the Automatically open all supported JPEGs option.
Click OK twice, and you are all set. Now when you open a jpg, it will automatically open into ACR.
Now, open the image in ACR and select the Lens Corrections tab.
Select the Lens Corrections tab once the image is in ACR.
Drag the Vertical slider to the left until the building is straight. You will see the top of the image rotate forward and a gray area appear at the bottom.
Slide the Vertical slider to the left and watch the building straighten out.
Next, slide the Size slider to the right until the gray area disappears, and you are done. Remember to save the image.
Slide the Size slider to the right to fill the gray area created when the building was straightened.
The advantage of using ACR to straighten the building is that it preserves the proportionality of the building. I put the finished products side-by-side, and drew a horizontal guideline for comparison. Notice that the minarets are taller in the ACR edited image.
When comparing the 2 altered images side-by-side, it becomes clear that the one edited with the ACR method is more accurate.
When taking a picture of a building, with the intent to straighten it when you get it into a computer, be sure to leave plenty of room on all four sides of the subject so that you can adjust it without losing part of the building. If the tops of the minarets were near the top of the original photo, they would have been cut off when I rotated it in ACR. Also, if the minarets were too close to the edges of the original photo, they would have been dragged out of the frame when I used the Photoshop method.
I like to use these methods to make buildings look straight, but sometimes it looks odd to do so. Sometimes it is better to leave well enough alone. Even though we know a building is likely built with elements like these square and parallel, our eyes are accustomed to seeing receding lines converge, so it appears natural to us. Give these techniques a try, compare to the original image, and see which way you prefer.