LensType for Sigma Lens Sony Camera

Started by ivoyger, December 13, 2011, 02:31:06 PM

Previous topic - Next topic

ivoyger

Hi Harvey !

First, I apologize for my english but I'm french.

Then, thank you for your great job with Exiftool ! ;)

I have a Sony Alpha700 with a 105mm Sigma. When I discover Exiftool, I really enjoy the possibility to change the lens name on Aperture. It was see as a Minolta AF 100-300mm F4.5-5.6 APO (D).

When I opened my .ARW file with Exiftool, using exiftool /Users/%.ARW, I saw 2 Tag for lens : LensID and LensType. After searching on the web and on this forum, I try to use this code : exiftool -Lens="Sigma AF 105mm F2.8 EX [DG] Macro"

And it worked perfectly. After updating metadata in Aperture, the lens use was the Sigma. But I was knowing that it was adding a new tag and just changing the title of the lens and not really change the lens used in the EXIF.

So I try with a new .ARW file to do : exiftool -LensType="Sigma AF 105mm F2.8 EX [DG] Macro"

With this code, the LensID change with Sigma AF 105mm F2.8 EX [DG] Macro, great. But the LensType show Minolta AF 100mm F2.8 Macro [New], also on Aperture. Better but not that I want.

So, I try to use the code of the Sigma Lens that I found on the Sony Tags : exiftool -LensType="2581.2"

Again, with this code, the LensID change with Sigma AF 105mm F2.8 EX [DG] Macro. But the LensType show Minolta AF 100mm F2.8 Macro [New], also on Aperture.

So, is there any chance to modify the LensType with Sigma AF 105mm F2.8 EX [DG] Macro ?

I noticed that this is the LensType witch is use to show the lens use in Aperture, iPhoto and DxO.

Thanks !

Phil Harvey

A console transcript is worth a thousand words:

> exiftool a.arw "-lens*"
Lens Type                       : Minolta AF 50mm F1.7
Lens Spec                       : Unknown (00 0 0 0 0 00)
Lens ID                         : Minolta AF 50mm F1.7

> exiftool a.arw -lenstype="Sigma AF 105mm F2.8 EX [DG] Macro"
Warning: [minor] Entries in SubIFD were out of sequence. Fixed. - a.arw
    1 image files updated

> exiftool a.arw "-lens*"
Lens Type                       : Minolta AF 100mm F2.8 Macro [New] or Sigma or Tamron Lens
Lens Spec                       : Unknown (00 0 0 0 0 00)
Lens ID                         : Minolta AF 100mm F2.8 Macro [New] or Sigma or Tamron Lens

> exiftool a.arw -focallength=105 -maxaperturevalue=2.8
         1 image files updated

> exiftool a.arw "-lens*"
Lens Type                       : Minolta AF 100mm F2.8 Macro [New] or Sigma or Tamron Lens
Lens Spec                       : Unknown (00 0 0 0 0 00)
Lens ID                         : Sigma AF 105mm F2.8 EX [DG] Macro


- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

ivoyger

Ok !

So, no chance to have the real lens in LensType ... :-\

I will continue with the exiftool -Lens="Sigma AF 105mm F2.8 EX [DG] Macro", which in reality create a new tag, Lens.

Is-it a chance that Aperture (and iPhoto, Aperçu) use this new tag Lens ?

Phil Harvey

I Don't know what Aperture uses to identify the lens.

Unfortunately, the LensType isn't unique, and different 3rd party lenses often use the same number.  This is the purpose of the ExifTool LensID tag -- it looks at the LensType, FocalLength, MaxApertureValue, etc to try to determine then actual lens.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

gregglee

This is closely related so I added to this existing thread. 
 
