I’ve found similar posts regarding this issue, but the solutions don’t quite seem to fit my specific problem.
I am using a Viltrox 23mm f/1.4 for Fujifilm X-mount. In darktable’s “lens correction” module, I get the message “Camera/Lens not found”. While I can manually select the correct entry from the Lensfun database (“Viltrox, Viltrox AF 23mm 1.4 XF/Z/L”), the automatic detection fails.
I’ve seen suggestions to create a mapping via the LensType ID, but I am unable to do so because exiv2 does not provide a LensType ID for my files. Here is the output of the metadata check:
Yeah, that mechanism is available only for Canon, Minolta, Nikon, Olympus, and Pentax cameras. It’s not because of exiv2, it’s because the camera vendor (Fujifilm) doesn’t actually store/map the lens info in that way so it could be remapped.
It’s with the complex interaction of the three.
Part of the problem could be that darktable is using only the LensModel string in these cases IIRC, while a LensMake + LensModel combo could be more useful, w/ some extra logic to avoid make duplication, prettify final output etc. Sadly lens makers and camera vendors don’t have a unified and consistent way of storing this metadata (hence all the issues).
The only realistic solution I can see to this is using Lua scripting to read the file and fill in the necessary information in the database so that the lens is recognized. I’d need an image file to work with.
Okay, I’ve played with this for awhile and now I understand the complete problem.
The sample image does partially identify the lens as AF 23/1.4 XF.
If I look at the Exif.Photo.Maker metadata the maker is VILTROX.
So I could grab the info and put it together and have VILTROX AF 23/1.4 XF, which is correct, but doesn’t match anything in the lensfun database.
In the lensfun database the lens is identified as Viltrox AF 23/1.4 XF/Z/L.
Years ago I had an issue with Sigma lenses on Canon bodies, where Sigma had reused Canon lens numbers and so my Sigma lenses were identified as various Canon lenses.
My solution was a script, correct_lens, that basically string matched and replaced the lens string with the correct one. In this case that’s probably the best solution since the metadata included in the image still won’t result in a match with the lensfun database.
The script is ~8 years old so I’ll look at it and refresh it.