Wednesday, January 18, 2012

What are Barrel and Pincushion distortion and how are they corrected?

Question

I have some questions regarding Barrel distortion and pincushion distortion. Since they are related I have put them in single post.

  1. I am aware that barrel distortion occurs more in wide-angle lenses, wherein straight lines near edges of the frame curve outwards. Is it pincushion distortion when lines curve inward, and in what conditions (what types of lenses, etc.) does pincushion distortion occur?

  2. I am aware that some new cameras (DSLRs, DSCs, SLDs) have in-camera corrections for these distortions, and also there are some tools to correct it in post processing (e.g., PTlens) but what is the exact procedure used in the correction process? Does the correction process work in Raw Bayer domain, or after some color conversion to YCbCr?

Any pointers (especially for question 2) would be useful, as I am trying to implement one post process for this type of correction.

Answer

  1. Your interpretation of distortion is correct. For an example of a lens that exhibits barrel distortion at the wide angle and pin cushion distortion at the telephoto end, have a look at the Canon 18-135mm
  2. Tools like PTLens and Hugin perform the corrections after the demosaicing of the Bayer data. I'm not sure why this would matter?

If you're interested in understanding how this correction is done, the equations are presented here.

No comments:

Post a Comment