Project

General

Profile

Sigma 35mm F1.4 DG HSM ART not recognized on Canon 6D body

Added by marcus san over 5 years ago

Hi,

New here so not sure how to handle this. I found my Sigma 35mm F1.4 DG HSM ART lens is not recognized by exiv2. In exiv2 and thus Darktable it is recognized as > Canon EF 17-35mm f/2.8L
Any suggestion on how to sort this out ? Running exiv2 version 0.25 on Linux.

Thanks in advance.


Replies (41)

RE: Sigma 35mm F1.4 DG HSM ART not recognized on Canon 6D body - Added by Jim Easterbrook over 5 years ago

I have a similar problem with my Sigma 70-300 mm lens and EOS 100D camera. Sigma have reused the ID code from a Canon 70-300 mm lens. I assume Canon doesn't reserve a group of codes for non-Canon lenses so what else can they do? (A problem this introduces is that the camera applied the wrong vignetting and chromatic aberration correction until I removed the 70-300 mm lens from its database using Canon's software.)

Life gets even more interesting when you use lens mount adaptors with a focus confirm "chip". My EOS to Olympus adapter claims to be a 50 mm f/1.8 Canon lens while my M42 adapter claims to be a 1-65535 mm zoom! I now make a point of setting the correct Exif.Photo.LensMake/LensModel/LensSerialNumber/LensSpecification, Exif.Photo.FNumber and Exif.Photo.FocalLength metadata immediately after importing photos to the computer.

RE: Sigma 35mm F1.4 DG HSM ART not recognized on Canon 6D body - Added by Robin Mills over 5 years ago

I recently had a conversation with somebody on this Forum about their Sony Camera and Lenses. A firmware update fixed the Sony business.

I'm going to try using a web service in v0.26 to take advantage of Phil's Lens Recognition in exiftool. We'll see how that goes. However, I honestly believe that lens recognition is not the business of Exiv2. We provide robust/reliable metadata read/write/modify. If the manufacturer has -1 as the LensID, that's what we should report. That we can guess/infer the lens from other metadata is not the business of Exiv2.

Of course, you are welcome to disagree. However, I'm dealing with many matters for Exiv2. Regrettably Niels, our wonderful MakerNote Engineer, has gone back to college and I've taken on lens recognition. Having dealt with several lenses, I have been surprised at the effort involved. And the lens recognition can break as new lenses and cameras arrive on the market. This is a time-sink for me and a distraction from the purpose and focus of Exiv2.

Gentlemen: I encourage you to discuss this with your Camera/Lens manufacturers whom you have paid for their products. Please let me know Canon's and Sigma's response to your enquires.

RE: Sigma 35mm F1.4 DG HSM ART not recognized on Canon 6D body - Added by Jim Easterbrook over 5 years ago

Robin, I fear you may have misunderstood me. I absolutely agree with you that it's not the business of Exiv2 to identify lenses. My point about the reused codes was meant to support that view.

RE: Sigma 35mm F1.4 DG HSM ART not recognized on Canon 6D body - Added by Robin Mills over 5 years ago

Well, it sounds as though we are in agreement and that's wonderful. Thank You for your support.

I don't know how the Camera/Lens (Canon/Sigma) interface works. For sure the lens has a digital interface to the camera because the metadata contains aperture, focus and other data. It's not impossible for the Lens to reveal the manufacturer and model to the camera. So, there could be a way, however it depends on the interface specifications.

I have an confession to make: I know very little about metadata. I'm a retired Adobe Engineer living in England and keep my C++ skills alive by maintaining Exiv2 (which I didn't write). Exactly how metadata is used by other software is a mystery to me. And for that matter, the Exiv2 user base is equally opaque.

Maybe, one day, the Exif Standard Committee will invite Team Exiv2 to participate in their deliberations. Two matters would top my list: Lens/Accessory Recognition and TimeZone.

I thank you for your support and I thank you for using Exiv2.

RE: Sigma 35mm F1.4 DG HSM ART not recognized on Canon 6D body - Added by Jim Easterbrook over 5 years ago

I suspect lens/camera interfaces are very proprietary, and camera makers will do all they can to give their own lenses an advantage over rival brands.

PS I'm a retired BBC R&D engineer keeping my Python skills alive with small projects such as a simple metadata editor (https://github.com/jim-easterbrook/Photini). My C++ skills are minimal.

RE: Sigma 35mm F1.4 DG HSM ART not recognized on Canon 6D body - Added by Robin Mills over 5 years ago

Regrettably commercial interests usually defeat common sense. The MakerNote tag carries lots of information. Most manufacturers provide scant documentation about their MakerNote tag. In truth, customers could rebel (pun intended) to this behaviour by the Manufacturers by not buying their products if they don't interoperate in a satisfactory manner.

