Scribbles and Snaps

Linux, Open Source, Photography

Correct Lens Distortion with digiKam

with 9 comments

Lens distortion is a fact of life. You can mitigate this problem, but you can’t avoid it completely (unless you are willing to invest in seriously expensive professional-grade lenses, that is). Fortunately, digiKam provides a set of tools that can help you to fix lens distortion with relative ease. In fact, the application sports the Auto-Correction feature that attempts to fix lens distortion with a minimum of tweaking. So if you have a photo that suffers from barrel1 or pincushion2 distortion, you might be able to fix it quickly using the Auto-Correction tool. To do this, open the photo in the image editor (choose Image | Edit or press F4) and choose Enhance | Lens | Auto-Correction. digiKam then automatically pulls the camera, lens, and other relevant information from the photo’s metadata and attempts to fix the distortion based on the obtained data. Besides the lens distortion, the Auto-Correction feature can fix other problems, too, including chromatic aberration and vignetting. So if the photo exhibits any of these problems, you can apply fixes to it by ticking the appropriate check boxes.

Usually the Auto-Correction tool does a decent job of fixing lens distortion, but if it fails to do the job, you can try to fix the problem manually. To do this, choose Enhance | Lens | Distortion and adjust the Main and Edge sliders to correct lens distortion.

1 Barrel distortion is a lens effect which causes images to be spherised or “inflated”. Barrel distortion is associated with wide angle lenses and typically occurs at the wide end of a zoom lens. The use of converters often amplifies the effect. It is most visible in images with perfectly straight lines, especially when they are close to the edge of the image frame. (Source: Digital Photography Review)

2 Pincushion distortion is a lens effect which causes images to be pinched at their center. Pincushion distortion is associated with tele lenses and typically occurs at the tele end of a zoom lens. The use of converters often amplifies the effect. It is most visible in images with perfectly straight lines, especially when they are close to the edge of the image frame. (Source: Digital Photography Review)

Written by Dmitri Popov

2010/08/30 at 10:03

9 Responses

Subscribe to comments with RSS.

  1. Did you use lensfun or did was developed from scratch?

    paurullan

    2010/08/30 at 10:44

  2. Hi, great website and nice tutorials abt digikam. I am a member of the Maldives Open Source Society (Moss), we promote open source software here in the Maldives. We release a magazine once a month called MOSS your monthly floss magazine and im the editor of the magazine. I was wondering whether i could reproduce some of the texts which has been written by you in your website. Im trying to write a article abt digikam and what it can do. By doing it i could save a lot of time.
    And i will also give you full credit and reference for your work.

    You can see the moss magazine and our activities @ http://www.moss.org.mv

    Mohamed Malik

    2010/09/21 at 00:22

    • Sure! Feel free to use any post you like. :-)

      Dmitri Popov

      2010/09/20 at 22:23

      • hi dmitri i have used some of the post and putted your name and the link of this blog in the article. Hope thats ok with you.

        mohamed malik`

        2010/10/06 at 18:02

  3. Hi Dmitri,

    I’m curious, will digiKam take the output from something like a Nikon 10.5 fisheye and “correct” that into a panorama like the native Nikon software does? I’m in a linux-only household so I don’t use the Nikon software, but the effect would be great to have available.

    Thanks,
    Gar

    Gar

    2011/01/07 at 17:16

  4. Great tool — but what can I do if my camera is not in the list for automatic correction? Is there an update for this list or can I find out correction coefficients by myself?

    Dieter

    2011/03/07 at 23:15

  5. great, but digikam 1.6 crashes on that tool

    slawek

    2011/06/21 at 11:29

    • Gimp has stable versions (Deb stable), and has a lens distortion correction ability. Also execclent NR, and I have a “Darla” script; that automatically removes color fringing (when needed).

      Read the ufraw page. Set it up one time, and it loads your Raw file, as done.

      Shoot only Raw. Pull the JPEG’s out with dcraw. Then develop only the Raw files that need it. Then, use Gimp for finishing and you will not (ever) need anything else.

      Spanky

      2013/03/12 at 04:37


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 368 other followers

%d bloggers like this: