The concept of architectural perspective is basically very simple. When a camera is angled up above the horizontal to include the top of a building in the frame, the parts of the building furthest from the camera appear smaller. A consequence of this is that the building appears to taper or lean away from the vertical. The same effect may be seen when driving along a straight road. The parallel sides of the road seem to converge in to the distance and the road apparently becomes narrower.
This effect is difficult to avoid in images captured from ground level with a wide-angle lens, such as the picture of the Cathedral of Siena, opposite - unless a perspective control lens or a view camera is available. Photoshop offers an excellent solution to this problem. The software has several tools that allow total control of perspective and wide-angle lens effects.
The first step in the correction process is to select a vertical line close to the centre of the image and rotate the entire image so that it is truly vertical. Turn on the grid lines to facilitate this process (Show grid in the View menu). In this case the image was rotated in a clockwise direction by about one degree. The image should now be cropped slightly to remove the unwanted white edges.
The next stage is to select the whole image and then go to the Transform, Distort option in the Edit menu. It is then a simple matter of dragging the corners of the rectangular selection box until the building appears upright. In the case of the example image, the upper corners of the selection box were dragged outwards in a more or less horizontal direction until the tower and front wall of the Cathedral were rendered upright. When the image appears correct, hit the Return button.
It can be seen in the transform image on the right that the selection box has also been pulled out vertically to some small extent. This was done to avoid the tower appearing "squashed", but the process was constrained by the need to keep the top of the tower in the frame.
The final image, below, shows the verticals upright and consequently leaves the viewer with the feeling that everything about the building is as expected. Only the photographer can make the the necessary detailed judgements regarding the extent to which perspective correction is applied. In reality, of course, the image is now distorted to a considerable extent.
One final consideration is that perspective control adjustments involve a great deal of computer processing, so a large image may take some time to handle and a lot of RAM may be rquired.