Project

General

Profile

Bug #1144

Sigma 10-20mm f/4-5.6 EX DC is detected as Tamaron

Added by Simon Harhues almost 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
lens
Target version:
Start date:
26 Dec 2015
Due date:
% Done:

100%

Estimated time:
4.00 h

Description

As Christmas is nearly over, so here is another bug in current trunk. I shot the attached photo with a

Sigma 10-20mm f/4-5.6 EX DC
using a Pentax K10 body.
But looking at exiv2 it is recognised wrongly:
simon@vmubuntu1510:/tmp/fotos/101_2212$ exiv2 --version
exiv2 0.25 001900 (64 bit build)
Copyright (C) 2004-2015 Andreas Huggel.

Dieses Programm ist freie Software. Sie können es weitergeben und/oder
verändern unter den Bedingungen der GNU General Public Lizenz, die von
der Free Software Foundation veröffentlicht wurde. Gültig ist die Version 2
der Lizenz oder, wenn Sie es wünschen, spätere Versionen.

Dieses Programm wird Ihnen in der Hoffnung zur Verfügung gestellt,
das Sie es brauchbar finden. Es gibt KEINE GARANTIE, noch nicht mal
eine implizite Zusicherung allgemeiner Gebrauchstauglichkeit oder der
Zusicherung der erforderlichen Gebrauchstauglichkeit. Weitere Details
finden Sie in der GNU General Public Lizenz.

Sie sollten mit diesem Programm eine Kopie der GNU General Public
Lizenz bekommen haben. Falls nicht, so wenden Sie sich bitte an die
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
simon@vmubuntu1510:/tmp/fotos/101_2212$ exiv2 -pt _IGP9302.DNG | grep Lens
Exif.PentaxDng.LensType                      Byte        3  Tamron 35-90mm F4 AF
Exif.PentaxDng.LensInfo                      Undefined  69  131 0 0 44 0 40 148 55 134 102 102 234 65 108 170 80 56 1 78 108 3 255 255 255 0 0 102 102 234 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
simon@vmubuntu1510:/tmp/fotos/101_2212$ 

If you need any further information from me let me know.


Files

_IGP9302.DNG (16.1 MB) _IGP9302.DNG raw photo taken with a Sigma lens Simon Harhues, 26 Dec 2015 21:53

Related issues

Related to Exiv2 - Bug #1143: Unable to extract embedded preview from jpg for Sony a77Closed24 Dec 2015

Actions
Related to Exiv2 - Feature #1145: Respect Sony/Minolta lenses with shared LensID such as Tamron SP AF 17-50mm F2.8 XR Di II LDClosed27 Dec 2015

Actions

Associated revisions

Revision 4151 (diff)
Added by Robin Mills almost 6 years ago

#1144 Fix submitted. r4147.

Revision 4152 (diff)
Added by Robin Mills almost 6 years ago

#1144. Correction to r4151 and update to test suite.

Revision 4153 (diff)
Added by Robin Mills almost 6 years ago

#1144 Fix submitted. Thank You, Simon for the test files on dropbox. I have extracted the metadata and added it to the test suite.

History

#1

Updated by Robin Mills almost 6 years ago

  • Status changed from New to Assigned
  • Assignee set to Robin Mills
  • Target version set to 0.26
  • Estimated time set to 3.00 h

