Post processing: lens correction / perspective correction

23 March, 2013

Tags: open source, post processing, tutorial

Last week the blog fototriss had architecture and buildings as theme. Architecture and (ultra) wide angle lenses can make dramatic images, but also cause much distortion in the image. To over exaggerate a little, walls that should be parallel can appear like the sides of a pyramid.

For example one image straight from the camera taken at 21mm with a crop camera (equiv. 33mm on full frame):

Photo of Bigfoot studios

If we trace lines along the vertical walls they will intersect. That is not how the building appears in real life. If the image would have been taken at equivalent to 16-18mm on full frame, the distortion would be much larger.

With the meta data recorded in the image and the help of the lensfun library the image can be automatically adjusted. The second image is processed in GIMP, the GNU Image Manipulation Program, which is great and free alternative to Photoshop. With the plugin GimpLensfun the image is easily adjusted by selecting Filters > Enhance > Gimplensfun. The default settings should be okay if your camera/lens is recognized.

Photo of Bigfoot studios with automatic lens correction applied

A much better result than the first image. For more advanced use or if the camera-lens combination used isn't available in lensfun, the panorama stitcher Hugin can be used. It can do perspecive correction, simulate architectural projections besides from stitching together many images and more.

Photo of Bigfoot studios with lens corrections performed manually in Hugin

The image from Hugin is not cropped compared to the one processed with GIMP and lensfun.

All the tools mentioned in the post are free and open source and part of my must-be-installed list.

Powered By Porridge2013-03-25 15:39:06
And if I should be picky, all three images should also be rotated slightly because I didn't hold the camera perfectly level, but that's another topic

Leave a comment

Comments are moderated. Name and e-mail are required, but your e-mail
address will not be displayed, only used for displaying a gravatar.