[Solved] My lens is supported on lensfun but not with my mount


I am using the latest stable version of darktable and version 3.2 of Lensfun (debian stable latest version).
I am using a legacy lens (Sigma 24mm f/2.8 Super Wide II) with a Nikon (crop sensor), it is supported in the 3.3 and develop versions of Lensfun, but not in 3.2. You can find it on the github db (lensfun/slr-sigma.xml at master · lensfun/lensfun · GitHub), but with Minolta and Pentax mounts, not the Nikon one i want:

        <model>Sigma 24mm f/2.8 Super Wide II</model>
        <mount>Minolta AF</mount>
        <mount>Pentax KAF</mount>
            <!-- Taken with Sony SLT-A58 -->
            <distortion model="ptlens" focal="24" a="0" b="-0.0085" c="0"/>
            <tca model="poly3" focal="24" br="-0.0000150" vr="1.0004690" bb="0.0000578" vb="0.9998126"/>
            <vignetting model="pa" focal="24" aperture="2.8" distance="10" k1="-0.4802" k2="0.0226" k3="0.0796"/>
           [...] rest of vignetting cropped out

I am having multiple issues:

  • i updated lensfun with (sudo) lensfun-update-data, cli says its up to date
  • in my local sigma db file /usr/share/lensfun/version_1/slr-sigma.xml there isn’t my lens (maybe this is normal since i have version 3.2)
  • i don’t have a ~/.local/share/lensfun/ folder
  • in darktable if i select my nikon camera, but my sigma lens doesn’t appear
  • but, here is where it gets interesting (maybe), if i select a Pentax body, i do find the lens (while it isn’t in my local slr-sigma.xml file)

So i tried adding the snippet manualy in my file, and adding a <mount>Nikon F AF</mount> line in it. It doesn’t appear either in darktable.

So my questions are:

  • where is darktable looking for the lensfun db if it isn’t in /usr/share/lensfun/version_1/slr-sigma.xml (because in this file there isnt my sigma lens, while it appears in darktable) ?
  • how could i make my lens get recognized with my Nikon body in darktable?

I hope this was clear. I did try looking for information around and tried reinstalling lensfun multiple times.
Thank you!

/usr/share/lensfun/version_1 or /var/lib/lensfun-updates/version_1 or /.local/share/lensfun

<mount>Nikon F AF</mount> seems to be right. What is the crop factor for your camera?

1 Like

yep! that was it. There was a slr-sigma.xml file in here, which contained my lens, I added the mount line in it and it was recognized!

Thank you very much!

crop factor of my camera is 1.534

1 Like