Feature #1128

New lens: TAMRON SP 70-200mm F/2.8 Di VC USD A009

Added by David Ramonet over 1 year ago. Updated 10 months ago.

Status:ClosedStart date:10 Oct 2015
Priority:NormalDue date:
Assignee:Robin Mills% Done:

100%

Category:metadataEstimated time:3.00 hours
Target version:0.26

Description

Hi!

Would you add support for the following lens?

$ exiv2 -pt img_9068.jpg | grep -ai lens
Exif.CanonCs.LensType                        Short       1  255
Exif.CanonCs.Lens                            Short       3  70.0 - 200.0 mm
Exif.Canon.LensModel                         Ascii      74  TAMRON SP 70-200mm F/2.8 Di VC USD A009´┐ŻUD
Exif.Photo.LensSpecification                 Rational    4  70/1 200/1 0/1 0/1
Exif.Photo.LensModel                         Ascii      40  TAMRON SP 70-200mm F/2.8 Di VC USD A009
Exif.Photo.LensSerialNumber                  Ascii      11  0000000000

manufacturer link: http://www.tamron-usa.com/lenses/prod/70200_vc_a009.php

Best

img_9068.jpg - sample image on Canon 6D (10.5 MB) David Ramonet, 10 Oct 2015 07:39

tamron.patch Magnifier - Patch to add support for Tamron 70-200 f/2.8 (717 Bytes) Steve Fosdick, 27 Feb 2016 14:41

History

#1 Updated by Robin Mills over 1 year ago

  • Category set to metadata
  • Status changed from New to Assigned
  • Assignee set to Robin Mills
  • Target version set to 0.26

It appears to there on the trunk already:

510 rmills@rmillsmbp:/Users/Shared/Parallels $ exiv2 --verbose --version --grep svn
exiv2 0.25 001900 (64 bit build)
svn=3980
511 rmills@rmillsmbp:/Users/Shared/Parallels $ exiv2 -pa -g Lens http://dev.exiv2.org/attachments/download/848/img_9068.jpg 
Exif.CanonCs.LensType                        Short       1  255
Exif.CanonCs.Lens                            Short       3  70.0 - 200.0 mm
Exif.Canon.LensModel                         Ascii      74  TAMRON SP 70-200mm F/2.8 Di VC USD A009
Exif.Photo.LensSpecification                 Rational    4  70/1 200/1 0/1 0/1
Exif.Photo.LensModel                         Ascii      40  TAMRON SP 70-200mm F/2.8 Di VC USD A009
Exif.Photo.LensSerialNumber                  Ascii      11  0000000000
512 rmills@rmillsmbp:/Users/Shared/Parallels $ 
You appear to have some "crud" on Exif.Canon.LensModel. I'm not getting that on trunk:
515 rmills@rmillsmbp:/Users/Shared/Parallels $ exiv2 -pa -g Canon.LensModel http://dev.exiv2.org/attachments/download/848/img_9068.jpg 
Exif.Canon.LensModel                         Ascii      74  TAMRON SP 70-200mm F/2.8 Di VC USD A009
516 rmills@rmillsmbp:/Users/Shared/Parallels $ exiv2 -pa -g Canon.LensModel http://dev.exiv2.org/attachments/download/848/img_9068.jpg  | od -a
0000000    E   x   i   f   .   C   a   n   o   n   .   L   e   n   s   M
0000020    o   d   e   l  sp  sp  sp  sp  sp  sp  sp  sp  sp  sp  sp  sp
0000040   sp  sp  sp  sp  sp  sp  sp  sp  sp  sp  sp  sp  sp   A   s   c
0000060    i   i  sp  sp  sp  sp  sp  sp   7   4  sp  sp   T   A   M   R
0000100    O   N  sp   S   P  sp   7   0   -   2   0   0   m   m  sp   F
0000120    /   2   .   8  sp   D   i  sp   V   C  sp   U   S   D  sp   A
0000140    0   0   9  nl                                                
0000144
517 rmills@rmillsmbp:/Users/Shared/Parallels $ 

#2 Updated by Robin Mills over 1 year ago

  • Status changed from Assigned to Resolved
  • % Done changed from 0 to 100
  • Estimated time set to 1.00

I'm going to set the status to Resolved/100% as I don't see any further work is required on this matter.

#3 Updated by Robin Mills about 1 year ago

  • Status changed from Resolved to Closed

#4 Updated by Steve Fosdick about 1 year ago

This issue has come up again in connection with darktable which uses exiv2. Compare the output from the Canon 70-200 which exiv2 does already recognise with the Tamron 70-200 which it does not.

Canon:

Exif.CanonCs.LensType Short 1 Canon EF 70-200mm f/2.8L IS
Exif.CanonCs.Lens Short 3 70.0 - 200.0 mm
Exif.Canon.LensModel Ascii 74 EF70-200mm f/2.8L IS USM
Exif.Photo.LensSpecification Rational 4 70/1 200/1 0/1 0/1
Exif.Photo.LensModel Ascii 25 EF70-200mm f/2.8L IS USM
Exif.Photo.LensSerialNumber Ascii 11 0000000000

Tamron:

Exif.CanonCs.LensType Short 1 255
Exif.CanonCs.Lens Short 3 70.0 - 200.0 mm
Exif.Canon.LensModel Ascii 74 TAMRON SP 70-200mm F/2.8 Di VC USD A009
Exif.Photo.LensSpecification Rational 4 70/1 200/1 0/1 0/1
Exif.Photo.LensModel Ascii 40 TAMRON SP 70-200mm F/2.8 Di VC USD A009
Exif.Photo.LensSerialNumber Ascii 11 0000000000