Python is my favourite scripting language. I gave a lightning presentation (5 minutes) about Exiv2 at PyCon2010 in Atlanta: http://clanmills.com/2010/PyCon/RobinPyCon2010.mov

RE: Sigma 35mm F1.4 DG HSM ART not recognized on Canon 6D body - Added by marcus san over 5 years ago

So is the lens > Sigma 35mm F1.4 DG HSM ART in the exiv2 database, is it missing in the database, or is there another problem. Like Sigma/Canon not providing correct identifiers ?

Thanks

RE: Sigma 35mm F1.4 DG HSM ART not recognized on Canon 6D body - Added by Robin Mills over 5 years ago

Marcus

Can you provide a test image for your lens and I will look at the metadata. In general, lens recognition is a metadata mess created by the camera/lens manufacturers.

RE: Sigma 35mm F1.4 DG HSM ART not recognized on Canon 6D body - Added by Jim Easterbrook over 5 years ago

My suspicion is that the Sigma lens is being wrongly identified by the camera, which then writes the wrong information to the metadata. This is not an uncommon problem, e.g. this discussion: http://www.canonrumors.com/forum/index.php?topic=649.15 Note reply #21 says lens code "169 = Canon EF 17-35mm f/2.8L or Sigma Lens" which suggests Sigma have used code 169 several times.

RE: Sigma 35mm F1.4 DG HSM ART not recognized on Canon 6D body - Added by marcus san over 5 years ago

Thanks, I will do some reading and contact Sigma to see what they have to say and will update this thread if I get some good info from them.

RE: Sigma 35mm F1.4 DG HSM ART not recognized on Canon 6D body - Added by Jim Easterbrook over 5 years ago

To expand a little - code 169 is the lens ID as seen by the camera, the 169.1 to 169.5 tags listed in that table are the heuristically derived tags (in Exiftool, I think) mentioned earlier by Robin. Your particular Sigma lens is not among them.

RE: Sigma 35mm F1.4 DG HSM ART not recognized on Canon 6D body - Added by marcus san over 5 years ago

Yes was thinking this also. So my lens has no lens ID , or is it not yet in the exiv2 database ?

RE: Sigma 35mm F1.4 DG HSM ART not recognized on Canon 6D body - Added by marcus san over 5 years ago

when looking at canonmn.cpp

I see { 169, "Canon EF 17-35mm f/2.8L" }, // 0 { 169, "Sigma 18-200mm f/3.5-6.3 DC OS" }, // 1 { 169, "Sigma 15-30mm f/3.5-4.5 EX DG Aspherical" }, // 2 { 169, "Sigma 18-50mm f/2.8 Macro" }, // 3 { 169, "Sigma 50mm f/1.4 EX DG HSM" }, // 4 { 169, "Sigma 85mm f/1.4 EX DG HSM" }, // 5 { 169, "Sigma 30mm f/1.4 EX DC HSM" }, // 6 { 169, "Sigma 35mm f/1.4 DG HSM" }, // 7

the last entry is my lens. So it is in the exiv2 db

RE: Sigma 35mm F1.4 DG HSM ART not recognized on Canon 6D body - Added by Robin Mills over 5 years ago

Marcus

Exiv2 doesn't really have a 'database' for lens recognition. It has code. My understanding (and I'm not a metadata expert) is that the LensID should be unique for every lens. If we look at 169 for Canon

$ grep 169 src/canonmn.cpp 
        { (long int)0x80000169, "EOS-1D Mark III" },
        { 169, "Canon EF 17-35mm f/2.8L"                                    }, // 0
        { 169, "Sigma 18-200mm f/3.5-6.3 DC OS"                             }, // 1
        { 169, "Sigma 15-30mm f/3.5-4.5 EX DG Aspherical"                   }, // 2
        { 169, "Sigma 18-50mm f/2.8 Macro"                                  }, // 3
        { 169, "Sigma 50mm f/1.4 EX DG HSM"                                 }, // 4
        { 169, "Sigma 85mm f/1.4 EX DG HSM"                                 }, // 5
        { 169, "Sigma 30mm f/1.4 EX DC HSM"                                 }, // 6
        { 169, "Sigma 35mm f/1.4 DG HSM"                                    }, // 7
        { 169, printCsLensByFocalLength },
$ 
We have to execute the code in the function printCsLensByFocalLength to differentiate your 169 from all the others. So we guess by inspecting other metadata that it is your lens. I'm very unhappy with this approach. It's my opinion that we should report '169'. When you approach Canon/Sigma, they may have a different opinion about this matter.

Another matter is the myriad of lenses. Is your 'Sigma 35mm F1.4 DG HSM ART' the same as the code's "Sigma 35mm f/1.4 DG HSM"?

It would be very helpful for you to provide a test image with which I can investigate this further.

