Exiv2 and Darktable Lens Identification

I love darktable and have been using it for several years. I shoot Olympus OMD EM1.2 and a legacy Sigma 300mm f4 APO Tele Macro in Canon EF mount with a metabones Smart Adapter. I have been able to add this ancient lens to Lensfun by finding the correct .xml file and adding the lens to it. I have also added this lens tag to my file exports so my jpegs all show the correct lens.

But… for some strange reason, exiv2 identifies this lens as a Leica D Vario Elmar 14-150 F3.5-5.6. Olympus and Sigma Lenses don’t have LensIDs, but I did use exiv2 to find the Lens Model and added it to the .exiv2 configuration file. This hasn’t helped.

Some questions:

  1. Does exiv2 add this incorrect metadata to image files when they are first imported from the SDcard or is Darktable adding the metadata from exiv2 and storing it in .xmp files.

  2. If I change the .exiv2 configuration data, how can I get darktable to see the changes. If I regenerate the .xmp files will the correct values be there?

Request: ART allows users to edit Lens Model in metadata and it would be great if we could also do that, or if the lens correction module could update the metadata when we change the lens there.

I realize this is probably a unique problem, but I guess many using legacy lenses would love to see their old glass easily updated in lens correction and metadata.



Exiv2 use a hueristic to try and determine what the lens is. If you’re using an adapter, the adapter might be putting in some information that nudges exiv2 towards the wrong identification. Dark table gets this info from exiv2.

In 3.4 there is a “re-read metadata” button that’ll fix the problem.

The .exiv2 file is the right place to do that. dark table doesn’t really override what exiv2 gives it. The lens correction module will update as well.

Does the correction look good? Lens correction is done for a specific censor size with a specific lens.

Also if you update lensfun, this change will be lost. Lensfun provides a way for users to use their own correction data, it is safer to use that.

Where can I find the “re-read metadata” button in DT 3.4?

I found it and…voila it works. Thank you! But… this process of working with metadata - exiv files, xml files, and hidden UI buttons - is so OS/2. Can’t someone create a UI to communicate between the exiv database, lensfun, and darktable to allow users to create their own metadata updates stored locally in a .db file that moves with new versions and makes all three applications better?

The darktable button is hardly hidden, and its documented.

Someone could do that, but it seems like a lot of work for very little gain.