When selecting lens correction modules, this issue is not merely a cosmetic problem of displayed lens name.   Photo software uses it to match lens correction modules for example.  It may be possible with duplicate ids for photo software to determine which specific lens by using id combined with other exif or maker notes.   (One standalone app apparently has:  http://equational.org/importphotos/alphalensinfo.html)   

Some lenses aren't listed at all in exiftool, even when an older similar version is.  Two raw converters I have checked (Bibble and DXO Pro Optics) use exactly the same lens id list as exiftool.  Not just the lenses but for duplicated ids, which lens gets .1, .2, etc.  This seems unlikely to be coincidence.  Perhaps they copy exiftool.   

So the general question is what is the source of the lens list?

The  more specific question is how can unlisted lenses be added to exiftool and to the master list (if that is not exiftool.) 


Example 1.  I have a Sigma 180mm f/3.5 ex dg macro which  has id 25811.  It does not appear on the lens id list.  This lens is a different design from the listed f/5.6 based on number of lens element and groups.  It was made until 2009, so is much newer than many lenses on the exiftool list.

exif tool Sony lens id list
25811   = Minolta AF 100mm F2.8 Macro [New] or Sigma or Tamron Lens
25811.1   = Sigma AF 90mm F2.8 Macro
25811.2   = Sigma AF 105mm F2.8 EX [DG] Macro
25811.3   = Sigma 180mm F5.6 Macro
25811.4   = Tamron 90mm F2.8 Macro


Example 2.  I have a Sigma 17-35mm f/2.8-4 EX.Aspherical with lens id  25661

exiftool shows only
25661   = Minolta AF 24mm F2.8     

So in this case the problem has an additional wrinkle.  Raw converters don't even "know" there is a potential duplication so if automatic is selected the converters apply the incorrect 24mm lens correction without alerting user.

Phil Harvey

Thanks for this information.

Yes, many other tools use ExifTool's lens list since I make this information public.

It is users like you that keep this information up to date, so everyone is encouraged to send me any other missing lens ID's that they discover.

I will add these lenses to the next exiftool release (version 8.76).

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

gregglee

Thanks.  I will check and send any more of mine.     (And also check that I have the best name on these two.  It can vary between catalog what is printed on the box, especially for alpha mount when the  Sigma version is HSM or OS and the alpha version is not.)                   

gregglee

I was double checking the two lenses I mentioned and others  on both Sony and Minolta bodies.  In the Sony LensType Values but not Minolta LensType Values I noticed that some lenses appear twice.  In fact the two lists are identical except for the duplicate names on the Sony list.  For example one set I mentioned

25811   = Minolta AF 100mm F2.8 Macro [New] or Sigma or Tamron Lens
25811.1   = Sigma AF 90mm F2.8 Macro
25811.2   = Sigma AF 105mm F2.8 EX [DG] Macro
25811.3   = Sigma 180mm F5.6 Macro
25811.4   = Tamron 90mm F2.8 Macro

Also appears as

2581   = Minolta AF 100mm F2.8 Macro [New] or Sigma or Tamron Lens
2581.1   = Sigma AF 90mm F2.8 Macro
2581.2   = Sigma AF 105mm F2.8 EX [DG] Macro
2581.3   = Sigma 180mm F5.6 Macro
2581.4   = Tamron 90mm F2.8 Macro

On the Sony list.  Only the first 5 digit version appears on the Minolta list.

I haven't yet encountered a 4 digit version.  What is it?  I do recognize that 2581 is the Minolta product code for the original 100mm f/2.8 of which the New aka RS version is a cosmetic update.  I checked a couple other Minolta lenses (50mm f/1.7 and 50mm f/2.8 macro) and found that the four digit number the same as the product code.

Obviously the 5 and 4 digit versions are the same other than the missing final digit.  Should I be looking for the four digit version somewhere?  A product code field separate from lens id? 

Phil Harvey

Very observant.

The Minolta list is the master list, and the Sony list is a duplicate, with additional entries generated by removing the last digit of the 5-digit Minolta numbers.

This is done because the last digit is missing from the metadata in images from some models of Sony cameras.  I don't know which models this affects.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

gregglee

I also notice that recent Sony lens names include the product code.  For example

52   = Sony 70-300mm F4.5-5.6 G SSM (SAL70300G)

but Minolta or those with more or less identical Sony and Minolta versions do not.   

23   = Minolta AF 200mm F4 Macro APO G
40   = Minolta/Sony AF DT 18-70mm F3.5-5.6 (D)
26121   = Minolta AF 200mm F2.8 HS-APO G

It may be that you don't intend to have the Sony product code  (I don't see any on Canon or Nikon lenses although a few Tamrons have them), but if you want them the following are as far as I know reliable references for Minolta product codes aka model number aka order code.

http://www.kb.sony.com/selfservice/documentLink.do?externalId=C1000570   
http://www.mhohner.de/sony-minolta/lenses.php  (drop the -XXX region suffix)  This reference also includes a column for exif lens id -third column from right.

So with product code would be

23   = Minolta AF 200mm F4 Macro APO G  (2658 )
40   = Minolta/Sony AF DT 18-70mm F3.5-5.6 (D)  (2697 / SAL1870)
26121   = Minolta AF 200mm F2.8 HS-APO G  (2612)

Phil Harvey

#10
Yes, the convention is different for different makes.

Currently, as you mention, Sony and Tamron are the only makes which include the product code in their description.

The current convention is intended to represent the most common/convenient format for identifying lenses within each make, but it isn't intended to be consistent across makes (which would be very difficult to achieve).

I haven't heard from anyone who wants product codes added the Minolta lenses, nor anyone who wants them removed from the Sony ones, so I don't see any problem leaving things the way they are.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Minolta User

Quote from: Phil Harvey on December 13, 2011, 02:48:58 PM
A console transcript is worth a thousand words:

> exiftool a.arw "-lens*"
Lens Type                       : Minolta AF 50mm F1.7
Lens Spec                       : Unknown (00 0 0 0 0 00)
Lens ID                         : Minolta AF 50mm F1.7

