RE: Objektivinformationen in Sony JPG- und ARW-Dateien

#1 von matthiaspaul , 14.05.2012 22:22

Hallo zusammen,

bei Dyxum hat sich der Niederländer Jos Roost sehr große Mühe gegeben, eine Übersicht über die verschiedenen Objektivinformationen zusammenzustellen, die als Metadaten (in Form von Makernotes u.a.) in Sony .JPG und .ARW-Dateien eingebettet sind und von der Bildbearbeitungssoftware ausgewertet werden können. Besonders interessant finde ich dabei, daß unterschiedliche Sony-Kameragenerationen unterschiedliche Datensätze schreiben, worauf die Auswertesoftware Rücksicht nehmen muß.

In Übereinkunft mit Jos stelle ich hier eine Komplettkopie dieser Beiträge aus dem entsprechenden Dyxum-Thread zur Verfügung, erstens, um diese nützlichen Informationen weiter zu verbreiten, und zweitens, um die Daten sicherheitshalber zu spiegeln. Ergänzungen und Korrekturen sind hochwillkommen und können sowohl hier als auch bei Dyxum eingebracht werden (und werden dann bei Bedarf auch zwischen den beiden Foren synchronisiert).

Ab der aktuellen Version 8.62 (von 2012-05-12) verarbeitet übrigens auch Phil Harveys Exiftool viele dieser Informationen. Das leistungsfähige Werkzeug läuft auf verschiedenen Plattformen und kann hier kostenlos heruntergeladen werden:

http://www.sno.phy.queensu.ca/~phil/exiftool/

Viele Grüße,

Matthias

EDIT: Siehe auch:

http://www.mi-fo.de/forum/viewtopic.php?t=14914
http://www.mi-fo.de/forum/viewtopic.php?t=18627
http://www.mi-fo.de/forum/viewtopic.php?t=34887
http://www.mi-fo.de/forum/viewtopic.php?t=47029


"All the important human advances that we know of since historical times began
have been due to individuals of whom the majority faced virulent public opposition."
--Bertrand Russell

http://www.mi-fo.de/forum/viewtopic.php?t=13448 (Minolta Forum Thread Index)


matthiaspaul  
matthiaspaul
Beiträge: 14.595
Registriert am: 08.06.2004


RE: Objektivinformationen in Sony JPG- und ARW-Dateien

#2 von matthiaspaul , 14.05.2012 22:24

http://www.dyxum.com/dforum/lens-informati...858.html#940858 2011-10-25 21:40/2012-05-02 20:11:

Zitat von JosR
Lens Information in Sony Alpha JPG and ARW files

Besides the "normal" Exif information, such as shutterspeed, focal length and aperture, the image files from Sony Alpha cameras contain additional information about the lens used:

(1) Sony Makernotes tag 0xB027 - Lens-ID (Exiftool Sony:LensType)
written by ALL Sony Alpha DSLR and SLT cameras with A-Mount (Groups I, II and III)this tag contains the Lens-ID number as received from the mounted lensthe A100 reports the same lens-id also in Minolta Makernotes 0x010C tagthe E-mount lenses (NEX) appear to have "abandoned" this tag, always being reported as 65535several programs (Sony Image Data Converter, Lightroom, Alphalensinfo, Exiftool) have a built-in or external Lookup-table, providing the correct lens description/specification for each Lens-ID for all known Sony and Minolta lenses, e.g.
39 = Minolta AF 28-75mm F2.8 (D)
45 = Carl Zeiss Planar T* 85mm F1.4 ZA
46 = Carl Zeiss Vario-Sonnar T* DT 16-80mm F3.5-4.5 ZAas the initial Sony lenses were more or less identical to their Minolta predecessors, they report the same Lens-ID, e.g. both the Minolta AF DT 18-70mm and the Sony DT 18-70mm lens report Lens-ID=40.however, many lens-ID numbers are also re-used by third-party lenses (Sigma, Tamron, Tokina etc.), resulting in ambiguous Lens-IDs, where the same Lens-ID may be reported by lenses with very different specifications, e.g.:
24 = Minolta AF 24-105mm F3.5-4.5 (D)
24.5 = Sigma 18-200 F3.5-6.3 DC
24.6 = Tamron SP AF 28-75mm F2.8 XR Di (IF) Macroif the image file has been edited (Photoshop etc.) the Makernotes may have been discarded and the Lens-ID information will not be present anymore in the image file
(2) Sony Makernotes tag 0xB02A (Exiftool Sony:LensSpec)
written by A700 and newer (Groups II and III), including NEX (i.e. all, except the A100), based on info reported by the lens to the cameralenses released before the A700 do not report the required info to the camera, and this tag will then contain all zero'sfor newer lenses this tag contains:
- lens name prefix, such as "DT" or "E"
- minimum focal length
- maximum focal length
- max. aperture at minimum focal length
- max. aperture at maximum focal length
- lens name suffix, such as ZA, G, SSM, SAM, Macrosee http://www.dyxum.com/dforum/the-lens-infor...topic37682.htmlif the image file has been edited (Photoshop etc.) the Makernotes may have been discarded and this information will not be present anymore in the image file
(3) Exif 2.3 tag 0xA432 (Exiftool Exif:LensInfo)
(4) Exif 2.3 tag 0xA434 (Exiftool Exif:LensModel)

