Previous page Next page

Correction #2 - (Barrel and Pincushion) Distortion

This is one of my favorite areas as in 1998 I developed my own mesh transformation algorithms for this and other types of corrections, and since 1999 we had the very popular barrel and pincushion distortion correction article on this site, based on Panorama Tools. It's worth noting that distortion is not something which needs to be corrected on every single image. It is usually only noticeable in images shot at extreme wide angle or telephoto and specifically with straight lines close to the edges or in images with an off-center horizon.

Because DxO Optics Pro takes lens and camera-specific corrections into account one would expect the highest possible accuracy. Surprisingly, in our tests, this was not the case and DxO was outperformed by PTLens, a lens- and camera-specific freeware based on Panorama Tools written by Thomas Niemann that is available as either a Photoshop plug-in or as a standalone version and currently covers a wider range of lenses and cameras than DxO, including many digital compacts with converters.

The thumbnails below link to the full size images. The red squares in the thumbnails indicate where the crops below were taken. The 80 x 80 pixel crops are 2 times (pixel) enlarged via nearest neighbor interpolation. I drew a straight red reference line in the original, the DxO, and PTLens results so that it "touched" the straight line of the building in the middle in all three cases.

Original
After DxO Optics Pro
After PTLens
2,773 KB
1,423 KB
1,823 KB
Original
The distance between the red reference line and the glass of the building is large in the top and bottom crops.
DxO Optics Pro
The distance between the red reference line and the glass of the building is reduced in the top and bottom crops.
PTLens
The red reference line is perfectly parallel to the glass of the building.

The results are self explanatory. DxO only removed about 65% (1) of the barrel distortion, while PTLens created a 100% straight line from top to bottom (the distance between the red reference line and the glass of the building is identical in the top, middle, and bottom crops).

PTLens takes away the need for guessing parameters required with Panorama Tools, and even the need to own Photoshop, as there is a standalone version (2) that works—like DxO—independently from Photoshop. Both the plug-in and standalone versions allow for batch processing. But unlike DxO, there is no need for the image to come straight out of the camera. Moreover, the Photoshop plug-in version allows you to work in 16Bits/Channel mode and can work on modified Photoshop files (as long as EXIF data are preserved in Photoshop and no cropping occurred). And unlike DxO, PTLens allows you to modify the parameters. While clearly not necessary in this case, advanced users can adjust the PTLens profiles or create their own by editing a simple text file or, if they own Photoshop, run Panorama Tools with slightly different parameters than those provided by PTLens.
Update (September 22, 2004): The just released PTLens 5 allows you to manually change the focal length.

DxO may do more sophisticated things in the background than meets the eye, but end of the day, the only thing that matters to photographers is what meets the human eye: the final result. And that seems to be inferior to the PTLens freeware, at least in my tests with this popular camera-lens combination.

* Update (September 22, 2004): It seems that the D70 with the 18-70mm kit lens reports all focal lengths between 18 to 21mm as 18mm in the EXIF data. Because DxO is based on EXIF information, it is unable to properly correct this most critical part of the zoom range. In particular, the results at 18mm are not optimal. DxO Labs has informed us that this is because they made a compromise by averaging the settings between 18mm and 21mm. Our thoughts on this:

  • DxO Labs should not have made this compromise, as most photographers will shoot at maximum wide angle at 18mm and not at 20 or 21mm. This looks more like a mathematical compromise rather than one made by photographers and it raises questions about how DxO Labs optimizes its parameters. DxO Labs has admitted the compromise made was not ideal and will correct it, thanks in part to our review.
  • Since DxO Optics Pro is based on EXIF, other body and lens combinations may face similar issues. DXO Labs confirmed this assumption but did not specify which camera and lens combinations were affected.

(1) Technical footnote: Panorama Tools with setting of a=0, b=0, c=-0.023, and d=1.023 leads to similar results. If you increase the width and height of the Panorama Tools results by 0.7% (only necessary to do a direct comparison between the two results) the difference between the results is minimal. Of course the PTLens result with Panorama Tools parameters a=0.024, b=-0.060, c=0.0, d=1.036 is the best in this case.
(2) If you own Photoshop CS or Photoshop Elements and higher, it is recommended to use the Photoshop plug-in because unlike the standalone version, the plug-in version can automatically recognize the camera make and model (the lens type must be chosen manually), retains the embedded color profile and supports RAW, TIFF, and 16 bits/Channel mode (not supported in Photoshop Elements).

Correction #3 - Lateral Chromatic Aberrations

DxO only corrects "Lateral Chromatic Aberration" and not for instance purple fringing which happens to occur more frequently. In reality, you are likely to encounter a mix of Longitudinal and Lateral chromatic aberration. Just like the Distortion correction, DxO had only a partial effect on the chromatic aberration in this image.

Checking the "Lateral Chromatic Aberration" option automatically selects the "Distortion" option in DxO Optics Pro and it is not possible to run it on its own. Essentially DxO is applying slightly different distortion corrections per channel to simultaneously correct geometrical distortion and lateral chromatic aberration. In the past I have experimented with the above mentioned Panorama Tools to do exactly the same thing, but was never 100% satisfied with the results. As shown in the crops below, if in Panorama Tools, you choose a=0 and b=0 for all channels, c=0.0225 and d 1.0225 for the red channel and c=0.023 and d=1.023 for the green and blue channels, the result is virtually identical to DxO which is in line with my assumption. Clearly, the results of both DxO and Panorama Tools are inferior to what Photoshop CS can achieve with the RAW version of the image. Unfortunately the Chromatic Aberration feature of Photoshop CS does not work on JPEG images. However, techniques based on channel-specific local desaturation perform equally well, if not better, on both JPEG and RAW images, as shown in the 2X (pixel) enlarged crops below.

Original

After DxO Optics Pro

After Panorama Tools *

3,214 KB
2,679 KB
2,723 KB

Note cyan and minor red fringing

Fringing is partially removed

Fringing is partially removed


Original

After Photoshop CS (RAW)
After Channel Specific
Local Desaturation
3,214 KB
1,423 KB
2,891 KB
Note cyan and minor red fringing
All fringing is removed
All fringing is removed

* Panorama Tools parameters: a=0, b=0 for all channels, c=0.0225, d=1.0225 (Red),
c=0.023, d=1.023 (Green), c=-0.023, d=1.023 (Blue)

Turn to the next page for the results of the Vignetting correction and our general conclusion.

This article is written by Vincent Bockaert,
author of The 123 of digital imaging.
 
Previous page Next page

Comments