> exiftool a.arw -lenstype="Sigma AF 105mm F2.8 EX [DG] Macro"
Warning: [minor] Entries in SubIFD were out of sequence. Fixed. - a.arw
    1 image files updated

> exiftool a.arw "-lens*"
Lens Type                       : Minolta AF 100mm F2.8 Macro [New] or Sigma or Tamron Lens
Lens Spec                       : Unknown (00 0 0 0 0 00)
Lens ID                         : Minolta AF 100mm F2.8 Macro [New] or Sigma or Tamron Lens

> exiftool a.arw -focallength=105 -maxaperturevalue=2.8
         1 image files updated

> exiftool a.arw "-lens*"
Lens Type                       : Minolta AF 100mm F2.8 Macro [New] or Sigma or Tamron Lens
Lens Spec                       : Unknown (00 0 0 0 0 00)
Lens ID                         : Sigma AF 105mm F2.8 EX [DG] Macro


- Phil

On similar subject I think I found some problems. I'll post example below.

Andrew:untitled folder 2 andrew$ exiftool "-lens*" PICT0001.MRW
Lens Type                       : Minolta AF 75-300mm F4.5-5.6 or Sigma Lens
Lens ID                         : Minolta AF 75-300mm F4.5-5.6 or Sigma Lens
Andrew:untitled folder 2 andrew$ exiftool -lenstype="Tokina AT-X AF 300mm F4" PICT0001.MRW
    1 image files updated
Andrew:untitled folder 2 andrew$ exiftool "-lens*" PICT0001.MRW
Lens Type                       : Unknown (25612)
Lens ID                         : Unknown (25612)
Andrew:untitled folder 2 andrew$


Looks like ID was changed one number up from 25611 which shouldn't happened since I was trying to change lenstype from 25611 to 25611.5.
Also:



Andrew:untitled folder 2 andrew$ exiftool -lenstype=25611 PICT0001.MRW
    0 image files updated
    1 image files unchanged
Andrew:untitled folder 2 andrew$ exiftool "-lens*" PICT0001.MRW
Lens Type                       : Unknown (25612)
Lens ID                         : Unknown (25612)
Andrew:untitled folder 2 andrew$ exiftool -ver
8.75
Andrew:untitled folder 2 andrew$


Seems I can't change lens ID using number. Am I doing it incorrectly ?
Finally,in your example lensID changed after you updated aperture and focal length. Does it mean that this is how it's done and we can't just type for example 25611.5 in lenstype tag ?

Sorry for the long post.
Thank you

Phil Harvey

Hi Andrew,

Thanks!  The round-off is causing problems in the conversion.  This will be fixed in ExifTool 8.79 when it is released.

Until then, you can write the numerical values numerically, like this:

exiftool -lenstype#=25611 FILE

(FAQ number 6 explains this)

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

treaves

Was this rounding issue resolved?  I am using version 8.99.  It looks like my lens is being recorded as 25, when it should be 25.3 (this is a Sigma 20mm F1.8 EX DG Aspherical RF on a Sony alpa camera).  I have also tried the string variant, with the same results.

In going over my data, there is both a Sony tag and a Minolta tag, and they both have a LensType tag, although they are different ID's (0x010c & 0xb027).  Am I not understanding this, or is this a bug?

Thanks!


[~/Downloads/exif_test/India ] exiftool DSC01779.ARW "-lens*"
Lens Type                       : Minolta AF 100-300mm F4.5-5.6 APO (D) or Sigma Lens
Lens Shutter Lock               : On
Lens ID                         : Sigma 20mm F1.8 EX DG Aspherical RF
[~/Downloads/exif_test/India ] exiftool DSC01779.ARW -lenstype#=25.3
    1 image files updated
[~/Downloads/exif_test/India ] exiftool DSC01779.ARW "-lens*"
Lens Type                       : Minolta AF 100-300mm F4.5-5.6 APO (D) or Sigma Lens
Lens Shutter Lock               : On
Lens ID                         : Sigma 20mm F1.8 EX DG Aspherical RF
[~/Downloads/exif_test/India ] exiftool DSC01779.ARW -lenstype#=25
    1 image files updated
[~/Downloads/exif_test/India ] exiftool DSC01779.ARW "-lens*"
Lens Type                       : Minolta AF 100-300mm F4.5-5.6 APO (D) or Sigma Lens
Lens Shutter Lock               : On
Lens ID                         : Sigma 20mm F1.8 EX DG Aspherical RF

Phil Harvey

This is the way it works.  The stored value is an integer.  ExifTool uses the decimal part internally to allow the different lenses to be distinguished in the code.  And the Composite LensID tag attempts to pick the correct lens from all lenses with the same integer LensType.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

treaves

O.K., that floating point numbers are not actually stored was what I was not understanding.  Thanks for the clarification.