Same LensType number for different lenses Exiv2

Hello,

I’m having an issue where Darktable isn’t able to figure out what my lens is from the exiv2 data. More precisely, I have 2 lenses that share the same lens type number in the exiv2 and DT only identifies one of them properly and I’m not sure how to go about it.

This is on Windows using DT 4.8.0, but I’ve confirmed the issue on Debian on the same version of DT.

So I have a Sigma 70-200 and a Sigma 150-600 C, both for Canon EF-mount and both of which I use on an RF body with the official EF-R adapter. I have the same issue on 2 different RF body.

So through ExifToolGui, I can confirm that both lenses have the LensType 624. From what I’ve read, this can happen. I checked with a third Sigma lens and that one has a different LensType number which is read properly. I searched about this issue and saw that two lens having the same LensType number is common and that the software has to kind of deduce from the other data the actual lens.

So in DT, the 70-200 is detected almost properly, but the name isn’t correct for Lensfun so I need to select it manually. The 150-600 is really just detected as 624.

If I try to do an entry in .exiv2.ini, DT just reads both lenses as whichever one I set, obviously. I’m not exactly sure if my problem lies with DT, Lensfun or exiv2 at this point.

Any help appreciated.

Thank you.

What if you write 624=0

Does it use LensModel instead? You will need to hit Refresh EXIF in darktable (Light table) after.

Can you make sure the firmware for both lenses and the adapter are up to date?

Identical lenstype codes between brands is common, I’d have hoped it wouldn’t happen within one brand…

But, you use an adapter with the two lenses in quenstion. Do you also use that same (type of) adapter for the third sigma lens?

You have overlapping ranges on those lenses, otherwise you could perhaps do something with presets?

To complicate the issue, it seems there is no exif tag “lenstype”, but it’s a tag derived from existing tags (see the exiftool docs)

I was hopeful this was actually something that could override the Lensfun detection or something, but sadly no. The image information detects the lens as “0” and the Lens Correction module defaults to a completely random lens with an extender.

I sadly do not own the Sigma USB dock so I can’t update the firmware on the lenses. As for the adapter, from my understand the basic one that I uses (straight adapter. No filter or control ring) doesn’t have a firmware at all.

Exact same adapter. Tested all 3 lenses with the same adapter on both bodies. The third lenses is detected perfectly through exiv2 as well as Darktable. So I’m more or less certain it has to do with the first two lenses themselves.

Can you upload two raw files from your two lenses? My thread some years ago Lensfun - Not finding the right lens

This is common on Canon bodies, and a known issue. It was somewhat improved w/ more recent versions of exiv2 library.

Unfortunately, the Windows dt package is still forced to deliver the older exiv2 0.27.7 because of some other issues with it, so you don’t get those improvements just yet.

Iff you use dt only in the English language on Windows, and you don’t need to handle files w/ non-ASCII characters, you may build dt from scratch w/ the latest exiv2 (0.28.2 currently) where lens detection on Canons should be improved.

Till then, you can only select the lenses from the dropdown manually.

2 Likes

969A3072.CR3 (33.3 MB)
969A3035.CR3 (32.7 MB)
There you go. 969A3072.CR3 is from the 150-600. You can tell from the Max and MinFocalLength. The LensType still shows as the 70-200. So in the end, it’s mostly about the 150-600 showing incorrectly as the 70-200 and not the other way around.

Edit : Forgot to add the ExifTool screenshot

I see. Thanks for the explanation. I will try this on Debian first, just because I feel it’ll be easier to build from there to test, when I’ll get some time and will update accordingly.

Debian is not known to deliver “latest” of anything :wink:

So you either have to use experimental AFAICT, or build exiv2 from scratch there.

Yes I confirmed that yesterday. I’m running DT 4.8.0 on Debian because I built it from source. I checked and confirmed that I built it using exiv 27.6 which is the latest on apt. I simply need to also build 28.2 from source and rebuild DT. I will try this later today.

Good luck. As I said, make sure you test w/ the English locale. The “real” fix is not yet released.

1 Like

Works in darktable 4.4.1 and Ubuntu out of the box.