written by cameras released mid-2010 and later (Group III), writing Exif-2.3 compatible files, i.e. A33/A55/A560/A580 and later(3) Exif:LensInfo consists of 4 numbers, e.g. "70 300 4.5 5.6":
- minimum focal length
- maximum focal length
- max. aperture at minimum focal length
- max. aperture at maximum focal length(4) Exif:LensModel contains a text string with the name/model of the lens, e.g. "70-300mm F4.5-5.6 G SSM"the content of these tags is determined by the camera-firmware, and appears to be based on (2) Sony:LensSpec if available, otherwise on (1) Sony:LensType and using a lookup-table with the data of the original Minolta/Sony lensesthe contents of (3) and (4) will therefore be correct for:
- newer lenses with correct data in (2) Sony:LensSpec
- older Minolta/Sony lenses as the correct data will be in the lookup-tablethe contents of (3) and (4) may be incorrect with older third-party lenses which re-use a Minolta Lens-ID, because the camera will write the data of the original Minolta lens (from the Lookup-table) to (3) and (4)!!!even if the image file has been edited (Photoshop etc.) and the Makernotes have been discarded, this Exif information should still be present in the image file (unless you have chosen to remove all Exif)for 3rd-party lenses that do not provide LensSpec info and that do not re-use an existing Minolta/Sony Lens-ID number, (3) LensInfo will NOT be written and (4) LensModel will be written as "----"
(5) XMP-aux-lensinfo (Exiftool XMP:LensInfo)
(6) XMP-aux-lens (Exiftool XMP:Lens)
(7) XMP-aux-lensid (Exiftool XMP:LensID)

these fields are NOT written by the Camera, but by programs such as Alphalensinfo, Lightroom, Exiftool etc.(5) XMP:Lensinfo consists of 4 numbers, similar to Exif:LensInfo (3)(6) XMP:Lens contains a text string with the name/model of the lens(7) XMP:LensID contains the LensID number, copied from (1)Alphalensinfo determines the lens name to be written to (6) based on (1), (2) and a lookup-table lenses.txt / mylenses.txtLightroom 3.x determines (??) or merely copies the contents of (3) and (4) to (5) and (6) respectively (??)
(8) DNG Specification tag 0xC630 (Exiftool ExifNGLensInfo)
this field is NOT written by the Camera, but may be used by some programs(8) ExifNGLensinfo consists of 4 numbers, similar to Exif:LensInfo (3)
History of changes in Lens Information written by A-mount cameras--------------------------------------------------------------------------------------------
| Group | Date | Model | Exif | RAW | 0xB027 | 0xB02A | 0xA432 | 0xA434 |
| | | e.g. | | | Sony | Sony | Exif2.3 | Exif2.3 |
| | | | | | LensType | LensSpec | LensInfo | LensModel |
| | | | | | (1) | (2) | (3) | (4) |
|------------------------------------------------------------------------------------------|
| I | 2006-05 | A100 | 2.21 | ARW 1.0 | yes | no | no | no |
|------------------------------------------------------------------------------------------|
| II | 2007-09 | A700 | 2.21 | ARW 2.0 | yes | yes | no | no |
|------------------------------------------------------------------------------------------|
| III | 2010-09 | A55/A580 | 2.3 | ARW 2.2 | yes | yes | yes | yes |
--------------------------------------------------------------------------------------------


"All the important human advances that we know of since historical times began
have been due to individuals of whom the majority faced virulent public opposition."
--Bertrand Russell

http://www.mi-fo.de/forum/viewtopic.php?t=13448 (Minolta Forum Thread Index)


matthiaspaul  
matthiaspaul
Beiträge: 14.595
Registriert am: 08.06.2004


RE: Objektivinformationen in Sony JPG- und ARW-Dateien

#3 von matthiaspaul , 14.05.2012 22:52

http://www.dyxum.com/dforum/lens-informati...859.html#940859 2011-10-25 21:40/2012-05-02 20:13:

Zitat von JosR
Some examples of lens information in A580 files, as reported by Exiftool (no PrintConv):

Looking at the reported lens information, one can identify several "Categories" of lenses:

