Bug #1163

Nikon Lens "Nikkor 16-80mm f/2.8-4G AF-S ED VR DX" not supported

Added by dreas b over 1 year ago. Updated 11 months ago.

Status:ClosedStart date:24 Feb 2016
Priority:NormalDue date:
Assignee:Robin Mills% Done:

100%

Category:lensEstimated time:1.00 hour
Target version:0.26

Description

The Nikon Nikkor 16-80mm f/2.8-4G AF-S ED VR DX is not supported within your exiv database. The full lens name is not shown within the lensidnumber section.

INVALID
exiv2 -pt ACB_0769.NEF | grep -i lens
Exif.Nikon3.LensType Byte 1 D G VR
Exif.Nikon3.Lens Rational 4 16-80mm F2.8-4
Exif.Nikon3.LensFStops Undefined 4 6
Exif.NikonLd3.LensIDNumber Byte 1 173
Exif.NikonLd3.LensFStops Byte 1 F6.0

EXPECTED
exiv2 -pt ACB_0769.NEF | grep -i lens
Exif.Nikon3.LensType Byte 1 D G VR
Exif.Nikon3.Lens Rational 4 16-80mm F2.8-4
Exif.Nikon3.LensFStops Undefined 4 6
Exif.NikonLd3.LensIDNumber Byte 1 Nikkor 16-80mm f/2.8-4G AF-S ED VR DX
Exif.NikonLd3.LensFStops Byte 1 F6.0

OTHER LENS
exiv2 -pt _ACB1562.NEF | grep -i lens
Exif.Nikon3.LensType Byte 1 D G
Exif.Nikon3.Lens Rational 4 17-55mm F2.8
Exif.Nikon3.LensFStops Undefined 4 6
Exif.NikonLd2.LensIDNumber Byte 1 Nikon AF-S DX Zoom-Nikkor 17-55mm f/2.8G IF-ED
Exif.NikonLd2.LensFStops Byte 1 F6.0

NOTE
I've create a similar ticket for the lensfun project to append this lens with identical identifier. Maybe it is possible to reuse this character sequence for this lens.

Nikkor_16-80mm_f_2.8-4G_AF-S_ED_VR_DX.exif - complete EXIF Data for new lens (14.2 KB) dreas b, 24 Feb 2016 20:06

ACB_0836.JPG (9.61 MB) dreas b, 29 Feb 2016 12:51

ACB_0836.NEF (18.7 MB) dreas b, 29 Feb 2016 12:51

History

#1 Updated by Robin Mills about 1 year ago

  • Target version set to 1.0

I cannot consider this for v0.26. I haven't started scheduling v0.27, so it is being pushed to v1.0 and will be considered for work after v0.26 code-complete (currently expected June 2016). http://dev.exiv2.org/projects/exiv2/news

#2 Updated by Robin Mills about 1 year ago

Can you provide a test image for this lens, please.

#3 Updated by dreas b about 1 year ago

Append JPG and NEF example data.

Note: Exif data modified; camera body serial number, copyright and artist removed.

#4 Updated by Robin Mills about 1 year ago

  • Status changed from New to Resolved
  • Assignee set to Robin Mills
  • % Done changed from 0 to 80
  • Estimated time set to 1.00

This appears to have been fixed on the trunk:

538 rmills@rmillsmbp:~/clanmills $ exiv2 -pa -g lens/i ~/Downloads/ACB_0836.NEF
Exif.Nikon3.LensType                         Byte        1  D G VR
Exif.Nikon3.Lens                             Rational    4  16-80mm F2.8-4
Exif.Nikon3.LensFStops                       Undefined   4  6
Exif.NikonLd3.LensIDNumber                   Byte        1  Nikon AF-S VR DX 16-80mm 2.8-4.0E ED
Exif.NikonLd3.LensFStops                     Byte        1  F6.0
539 rmills@rmillsmbp:~/clanmills $ exiv2 -pa -g lens/i http://dev.exiv2.org/attachments/download/969/ACB_0836.JPG
Exif.Nikon3.LensType                         Byte        1  D G VR
Exif.Nikon3.Lens                             Rational    4  16-80mm F2.8-4
Exif.Nikon3.LensFStops                       Undefined   4  6
Exif.NikonLd3.LensIDNumber                   Byte        1  Nikon AF-S VR DX 16-80mm 2.8-4.0E ED
Exif.NikonLd3.LensFStops                     Byte        1  F6.0
540 rmills@rmillsmbp:~/clanmills $ $ exiv2 -vVg svn
exiv2 0.25 001900 (64 bit build)
svn=4207
541 rmills@rmillsmbp:~/clanmills $ 