Thanks, Simon. I think this is quite easy. It's another variant of #816 - so I know what to do and I'll fix it in the next day or two (I'm working on a Sony/Minolta puzzle at the moment #1143). Can you take a look in src/pentaxmn.cpp. You'll see the "duplicate" lens groups like this:

        { 0x0317, "smc PENTAX-F 100-300mm F4.5-5.6" },                   //0
        { 0x0317, "Sigma AF 28-300mm F3.5-6.3 DG IF Macro" },            //1
        { 0x0317, "Tokina 80-200mm F2.8 ATX-Pro" },                      //2
        { 0x0318, "smc PENTAX-F 35-135mm F3.5-4.5" },
        { 0x0319, "smc PENTAX-F 35-105mm F4-5.6" },                      //0
        { 0x0319, "Sigma AF 28-300mm F3.5-5.6 DL IF" },                  //1
        { 0x0319, "Sigma 55-200mm F4-5.6 DC" },                          //2
        { 0x0319, "Sigma AF 28-300mm F3.5-5.6 DL IF" },                  //3
        { 0x0319, "Sigma AF 28-300mm F3.5-6.3 DG IF Macro" },            //4
        { 0x0319, "Tokina 80-200mm F2.8 ATX-Pro" },                      //5
        { 0x031a, "smc PENTAX-F* 250-600mm F5.6 ED[IF]" },
        { 0x031b, "smc PENTAX-F 28-80mm F3.5-4.5" },                     //0
        { 0x031b, "Tokina AT-X Pro AF 28-70mm F2.6-2.8" },               //1
        { 0x031c, "smc PENTAX-F 35-70mm F3.5-4.5" },                     //0
        { 0x031c, "Tokina 19-35mm F3.5-4.5 AF" },                        //1
        { 0x031c, "Tokina AT-X AF 400mm F5.6" },                         //2
        { 0x031d, "PENTAX-F 28-80mm F3.5-4.5" },                         //0
        { 0x031d, "Sigma AF 18-125mm F3.5-5.6 DC" },                     //1
        { 0x031d, "Tokina AT-X PRO 28-70mm F2.6-2.8" },                  //2
        { 0x031e, "PENTAX-F 70-200mm F4-5.6" },
        { 0x031f, "smc PENTAX-F 70-210mm F4-5.6" },                      //0
        { 0x031f, "Tokina AF 730 75-300mm F4.5-5.6" },                   //1
        { 0x031f, "Takumar-F 70-210mm F4-5.6" },                         //2
        { 0x0320, "smc PENTAX-F 50mm F1.4" },
        { 0x0321, "smc PENTAX-F 50mm F1.7" },
        { 0x0322, "smc PENTAX-F 135mm F2.8 [IF]" },
        { 0x0323, "smc PENTAX-F 28mm F2.8" },
        { 0x0324, "Sigma 20mm F1.8 EX DG Aspherical RF" },
        { 0x0326, "smc PENTAX-F* 300mm F4.5 ED[IF]" },
        { 0x0327, "smc PENTAX-F* 600mm F4 ED[IF]" },
        { 0x0328, "smc PENTAX-F Macro 100mm F2.8" },
        { 0x0329, "smc PENTAX-F Macro 50mm F2.8" },                      //0
        { 0x0329, "Sigma 50mm F2.8 Macro" },                             //1
        { 0x032a, "Sigma 300mm F2.8 EX DG APO IF" },
        { 0x032c, "Tamron 35-90mm F4 AF" },                              //0
        { 0x032c, "Sigma AF 10-20mm F4-5.6 EX DC" },                     //1
        { 0x032c, "Sigma 12-24mm F4.5-5.6 EX DG" },                      //2
        { 0x032c, "Sigma 17-70mm F2.8-4.5 DC Macro" },                   //3
        { 0x032c, "Sigma 18-50mm F3.5-5.6 DC" },                         //4
        { 0x032e, "Sigma or Samsung Lens" },                             //0
        { 0x032e, "Sigma APO 70-200mm F2.8 EX" },                        //1
        { 0x032e, "Sigma EX APO 100-300mm F4 IF" },                      //2
        { 0x032e, "Samsung/Schneider D-XENON 50-200mm F4-5.6 ED" },      //3
        { 0x0332, "smc PENTAX-FA 28-70mm F4 AL" },
        { 0x0333, "Sigma 28mm F1.8 EX DG Aspherical Macro" },
        { 0x0334, "smc PENTAX-FA 28-200mm F3.8-5.6 AL[IF]" },            //0
        { 0x0334, "Tamron AF LD 28-200mm F3.8-5.6 [IF] Aspherical (171D)" },//1
        { 0x0335, "smc PENTAX-FA 28-80mm F3.5-5.6 AL" },
        { 0x03f7, "smc PENTAX-DA FISH-EYE 10-17mm F3.5-4.5 ED[IF]" },
        { 0x03f8, "smc PENTAX-DA 12-24mm F4 ED AL[IF]" },
        { 0x03fa, "smc PENTAX-DA 50-200mm F4-5.6 ED" },
        { 0x03fb, "smc PENTAX-DA 40mm F2.8 Limited" },
        { 0x03fc, "smc PENTAX-DA 18-55mm F3.5-5.6 AL" },
        { 0x03fd, "smc PENTAX-DA 14mm F2.8 ED[IF]" },
        { 0x03fe, "smc PENTAX-DA 16-45mm F4 ED AL" },
        { 0x03ff, "Sigma Lens" },                                        //0
        { 0x03ff, "Sigma 18-200mm F3.5-6.3 DC" },                        //1
        { 0x03ff, "Sigma DL-II 35-80mm F4-5.6" },                        //2
        { 0x03ff, "Sigma DL Zoom 75-300mm F4-5.6" },                     //3
        { 0x03ff, "Sigma DF EX Aspherical 28-70mm F2.8" },               //4
        { 0x03ff, "Sigma AF Tele 400mm F5.6 Multi-coated" },             //5
        { 0x03ff, "Sigma 24-60mm F2.8 EX DG" },                          //6
        { 0x03ff, "Sigma 70-300mm F4-5.6 Macro" },                       //7
        { 0x03ff, "Sigma 55-200mm F4-5.6 DC" },                          //8
        { 0x03ff, "Sigma 18-50mm F2.8 EX DC" },                          //9
        { 0x03ff, "Sigma 18-50mm F2.8 EX DC Macro" },                    //10
There are more than those. I haven't listed them all. If you have any of these lenses for any of your cameras, can you take a photo and attach the image to this issue and I'll clear them up.

What's going on here is that there are several lenses that share the same LensID. For example 0x3ff is shared by at least 9 known lenses. There's special code to deduce the lens by sniffing other metadata such as MaxAperture.

I'm travelling ground already tramped by Phil Harvey in exiftool. I've been thinking that when I encounter these, maybe I should just call exiftool and get the answer. Cheating? Maybe. Simple and effective? Yes on Linux and Mac. Windows will probably throw a horrible dos box onto the screen - however I might be able to get Windows to throw the dos box onto an invisible desktop and hide the perl from the user.

#2

Updated by Robin Mills almost 6 years ago

Oh, another little point. When you send the version information, could you include the svn number. Like this:

$ exiv2 --verbose --version --grep svn
exiv2 0.25 001900 (64 bit build)
svn=4146
$ 
You'll discover that
$ exiv2 --verbose --version
prints lot of stuff about the build and run-time environment. You can use grep multiple times to filter date/time and other stuff. For example to show me when you built the library and the libraries that have been loaded at run time:
$ exiv2 --verbose --version --grep svn --grep date --grep time --grep version --grep library
exiv2 0.25 001900 (64 bit build)
version=4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)
date=Dec 26 2015
time=11:36:17
svn=4146
id=$Id: version.cpp 4075 2015-12-08 09:27:38Z robinwmills $
library=/usr/local/lib/libexiv2.14.dylib
library=/usr/local/lib/libintl.8.dylib
library=/usr/lib/libSystem.B.dylib
library=/usr/lib/libiconv.2.dylib
library=/usr/local/lib/libz.1.dylib
library=/usr/local/lib/libexpat.1.dylib
library=/usr/lib/libc++.1.dylib
library=/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
...
library=/usr/lib/libz.1.dylib
have_gmtime_r=1
have_timegm=1
xmlns=mediapro:http://ns.iview-multimedia.com/mediapro/1.0/
749 rmills@rmillsmbp:~/gnu/exiv2/trunk $ 
So now you know that I was working on #1143 this morning at 11:36. I also worked on it on Christmas Day. Don't know why I put so much effort into this. Maybe it's because I enjoy it!