(Category A) recent Sony lenses, e.g. Sony 70-300mm F4.5-5.6 G SSM:
(1) Sony:LensType = 52(2) Sony:LensSpec = 00 70 300 4.5 5.6 09 (i.e. correct and complete LensSpec data)(3) Exif:LensInfo = 70 300 4.5 5.6(4) Exif:LensModel = "70-300mm F4.5-5.6 G SSM"
(Category B1) older (pre A700) Sony lens, e.g. Zeiss Vario-Sonnar T* DT 16-80mm F3.5-4.5 ZA:
(1) Sony:LensType = 46(2) Sony:LensSpec = 00 0 0 0 0 00 (i.e. no LensSpec data)(3) Exif:LensInfo = 16 80 3.5 4.5(4) Exif:LensModel = "DT 16-80mm F3.5-4.5 ZA"
(Category B2) Minolta lenses, e.g. Minolta AF 24-105mm F3.5-4.5 (D):
(1) Sony:LensType = 24(2) Sony:LensSpec = 00 0 0 0 0 00 (i.e. no LensSpec data)(3) Exif:LensInfo = 24 105 3.5 4.5(4) Exif:LensModel = "24-105mm F3.5-4.5"
(Category C) "new" third-party lens, reporting correct LensSpec, e.g. Sigma 10-20mm F3.5 EX DC HSM:
(1) Sony:LensType = 128 (ambiguous)(2) Sony:LensSpec = 00 10 20 3.5 0 00 (correct LensSpec data)(3) Exif:LensInfo = 10 20 3.5 3.5(4) Exif:LensModel = "10-20mm F3.5"
(Category D) third-party lens, reporting NO LensSpec, AND re-using a Minolta/Sony Lens-ID, e.g. Sigma 70-300mm F4-5.6 APO Macro:
(1) Sony:LensType = 25611 (ambiguous LensType, originally used by Minolta AF 75-300mm F4.5-5.6)(2) Sony:LensSpec = 00 0 0 0 0 00 (no LensSpec data)(3) Exif:LensInfo = 75 300 4.5 5.6 (data of original Minolta lens)(4) Exif:LensModel = "75-300mm F4.5-5.6" (data of original Minolta lens)
(Category E) third-party lens, reporting NO LensSpec and NOT re-using a Minolta/Sony Lens-ID, e.g Tamron SP AF 10-24mm F3.5-4.5 Di II LD Aspherical IF:
(1) Sony:LensType = 255 (never used by Minolta/Sony)(2) Sony:LensSpec = 00 0 0 0 0 00 (no LensSpec data)(3) (absent - not written)(4) Exif:LensModel = "----"

Remarks:
A100 images will only contain (1)only A33/A55/A560/A580 and newer (Group III) images will contain (3) and (4)the info in (3) and (4) for third-party lenses (Category D and E) may be incorrect or absent

-----------------------------------------------------------------------------------------------
| | | Sony | Sony | Exif2.3 | Exif2.3 | tested |
| Cat | Lens | 0xB027 | 0xB02A | 0xA432 | 0xA434 | with |
| | | LensType | LensSpec | LensInfo | LensModel | |
|---------------------------------------------------------------------------------------------|
| A | Sony lenses | new numbers: | full | correct data | Sony 70-300 |
| | since 2007 | 48 and higher | | from LensSpec | Sony 28-75 |
|---------------------------------------------------------------------------------------------|
| B1 | Sony lenses | Minolta numbers, | empty | correct data | Sony 18-70 |
| | before 2007 | some new numbers | | from Lookup-table | Sony 16-80 |
|---------------------------------------------------------------------------------------------|
| B2 | Minolta lenses | Minolta numbers | empty | correct data | Minolta 24-105 |
| | | | | from lookup-table | Minolta 17-35 |
|---------------------------------------------------------------------------------------------|
| C | 3rd-party lens | Minolta/Sony nrs. | partly/ | correct data | Sigma 10-20 |
| | "new" | or own numbers | full | from LensSpec | Tamron 18-270 |
|---------------------------------------------------------------------------------------------|
| D | 3rd-party lens | re-using Minolta/ | empty | data of Minolta lens | Sigma 70-300 |
| | "old" | Sony numbers | | from Lookup-table | Sigma 28-105 |
|---------------------------------------------------------------------------------------------|
| E | 3rd-party lens | non-Minolta/Sony | empty | absent | ---- | Tamron 10-24 |
| | "old" | numbers | | | | |
-----------------------------------------------------------------------------------------------


"All the important human advances that we know of since historical times began
have been due to individuals of whom the majority faced virulent public opposition."
--Bertrand Russell

http://www.mi-fo.de/forum/viewtopic.php?t=13448 (Minolta Forum Thread Index)


matthiaspaul  
matthiaspaul
Beiträge: 14.595
Registriert am: 08.06.2004


RE: Objektivinformationen in Sony JPG- und ARW-Dateien

#4 von matthiaspaul , 14.05.2012 23:03

http://www.dyxum.com/dforum/lens-informati...860.html#940860 2011-10-25 21:41/2012-05-03 19:28:

Zitat von JosR
Lens information as used by some programs

Sony Image Data Lightbox / Image Data Converter
For displaying lens names, IDC:
uses (2) Sony:LensSpec if available, otherwiseuses (1) Sony:LensType (Lens-ID) with lookup-table
==> IDC will usually display correct lens information for all Sony JPG and ARW files for all Minolta and Sony lenses.
However, for newer Sony lenses (LensType > 47) on the A100, "unknown lens" will be displayed.
For "Category D" lenses the info of the original Minolta lens will be displayed, which is probably not correct.
For "Category E" lenses, "unknown lens" will be displayed.

