Wednesday 27 November 2019

distortion - Lens correction in darktable when my lens isn't known?


I took some raw (CR2) photos and want to edit them in darktable. The focal length is quite low and the distortion high.


Usually I correct the distortion by using darktable's lens correction module which automatically chooses the right values based on the exif information. It works for DSLRs but for this very camera the values are not known.


lens correction


My question:




  • What's the way to correct the distortion in darktable, if I cannot choose the right objective from the drop down menu in the lens correction module?

  • How do I determine the values? Which values should I choose?



Answer



Unfortunately, as of right now, darktable doesn't have a very good way of doing ad hoc distortion correction for a lens you don't have a lensfun profile for. The following is a dirty hack that may be useful in cases where the barrel distortion at the wide end of a zoom is so strong that even "incorrect" correction might be an improvement...


In the lens correction module:



  • Click on the top (camera) dropdown list and select Generic --> Crop-factor 1.0 (Full Frame)

  • For the lens dropdown: Select Generic --> Rectilinear 10-1000mm f/1.0.

  • Change the geometry to fish-eye


  • Change mode to distort


Now, when you change the value in the "mm" dropdown menu, you should get different degrees of generic "defishing"; start at the largest mm values and work down the list until you find something that looks closest to correct. Clicking the circular arrow button to the right of the "scale" slider will auto-adjust the scale to the largest crop with no blank pixels.


If you're trying to correct "pincushion" distortion at the long end of a zoom, change the mode to "correct" instead of "distort".


No comments:

Post a Comment

Why is the front element of a telephoto lens larger than a wide angle lens?

A wide angle lens has a wide angle of view, therefore it would make sense that the front of the lens would also be wide. A telephoto lens ha...