#3

Updated by Simon Harhues almost 6 years ago

I went through the file looking at the ambiguous entries, but believe I didn't find any other lens I have at hand atm beside the here mentioned Sigma 10-20mm and the Sigma 55-200mm from #816.

I did find a duplicated list entry though -- maybe one line can be removed:
line 709: { 0x0319, "Sigma AF 28-300mm F3.5-5.6 DL IF" }, //1
line 711: { 0x0319, "Sigma AF 28-300mm F3.5-5.6 DL IF" }, //3

Thanks for you effort!

#4

Updated by Robin Mills almost 6 years ago

  • % Done changed from 0 to 80

OK. I think I've got that fixed. r4152. Run some tests and let me know if/when you find something. You'll probably be interested in #1145 which is something similar for the Sony/Minolta cameras. Michael has given me some images for various Tamron lenses and that will keep my busy tomorrow!

I'm sure you are correct and one of the duplicates on either 709 or 711 can be removed. However I didn't write this code, so I'm going to leave those records in place.

Michael originally reported something much more complex #1143 which contains a "hidden" preview. I'm not going to get that fixed tomorrow. I'll have to think more about the hidden preview. However I think the lens identification is much the same as the matters you've raised here and r816.

Incidentally, we have a long standing idea to have an "overflow" file: r1034. Working on r816, r1145 and this (r1144) has caused me to rethink the solution for the "overflow" file. So this has been very useful - both for you and for the Exiv2 project.