Regarding the Lookup-table used by IDC:
This Lookup-table is located in:
"C:\Program Files (x86)\Sony\Image Data Converter\Image Data Converter Ver. 4.0\LensTable.xml"

This table lists all Minolta and Sony lenses until Lens-ID=47, i.e. only those lenses released before the A700.
All newer Sony lenses are supposedly assumed to provide their info via the LensSpec tag.
This is fine for all cameras, except for the A100, which does not have this tag!
Indeed, when putting one of the newer Sony lenses, with Lens-ID > 47, on the A100, Sony IDC reports "unknown lens".
If you want IDC to show the name of a newer lens also for the A100, you will have to manually add an entry for it in the LensTable.xml file, e.g.:
<key>55</key><string>DT 18-55mm F3.5-5.6 SAM</string>
Similarly, if you want IDC to display the correct name for a Category D or E lens, you can edit the LensTable.xml file accordingly.

Lightroom
For displaying lens names, Lightroom 3.x:
uses (6) XMP:Lens if available (e.g. written by Alphalensinfo), otherwiseuses (4) Exif:LensModel if available (e.g. from newer cameras), otherwiseARW only, except A100: uses (2) Sony:LensSpec if available, otherwiseARW only, except A100: uses (1) Sony:LensType with Lookup-table if availabe, otherwiseuses (3) Exif:LensInfo if available, otherwiseuses (5) XMP:LensInfo
For displaying lens names, Lightroom 4.x:
uses (4) Exif:LensModel if available (e.g. from newer cameras), otherwiseuses (6) XMP:Lens if available (e.g. written by Alphalensinfo), otherwiseARW only, except A100: uses (2) Sony:LensSpec if available, otherwiseARW only, except A100: uses (1) Sony:LensType with Lookup-table if availabe, otherwiseuses (3) Exif:LensInfo if available, otherwiseuses (5) XMP:LensInfo==> The priority of the Lens Information tags has changed from LR3 to LR4!

==> For Sony Alpha image files directly from the camera:
- ARW files: LR will show lens information based on (4) Exif:LensModel (new cameras) or (2) LensSpec or (1) LensType, but NOT for A100 ARW files
- JPG files: LR will ONLY show lens information for A33/A55/A560/A580 and newer (Group III), based on (4) Exif:LensModel
The displayed info will probably be incorrect or missing for "Category D or E" lenses, e.g. "----".

The changed priority from LR3 to LR4 causes problems with AlphaLensInfo which writes XMP:Lens, because the image files of all Group III cameras contain the Exif:LensModel tag, and LR4 will therefore ignore any Alphalensinfo-written XMP:Lens tag for these cameras.

It would appear that Lightroom 3.x, when writing XMP or exporting, always attempts to write a complete set of lens information comprising Exif tags (3) and (4) as well as the corresponding XMP tags (5) and (6).
However, when exporting from Lightroom (or editing/saving with Photoshop) the Sony Makernotes will be discarded, and consequently there will be NO (1)LensType and (2)LensSpec tags in the exported or saved file!

Regarding the difference between ARW files and JPG files:
this should be considered a BUG, because both JPG and ARW files directly from the camera contain identical Sony Makernotes (1) and (2)!!!
Also, displaying "----" as LensModel could be considered a bug, as apparently no validity check is performed on the contents of this tag.


Alphalensinfo
See Identifying lenses in Lightroom with AlphaLensInfo
Alphalensinfo reads (1) Sony:LensType and (2) Sony:LensSpec from the image files. It then uses a built-in or external (lenses.txt) lookup-table to find the corresponding lens name/model and writes this to (6) XMP:Lens.
For ARW files it writes XMP sidecar files, and does not modify the original ARW file.
For ambiguous Sony:LensType ID's, it also takes the used focal length and aperture into account, to try to determine the correct lens.
To make Alphalensinfo produce the best/correct results for your images, edit your own "mylenses.txt" file, so that only the lenses you actually own or have used will be selected.
If you happen to have multiple (older) third-party lenses reporting the same Lens-ID, you have a problem...

Unfortunately: Lightroom 4 has changed the priority of the lens information tags it uses, now preferring Exif:LensModel over XMP:Lens!

Notes:IMPORTANT: Before running Alphalensinfo, read the instructions, especially if your images are already in Lightroom!Obviously, if in your image files the Sony Makernotes are missing or corrupted, Alphalensinfo will be "Unable to find lens information."
However, if you know, in some other way, which lens was used, you can force Alphalensinfo to write the lens-name for that lens by using the -l option.A580 with Sigma 10-20mm lens (with Lens-ID=128): even though (2) Sony:LensSpec correctly indicates 10-20mm F3.5, Alphalensinfo, using built-in lenstable, still selects the Tamron 18-200 from the list of lenses with Lens-ID=128!
I think if valid LensSpec data is available, it should have priority over Lens-ID, especially if the Lens-ID is known to be ambiguous.Also, Alphalensinfo uses an "AF" prefix for Sony lenses, which I think is NOT CORRECT! Nowhere on any Sony website, in any Sony brochure, or in Image Data Converter, is this "AF" prefix used (nor are "(D)" or "APO" suffixes used for Sony lenses).
This may also cause problems in Lightroom (with lens-correction modules, or when filtering on lens), because the Alphalensinfo-generated lens-name will be different from the Exif:LensModel written by the newer cameras.
To have AlphaLensInfo write lens-names corresponding exactly to the Sony IDC / LensSpec names, you can use the list of Sony lenses as provided some posts further down.


