I’m using darktable on Windows (11) and I’m not getting the contents of the lensfun database to match the available lenses shown in the list of lenses from the lens correction module in DT. Is this expected behavior? Is there a configuration I need to set in DT to get the lenses to display/match? Or does the lens in the lensfun DB need to match the model in the exif data from the image?
The specific lens I’m trying to find is an EF 75-300mm, but neither of the two listed in the lensfun XML file are present in that list in DT.
I’ve tried a direct windows installer that was downloaded from the DT website, as well as a successfully compiled instance on my machine after successfully running lensfun-update-data.
Determining lens names is a hard problem, especially in older cameras. The identifier that is in the metadata of your raw file is an integer, and exiv2 tries to map that onto a lens name. The problem is that different lenses often use the same integer for identification.
Thank you for the detailed suggestion. I tried this for both the lens and the camera (which was already listed properly, but it was no help either). I tried first with just the lens data an then tried the camera model data. I should point out that the module is listing the lens properly now, but when I click to turn on the lens correction, I get a “camera/lens not found” error.
As I said originally, when I try to choose a lens from the module (after getting that error), I get a display of a list of lenses, but that list does not match what’s in the lensfun XML. For example two different lenses of 75-300mm f/4-5.6 are listed in the lensfun database (one of them is mine), but the list of lenses from the module in darktable have neither lens listed. This happens for both: the system install of darktable on Windows and the compiled build install in my UCRT64 environment.
There indeed is known (to me?) “relocation” bug wrt lensfun and MSYS2 builds. Namely, it can only see the main database in e.g. /ucrt64/share/lensfun/version_1/, but not the updates in /ucrt64/var/lib/lensfun-updates/version_1/.
So the current workaround is to move the updates to the main location manually. (Which is pretty much how the official Windows installer does it, just that the “root” is not ucrt64 but the darktable install folder, i.e. lensfun looks for its db relative to bin/darktable.exe/../)
This is because of how lensfun builds up relative paths internally - it of course assumes it’s running on *nix only where things work out nicely. I have tried patching this, but haven’t gotten it to work yet…
P.S. We could actually report this to MSYS2 as a packaging bug/enhancement request, and hope someone else has the time/interest to take a stab at it as well…
Thank you very much for your feedback. I (now) have the lenses I’m looking for in:
/ucrt64/share/lensfun/version_1/slr-canon.xml
/opt/darktable/share/lensfun/version_1/slr-canon.xml
As well as for the Windows system install of darkktable:
C:\Program Files\darktable\share\lensfun\version_1\slr-canon.xml
Both instances (windows system install and the compiled install) of DT are getting the same results: some of the lenses in slr-canon.xml are not visible for selection within the lens correction module in darktable.
FYI, the two lenses I’m looking for are as follows (I didn’t check any others):
Canon EF 35-135mm f/4-5.6 USM
Canon EF 75-300mm f/4-5.6 III
Might also be a problem of body mount vs lens mount incompatibility (incompatible combos are not available and not shown for selection).
Also the crop factor is important - if a lens was profiled on an APS-C body (which seems to be the case for the two you mentioned), it won’t be available/shown for a FF one…
Other than that, if the lens popup list is very long I did notice it is sometimes hard/impossible to scroll in Windows, or there is maybe a syntax error in the XML?
I was thinking that it was just the entire list for the camera. Of the 4 groups, one group of lenses was pretty while another was very long. The other two were groups of 1 and 5.
A quick spot-check of several lenses in the different groups confirm that there is a CF of 1.0+ available for the lenses shown.