As before, I've extracted the metadata from _IGP9302.DNG into test/data/exiv2-bug1144.exv and used it as a regression detector in our test suite:

$ exiv2 -pa --grep Lens/i test/data/exiv2-bug{816a,1144}.exv 
test/data/exiv2-bug816a.exv  Exif.Pentax.LensType                 Byte        2  Sigma 55-200mm F4-5.6 DC
test/data/exiv2-bug816a.exv  Exif.Pentax.LensInfo                 Undefined  36  3 255 0 0 40 148 71 152 80 6 241 65 ...
test/data/exiv2-bug1144.exv  Exif.PentaxDng.LensType              Byte        3  Sigma AF 10-20mm F4-5.6 EX DC
data/exiv2-bug1144.exv  Exif.PentaxDng.LensInfo                   Undefined  69  131 0 0 44 0 40 148 55 134 102 102 234  ...
$ 

#5

Updated by Simon Harhues almost 6 years ago

Thanks for the fast reply, I hope your family doesn't get angry with me/the exiv2 project.
I did as you told. And I'm feeling sorry for Michael, but I believe this issue is unfortunately not fixed yet. I uploaded some more pictures taken by the Sigma 10-20mm lens to https://www.dropbox.com/sh/zb7cb5o71u8p1dz/AABIQetKGrhzncDaP-aHMtCja?dl=0 and tested it against

exiv2 0.25 001900 (64 bit build)
svn=4025

(thanks for the --verbose and --grep svn info btw. Generally I do a fresh checkout just before I test and report back here; but as often in life, better have information than guess :) )
Here is the result:
./IMGP2248.PEF nok
./IMGP2247.JPG nok
./IMGP2246.JPG nok
./_IGP9302.DNG ok
./_IGP9303.DNG nok
./IMGP2247.PEF nok
./IMGP2248.JPG nok
./_IGP9301.DNG nok
./IMGP2246.PEF nok

Looks pretty sad to me. You know my sentence already: Feel free to use the photos for further tests. If you need more test data let me know (I only have access to that lens for another week or so).

#6

Updated by Robin Mills almost 6 years ago

Thanks for testing this and providing the test files. I'm confident that we'll get this resolved tomorrow. And probably Michael's #1145 also. Michael's little horror with the hidden preview is something else, however I'll put him to the sword in 2015!