RE: Sigma 35mm F1.4 DG HSM ART not recognized on Canon 6D body - Added by Jim Easterbrook over 5 years ago

When stopped down to f/2.8 or more the other metadata (focal length and aperture) can't help, surely?

RE: Sigma 35mm F1.4 DG HSM ART not recognized on Canon 6D body - Added by Robin Mills over 5 years ago

The subject is even more complicated than using printCsLensByFocalLength. For different cameras, other metadata has to be consulted - not only FocalLength. The function in exiftool to handle this is passed about 13 elements of metadata. And, I've noticed that recent camera/lens combinations are often not recognised correctly by exiftool.

However, Phil is a wizard and frequently updates his code to deal with this. And that's what lead me to think several things:

  1. I cannot reproduce all of Phil's magic in C++
  2. I cannot update Exiv2 with the frequency that Phil updates exiftool
  3. If I call exiftool as a web service, I can take advantage of Phil's code. I'll update the web service every time Phil updates exiftool. So I can harness Phil's genius and his update frequency.

Of course, as I'm not an expert in metadata, I may be wrong in my opinion about this. The web service idea is discussed in #1034 and I hope/expect to implement it in v0.26 http://dev.exiv2.org/issues/1034

I thank you all for participating in this conversation as we may achieve new enlightenment!

RE: Sigma 35mm F1.4 DG HSM ART not recognized on Canon 6D body - Added by marcus san over 5 years ago

I have a testimage here. Shot with F1.4 with the Sigma 35 mm on my Canon 6D

when I do >

$ exiv2 -pt testimage.jpg | grep -ai lens

I get:

Exif.CanonCs.LensType                        Short       1  Canon EF 17-35mm f/2.8L
Exif.CanonCs.Lens                            Short       3  35.0 mm
Exif.Canon.LensModel                         Ascii      74  35mm
Exif.Photo.LensSpecification                 Rational    4  35/1 35/1 0/1 0/1
Exif.Photo.LensModel                         Ascii       5  35mm
Exif.Photo.LensSerialNumber                  Ascii      11  0000000000

testimage.jpg (200 KB) testimage.jpg testimage shot with F1.4

RE: Sigma 35mm F1.4 DG HSM ART not recognized on Canon 6D body - Added by marcus san over 5 years ago

Not sure if helps, but this is the lens I have >
http://www.sigmaphoto.com/lenses/standard-lenses/35mm-f14-dg-hsm-a

These are the new ART range lenses. The lenses with EX in it are the older range lenses.

RE: Sigma 35mm F1.4 DG HSM ART not recognized on Canon 6D body - Added by Robin Mills over 5 years ago

Right. We're on the same page. Here's what I have on the trunk.

525 rmills@rmillsmbp:~/gnu/exiv2/trunk $ svn info .
Path: .
Working Copy Root Path: /Users/rmills/gnu/exiv2/trunk
URL: svn://dev.exiv2.org/svn/trunk
Relative URL: ^/trunk
Repository Root: svn://dev.exiv2.org/svn
Repository UUID: b7c8b350-86e7-0310-a4b4-de8f6a8f16a3
Revision: 4235
Node Kind: directory
Schedule: normal
Last Changed Author: robinwmills
Last Changed Rev: 4235
Last Changed Date: 2016-03-18 20:31:04 +0000 (Fri, 18 Mar 2016)

526 rmills@rmillsmbp:~/gnu/exiv2/trunk $ exiv2 --verbose --version --grep svn 
exiv2 0.25 001900 (64 bit build)
svn=4235
527 rmills@rmillsmbp:~/gnu/exiv2/trunk $ exiv2 -pa --grep lens/i http://dev.exiv2.org/attachments/download/988/testimage.jpg
Exif.CanonCs.LensType                        Short       1  Canon EF 17-35mm f/2.8L
Exif.CanonCs.Lens                            Short       3  35.0 mm
Exif.Canon.LensModel                         Ascii      74  35mm
Exif.Photo.LensSpecification                 Rational    4  35/1 35/1 0/1 0/1
Exif.Photo.LensModel                         Ascii       5  35mm
Exif.Photo.LensSerialNumber                  Ascii      11  0000000000
528 rmills@rmillsmbp:~/gnu/exiv2/trunk $ 
I'll have a step through the debugger and see if I can do something about this. Can you confirm, is it correct to identify this as:
{ 169, "Sigma 35mm f/1.4 DG HSM"                                    }, // 7
Or should I add another item:
{ 169, "Sigma 35mm f/1.4 DG HSM ART"                                 }, // 8

RE: Sigma 35mm F1.4 DG HSM ART not recognized on Canon 6D body - Added by marcus san over 5 years ago

Nice !

