Saturday, 11 September 2010

Lumix 20mm distortion correction

One of the key features that separates quality optics from the cheaper variants, especially for wide angle lenses, is the the handling of distortion. In this respect, the Panasonic Lumix 20mm f/1.7 pancake lens is special, since in fact it features quite a bit of barrel distortion. However, this distortion is corrected by software inside the camera, so the user will never notice the fact in the first place.

However, the RAW files can be opened with third party software, to reveal the true image as captured by the sensor. In this case, I used UFRaw to convert the image to JPEG. Below is the original JPEG out of camera (left) and the RAW image with distortion uncorrected (right). The images were rescaled and sharpened. Click for larger images.

Out of camera JPEGUncorrected, from the RAW file

For these images, I used the 3:2 aspect ratio feature of the Lumix GH1 camera.

As you can see, there is some distortion in the right image. To correct it in The Gimp image processing software, around -13.5 Lens Distortion adjustment is needed.

Due to the distortion correction, all of the sensor surface is not used in the final image. Hence, the image area from the border is lost, as the image is adjusted and rescaled back to 12 megapixels.

In the image below, the area outside the white box corresponds roughly to the pixels lost during the distortion correction:

This means that when using the Lumix 20mm lens, about 7% of the sensor area is lost. The 12 megapixel sensor becomes 11 megapixels using the automatic distortion correction. The end user may never notice, however, as the output image is converted back to 12 megapixels anyway.

The upside of this is that when photographing non-straight shapes, you can probably get away with using the uncorrected image. This means that you gain some details in the borders, and a wider effective angle. For example, if you are photographing nature, flowers, people, animals, etc.

Most Micro Four Thirds lenses employ software distortion correction. Kit lenses like the Panasonic Lumix G 45-200mm f/4-5.6 and the Panasonic Lumix G HD 14-140mm f/4-5.8 do. One notable exception is the Panasonic Leica Lumix DG Macro-Elmarit 45mm f/2.8 1:1 Macro, which has all the distortion correction done optically.

1 comment: