Patch #982

Improve detection of Canon lenses sharing the same IDs

Added by Alexander Steffen over 4 years ago. Updated over 3 years ago.

Status:ClosedStart date:15 Aug 2014
Priority:NormalDue date:31 Aug 2014
Assignee:Niels Kristian Bech Jensen% Done:


Target version:0.25


This originally started as a bug report that my Tamron 150-600mm f/5-6.3 is not detected by exiv2 at all, because the lens reports a maximum aperture of 5.6 instead of 6.3, presumably so that the camera's AF still works. But quickly I discovered that for most lens IDs with more than one lens the maximum aperture is not necessary (or useful) to distinguish the lenses. Only for lens IDs 10 and 26 there are lenses with the same focal length but different apertures. Lens IDs 137, 161 and 173 also have lenses with the same focal length, but for those the aperture is identical too, so they cannot be distinguished by the current implementation.

Therefore, the attached patch changes the implementation so that only lens IDs 10 and 26 use focal length and aperture to try to determine the correct lens description, whereas all others use only the focal length. With this patch my Tamron is detected correctly, and this should also fix #926, #927 and #938.

#947 is not fixed by this patch, as in this case both lenses have the same focal length and maximum aperture. Maybe these lenses can be distinguished by other lens-dependent tags (perhaps minimum aperture?), but this would require images taken with both lenses (and ideally the same camera) for further investigation.

0001-Improve-detection-of-Canon-lenses-sharing-the-same-I.patch Magnifier (6.48 KB) Alexander Steffen, 15 Aug 2014 09:55

Related issues

Related to Exiv2 - Bug #926: Lens matching on Canon Closed 13 Oct 2013 31 Aug 2014
Related to Exiv2 - Bug #927: Sigma Lens Not detected Closed 18 Oct 2013 31 Aug 2014
Related to Exiv2 - Bug #938: Tamron 18-270 is not detected anymore Closed 18 Dec 2013 31 Aug 2014
Related to Exiv2 - Bug #947: LensID 137 in exiv2 0.23 and 0.24 instead of Tamron as S... Closed 24 Jan 2014 31 Aug 2014

Associated revisions

Revision 3340
Added by Niels Kristian Bech Jensen over 4 years ago

Fix issue #982: Improve detection of Canon lenses sharing the same IDs. Also fixes issues #926, #927, and #938. Thanks goes to Alexander Steffen for the patch.


#1 Updated by Robin Mills over 4 years ago

  • Status changed from New to Assigned
  • Assignee set to Niels Kristian Bech Jensen
  • Target version set to 0.24

Thank You, Alexander for reporting this and providing the patch. I'm going to assign this one to Niels as he's the project expert on Cameras and Accessories. In fact, I didn't respond sooner as I though Neils would volunteer for this issue.

Niels: If you're busy, I can submit the patch. However I'd like you to bless the patch as this is your area of expertise.

#2 Updated by Niels Kristian Bech Jensen over 4 years ago

  • Due date set to 31 Aug 2014
  • Status changed from Assigned to Resolved
  • Target version changed from 0.24 to 0.25
  • % Done changed from 0 to 100

Hi Alexander.

Thanks for the patch. It fixes several issues. I have commited it to the svn trunk.

Best regards,
Niels Kristian Bech Jensen

#3 Updated by Andreas Huggel over 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF

Redmine Appliance - Powered by TurnKey Linux