I think my wife is quite happy that I keep busy and quiet! I am retired and happy to potter about on Exiv2. Mind you on busy weeks, it feels like a full time unpaid job.

#7

Updated by Robin Mills almost 6 years ago

Fix submitted. r4153. Thank You, Simon for the test files you sent via Dropbox. I've extracted the metadata and added it to the test suite.

$ exiv2 -pa --grep Lens/i --grep Photo.FocalLength/i ~/Downloads/exiv2-1144/* 
/Users/rmills/Downloads/exiv2-1144/IMGP2246.JPG  Exif.Photo.FocalLength              Rational    1  10.0 mm
/Users/rmills/Downloads/exiv2-1144/IMGP2246.JPG  Exif.PentaxDng.LensType             Byte        4  Sigma AF 10-20mm F4-5.6 EX DC
/Users/rmills/Downloads/exiv2-1144/IMGP2246.JPG  Exif.PentaxDng.LensInfo             Undefined 128  0 131 128 0 0 44 0 80 0 0 ...
/Users/rmills/Downloads/exiv2-1144/IMGP2246.JPG  Exif.Photo.FocalLengthIn35mmFilm    Short       1  15.0 mm
/Users/rmills/Downloads/exiv2-1144/IMGP2246.PEF  Exif.Photo.FocalLength              Rational    1  10.0 mm
/Users/rmills/Downloads/exiv2-1144/IMGP2246.PEF  Exif.PentaxDng.LensType             Byte        4  Sigma AF 10-20mm F4-5.6 EX DC
/Users/rmills/Downloads/exiv2-1144/IMGP2246.PEF  Exif.PentaxDng.LensInfo             Undefined 128  0 131 128 0 0 44 0 80 0 0 ...
/Users/rmills/Downloads/exiv2-1144/IMGP2246.PEF  Exif.Photo.FocalLengthIn35mmFilm    Short       1  15.0 mm
/Users/rmills/Downloads/exiv2-1144/IMGP2247.JPG  Exif.Photo.FocalLength              Rational    1  18.0 mm
/Users/rmills/Downloads/exiv2-1144/IMGP2247.JPG  Exif.PentaxDng.LensType             Byte        4  Sigma AF 10-20mm F4-5.6 EX DC
/Users/rmills/Downloads/exiv2-1144/IMGP2247.JPG  Exif.PentaxDng.LensInfo             Undefined 128  0 131 128 0 0 44 0 140 0 0 ...
/Users/rmills/Downloads/exiv2-1144/IMGP2247.JPG  Exif.Photo.FocalLengthIn35mmFilm    Short       1  27.0 mm
/Users/rmills/Downloads/exiv2-1144/IMGP2247.PEF  Exif.Photo.FocalLength              Rational    1  18.0 mm
/Users/rmills/Downloads/exiv2-1144/IMGP2247.PEF  Exif.PentaxDng.LensType             Byte        4  Sigma AF 10-20mm F4-5.6 EX DC
/Users/rmills/Downloads/exiv2-1144/IMGP2247.PEF  Exif.PentaxDng.LensInfo             Undefined 128  0 131 128 0 0 44 0 140 0 0 ...
/Users/rmills/Downloads/exiv2-1144/IMGP2247.PEF  Exif.Photo.FocalLengthIn35mmFilm    Short       1  27.0 mm
/Users/rmills/Downloads/exiv2-1144/IMGP2248.JPG  Exif.Photo.FocalLength              Rational    1  20.0 mm
/Users/rmills/Downloads/exiv2-1144/IMGP2248.JPG  Exif.PentaxDng.LensType             Byte        4  Sigma AF 10-20mm F4-5.6 EX DC
/Users/rmills/Downloads/exiv2-1144/IMGP2248.JPG  Exif.PentaxDng.LensInfo             Undefined 128  0 131 128 0 0 44 0 160 0 0 ...
/Users/rmills/Downloads/exiv2-1144/IMGP2248.JPG  Exif.Photo.FocalLengthIn35mmFilm    Short       1  30.0 mm
/Users/rmills/Downloads/exiv2-1144/IMGP2248.PEF  Exif.Photo.FocalLength              Rational    1  20.0 mm
/Users/rmills/Downloads/exiv2-1144/IMGP2248.PEF  Exif.PentaxDng.LensType             Byte        4  Sigma AF 10-20mm F4-5.6 EX DC
/Users/rmills/Downloads/exiv2-1144/IMGP2248.PEF  Exif.PentaxDng.LensInfo             Undefined 128  0 131 128 0 0 44 0 160 0 0 ...
/Users/rmills/Downloads/exiv2-1144/IMGP2248.PEF  Exif.Photo.FocalLengthIn35mmFilm    Short       1  30.0 mm
/Users/rmills/Downloads/exiv2-1144/_IGP9301.DNG  Exif.Photo.FocalLength              Rational    1  10.0 mm
/Users/rmills/Downloads/exiv2-1144/_IGP9301.DNG  Exif.Photo.FocalLengthIn35mmFilm    Short       1  15.0 mm
/Users/rmills/Downloads/exiv2-1144/_IGP9301.DNG  Exif.PentaxDng.LensType             Byte        3  Sigma AF 10-20mm F4-5.6 EX DC
/Users/rmills/Downloads/exiv2-1144/_IGP9301.DNG  Exif.PentaxDng.LensInfo             Undefined  69  131 0 0 44 0 40 148 54 99 83 ...
/Users/rmills/Downloads/exiv2-1144/_IGP9302.DNG  Exif.Photo.FocalLength              Rational    1  17.0 mm
/Users/rmills/Downloads/exiv2-1144/_IGP9302.DNG  Exif.Photo.FocalLengthIn35mmFilm    Short       1  25.0 mm
/Users/rmills/Downloads/exiv2-1144/_IGP9302.DNG  Exif.PentaxDng.LensType             Byte        3  Sigma AF 10-20mm F4-5.6 EX DC
/Users/rmills/Downloads/exiv2-1144/_IGP9302.DNG  Exif.PentaxDng.LensInfo             Undefined  69  131 0 0 44 0 40 148 55 134 ...
/Users/rmills/Downloads/exiv2-1144/_IGP9303.DNG  Exif.Photo.FocalLength              Rational    1  20.0 mm
/Users/rmills/Downloads/exiv2-1144/_IGP9303.DNG  Exif.Photo.FocalLengthIn35mmFilm    Short       1  30.0 mm
/Users/rmills/Downloads/exiv2-1144/_IGP9303.DNG  Exif.PentaxDng.LensType             Byte        3  Sigma AF 10-20mm F4-5.6 EX DC
/Users/rmills/Downloads/exiv2-1144/_IGP9303.DNG  Exif.PentaxDng.LensInfo             Undefined  69  131 0 0 44 0 40 148 55 98 ...
1309 rmills@rmillsmbp:~/gnu/exiv2/trunk $ 

#8

Updated by Simon Harhues almost 6 years ago

Thanks for the fix. I did a couple of more test shots with the Sigma lens and all were correctly recognised. From my side you can close this issue.

#9

Updated by Robin Mills almost 6 years ago

  • % Done changed from 80 to 100
  • Estimated time changed from 3.00 h to 4.00 h

I'm going to set this to 100% Resolved which means, I don't intend further work on this subject.

If something does occur, please update this issue and I will investigate. If nothing has happened after about a month, I'll close this. Even when closed, you can update an issue report - however it's better to open a new issue and mention this issue report.

Here's the bill for my help: I'd like you to visit OpenHub.net and register (it's free). Give the Exiv2 project a great rating and give me kudos.

Exiv2: https://www.openhub.net/p/exiv2
Clanmills: https://www.openhub.net/p/exiv2/contributors/60065117754297

#10

Updated by Robin Mills almost 6 years ago

  • Status changed from Assigned to Closed

Also available in: Atom PDF