"All the important human advances that we know of since historical times began
have been due to individuals of whom the majority faced virulent public opposition."
--Bertrand Russell

http://www.mi-fo.de/forum/viewtopic.php?t=13448 (Minolta Forum Thread Index)


matthiaspaul  
matthiaspaul
Beiträge: 14.595
Registriert am: 08.06.2004


RE: Objektivinformationen in Sony JPG- und ARW-Dateien

#5 von matthiaspaul , 14.05.2012 23:11

http://www.dyxum.com/dforum/lens-informati...861.html#940861 2011-10-25 21:41/2012-05-03 19:30:

Zitat von JosR
How to make Lightroom show the correct lens name?

For images directly from the camera, Lightroom (all versions) will show:

---------------------------------------------------------------------------------------------
| Camera | Lens | Lightroom will show |
| Group | Cat. | for JPG files | for ARW files |
|-------------------------------------------------------------------------------------------|
| I | All | no lens info | no lens info |
|-------------------------------------------------------------------------------------------|
| II | A | no lens info | correct lens info (LensSpec) |
| |----------------------------------------------------------------------------------|
| | B | no lens info | correct lens info (LensType+table) |
| |----------------------------------------------------------------------------------|
| | C | no lens info | correct lens info (LensSpec) |
| |----------------------------------------------------------------------------------|
| | D | no lens info | INcorrect lens info (LensType+table) |
| |----------------------------------------------------------------------------------|
| | E | no lens info | no lens info |
|-------------------------------------------------------------------------------------------|
| III | A, B, C | correct lens info (LensModel) | correct lens info (LensModel) |
| |----------------------------------------------------------------------------------|
| | D | INcorrect lens info (LensModel) | INcorrect lens info (LensModel) |
| |----------------------------------------------------------------------------------|
| | E | "----" (LensModel) | "---" (LensModel) |
---------------------------------------------------------------------------------------------
Using AlphaLensInfo, you can write XMP:Lens to ALL your Sony JPG and ARW files.
Provided you have prepared a correct and unambiguous "mylenses.txt" for all the lenses you ever used on your Sony Alpha cameras, this will result in Lightroom showing the correct lens name for all your images using the AlphaLensInfo-written XMP:Lens, with the exception of LR4 with images from Group III cameras.
However, depending on the camera and the lenses you own, it might be sufficient to run AlphaLensInfo only on a subset of your images:
Camera Group I: Sony A100 and Minolta 7D and 5D
ALL JPG and ARW files: ==> use Alphalensinfo to write (6) XMP:Lens
This will work for all Lightroom versions.Camera Group II: from A700 until mid-2010
ALL JPG and ARW files: ==> use Alphalensinfo to write (6) XMP:Lens
(although you could exclude ARW files for Category A, B and C lenses, where LR already shows correct lens information)
This will work for all Lightroom versions.Camera Group III: A33/A55/A560/A580 and newer
These cameras write Exif:LensModel for all lenses, but its contents are incorrect for Cat. D and E third-party lenses
Cat. A, B and C lenses: Lightroom (all versions) already shows correct lens information based on Exif:LensModel.
Using AlphalensInfo is not needed, but will work for LR3. It will NOT work for LR4.
Category D and E lenses:
- Lightroom 2.x, 3.x: all JPG and ARW files: ==> use Alphalensinfo to write (6) XMP:Lens
- Lightroom 4.x: use e.g. ExifTool to
- ==> remove the incorrect Exif:LensModel, and then use Alphalensinfo to write (6) XMP:Lens
- ==> or overwrite Exif:LensModel with the correct lens name


"All the important human advances that we know of since historical times began
have been due to individuals of whom the majority faced virulent public opposition."
--Bertrand Russell

http://www.mi-fo.de/forum/viewtopic.php?t=13448 (Minolta Forum Thread Index)


matthiaspaul  
matthiaspaul
Beiträge: 14.595
Registriert am: 08.06.2004


RE: Objektivinformationen in Sony JPG- und ARW-Dateien

#6 von matthiaspaul , 14.05.2012 23:19

http://www.dyxum.com/dforum/lens-informati...862.html#940862 2011-10-25 21:42/2012-05-11 07:13:

Zitat von JosR
Exiftool for viewing and writing lens information

Exiftool is a very powerful program that allows you to view and modify or write all kinds of Exif, IPTC and XMP data.
Here, I only show you some examples of using Exiftool to view and possibly write (Sony) Lens information.
Be careful - you do this at your own risk...

Viewing lens information present in JPG or ARW files
Exiftool from version 8.68 can read (and write) ALL lens information tags discussed above.
The following command will show the contents of these tags, if present:

