Trying to understand how this composite Lens ID field is formed
Beep6581 opened this issue · comments
Hello
Someone edited a JPEG and set the lens manually, and asked a question about why RawTherapee shows an array of possible lens names whereas other programs/websites show only the lens he set.
RawTherapee derives its lens identification from ExifTool, and ExifTool shows the same composite Lens ID:
$ exiftool -G0 DSC00074-1.jpg | grep -ai lens
[EXIF] Lens Make : Nikon
[EXIF] Lens Model : Series E 100mm 1:2.8
[MakerNotes] Lens Format : Unknown
[MakerNotes] Lens Mount : Unknown
[MakerNotes] Lens Zoom Position : 0%
[MakerNotes] Lens Type : E-Mount, T-Mount, Other Lens or no lens
[XMP] Lens : Series E 100mm 1:2.8
[Composite] Lens ID : Sony FE 100mm F2.8 STF GM OSS or Sony FE 70-200mm F2.8 GM OSS or Sony FE 70-200mm F2.8 GM OSS + 1.4X Teleconverter or Sony FE 70-200mm F2.8 GM OSS + 2X Teleconverter or Sigma 70-200mm F2.8 DG OS HSM | S
Could you help me understand how this composite is formed?
If it's based on a bunch of possible numerical lens ID values, how do I see those values?
Looking at /lib/Image/ExifTool/Sony.pm
, the lenses in the composite ID map to:
- 32819
- 32830
- 33072
- 33073
- 50512
Why are there so many hits, how does that work?
Thank you
Sorry for the delay in responding.
Unfortunately, the LensType number in this image is 65535, which maps into a large number of lenses. ExifTool tries to narrow this down using the "Derived From" tags listed here (the relevant one is the first LensID in the table): http://owl.phy.queensu.ca/~phil/exiftool/TagNames/Composite.html
It is on my list to improve the logic and use EXIF:LensModel more intelligently in the determination. I'll see what I can do about improving this for the next release.
What exactly did the guy change in the metadata when he tried to change the lens?
- Phil
I was playing around with this file. To properly set this lens requires two separate ExifTool commands:
- exiftool -lensmount=E-mount FILE
- exiftool -lenstype2#=32819 FILE
The value of the LensMount tag affects how LensType2 is interpreted, so it must be written first.
Thank you @boardhead
What exactly did the guy change in the metadata when he tried to change the lens?
I suppose he set these two:
[EXIF] Lens Make : Nikon
[EXIF] Lens Model : Series E 100mm 1:2.8
You can find the discussion here:
https://discuss.pixls.us/t/rt-and-lens-data-exif-in-info/12760
Feel free to close this issue, as I was just trying to understand how this works, which you kindly explained.
This makes sense. Until relatively recently cameras haven't been setting these tags, and as a result ExifTool identifies the lens using other tags.
- Phil