Note for the Canon exiv2 is mapping the Exif.CanonCs.LensType short value into a string whereas for the Tamron it is not. The attached patch fixes that. It is worth noting that ID 255 is subject to a ID clash with two other lenses:

"Sigma 24-105mm f/4 DG OS HSM | A"
"Sigma 180mm f/2.8 EX DG OS HSM APO Macro"

these all have distinct focal lengths so there should be no problem but if you have images for these other two lenses it would be worth running a test.

#5 Updated by Robin Mills about 1 year ago

  • Status changed from Closed to Assigned
  • % Done changed from 100 to 60
  • Estimated time changed from 1.00 to 3.00

Steve

Thank You for the patch. It's very helpful to get a patch as I am rather overloaded with a home remodelling project at the moment. Do you have one (or more) test images which I can add to our test suite as a regression detector? Without a test image, I can only inspect your patch so I can't be certain that we've fixed this and of course I can't detect if the fix breaks in future.

Robin

#6 Updated by Igor Blanco about 1 year ago

Hi Robin:

For the Tamron Darktable does not recognize the lens name, it just prints 255.
For the Sigma right now darktable does print the correct lens name, but doesn't choose it automatically when activating the lens correction module. But I suppose this is a Darktable issue.

This is a CR2 file for the Tamron 70-200: https://www.dropbox.com/s/55jh1w7mkoc3ox2/20160117_0060.CR2?dl=0
This is a CR2 file for the SIGMA 24-105: https://www.dropbox.com/s/h4xw6thay4bcdbz/SIGMA_24_105_20150103_0484.CR2?dl=0

I give you a sample of each so that you can check that clashes are correctly managed. Sorry

#7 Updated by Robin Mills 10 months ago

  • Status changed from Assigned to Resolved
  • % Done changed from 60 to 100

I've added a new feature to #1034 to read the file ~/.exiv2. You can specify a lens names in that file to overwrite the defaults compiled into exiv2. The file ~/.exiv2 is in .INI format.

529 rmills@rmillsmbp:~/gnu/exiv2/ttt $ cat ~/.exiv2
[canon]
# 255=some weird lens
530 rmills@rmillsmbp:~/gnu/exiv2/ttt $ exiv2 -pa --grep lens/i ~/Downloads/S*.CR2
Exif.CanonCs.LensType                        Short       1  Sigma 24-105mm f/4 DG OS HSM | A
Exif.CanonCs.Lens                            Short       3  24.0 - 105.0 mm
Exif.Canon.LensModel                         Ascii      74  24-105mm
Exif.Photo.LensSpecification                 Rational    4  24/1 105/1 0/1 0/1
Exif.Photo.LensModel                         Ascii       9  24-105mm
Exif.Photo.LensSerialNumber                  Ascii      11  0000000000
531 rmills@rmillsmbp:~/gnu/exiv2/ttt $ exiv2 -pa --grep lens/i ~/Downloads/2016*.CR2
Exif.CanonCs.LensType                        Short       1  255
Exif.CanonCs.Lens                            Short       3  70.0 - 200.0 mm
Exif.Canon.LensModel                         Ascii      74  TAMRON SP 70-200mm F/2.8 Di VC USD A009
Exif.Photo.LensSpecification                 Rational    4  70/1 200/1 0/1 0/1
Exif.Photo.LensModel                         Ascii      40  TAMRON SP 70-200mm F/2.8 Di VC USD A009
Exif.Photo.LensSerialNumber                  Ascii      11  0000000000
532 rmills@rmillsmbp:~/gnu/exiv2/ttt $ cat ~/.exiv2
[canon]
255=some weird lens
533 rmills@rmillsmbp:~/gnu/exiv2/ttt $ exiv2 -pa --grep lens/i ~/Downloads/S*.CR2
Exif.CanonCs.LensType                        Short       1  some weird lens
Exif.CanonCs.Lens                            Short       3  24.0 - 105.0 mm
Exif.Canon.LensModel                         Ascii      74  24-105mm
Exif.Photo.LensSpecification                 Rational    4  24/1 105/1 0/1 0/1
Exif.Photo.LensModel                         Ascii       9  24-105mm
Exif.Photo.LensSerialNumber                  Ascii      11  0000000000
534 rmills@rmillsmbp:~/gnu/exiv2/ttt $ exiv2 -pa --grep lens/i ~/Downloads/2016*.CR2
Exif.CanonCs.LensType                        Short       1  some weird lens
Exif.CanonCs.Lens                            Short       3  70.0 - 200.0 mm
Exif.Canon.LensModel                         Ascii      74  TAMRON SP 70-200mm F/2.8 Di VC USD A009
Exif.Photo.LensSpecification                 Rational    4  70/1 200/1 0/1 0/1
Exif.Photo.LensModel                         Ascii      40  TAMRON SP 70-200mm F/2.8 Di VC USD A009
Exif.Photo.LensSerialNumber                  Ascii      11  0000000000
535 rmills@rmillsmbp:~/gnu/exiv2/ttt $ 
I'm going to mark this 100% resolved. I'd appreciate this feature being tested and welcome your feedback. Currently it is only implemented for canon cameras. Other manufacturers will be added in May 2016.

#8 Updated by Robin Mills 10 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF

Redmine Appliance - Powered by TurnKey Linux