exiftool.exe -G1 -Exif:LensInfo# -Exif:LensModel# -ExifNGLensInfo# -Minolta:LensType# -Sony:LensType# -Sony:LensType -Sony:LensSpec# -Sony:LensSpec -XMP:LensInfo# -XMP:Lens# -XMP:LensID -Composite:LensID [filename]

The Composite:LensID is Exiftools guess of the lens used, based on LensSpec, max-aperture and focal-length, in case of ambiguous LensType.

Note that the trailing "#" of a tag indicates that the "raw" value of that tag will be displayed.
Otherwise, Exiftool will apply a "print-conversion" to convert the raw value into a more understandable format, e.g.:

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

-Sony:LensSpec#=00 70 300 4.5 5.6 09
-Sony:LensSpec=70-300mm F4.5-5.6 G SSM

You can also simply use:
exiftool.exe -G1 -a -*lens* [filename]

As alternative to Alphalensinfo
Exiftool can conditionally, based on Lens-ID, write XMP:Lens or Exif:LensModel for selected lenses.
For example, if you would like to write XMP:Lens only to the images where you used an old "Category D" lens with (ambiguous) Lens-ID=25611, you could execute a command like:
exiftool.exe -XMP:Lens="Sigma 70-300mm F4-5.6 APO Macro" -if "$Sony:LensType# eq 25611" *.JPG
This command will test all JPG files in the current directory, and update only the ones having Lens-ID=25611.
Obviously, this will not work if in your image files the Sony Makernotes are missing or corrupt.

Creating XMP sidecar files with ExifTool
If you don't want to touch the ARW files, you can have Exiftool write XMP sidecar files:
Exiftool.exe -XMP:Lens="Samyang 8mm F3.5" [files.ARW] -srcfile %d%f.XMP

Exiftool as a complete replacement for AlphalensInfo
Before writing any lens information, it is always a good idea to first have Exiftool show you which lenses it thinks you used
(nothing will be written to your image files):
Exiftool.exe -Composite:LensID [your image files] > lenslist.txt

This will create a list with the lens names for your image files. Check the lens names in lenslist.txt to see if they are correct / as you want them.
If the names reported are OK with you, you can use ExifTool to autmatically write these lens names to XMP:Lens or Exif:LensModel:

JPG files:
Exiftool.exe "-Composite:LensID>XMP:Lens" [your_images.JPG]
or
Exiftool.exe "-Composite:LensID>Exif:LensModel" [your_images.JPG]

ARW files: modifying the ARW files: same command as for the JPG files
or
ARW files: creating XMP sidecar files:
Exiftool.exe "-Composite:LensID>XMP:Lens" [files.ARW] -o %f.XMP (but LR4 priority is LensModel ...)

Lightroom will now show you the Composite:LensID names using these Exif:LensModel or XMP:Lens tags.

Using your own lens names
The idea is simple: if you do not like the names in Exiftools Composite:LensID list, you make your own list.
The place to do this is Exiftools configuration file ".ExifTool_config" which should be placed in the same directory as Exiftool.exe.
The format for this configuration file is as follows:

%Image::ExifTool::UserDefined = (
'Image::ExifTool::Composite' => {
MyLensType => {
Require => 'LensType',
PrintConv => {
14 => '100-400mm F4.5-6.7',
24 => '24-105mm F3.5-4.5',
28 => '100mm F2.8 Macro',
38 => '17-35mm F2.8-4',
40 => 'DT 18-70mm F3.5-5.6',
46 => 'DT 16-80mm F3.5-4.5 ZA',
52 => '70-300mm F4.5-5.6 G SSM',
59 => '28-75mm F2.8 SAM',
128 => '10-20mm F3.5',
25531 => '28-105mm F4-5.6',
25611 => '70-300mm F4-5.6 Macro',
},
},
},
);
1; #end

The numbers are the LensType numbers of your lenses, the names between the quotes you can edit to your own liking.

In the Exiftool commands you now have to use your own defined "MyLensType" instead of Composite:LensID.
JPG files:
Exiftool.exe "-MyLensType>XMP:Lens" [your_images.JPG]
or
Exiftool.exe "-MyLensType>Exif:LensModel" [your_images.JPG]

ARW files: modifying the ARW files: same command as for the JPG files
or
ARW files: creating XMP sidecar files:
Exiftool.exe "-MyLensType>XMP:Lens" [files.ARW] -o %f.XMP

If you have lenses that share the same lens-ID:
Usually, Exiftool's Composite:LensID will correctly identify these lenses, based on e.g. LensType, LensSpec, focal length and maximum aperture.
The first method above with the default names will then probably work fine.
(That is, provided your lenses are all listed. If not, report your lens to Phil Harvey.)
The method with your own list will not work, because you can only define one lens name for a certain LensType.