#5 Updated by Robin Mills about 1 year ago

  • Target version changed from 1.0 to 0.26

#6 Updated by Robin Mills about 1 year ago

  • Status changed from Resolved to Closed

#7 Updated by Robin Mills about 1 year ago

  • % Done changed from 80 to 100

#8 Updated by Torsten Bronger 11 months ago

Which name should I use for Lensfun's database? I see the "E" as well as the "G" letter in this lens name.

#9 Updated by Robin Mills 11 months ago

I don't know anything about Lensfun.

I've added a new feature #1034 to the trunk for v0.26. Get the LensID for your lens and put it in the [nikon] section of ~/.exiv2. You get the lensid with the command:

$ exiv2 -pv --grep lens/i path-to-image.
Suppose the LensID=123, then edit ~/.exiv2 as follows:
[nikon]
123=Nikkor 16-80mm f/2.8-4G AF-S ED VR DX
Here's it working with your test file:
521 rmills@rmillsmbp:~/gnu/exiv2/trunk $ dir ~/Downloads/*.NEF
-rw-r--r--@ 1 rmills  staff    19M 15 Jun 11:56 /Users/rmills/Downloads/ACB_0836.NEF
522 rmills@rmillsmbp:~/gnu/exiv2/trunk $ exiv2 -pv --grep lens/i ~/Downloads/ACB_0836.NEF 
0x0083 Nikon3       LensType                    Byte        1  78
0x0084 Nikon3       Lens                        Rational    4  160/10 800/10 28/10 40/10
0x008b Nikon3       LensFStops                  Undefined   4  72 1 12 0
0x000c NikonLd3     LensIDNumber                Byte        1  173
0x000d NikonLd3     LensFStops                  Byte        1  72
523 rmills@rmillsmbp:~/gnu/exiv2/trunk $ cat ~/.exiv2 
[nikon]
78=Nikkor 16-80mm f/2.8-4G AF-S ED VR DX

524 rmills@rmillsmbp:~/gnu/exiv2/trunk $ exiv2 -pa --grep lens/i ~/Downloads/ACB_0836.NEF 
Exif.Nikon3.LensType                         Byte        1  D G VR
Exif.Nikon3.Lens                             Rational    4  16-80mm F2.8-4
Exif.Nikon3.LensFStops                       Undefined   4  6
Exif.NikonLd3.LensIDNumber                   Byte        1  Nikkor 16-80mm f/2.8-4G AF-S ED VR DX
Exif.NikonLd3.LensFStops                     Byte        1  F6.0
525 rmills@rmillsmbp:~/gnu/exiv2/trunk $ 

#10 Updated by Torsten Bronger 11 months ago

What I mean is: Is

Nikkor 16-80mm f/2.8-4G AF-S ED VR DX
Nikkor 16-80mm f/2.8-4.0E AF-S ED VR DX

the same lens? Both names appear in this issue. The first has "4G" and the second "4.0E" in its name. For my purposes, it is important to know the precise lens name (modulo lettercase, ordering of tokens etc).

#11 Updated by Robin Mills 11 months ago

Torsten

I can't help with this. I'm not a photographer and have no knowledge of different lens models. I wish exiv2 had never become involved with lens recognition. Our mission is to reliably read/modify/delete metadata. The meaning of the metadata isn't the concern of exiv2. The metadata is stored by the camera in your image is:

0x0083 Nikon3       LensType                    Byte        1  78
0x000c NikonLd3     LensIDNumber                Byte        1  173
What type of lens is LensIDNumber 173? I don't know. Perhaps you can ask on a PhotoGraphy Forum and somebody there may be able to answer your question. You could try here: https://discuss.pixls.us

One of the difficulties involved in lens recognition is that manufacturers often use the same LensID for several different models of lens. For this reason, I decided to add the ~/.exiv2 file to enable a user to define their lens. It's unlikely that a user would have the misfortune to have two lenses with the same LensID.

#12 Updated by Robin Mills 11 months ago

I intended to say "Thank You, Torsten" for your work on LensFun. I don't know anything about your product, however I've heard others speak well of what you have been doing. My Team Exiv2 colleague Alan Pater has suggested there may be a way to combine LensFun with Exiv2 to solve our issues with lens recognition. If you think this is a possibility, I'd be very happy to work with you to bring this to life.

I'm currently busy closing exiv2 v0.26 by the end of June 2016. In July and August, I want to have a break to deal with some family matters and to have a vacation. After that, I'll be available if you're interested in collaboration.

And ... once more "Thank You" for your open source work. Open source is often a slog with little praise and encouragement. Thanks for doing what you do.

#13 Updated by Torsten Bronger 11 months ago

Thank you for your kind words!

I'm now pretty sure that the reporter mixed up the model names ... I hoped he could clear it up. But exiv2 does it correctly and that is all that counts.

I can whole-heartedly understand that you wish that exiv2 had never got this burden of lens models. It is really outrageous that EXIF doesn't have an accepted, canonical place for it.

The Darktable people do a lot of postprocessing with the exiv2 output, as do other applications. From a conceptional point of view, Lensfun is a good place to move this DT logic to, because this would avoid re-inventing the wheel. This could also disburden exiv2 somewhat.

Rest assured though that your work on lens model recognition is highly appreciated by end users. On the Darktable mailing list, the answer "it works with a current exiv2 version" is a frequent one.

#14 Updated by Robin Mills 11 months ago

Thanks. Did you attend LGM (Libre Graphics Meeting) in London in April? Pascal (DT) and I had a very nice discussion. Pascal has done some outstanding work to maintain updates to exiv2 for linux distribution. He cherrypicks the lens code and updates the version of libexiv2.14.0.0 that goes into Linux!

One of my ideas with Lens Recognition was to put an interpreter into Exiv2. It would almost certainly be my (mini) PostScript interpreter that that I wrote before I worked for Adobe. 1000 lines of magic. Let's call it Exiv2Script. When somebody reports a new lens, I can write the Lens recognition in Exiv2Script. So we can add new lenses without recompiling the library. The exiv2 utility would have an option to update its library of Exiv2Scripts from exiv2.org. Can't be done before 2018 because there's already lots of stuff for v0.27 next year. http://dev.exiv2.org/news/3

#15 Updated by dreas b 11 months ago

The lens model name which is printed on the lens:
"AF-S NIKKOR 16-80mm 1:2.8-4E ED"

The lens model name at the lens-box and on the cover of the user manual:
"AF-S DX NIKKOR 16-80mm f/2.8-4E ED VR"

It seems that my proposed/expected lens model name within the initial post is invalid.

#16 Updated by dreas b 11 months ago

The output of the "exiftool" application, which I have used to identify the model name is

exiftool ACB_0887.JPG | grep -i lens
Lens Type : G VR [6]
Lens : 16-80mm f/2.8-4
Lens Data Version : 0204
Lens ID Number : 173
Lens F Stops : 6.00
Lens ID : AF-S VR DX 16-80mm f/2.8-4.0E ED
Lens : 16-80mm f/2.8-4 G VR [6]

Now I'm confused.

#17 Updated by Torsten Bronger 11 months ago

Looks fine. FWIW, I always take the longest name available in exiftool or exiv2, which both call the lens almost the same (only 4 vs. 4.0).

Also available in: Atom PDF

Redmine Appliance - Powered by TurnKey Linux