Well I think the correct ID would be at least matching the Sigma 50mm F1.4 DG HSM Art from the same range. I read here this : http://dev.exiv2.org/issues/0000969 which is a bit confusing as there is no EX Art lens. It is either EX, or DG HSM Art it seems.

So it would make sense to have them both with same syntax. The lenses are both from the same range, only difference is 35mm or 50mm
I think somehow using the 'A' in the identifier would make sense. On the Sigma site they use > 35mm F1.4 DG HSM | A

RE: Sigma 35mm F1.4 DG HSM ART not recognized on Canon 6D body - Added by Robin Mills over 5 years ago

Well here's what the latest exiftool 10.13 sees:

542 rmills@rmillsmbp:~/gnu/exiv2/trunk $ curl -O http://dev.exiv2.org/attachments/download/988/testimage.jpg
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  200k    0  200k    0     0   779k      0 --:--:-- --:--:-- --:--:--  789k
543 rmills@rmillsmbp:~/gnu/exiv2/trunk $ exiftool -ver
10.13
544 rmills@rmillsmbp:~/gnu/exiv2/trunk $ exiftool testimage.jpg | grep -i lens
Lens Type                       : Canon EF 17-35mm f/2.8L or Sigma Lens
Lens Info                       : 35mm f/0
Lens Model                      : 35mm
Lens Serial Number              : 0000000000
Lens                            : 35.0 mm
Lens ID                         : Sigma 35mm f/1.4 DG HSM
Lens                            : 35.0 mm (35 mm equivalent: 34.6 mm)
545 rmills@rmillsmbp:~/gnu/exiv2/trunk $ 
You'll recall that "Pooh was a bear with an exceedingly small brain". Robin's the same, so #969 leaves me confused. Theres something that screams "It's marcus lens". This is useful: Exif.CanonCs.MaxAperture F1.4

However what would distinguish

...HSM " //7
from:
... HSM ART" // 8
Do you know?
546 rmills@rmillsmbp:~/gnu/exiv2/trunk $ exiv2 -pa --grep lens/i --grep aper/i --grep focal/i --grep model/i ^
                                         http://dev.exiv2.org/attachments/download/988/testimage.jpg
Exif.Image.Model                             Ascii      13  Canon EOS 6D
Exif.Photo.ApertureValue                     Rational    1  F1.4
Exif.Photo.FocalLength                       Rational    1  35.0 mm
Exif.CanonCs.LensType                        Short       1  Canon EF 17-35mm f/2.8L
Exif.CanonCs.Lens                            Short       3  35.0 mm
Exif.CanonCs.MaxAperture                     Short       1  F1.4
Exif.CanonCs.MinAperture                     Short       1  F16
Exif.CanonCs.DisplayAperture                 Short       1  0
Exif.Canon.FocalLength                       Short       4  35.0 mm
Exif.CanonSi.TargetAperture                  Short       1  F1.4
Exif.CanonSi.ApertureValue                   Short       1  F1.4
Exif.Canon.ModelID                           Long        1  EOS 6D
Exif.Canon.LensModel                         Ascii      74  35mm
Exif.Photo.FocalPlaneXResolution             Rational    1  3810.58
Exif.Photo.FocalPlaneYResolution             Rational    1  3815.9
Exif.Photo.FocalPlaneResolutionUnit          Short       1  inch
Exif.Photo.LensSpecification                 Rational    4  35/1 35/1 0/1 0/1
Exif.Photo.LensModel                         Ascii       5  35mm
Exif.Photo.LensSerialNumber                  Ascii      11  0000000000
547 rmills@rmillsmbp:~/gnu/exiv2/trunk $ 

RE: Sigma 35mm F1.4 DG HSM ART not recognized on Canon 6D body - Added by marcus san over 5 years ago

I think there would be no way to distinguish

...HSM " //7

from

... HSM ART" // 8

As it would be the same lens. The only thing is to decide how to define the ID in

...HSM " //7

leave it as it is, or change it to

... HSM ART" // 7

And indeed, regarding this

Exif.CanonCs.MaxAperture F1.4

There is no other lens in the 169 ID list that has fixed 35mm with max aperture F1.4

And then I would suggest using same syntax, as used for the
Sigma 50 mm f1.4 DG HSM Art lens
http://www.sigmaphoto.com/lenses/standard-lenses/50mm-f14-dg-hsm-a

which is NOT the same as
http://www.sigmaphoto.com/lenses/standard-lenses/50mm-f1-4-ex-dg-hsm

RE: Sigma 35mm F1.4 DG HSM ART not recognized on Canon 6D body - Added by Robin Mills over 5 years ago

I'm really lost. You've now started discussing a 50mm lens. Is it possible to discuss 1-to-1 on Skype 'clanmills', or messenger, or Google+, or FaceTime?

When we have this resolved, we can report our conclusion here.

(1-25/41)