Digital Image Studio

Digital perspective correction Dash Index Dash Publications

Outline

The perspective distortion commonly known as "keystone" distortion (taken from the wedge-shaped keystone block found at the summit of arch-ways in older architecture) has to be considered and managed when photographing architectural or other subjects with obvious vertical elements in order to present a natural perspective to the viewer. In order to ensure that the vertical elements of an image remain without perspective distortion the subject and film plane must remain parallel (we assume through this text that the camera equipment being generally referred to does not have inherent perspective correction capabilities).

In many instances this limitation can severely stifle composition opportunities since most often the possibility to modify the elevation of the camera to obtain a more pleasing viewpoint is non-existent without incurring noticeable distortion. So to limit "keystone" distortion often the composition must be compromised, for example; when photographing low lying architecture from ground level with a standard fixed lens the horizon must be placed in the centre of the frame vertically to eliminate "keystone" distortion. In many instances this scenario leads to the view of unwanted foreground elements and/or a distracting balance of sky vs wanted elements.
Top of page

Solutions

Optical

There are several solutions to remedy this problem (assuming we don't wish to use a view or panoramic camera), physical methods were the only options open to the casual photographer until personal computing and digital imaging became feasible. The first physical option is to employ a shift or perspective correction (PC) lens that has the provisions to shift and sometimes tilt the lens relative to the film plane. The PC lens is generally designed to provide a greater image circle than a standard lens of the same focal length, this system provides for some control of perspective distortion but its use is limited by the amount of shift available and by the fact that these lenses are generally not available in ultra-wide angles of view ie greater than about 75 degrees.

Another method is to capture the image including the apparent distortion and then to physically correct for distortion at the time of printing. Correction can be achieved by tilting the baseboard and lens assembly relative to each other so as to negate the perspective distortion on the print. This method allows the use of wider lenses but is limited in success by the depth-of-field (DOF) limitations of the enlarging optics and the capabilities of the enlarging equipment. A shift lens may be the only viable option to implement perspective correction in the case of colour transparencies if darkroom or computing facilities are not available.
Top of page

Digital

The third method is for the photographer to capture the image with their rectilinear lens of choice with distortion intact then to digitise the image with a scanner and then apply digital filtration to correct the distortion. This option is now realistic since many photographers have access to computers and scanners or scanning services and the fact that professional digital image editing packages such as Adobe Photoshop now include perspective correction tools.

The limitations that affect the digital process draw parallels to those of conventional optical correction processes and require a thorough understanding in order to provide optimum results. With digital perspective transformation data is both discarded and interpolated and image width is lost in the correction so these factors must be accounted for in the final image. Since the horizontal angle of view decreases after perspective correction the original image must be taken including a margin or alternately shot with a slightly wider lens than required for the envisaged final image.

The required print size and resolution has to balanced against the loss of detail along the image edge where the data will be stretched by interpolation. At the image corners the combined effect of the data interpolation and the inherent edge distortion of the taking lens may have an undesirable cumulative effect and if it is too distracting then the edges of the image may need to be cropped further. The image to be modified should be zoomed
Top of page

Correction using Photoshop

The Photoshop image editing tool from Adobe may be used to digitally correct perspective distortion by utilising it's transform functions. To correct an image the file should be opened into Photoshop, the image mode should preferably be RGB colour in order to minimise distortions. The image should be Zoomed to fit the screen (Ctrl + 0) or from the menu bar View - Fit on Screen and then maximised so that work-space beyond the image edges is visible, the image should then be selected by (Ctrl + A) or from the menu bar Select - All. The transform function should then be engaged by (Ctrl + T) or from the menu bar Layer - Free Transform.

The image can now be corrected for perspective distortion by holding down the Shift + Ctrl + Alt keys whilst dragging the control points at the top and bottom corners of the image horizontally left or right using the mouse cursor. Since there is no actual transform dedicated to the task of perspective correction the editor must be careful not to modify the image width to height ratio. This can be achieved by ensuring that the centre vertical control point remains aligned with the centre of the original image.

Control pointsOnce the transformation control points have been set so that the apparent image distortion is eliminated then finalise the transform by pressing the "enter" key or "double clicking" the mouse whilst the cursor is within the transform guides. Using the crop tool from the tools menu bar the image may be cropped as required, then saved.

N.B. If the entire transformed image is required the image canvas can be increased in size horizontally by an appropriate factor after the image has been selected and the selection saved then prior to engaging the Free Transform tool the selection can be reloaded or the selection can be re-established manually on the wider canvas.
Top of page

Example images

Clicking on a thumbnail will yield a magnified image, use the browser back button to return.

Click here for a larger view
Original image
lens 15mm/135 format
~100 degree HAOV
Click here for a larger view
Perspective corrected
image
Click here for a larger view
Corrected cropped image
Equiv. lens 18mm/135 format
~90 degree HAOV
Click here for a larger view
Original image detail
Click here for a larger view
Perspective corrected
image detail
Click here for a larger view
Perspective corrected
cropped image detail
Top of page

Conclusion:

Using the technique outlined above allows the photographer to capture images where the distortion may have been objectionable prior to the viability of digital perspective distortion correction. Digital perspective distortion accommodates rectilinear lenses of virtually any angle of view and negates the requirement for specialised PC lenses so providing the photographer with greater photographic freedom. There are no digital techniques that can emulate tilt or swing after the initial exposure.
Top of page

Disclaimers and other information

The text contained in this document represents my opinions only, and as such I will not be held liable for detrimental consequences that arise from the application of any information within or relating to this document. All references to trade marks and or trade names are acknowledged as belonging to their respective owners. Digital Image Studio or its associates are in no way associated with the owners of the trade names Photoshop or Adobe.

This complete document may be copied, re-posted, linked-to or used within other publications providing that permission from the author is sought and granted and that there exists a visible reference to Rob Studdert as author in any referring text. I am not a camera technician nor do I represent Pentax or their affiliates.

Rob Studdert
Digital Image Studio
distudio@swiftdsl.com.au
6th March, 2000

Design & Copyright © - Digital Image Studio 1998