@zLost I'm trying to understand what attribute is used on each editing software and what metadata need to be rewritten to have correct lens name embedded in the picture.
I selected "Samyang 8mm f/3.5 UMC Fish-Eye CS II" from the script and taken a CR2 picture without a lens installed, so no lens-related metadata were included.
XMP sidecar looks like this: (let's keep it simple for now, no exif:lensModel or others... is exif:lensModel to be preferred to aux:lens instead?)
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.6-c011 79.156380, 2014/05/21-23:38:37 ">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""
xmlns:exif="http://ns.adobe.com/exif/1.0/"
xmlns:aux="http://ns.adobe.com/exif/1.0/aux/"
exif:ExifVersion="0230"
exif:FocalLength="8/1"
exif:FNumber="35/10"
aux:SerialNumber="0"
aux:Lens="Samyang 8mm f/3.5 UMC Fish-Eye CS II"
exif:MaxApertureValue="35/10"
exif:MinApertureValue="226/10">
</rdf:Description>
</rdf:RDF>
</x:xmpmeta>
Lens correction profile is applied automatically with Photoshop and probably also with Lightroom, but other software appear to skip the sidecar and try to recognise lens using metadata...
EXIF looks like this with exiv2 and exiftool:
exiv2 -g Lens -g Aperture -Pknyt IMG_2321.CR2
Exif.Photo.ApertureValue ApertureValue Rational Finf
Exif.CanonCs.LensType LensType Short (0)
Exif.CanonCs.Lens Lens Short 0.0 mm
Exif.CanonCs.MaxAperture MaxAperture Short 65504
Exif.CanonCs.MinAperture MinAperture Short 65504
Exif.CanonCs.DisplayAperture DisplayAperture Short 0
Exif.CanonSi.TargetAperture TargetAperture Short 65504
Exif.CanonSi.ApertureValue ApertureValue Short 65504
Exif.Canon.LensModel LensModel Ascii
Lens Type : Unknown (0)
Lens Model :
Lens : 0.0 mm
Lens ID : Unknown (0)
Lens : 0.0 mm (35 mm equivalent: 0.0 mm)
Now let's rewrite metadata with this command line (from one of your posts):
exiv2 -k -M"set Exif.CanonCs.LensType 65535" -M "set Exif.CanonCs.MinAperture 285" -M "set Exif.Photo.ApertureValue 322363/65536" -M "set Exif.CanonCs.Lens 180 180 1" -M "set Exif.Photo.LensSpecification 180/1 180/1 56/10 56/10" -M "set Exif.Photo.MaxApertureValue 322363/65536" -M "set Exif.Photo.LensSerialNumber 1728275" -M "set Exif.CanonSi.TargetAperture 157" -M "set Exif.Canon.LensModel Telemegor 180mm f/5.5" -M "set Exif.Photo.LensModel Telemegor 180mm f/5.5" -M "set Exif.Photo.FocalLength 180/1" -M "set Exif.CanonSi.ApertureValue 157" -M "set Exif.CanonCs.MaxAperture 157" -M "set Exif.Photo.FNumber 55/10" -M "set Xmp.aux.Lens Meyer-Optik Gorlitz Telemegor 180mm f/5.5" -M "set Exif.Image.LensInfo 180/1 180/1 56/10 56/10" -M "set Exif.Photo.LensMake Meyer-Optik Gorlitz" IMG_2321_test.CR2
Exif.Photo.ApertureValue ApertureValue Rational F5.5
Exif.Photo.MaxApertureValue MaxApertureValue Rational F5.5
Exif.CanonCs.LensType LensType Short n/a
Exif.CanonCs.Lens Lens Short 180.0 mm
Exif.CanonCs.MaxAperture MaxAperture Short F5.5
Exif.CanonCs.MinAperture MinAperture Short F22
Exif.CanonCs.DisplayAperture DisplayAperture Short 0
Exif.CanonSi.TargetAperture TargetAperture Short F5.5
Exif.CanonSi.ApertureValue ApertureValue Short F5.5
Exif.Canon.LensModel LensModel Ascii Telemegor 180mm f/5.5
Exif.Photo.LensSpecification LensSpecification Rational 180/1 180/1 56/10 56/10
Exif.Photo.LensMake LensMake Ascii Meyer-Optik Gorlitz
Exif.Photo.LensModel LensModel Ascii Telemegor 180mm f/5.5
Exif.Photo.LensSerialNumber LensSerialNumber Ascii 1728275
Exif.Image.LensInfo LensInfo Rational 180/1 180/1 56/10 56/10
Xmp.aux.Lens Lens XmpText Meyer-Optik Gorlitz Telemegor 180mm f/5.5
Lens is showed differently on each software:
Adobe Photoshop -> Telemegor 180mm f/5.5
DxO Optic Pro 10 -> 180mm
Darktable -> n/a ---> is the same for you zLost?
RawTherapee / Preview(MacOS) -> Canon Telemegor 180mm f/5.5 ---> what is causing the prefix?
Let's try compare with a picture taken with an automatic lens: (Tamron SP AF 17-50mm F/2.8 XR Di II LD Aspherical [IF])
exiv2 -g Lens -g Aperture -Pknyt IMG_1874.CR2
Exif.Photo.ApertureValue ApertureValue Rational F3.5
Exif.CanonCs.LensType LensType Short Tamron AF 17-50mm f/2.8 Di-II LD Aspherical
Exif.CanonCs.Lens Lens Short 17.0 - 50.0 mm
Exif.CanonCs.MaxAperture MaxAperture Short F2.8
Exif.CanonCs.MinAperture MinAperture Short F32
Exif.CanonCs.DisplayAperture DisplayAperture Short 0
Exif.CanonSi.TargetAperture TargetAperture Short F3.6
Exif.CanonSi.ApertureValue ApertureValue Short F3.6
Exif.Canon.LensModel LensModel Ascii 17-50mm
Lens Type : Canon EF 28-70mm f/2.8L USM or Sigma or Tamron Lens
Lens Model : 17-50mm
Lens : 17.0 - 50.0 mm
Lens ID : Tamron AF 17-50mm f/2.8 Di-II LD Aspherical
Lens : 17.0 - 50.0 mm (35 mm equivalent: 26.9 - 79.2 mm)
This is what I have observed:
Adobe Photoshop -> 17-50mm ----> is using "Exif.Canon.LensModel" (NO Automatic lens corretion!)
DxO Optic Pro 10 -> Tamron SP AF17-50mm f/2.8 XR DI ii LD Aspherical (IF)
looks like is comparing "Exif.CanonCs.LensType" with an internal lenses database (prompt for downloading correct module)
Darktable -> Tamron AF 17-50mm f/2.8 Di-II LD Aspherical ----> is using "Exif.CanonCs.LensType" straight off exiv2
RawTherapee -> Canon 17-50mm ----> looks like is using "Exif.Canon.LensModel" with "Canon" as prefix (still Bad...)
Preview(MacOS) -> Tamron AF 17-50mm f/2.8 Di-II LD Aspherical ----> looks better now... is "Exif.CanonCs.LensType"
So, it's important to override Exif.Canon.LensModel with correct lens name (maker + model), find a way to handle "Exif.CanonCs.LensType" (
Lens ID database) plus additional infos about focal length and aperture to make software heuristic happy?
Can someone try to replicate this experiment with your lenses (both Canon and Third Party if possible) and editing software?