Slashdot Mirror


Correcting Lens Aberrations in Digital Photography?

Kavau asks: "I've recently entered the world of digital photography, and bought a pocket-sized digital. While the resolution and the color accuracy are very nice, I was utterly disappointed by the (lack of) quality of the zoom lens: It has a clearly visible barrel distortion, especially in wide angle, so that straight lines appear curved in the picture. This is especially annoying in architectural shots or cityscapes. While grumbling about this shortcoming, I suddenly realized that I am dealing with digital imaging here: In principle it should be no problem to measure the distortion, and then to correct it with a digital mapping. Other lens faults such as vignetting could also be corrected. Now, since I don't want to reinvent the wheel, here is my question to Slashdot: Do you know of any open-source tools that deal with issues such as (1) applying general analytic transformations to a picture, (2) specifically correcting for barrel distortion, or (3) determining the amount of distortion from test pictures? Also, since people probably had this idea before, does anyone have experience with this issue that he/she wants to share, or some resources to point out?"

3 of 67 comments (clear)

  1. PanoTools by ugglan · · Score: 5, Informative

    Check out PanoTools at http://www.path.unimelb.edu.au/~dersch/

    It has a steep learning curve, but seems to be worth the effort. I've only played around with it some myself but I've seen lots of (seemingly) professional photographers on the web that use it.

    Exellent tutorials: Big Ben's Panorama Tutorials

  2. Nothing new here by themo0c0w · · Score: 5, Interesting

    This has been a problem in traditional photography for some time. Distortion for wide angle shots always occurs for any wide angle shot -- try a 28mm lense sometime and see for yourself.

    Special lenses do exist to correct for this. However, the are very expensive. Generally, only architecture photographers and other professionals have them.

    You'll probably want a better lens anyway for doing any sort of quality photography. Oh, and as for fixing it with a filter, good luck. Its not as easy as just applying a transform as the person with the graph paper suggests. The warping depends on distance from the lens.

    --
    ph34r teh p0w3r 0f th3 c0w
  3. DLT by MountainLogic · · Score: 5, Informative
    The method for fully correcting for lens aberations is the Direct Linear Transform. It involves placing targets at known locations in the object field, recording their location in the film plane, then solve for this real ugly transform matix. You can then take a pixel in film space, run it through the solved matrix and get that pixels location in meat space (well really just that pixel's vector for a 2d camera system). You can also do this with two fixed cameras to solve for 3d location. I've had no trouble resolving targets down to 1/4 pixel accuracy. The only referance I have off of the top of my head is:

    Woodle, Alan S., Scott Elliott: The Vector system for dynamic gait analysis. Clinics in podiatric medicine and surgery. 10(3)485-500, 1993.

    There are referances to the math in that paper. Good key words to google might be DLT & photogrametry (sp?)