Exiv2 / exiv2

Image metadata library and tools

Home Page:http://www.exiv2.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RawTherapee ART and Darktable cannot recognise correctly Tamron and Tokina lenses on Nikon camera

markman8 opened this issue · comments

For some reason and on Tokina and Tamron lenses on Nikon cameras (such as D4) open source programs as RawTherapee ART and Darktable cannot recognise them correctly and give the id of that lens instead, via using exiv2.
Please refer to https://discuss.pixls.us/t/custom-input-profile-color-management-dcp/39544/19

Instead of changing each and every foss it could be nice to be able to compensate the exiv2 tool to cooperate with those 3 programs.

All of the above foss have switched to exiv2 from exiftool

  • OpenSUSE Tumbleweed
  • Exiv2 version 0.28.2, source OpenSUSE repository
  • Software using exiv2: RawTherapee, ART, Darktable

https://discuss.pixls.us/t/custom-input-profile-color-management-dcp/39544/16
List of lenses that are not recognised correctly at least on RawTherapee:
Tamron SP 70-200mm F/2.8 Di VC USD G2
Tokina AT-X M100 AF PRO D (AF 100mm f/2.8 Macro)
Tokina AT-X 16-28 AF PRO FX (AF 16-28mm f/2.8)

There are probably be some more lenses for this list that I am not capable of knowing

Please use the config file as a workaround.

Part of the problem could be that these strings are in the lensfun database in "Canon style".

@kmilos The lens matching for nikon cameras are not provided here https://github.com/Exiv2/exiv2/blob/main/src/nikonmn_int.cpp#L2151

  • Is it enough to take the same rules and names from the one already available from exiftool?
  • Are there some naming rules? I.E. use the same name of lensfun?

Patches are welcome

Exiftool unfortunately also has a different naming scheme for 3rd party lenses in Canon vs Nikon tables. I guess this is historical....

Patches are welcome

Patches are possible if the naming rules are clear. So I'll ask again: which are the right names to use? The lensfun ones so they'll match? Are there some rules written somewhere?

Are there some rules written somewhere?

Not as far as I know. Historically we follow exiftool for both Canon and Nikon internal translation tables.

TBH, I'm personally not going to work on lens support any longer, precisely because it is so arbitrary. As Robin noted, I also wish exiv2 never started doing lens translation, providing IDs is where it should stop. For everything else (including adding lenses) there is always the config file. At least some vendors are starting to use standard Exif tags/strings more and more recently.

@kmilos Thanks! So should we leave it as is or if I open a PR with some good names it could be accepted?

FWIW, the untranslated vendor strings on more recent Nikon Z bodies look like this:

Exif.Photo.LensModel                         Ascii      45  TAMRON 150-500mm F/5-6.7 Di III VC VXD A057Z

If lensfun matching is not case sensitive, I guess the existing F/ (or f/) style for "legacy" Tamrons in nikonmn_int.cpp (and as in exftool Nikon tables) should be continued, and I'll consider a PR matching that (note that it also seems consistent w/ product marketing web pages).

Any ideas how to narrow it down more for Tokina are welcome.

P.S. Exif.Photo.LensModel style for modern Sigmas seems to be only F, (luckily?) already matching "legacy" exiv2 and exiftool translation tables (for Nikon, but not for Canon). Note that I've tried to do a tiny bit of a cleanup here.