Category D and E lenses and Sony IDC
If you would also want Sony Image Data Converter to display the correct lens information (and not the info of the original Minolta lens with this Lens-ID, or "unknown lens", you could also write LensSpec:
exiftool.exe -Sony:LensSpec#="00 70 300 4.0 5.6 60" -XMP:Lens="Sigma 70-300mm F4-5.6 APO Macro" -if "$Sony:LensType# eq 25611" *.JPG
Instead of "75-300mm F4.5-5.6", IDC will now display "70-300mm F4-5.6 Macro".
(the last "60" in the LensSpec indicates "Macro", LensSpec does not have an option to specify "APO"
This will not work for A100 files, as the Sony:LensSpec does not exist for the A100.
Again, this will not work if in your image files the Sony Makernotes are missing or corrupt.


"All the important human advances that we know of since historical times began
have been due to individuals of whom the majority faced virulent public opposition."
--Bertrand Russell

http://www.mi-fo.de/forum/viewtopic.php?t=13448 (Minolta Forum Thread Index)


matthiaspaul  
matthiaspaul
Beiträge: 14.595
Registriert am: 08.06.2004


RE: Objektivinformationen in Sony JPG- und ARW-Dateien

#7 von matthiaspaul , 14.05.2012 23:24

http://www.dyxum.com/dforum/lens-informati...52.html#1024852 2012-05-03 07:38:

Zitat von JosR
Known Sony:LensSpec (tag 0xB02A) (2) prefixes and suffixes
(From: http://www.dyxum.com/dforum/the-lens-infor...topic37682.html)

The Sony:LensSpec tag consists of 8 bytes:

bits hex meaning
byte 1: 0 0 0 0 0 0 0 0 00 (no prefix)
0 0 0 0 0 0 0 1 01 DT
0 0 0 0 0 0 1 1 03 E (always implies DT?)
1 0 0 0 0 0 0 0 80 OSS
1 0 0 0 0 0 1 1 83 E . . . OSS

byte 2+3: min. focal length 00 16 = 16mm

byte 4+5: max. focal length 01 05 = 105mm
or 00 00 for fixed focal length lens

byte 6: max.apert. min.focal 35 = F3.5

byte 7: max.apert. max.focal 56 = F5.6
or 00 for constant max. aperture lens

byte 8: 0 0 0 0 0 0 0 0 00 (no suffix)
0 0 0 0 0 0 0 1 01 SSM
0 0 0 0 0 0 1 0 02 SAM
0 0 0 0 0 1 0 0 04 ZA
0 0 0 0 0 1 0 1 05 ZA SSM
0 0 0 0 1 0 0 0 08 G
0 0 0 0 1 0 0 1 09 G SSM
0 0 1 0 0 0 0 0 20 STF
0 1 0 0 0 0 0 0 40 Reflex
0 1 1 0 0 0 0 0 60 Macro
0 1 1 0 0 0 1 0 62 Macro SAM
1 0 0 0 0 0 0 0 80 Fisheye
Exiftool uses the "hex"-column values as listed above.
For the focal lengths, it combines bytes 2+3 into 1 value, and similarly bytes 4+5.
For the aperture values it uses a decimal point.
For example, for three recent Sony lenses:

Exiftool.exe -LensSpec# [filename]

will show the hex values:
Lens Spec : 01 16 105 3.5 5.6 00
Lens Spec : 00 70 300 4.5 5.6 09
Lens Spec : 01 30 0 2.8 0 62

Exiftool.exe -LensSpec [filename]

will show the corresponding interpreted names:
Lens Spec : DT 16-105mm F3.5-5.6
Lens Spec : 70-300mm F4.5-5.6 G SSM
Lens Spec : DT 30mm F2.8 Macro SAM

The same format is used for writing LensSpec.


"All the important human advances that we know of since historical times began
have been due to individuals of whom the majority faced virulent public opposition."
--Bertrand Russell

http://www.mi-fo.de/forum/viewtopic.php?t=13448 (Minolta Forum Thread Index)


matthiaspaul  
matthiaspaul
Beiträge: 14.595
Registriert am: 08.06.2004


RE: Objektivinformationen in Sony JPG- und ARW-Dateien

#8 von matthiaspaul , 14.05.2012 23:28

http://www.dyxum.com/dforum/lens-informati...59.html#1024859 2012-05-03 07:47:

Zitat von JosR
List of Sony A-mount lenses as of April 2012

The following is a list of all known Sony Alpha lenses as of April 2012.
The format of the list is compatible for use with Alphalensinfo.
#
# List of Sony Alpha lenses as of April 2012.
# The below "short" lens names correspond to:
# - the names as shown by Sony Image Data Converter
# - the names as written by A55/A580 and newer to Exif:LensModel
# - the specs/names as defined by Sony Makernotes tag 0xB02A ("LensSpec"
#
# Lens-ID numbers 25571 - 44 are shared with the corresponding Minolta lenses.
# Lens-ID numbers 45 - 64 are Sony-only (but some of them now also used by Tamron...)
#
# The following Sony lenses provide only LensType (Lens-ID):
25571 = 28mm F2.8
25721 = 500mm F8 Reflex
25781 = 16mm F2.8 Fisheye
25791 = 20mm F2.8
20 = 135mm F2.8 [T4.5] STF
24 = 24-105mm F3.5-4.5
28 = 100mm F2.8 Macro
29 = 75-300mm F4.5-5.6
31 = 50mm F2.8 Macro
32 = 300mm F2.8 G
33 = 70-200mm F2.8 G
40 = DT 18-70mm F3.5-5.6
41 = DT 11-18mm F4.5-5.6
42 = DT 18-200mm F3.5-6.3
43 = 35mm F1.4 G
44 = 50mm F1.4
45 = 85mm F1.4 ZA
46 = DT 16-80mm F3.5-4.5 ZA
47 = 135mm F1.8 ZA
#
# The following Sony lenses provide LensType AND LensSpec info:
48 = 24-70mm F2.8 ZA SSM
49 = DT 55-200mm F4-5.6
50 = DT 18-250mm F3.5-6.3
51 = DT 16-105mm F3.5-5.6
52 = 70-300mm F4.5-5.6 G SSM
53 = 70-400mm F4-5.6 G SSM
54 = 16-35mm F2.8 ZA SSM
55 = DT 18-55mm F3.5-5.6 SAM
56 = DT 55-200mm F4-5.6 SAM
57 = DT 50mm F1.8 SAM
58 = DT 30mm F2.8 Macro SAM
59 = 28-75 F2.8 SAM
60 = 24mm F2 ZA SSM
61 = 85mm F2.8 SAM
62 = DT 35mm F1.8 SAM
63 = DT 16-50mm F2.8 SSM
64 = 500mm F4.0 G SSM
#
# For completeness: names of known Sony E-mount lenses as of April 2012
# These lenses provide full LensSpec info, but LensType is always reported as 65535.
# E 16mm F2.8
# E 18-55mm F3.5-5.6 OSS
# E 18-200mm F3.5-6.3 OSS
# E 24mm F1.8 ZA
# E 50mm F1.8 OSS
# E 55-210mm F4.5-6.3 OSS
# E 30mm F3.5 Macro
#


"All the important human advances that we know of since historical times began
have been due to individuals of whom the majority faced virulent public opposition."
--Bertrand Russell

http://www.mi-fo.de/forum/viewtopic.php?t=13448 (Minolta Forum Thread Index)


matthiaspaul  
matthiaspaul
Beiträge: 14.595
Registriert am: 08.06.2004


RE: Objektivinformationen in Sony JPG- und ARW-Dateien

#9 von matthiaspaul , 14.05.2012 23:31

http://www.dyxum.com/dforum/lens-informati...59.html#1025059 2012-05-03 19:44/2012-05-11 21:41:

Zitat von JosR
Some Camera and Lens related Tags

Hex ID Exif / XMP name Exiftool Group / Name Exiv2 0.22
------ ---------------------- ----------------------------- ---------------------------
1 0x010C Makernotes Minolta Minolta MakerNotes:LensType Exif.Minolta.LensID
1 0xB027 Makernotes Sony Sony MakerNotes:LensType Exif.Sony1.LensID
2 0xB02A Makernotes Sony Sony MakerNotes:LensSpec -
0x010F Exif Make IFD0 Exif:Make Exif.Image.Make
0x0110 Exif Model IFD0 Exif:Model Exif.Image.Model
8 0xC630 Exif LensInfo IFD0 ExifNGLensInfo Exif.Image.LensInfo
0xA430 Exif CameraOwnerName ExifIFD ExifwnerName Exif.Photo.CameraOwnerName
0xA431 Exif BodySerialNumber ExifIFD Exif:SerialNumber Exif.Photo.BodySerialNumber
3 0xA432 Exif LensSpecification ExifIFD Exif:LensInfo Exif.Photo.LensSpecification
0xA433 Exif LensMake ExifIFD Exif:Lensmake Exif.Photo.LensMake
4 0xA434 Exif LensModel ExifIFD Exif:LensModel Exif.Photo.LensModel
0xA435 Exif LensSerialNumber ExifIFD Exif:LensSerialNumber Exif.Photo.LensSerialNumber
0xFDEA Exif Lens (Ad.Cam.Raw) ExifIFD Exif:Lens -
5 - xmp LensInfo XMP-aux XMP:LensInfo Xmp.aux.LensInfo
6 - xmp Lens XMP-aux XMP:Lens Xmp.aux.Lens
7 - xmp LensID XMP-aux XMP:LensID Xmp.aux.LensID
- xmp LensModel XMP-Microsoft XMP:LensModel Xmp.MicrosoftPhoto.LensModel


"All the important human advances that we know of since historical times began
have been due to individuals of whom the majority faced virulent public opposition."
--Bertrand Russell

http://www.mi-fo.de/forum/viewtopic.php?t=13448 (Minolta Forum Thread Index)


matthiaspaul  
matthiaspaul
Beiträge: 14.595
Registriert am: 08.06.2004


   


  • Ähnliche Themen
    Antworten
    Zugriffe
    Letzter Beitrag
| 2002- © so-fo.de | minolta-forum.de |
Xobor Einfach ein eigenes Forum erstellen
Datenschutz