My comment is focused on Nikkor lenses, as theyāre the topic of the 8-byte Nikon Lens ID endeavor. And, based on a cursory inspection of RawTherapee, darktable, exiv2, and exiftool source codesā¦
I donāt know the specific history behind this encoding, but it appears to be an open-source fomented thing, in order to provide some order to lens nomenclature sufficient to inform lens correction. Essentially, itās the construction of a lens ID from 8 other metadata tags, and the maintenance of a large table that maps those IDs to ASCII strings defining unique lens nomenclature.
Thing is, there is more than one source of ācanonicalā ID-nomenclature mappings. Most seem to have a root in a file created by a fellow named Robert Rottmerhusen, nikonlensid.h. I have a copy of it in rawproc:
#define FMLVERSION "4.4.527.01"
#define FMLDATE "2017-02-27"
to which I added a more friendly lookup function. Of note is that the URL referenced as the file source no longer points to a web server. For the lens that is the subject of this thread, hereās the table entry:
{0x82,0x34,0x76,0xA6,0x38,0x40,0x4B,0x0E,0x03,0x00,0x00, "Sigma", "", "150-600mm F5-6.3 DG OS HSM | C"}
RawTherapee has its own table, located in rtexif/nikonattribs.cc. Hereās its entry:
{"82 34 76 A6 38 40 4B 0E", "Sigma 150-600mm f/5-6.3 DG OS HSM | C"},
Darktable uses exiv2, same with PhotoFlow, more on that in a momentā¦
The two metadata utilities, exiv2 and exiftool, both use nikonlensid.h as a source. exiv2 has the nikonlensid.h file pasted into src/nikonmn_int.cpp, version:
#define FMLVERSION "4.4.550.02"
#define FMLDATE "2018-03-03"
and the entry for the Sigma lens:
{0x82,0x34,0x76,0xA6,0x38,0x40,0x4B,0x0E,0x03,0x00,0x00, "Sigma", "", "150-600mm F5-6.3 DG OS HSM Contemporary"}
Note the difference between this entry and the one from the rawproc version above.
exiftool has itās own Perl-encoded table in lib/Image/ExifTool/Nikon.pm. Phil Harvey has this note at the tableās head :
# Note: Sync this list with Robert's Perl version at
# http://www.rottmerhusen.com/objektives/lensid/files/exif/fmountlens.p.txt
and hereās the Sigma lens entry:
'82 34 76 A6 38 40 4B 0E' => 'Sigma 150-600mm F5-6.3 DG OS HSM | C'
Now, all this needs to square up with the lensfun database. For one thing, thereās no single file of lens nomenclatures, theyāre all scattered in the correction data. Iād surmise that, based on how calibrations are collected, each submitter is supplying the lens nomenclature they read from their favorite raw converter, or Hugin, as thatās a key tool in analyzing the distortion component. For the Sigma lens, @Carmelo_DrRaw showed us that nomenclature in his first post of the thread.
Sooooooā¦ bear-of-little-brain here makes the following observations:
- Mr. Rottmerhusen appears to have started what we need, but doesnāt seem to be maintaining it any longer. Does anyone here know the story? What he was doing is what we need here.
- The lensfun database needs to be aligned to the same nomenclature source.
- A specific concern, but the thought applies generally: Aperture range is inconsistently encoded. Some are āF5-6.3ā, others are āf/5-6.3ā. Thing is, this inconsistency is rife in the nikonlensid.h file. And, this particular difference in encoding would require a match function that can syntactically recognize aperture range fields in all their incarnations.
Again, this missive is focused at the Nikon situation, but probably has applicability to other vendors. Iām particularly interested now because I have a camera/lens from a manufacturer (Nikon Z) that has explicitly stated that software corrections are now in the trade space for lens design. Oh, for that tool, Nikon encodes correction data in their proprietary metadata; ideally, one would just be reading that and correcting the image, no hairy lookups of externally-produced correction data, but thatās another (wide) ditch to jumpā¦
Musings on a snowy day in Coloradoā¦