I have been trying to update the lensfun module in darktable for some time. I believe I tried everything I could find about it here in the forum as well as in the rest of the internet. It still remains, there are a lot of lenses missing from the list.
Is there a step-by-step guide somewhere on how to bring lensfun up to date and have darktable recognize the lenses?
The following about the installation status:
dnf list \*lensfun\*
Last metadata expiration check: 3:08:42 ago on Mon 02 Jan 2023 12:14:47 CET.
Installed Packages
lensfun.x86_64 0.3.3-1.fc37 @rawhide
lensfun-devel.x86_64 0.3.3-1.fc37 @rawhide
lensfun-tools.x86_64 0.3.3-1.fc37 @rawhide
python3-lensfun.x86_64
If you’re looking for the lens in the screenshot, Zeiss C Sonnar T* 50mm f1.5 ZM, I don’t think it’s in the database. Did a grep on “Sonnar” to the github master database, and came up with this:
glenn@bena:~/ImageStuff/lensfun/data/db$ grep Sonnar *
mil-zeiss.xml: <model>Sonnar 85mm f/2.8 AEJ</model>
slr-sony.xml: <model>Carl Zeiss Vario-Sonnar T* 16-35mm f/2.8 ZA SSM II (SAL1635Z2)</model>
slr-sony.xml: <model lang="en">Zeiss Vario-Sonnar T* 16-35mm f/2.8 ZA SSM II</model>
slr-sony.xml: <model>Carl Zeiss Vario-Sonnar T* 24-70mm f/2.8 ZA SSM II (SAL2470Z2)</model>
slr-sony.xml: <model lang="en">Zeiss Vario-Sonnar T* 24-70mm f/2.8 ZA SSM II</model>
slr-zeiss.xml: <model>Carl Zeiss Sonnar T* 135mm F1.8 ZA (SAL135F18Z)</model>
if your darktable installation doesn’t use the system wide installed lens database updated by lensfun-update-data (e.g. for macOS package the database is included in the app package) then you need to copy the results yourself.
so first check, which lensfun database is used by darktable on your system …
Thanks, I use Linux. I compiled the current darktable version from the git repository. The Lensfun version is installed from the Fedora repository.
I just checked this again by installing the darktable version from the Fedora repository. And lo and behold: Suddenly there are more cameras and also a little more lenses in the Fedora version of darktable.
Interestingly, the amount of lenses depends on the camera used. I didn’t know that lensfun had such dependencies built in.
The question is now, how can I check which lensfun directory is used by darktable from the Fedora repo and which one the compiled version?
Well, that’s more of the same problem, which is a dearth of representation in the database of your lens interests. Thing is, to solve it would require you to wade into the craft of lens correction. Or, wait for someone else to wade in…
I haven’t done it, but I’ve read through the documentation and it doesn’t appear to be that hard. Take a few shots with certain specifications, use them to extract alignment points and feed that to software that produces the correction parameters compatible with the lensfun algorithms. Take that with a grain of salt, I happen to think command line computing is easy…
If you do decide to take it on, this forum is a good place to ask questions as you go.
I guess the description of my problem was a bit confusing. I think - and this is what I believe the main problem - that my git-darktable uses a different database than the Fedora installed dt. The git-darktable has less lenses in the db. I just need to persuade the git-darktable to use the lensfun-database of Fedora-darktable.
Try running lensfun-update-data and then run sudo lensfun-update-data. Without sudo, the .local/share/lensfun/update gets update with sudo /var/lib/lensfun-update/version_1
I now have a current and nice example. I own the lens “Sigma 35mm F1.2 DG DN | Art 019” for L-Mount. According to the lensfun website https://lensfun.github.io/lenslist/ this lens is supported and I am able to find the lens in directory version 1 & 2.
Did you check the name reported by Exiv2 and/or Exiftool for your lens?
Lenses can show slight variations in the name such that lensfun doesn’t recognise them anymore (branding based on country of sale is one exemple)
As for the Zeiss lens in the original question, I don’t think it is in the database. And perhaps you don’t need the distortion correction?
Keep in mind that the lensfun database is fed by volunteers, lens makers don’t automatically provide data for lens corrections to lensfun.