MagicLantern + manual lenses =

News

2020-04-16
I just found out, that when the Exif.CanonCs.LensType is set to 65536 (which is interpreted as n/a aka Not Available), DarkTable does not even attempt to guess the lens from other exif parameters and does not offer automatic lens correction.
So this tag is now completely removed and the autodetection works fine (for those few lenses, which have the necessary profiles in lensfun database).
2019-08-20
Added new lens parameter called note, which is used in the list of available lenses, when you need to differentiate between various pieces of the same type. When present, it is appended to the lens name - see the (#1) and (#2) in the first screenshot below.
{ make = "Helios", name = "44-2 58mm f/2", focal_length = 58, manual_aperture = 2, serialN = "7765411", aperture_max = 2, aperture_min = 16, f_values = {"2","2.8","4","5.6","8","11","16"}, note = "#1"}
2019-08-05
Fixed couple bugs related to autoloading the lens configuration and setting the previously saved output format. Check the updated lua.zip.

Why?

Since i've started using manual lenses, i've always wondered how to add correct EXIF data to my images. At first it was just for some statistical purposes and generally a "good feeling" of having the pictures "complete". Then i've realized, that i could use these values to find matching lens profiles in DarkTable and correct chromatic aberration, distortion and vignetting. But aren't these imperfections exactly the reason why we love old lenses? ;)

My first attempt resulted in a simple bash script with set of predefined lenses, which i've run and set the right values to different exif keys.

But i knew there must be a better way. And there really was ;) One day i've found this thread at MagicLantern forum. I've been occasionally using ML before, but didn't explore its features, nor did i knew about the possible scripting, which opened a whole new world to me. After a bit of playing with it, i've found out, that neither Gimp nor DarkTable care about the sidecar files the script was creating..

Since we can't easily and reliably modify the exif data directly during shooting, i've decided to modify the script and let it output something similar to what my old script was doing - a bash script, which will modify the exif data ex-post.

How?

  1. Head to MagicLantern experiment releases and grab a "Non-CPU lens info" build for your camera.
  2. Follow the how-to to install ML.
  3. Grab lua.zip and unpack it in the ML/scripts/ directory on your memory card. When prompted to overwrite xmp.lua, confirm it as you need the defined templates for the output file.
  4. Edit the lens2.lua script and add/comment out any lenses you'd like to use within the "lenses = ...." part. All the configurable lens parameters are described there.
  5. Insert the card to your camera, start it and if there is a manual lens attached, you should be prompted with a lens-selection dialogue.
  6. Within ML configuration locate the menu with general configuration of the script (screenshot to be added here....) and from the format dropdown select Exiv2.
  7. Enable image-previews in the camera menu.
  8. Go out and make some pictures ;)
  9. Once you're back home, you should see a file called MANUAL.SH in the image folder of your memory card. Contents of that file should be similar to whats shown below
  10. Execute the script (i'm using simple bash ./MANUAL.SH) and open the images in your favorite viewer or editor.
ml/lens_list.jpg - Lens list

Lens list

ml/lens_detail.jpg - Lens detail

Lens detail

ml/format.jpg - Script settings

Script settings

ml/format2.jpg - Outfile format

Outfile format

ml/recent.jpg - Recent items

Recent items

ml/scripts.jpg - Scripts menu

Scripts menu

Known issues

  1. The resulting script is using exiv2 and is meant to be used on Linux (i'm a debian user), but since Exiv2 has some builds for other operating systems, i assume, that it may work in couple other enviroments as well ;)
  2. You have to turn on the post-capture image preview to have the MANUAL.SH written/updated.
  3. Adapters with chips seem to enforce focal length and aperture values and these are then used instead of values set with this script.
  4. There is a difference in lens name used by LensFun and ACR for Samyang 85mm f/1.4, so you have to use the one, which matches the software you are going to use for postprocessing.

Generated MANUAL.SH

exiv2 -k -M"del Exif.CanonCs.LensType" -M "set Exif.CanonCs.MinAperture 288" -M "set Exif.Photo.LensMake KMZ" -M "set Exif.CanonCs.Lens 16 16 1" -M "set Exif.Photo.ApertureValue 262144/65536" -M "set Exif.CanonSi.TargetAperture 128" -M "set Exif.Photo.LensSpecification 16/1 16/1 28/10 28/10" -M "set Exif.Photo.LensSerialNumber 171728" -M "set Exif.CanonSi.ApertureValue 128" -M "set Exif.Photo.FNumber 40/10" -M "set Exif.Photo.MaxApertureValue 194698/65536" -M "set Exif.CanonCs.MaxAperture 95" -M "set Xmp.aux.Lens KMZ MC Zenitar 2.8/16" -M "set Exif.Canon.LensModel MC Zenitar 2.8/16" -M "set Exif.Photo.LensModel MC Zenitar 2.8/16" -M "set Exif.Photo.FocalLength 16/1" -M "set Exif.Image.LensInfo 16/1 16/1 28/10 28/10" IMG_1427.CR2

exiv2 -k -M"del Exif.CanonCs.LensType" -M "set Exif.Photo.LensMake Samyang" -M "set Exif.CanonCs.MaxAperture 31" -M "set Exif.Photo.FNumber 14/10" -M "set Xmp.aux.Lens Samyang 85mm f/1.4 IF UMC Aspherical" -M "set Exif.CanonCs.MinAperture 288" -M "set Exif.CanonCs.Lens 85 85 1" -M "set Exif.Image.LensInfo 85/1 85/1 14/10 14/10" -M "set Exif.Photo.ApertureValue 63626/65536" -M "set Exif.CanonSi.TargetAperture 31" -M "set Exif.Photo.MaxApertureValue 63626/65536" -M "set Exif.Photo.LensSpecification 85/1 85/1 14/10 14/10" -M "set Exif.CanonSi.ApertureValue 31" -M "set Exif.Photo.FocalLength 85/1" -M "set Exif.Photo.LensSerialNumber A217D0264" -M "set Exif.Canon.LensModel 85mm f/1.4 IF UMC Aspherical" -M "set Exif.Photo.LensModel 85mm f/1.4 IF UMC Aspherical" IMG_1430.CR2

exiv2 -k -M"del Exif.CanonCs.LensType" -M "set Exif.Photo.LensMake E. Ludwig" -M "set Exif.CanonCs.MaxAperture 98" -M "set Exif.Photo.FNumber 29/10" -M "set Xmp.aux.Lens E. Ludwig Meritar 50mm f/2.9" -M "set Exif.CanonCs.MinAperture 256" -M "set Exif.CanonCs.Lens 50 50 1" -M "set Exif.Image.LensInfo 50/1 50/1 29/10 29/10" -M "set Exif.Photo.ApertureValue 201334/65536" -M "set Exif.CanonSi.TargetAperture 98" -M "set Exif.Photo.MaxApertureValue 201334/65536" -M "set Exif.Photo.LensSpecification 50/1 50/1 29/10 29/10" -M "set Exif.CanonSi.ApertureValue 98" -M "set Exif.Photo.FocalLength 50/1" -M "set Exif.Photo.LensSerialNumber 1610554" -M "set Exif.Canon.LensModel Meritar 50mm f/2.9" -M "set Exif.Photo.LensModel Meritar 50mm f/2.9" IMG_1433.CR2

exiv2 -k -M"del Exif.CanonCs.LensType" -M "set Exif.Photo.LensMake Revuenon" -M "set Exif.CanonCs.MaxAperture 49" -M "set Exif.Photo.FNumber 17/10" -M "set Xmp.aux.Lens Revuenon Auto Revuenon 1:1.7 f=55mm" -M "set Exif.CanonCs.MinAperture 256" -M "set Exif.CanonCs.Lens 55 55 1" -M "set Exif.Image.LensInfo 55/1 55/1 17/10 17/10" -M "set Exif.Photo.ApertureValue 100340/65536" -M "set Exif.CanonSi.TargetAperture 49" -M "set Exif.Photo.MaxApertureValue 100340/65536" -M "set Exif.Photo.LensSpecification 55/1 55/1 17/10 17/10" -M "set Exif.CanonSi.ApertureValue 49" -M "set Exif.Photo.FocalLength 55/1" -M "set Exif.Photo.LensSerialNumber 10470" -M "set Exif.Canon.LensModel Auto Revuenon 1:1.7 f=55mm" -M "set Exif.Photo.LensModel Auto Revuenon 1:1.7 f=55mm" IMG_1435.CR2

exiv2 -k -M"del Exif.CanonCs.LensType" -M "set Exif.Photo.LensMake Carl Zeiss Jena" -M "set Exif.CanonCs.MaxAperture 54" -M "set Exif.Photo.FNumber 18/10" -M "set Xmp.aux.Lens Carl Zeiss Jena Pancolar auto 1.8/50 MC" -M "set Exif.CanonCs.MinAperture 288" -M "set Exif.CanonCs.Lens 50 50 1" -M "set Exif.Image.LensInfo 50/1 50/1 18/10 18/10" -M "set Exif.Photo.ApertureValue 111149/65536" -M "set Exif.CanonSi.TargetAperture 54" -M "set Exif.Photo.MaxApertureValue 111149/65536" -M "set Exif.Photo.LensSpecification 50/1 50/1 18/10 18/10" -M "set Exif.CanonSi.ApertureValue 54" -M "set Exif.Photo.FocalLength 50/1" -M "set Exif.Photo.LensSerialNumber 10859940" -M "set Exif.Canon.LensModel Pancolar auto 1.8/50 MC" -M "set Exif.Photo.LensModel Pancolar auto 1.8/50 MC" IMG_1437.CR2

exiv2 -k -M"del Exif.CanonCs.LensType" -M "set Exif.Photo.LensMake Meyer-Optik Gorlitz" -M "set Exif.CanonCs.MaxAperture 98" -M "set Exif.Photo.FNumber 29/10" -M "set Xmp.aux.Lens Meyer-Optik Gorlitz Trioplan 1:2.9/50 V" -M "set Exif.CanonCs.MinAperture 288" -M "set Exif.CanonCs.Lens 50 50 1" -M "set Exif.Image.LensInfo 50/1 50/1 29/10 29/10" -M "set Exif.Photo.ApertureValue 201334/65536" -M "set Exif.CanonSi.TargetAperture 98" -M "set Exif.Photo.MaxApertureValue 201334/65536" -M "set Exif.Photo.LensSpecification 50/1 50/1 29/10 29/10" -M "set Exif.CanonSi.ApertureValue 98" -M "set Exif.Photo.FocalLength 50/1" -M "set Exif.Photo.LensSerialNumber 1596812" -M "set Exif.Canon.LensModel Trioplan 1:2.9/50 V" -M "set Exif.Photo.LensModel Trioplan 1:2.9/50 V" IMG_1439.CR2

exiv2 -k -M"del Exif.CanonCs.LensType" -M "set Exif.Photo.FocalLength 55/1" -M "set Exif.Photo.FNumber 12/10" -M "set Exif.CanonSi.TargetAperture 17" -M "set Exif.Photo.LensMake Revuenon" -M "set Exif.Photo.MaxApertureValue 34476/65536" -M "set Exif.CanonSi.ApertureValue 17" -M "set Exif.CanonCs.MinAperture 256" -M "set Exif.Image.LensInfo 55/1 55/1 12/10 12/10" -M "set Exif.Photo.LensSpecification 55/1 55/1 12/10 12/10" -M "set Exif.Photo.ApertureValue 34476/65536" -M "set Exif.Canon.LensModel Auto Revuenon 1:1.2 f=55mm (Tomioka)" -M "set Exif.Photo.LensModel Auto Revuenon 1:1.2 f=55mm (Tomioka)" -M "set Exif.CanonCs.Lens 55 55 1" -M "set Xmp.aux.Lens Revuenon Auto Revuenon 1:1.2 f=55mm (Tomioka)" -M "set Exif.Photo.LensSerialNumber 101285" -M "set Exif.CanonCs.MaxAperture 17" IMG_1440.CR2

exiv2 -k -M"del Exif.CanonCs.LensType" -M "set Exif.Photo.FocalLength 50/1" -M "set Exif.Photo.FNumber 35/10" -M "set Exif.CanonSi.TargetAperture 116" -M "set Exif.Photo.LensMake KMZ" -M "set Exif.Photo.MaxApertureValue 236894/65536" -M "set Exif.CanonSi.ApertureValue 116" -M "set Exif.CanonCs.MinAperture 256" -M "set Exif.Image.LensInfo 50/1 50/1 12/10 12/10" -M "set Exif.Photo.LensSpecification 50/1 50/1 12/10 12/10" -M "set Exif.Photo.ApertureValue 236894/65536" -M "set Exif.Canon.LensModel Industar-50-2 3.5/50" -M "set Exif.Photo.LensModel Industar-50-2 3.5/50" -M "set Exif.CanonCs.Lens 50 50 1" -M "set Xmp.aux.Lens KMZ Industar-50-2 3.5/50" -M "set Exif.Photo.LensSerialNumber 7149595" -M "set Exif.CanonCs.MaxAperture 116" IMG_1445.CR2

exiv2 -k -M"del Exif.CanonCs.LensType" -M "set Exif.Photo.FocalLength 58/1" -M "set Xmp.aux.Lens KMZ Helios-44-2 58mm f/2" -M "set Exif.Image.LensInfo 58/1 58/1 20/10 20/10" -M "set Exif.Photo.MaxApertureValue 131072/65536" -M "set Exif.CanonCs.MinAperture 256" -M "set Exif.Photo.FNumber 20/10" -M "set Exif.Canon.LensModel Helios-44-2 58mm f/2" -M "set Exif.Photo.LensModel Helios-44-2 58mm f/2" -M "set Exif.Photo.LensSpecification 58/1 58/1 20/10 20/10" -M "set Exif.CanonCs.MaxAperture 64" -M "set Exif.CanonSi.TargetAperture 64" -M "set Exif.CanonSi.ApertureValue 64" -M "set Exif.Photo.LensMake KMZ" -M "set Exif.Photo.ApertureValue 131072/65536" -M "set Exif.CanonCs.Lens 58 58 1" -M "set Exif.Photo.LensSerialNumber 7765411" IMG_1446.CR2

exiv2 -k -M"del Exif.CanonCs.LensType" -M "set Exif.Photo.FocalLength 135/1" -M "set Xmp.aux.Lens Pentacon Pentacon 135mm f/2.8 auto MC" -M "set Exif.Image.LensInfo 135/1 135/1 28/10 28/10" -M "set Exif.Photo.MaxApertureValue 194698/65536" -M "set Exif.CanonCs.MinAperture 288" -M "set Exif.Photo.FNumber 28/10" -M "set Exif.Canon.LensModel Pentacon 135mm f/2.8 auto MC" -M "set Exif.Photo.LensModel Pentacon 135mm f/2.8 auto MC" -M "set Exif.Photo.LensSpecification 135/1 135/1 28/10 28/10" -M "set Exif.CanonCs.MaxAperture 95" -M "set Exif.CanonSi.TargetAperture 95" -M "set Exif.CanonSi.ApertureValue 95" -M "set Exif.Photo.LensMake Pentacon" -M "set Exif.Photo.ApertureValue 194698/65536" -M "set Exif.CanonCs.Lens 135 135 1" -M "set Exif.Photo.LensSerialNumber 6327811" IMG_1449.CR2

exiv2 -k -M"del Exif.CanonCs.LensType" -M "set Exif.CanonCs.MaxAperture 95" -M "set Exif.CanonCs.Lens 29 29 1" -M "set Exif.CanonCs.MinAperture 288" -M "set Exif.Photo.FocalLength 29/1" -M "set Exif.Photo.ApertureValue 194698/65536" -M "set Exif.Image.LensInfo 29/1 29/1 28/10 28/10" -M "set Xmp.aux.Lens Pentacon Pentacon 29mm f/2.8 auto" -M "set Exif.CanonSi.ApertureValue 95" -M "set Exif.Canon.LensModel Pentacon 29mm f/2.8 auto" -M "set Exif.Photo.LensModel Pentacon 29mm f/2.8 auto" -M "set Exif.Photo.LensSerialNumber 6308110" -M "set Exif.Photo.FNumber 28/10" -M "set Exif.Photo.LensSpecification 29/1 29/1 28/10 28/10" -M "set Exif.CanonSi.TargetAperture 95" -M "set Exif.Photo.MaxApertureValue 194698/65536" -M "set Exif.Photo.LensMake Pentacon" IMG_1451.CR2

exiv2 -k -M"del Exif.CanonCs.LensType" -M "set Exif.Photo.LensMake Revuenon" -M "set Exif.Image.LensInfo 28/1 28/1 35/10 35/10" -M "set Exif.CanonSi.ApertureValue 116" -M "set Exif.Photo.FocalLength 28/1" -M "set Exif.Photo.FNumber 35/10" -M "set Exif.Photo.MaxApertureValue 236894/65536" -M "set Exif.Canon.LensModel Auto Revuenon 1:3.5 f=28mm" -M "set Exif.Photo.LensModel Auto Revuenon 1:3.5 f=28mm" -M "set Xmp.aux.Lens Revuenon Auto Revuenon 1:3.5 f=28mm" -M "set Exif.CanonCs.Lens 28 28 1" -M "set Exif.Photo.LensSerialNumber " -M "set Exif.CanonCs.MaxAperture 116" -M "set Exif.CanonSi.TargetAperture 116" -M "set Exif.CanonCs.MinAperture 256" -M "set Exif.Photo.LensSpecification 28/1 28/1 35/10 35/10" -M "set Exif.Photo.ApertureValue 236894/65536" IMG_1453.CR2

exiv2 -k -M"del Exif.CanonCs.LensType" -M "set Exif.Photo.LensMake KMZ" -M "set Exif.Image.LensInfo 50/1 50/1 35/10 35/10" -M "set Exif.CanonSi.ApertureValue 128" -M "set Exif.Photo.FocalLength 50/1" -M "set Exif.Photo.FNumber 40/10" -M "set Exif.Photo.MaxApertureValue 194698/65536" -M "set Exif.Canon.LensModel Industar-61L/Z-MC 2.8/50" -M "set Exif.Photo.LensModel Industar-61L/Z-MC 2.8/50" -M "set Xmp.aux.Lens KMZ Industar-61L/Z-MC 2.8/50" -M "set Exif.CanonCs.Lens 50 50 1" -M "set Exif.Photo.LensSerialNumber 8707286" -M "set Exif.CanonCs.MaxAperture 95" -M "set Exif.CanonSi.TargetAperture 128" -M "set Exif.CanonCs.MinAperture 256" -M "set Exif.Photo.LensSpecification 50/1 50/1 35/10 35/10" -M "set Exif.Photo.ApertureValue 262144/65536" IMG_1454.CR2

exiv2 -k -M"del Exif.CanonCs.LensType" -M "set Exif.Canon.LensModel Auto Revuenon 1:3.8 f=75-205mm" -M "set Exif.Photo.LensModel Auto Revuenon 1:3.8 f=75-205mm" -M "set Exif.Photo.FocalLength 205/1" -M "set Exif.Photo.LensSpecification 75/1 205/1 38/10 38/10" -M "set Exif.CanonSi.ApertureValue 123" -M "set Exif.Photo.ApertureValue 252445/65536" -M "set Exif.Photo.LensSerialNumber 740015" -M "set Exif.CanonSi.TargetAperture 123" -M "set Exif.Photo.MaxApertureValue 252445/65536" -M "set Exif.Image.LensInfo 75/1 205/1 38/10 38/10" -M "set Exif.CanonCs.MinAperture 288" -M "set Exif.CanonCs.MaxAperture 123" -M "set Xmp.aux.Lens Revuenon Auto Revuenon 1:3.8 f=75-205mm" -M "set Exif.CanonCs.Lens 75 205 1" -M "set Exif.Photo.LensMake Revuenon" -M "set Exif.Photo.FNumber 38/10" IMG_1459.CR2

exiv2 -k -M"del Exif.CanonCs.LensType" -M "set Exif.CanonSi.ApertureValue 157" -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.FocalLength 180/1" -M "set Exif.Photo.ApertureValue 322363/65536" -M "set Exif.Photo.LensSpecification 180/1 180/1 56/10 56/10" -M "set Exif.Photo.MaxApertureValue 325770/65536" -M "set Exif.CanonSi.TargetAperture 157" -M "set Exif.CanonCs.MinAperture 288" -M "set Exif.CanonCs.MaxAperture 159" -M "set Exif.Canon.LensModel Telemegor 180mm f/5.5" -M "set Exif.Photo.LensModel Telemegor 180mm f/5.5" -M "set Exif.CanonCs.Lens 180 180 1" -M "set Exif.Photo.LensSerialNumber 1728275" -M "set Exif.Photo.LensMake Meyer-Optik Gorlitz" -M "set Exif.Photo.FNumber 55/10" IMG_1464.CR2

EXIF data examples

All these black images made by old lenses were taken and later updated using the script described above. Feel free to download, test them on your own and let me know if they worked for you or not. You can easily find me on ML Forum and/or IRCnet/freenode as zLOST ;)

jpg/IMG_7148.JPG - Canon EF 50mm f/1.8 STM
dt/IMG_7148.png - Canon EF 50mm f/1.8 STM

DarkTable

KeyValue
Photo.LensMake -- unset -- 
Photo.LensModelEF50mm f/1.8 STM
Image.LensInfo50/1 50/1 0/1 0/1
FocalLength50/1
FNumber56/10
Canon.LensModelEF50mm f/1.8 STM
<!-- lensfun -->
<lens>
        <maker>Canon</maker>
        <model>Canon EF 50mm f/1.8 STM</model>
        <mount>Canon EF</mount>
...
</lens>

<!-- Adobe Camera Raw -->
stCamera:LensID="4156"
stCamera:Lens="EF50mm f/1.8 STM"
stCamera:LensInfo="50/1 50/1 0/0 0/0"
stCamera:LensPrettyName="Canon EF 50mm f/1.8 STM"
stCamera:ProfileName="Adobe (Canon EF 50mm f/1.8 STM)"
jpg/IMG_7149.JPG - Canon EF 70-300mm f/4.0-5.6 IS USM
dt/IMG_7149.png - Canon EF 70-300mm f/4.0-5.6 IS USM

DarkTable

KeyValue
Photo.LensMake -- unset -- 
Photo.LensModelEF70-300mm f/4-5.6 IS USM
Image.LensInfo70/1 300/1 0/1 0/1
FocalLength130/1
FNumber56/10
Canon.LensModelEF70-300mm f/4-5.6 IS USM
<!-- lensfun -->
<!-- this is not an L-grade lens ;) -->
<lens>
        <maker>Canon</maker>
        <model>Canon EF 70-300mm f/4-5.6L IS USM</model>
        <mount>Canon EF</mount>
...
</lens>

<!-- Adobe Camera Raw -->
<stCamera:LensID>238</stCamera:LensID>
<stCamera:Lens>EF70-300mm f/4-5.6 IS USM</stCamera:Lens>
<stCamera:LensInfo>70/1 300/1 0/0 0/0</stCamera:LensInfo>
<stCamera:LensPrettyName>Canon EF 70-300mm f/4-5.6 IS USM</stCamera:LensPrettyName>
<stCamera:ProfileName>Adobe (Canon EF 70-300mm f/4-5.6 IS USM)</stCamera:ProfileName>
jpg/IMG_7150.JPG - Canon EF 17-40 mm f/4 L USM
dt/IMG_7150.png - Canon EF 17-40 mm f/4 L USM

DarkTable

KeyValue
Photo.LensMake -- unset -- 
Photo.LensModelEF17-40mm f/4L USM
Image.LensInfo17/1 40/1 0/1 0/1
FocalLength24/1
FNumber56/10
Canon.LensModelEF17-40mm f/4L USM
<!-- lensfun -->
<lens>
	<maker>Canon</maker>
	<model>Canon EF 17-40mm f/4L USM</model>
	<mount>Canon EF</mount>
...
</lens>

<!-- Adobe Camera Raw -->
<stCamera:LensID>231</stCamera:LensID>
<stCamera:Lens>EF17-40mm f/4L USM</stCamera:Lens>
<stCamera:LensInfo>17/1 40/1 0/0 0/0</stCamera:LensInfo>
<stCamera:LensPrettyName>Canon EF 17-40mm f/4 L USM</stCamera:LensPrettyName>
<stCamera:ProfileName>Adobe (Canon EF 17-40mm f/4 L USM)</stCamera:ProfileName>
jpg/IMG_7151.JPG - Canon EF 24-105 mm f/ 4 L IS USM
dt/IMG_7151.png - Canon EF 24-105 mm f/ 4 L IS USM

DarkTable

KeyValue
Photo.LensMake -- unset -- 
Photo.LensModelEF24-105mm f/4L IS USM
Image.LensInfo24/1 105/1 0/1 0/1
FocalLength24/1
FNumber56/10
Canon.LensModelEF24-105mm f/4L IS USM
<!-- lensfun -->
<lens>
	<maker>Canon</maker>
	<model>Canon EF 24-105mm f/4L IS USM</model>
	<mount>Canon EF</mount>
...
</lens>

<!-- Adobe Camera Raw -->
stCamera:LensID="237"
stCamera:Lens="EF24-105mm f/4L IS USM"
stCamera:LensPrettyName="Canon EF 24-105mm f/4 L IS USM"
stCamera:ProfileName="Adobe (Canon EF 24-105mm f/4 L IS USM)"
jpg/IMG_7152.JPG - Canon MP-E 65mm f/2.8
dt/IMG_7152.png - Canon MP-E 65mm f/2.8

DarkTable

KeyValue
Photo.LensMake -- unset -- 
Photo.LensModelMP-E65mm f/2.8 1-5x Macro Photo
Image.LensInfo65/1 65/1 0/1 0/1
FocalLength65/1
FNumber56/10
Canon.LensModelMP-E65mm f/2.8 1-5x Macro Photo
<!-- Adobe Camera Raw -->
stCamera:LensID="124"
stCamera:Lens="MP-E65mm f/2.8 1-5x Macro Photo"
stCamera:LensInfo="65/1 65/1 0/0 0/0"
stCamera:LensPrettyName="Canon MP-E 65mm f/2.8 1-5x Macro Photo"
stCamera:ProfileName="Adobe (Canon MP-E 65mm f/2.8 1-5x Macro Photo)"
jpg/IMG_7153.JPG - Sigma APO 150-500 mm f/ 5-6.3 DG OS HSM
dt/IMG_7153.png - Sigma APO 150-500 mm f/ 5-6.3 DG OS HSM

DarkTable

KeyValue
Photo.LensMake -- unset -- 
Photo.LensModel150-500mm
Image.LensInfo150/1 500/1 0/1 0/1
FocalLength267/1
FNumber56/10
Canon.LensModel150-500mm
<!-- lensfun -->
<lens>
	<maker>Sigma</maker>
	<model>Sigma 150-500mm f/5-6.3 APO DG OS HSM</model>
	<mount>Nikon F AF</mount>
	<mount>Sigma SA</mount>
	<mount>Canon EF</mount>
	<mount>Sony Alpha</mount>
	<mount>Pentax KAF</mount>
...
</lens>

<!-- Adobe Camera Raw -->
stCamera:LensID="174"
stCamera:Lens="150-500mm"
stCamera:LensInfo="150/1 500/1 0/0 0/0"
stCamera:LensPrettyName="SIGMA APO 150-500mm F5-6.3 DG OS HSM"
stCamera:ProfileName="Adobe (SIGMA APO 150-500mm F5-6.3 DG OS HSM, Canon)"
jpg/IMG_7155.JPG - Carl Zeiss Tessar 50mm f/2.8
dt/IMG_7155.png - Carl Zeiss Tessar 50mm f/2.8

DarkTable

KeyValue
Photo.LensMakeCarl Zeiss Jena DDR
Photo.LensModelTessar 50mm f/2.8
Image.LensInfo50/1 50/1 28/10 28/10
FocalLength50/1
FNumber28/10
Canon.LensModelTessar 50mm f/2.8
 -- none -- 
jpg/IMG_1436.JPG - Carl Zeiss Jena Pancolar 50 mm f/ 1.8
dt/IMG_1436.png - Carl Zeiss Jena Pancolar 50 mm f/ 1.8

DarkTable

KeyValue
Photo.LensMakeCarl Zeiss Jena
Photo.LensModelPancolar auto 1.8/50 MC
Image.LensInfo50/1 50/1 18/10 18/10
FocalLength50/1
FNumber18/10
Canon.LensModelPancolar auto 1.8/50 MC
 -- none -- 
jpg/IMG_7156.JPG - E. Ludwig Meritar 50mm f/2.9
dt/IMG_7156.png - E. Ludwig Meritar 50mm f/2.9

DarkTable

KeyValue
Photo.LensMakeE. Ludwig
Photo.LensModelMeritar 50mm f/2.9
Image.LensInfo50/1 50/1 29/10 29/10
FocalLength50/1
FNumber29/10
Canon.LensModelMeritar 50mm f/2.9
 -- none -- 
jpg/IMG_7157.JPG - Helios 44-2 58mm f/2
dt/IMG_7157.png - Helios 44-2 58mm f/2

DarkTable

KeyValue
Photo.LensMakeKMZ
Photo.LensModelHelios-44-2 58mm f/2
Image.LensInfo58/1 58/1 20/10 20/10
FocalLength58/1
FNumber20/10
Canon.LensModelHelios-44-2 58mm f/2
 -- none -- 
jpg/IMG_7158.JPG - Industar-50-2 50mm f/3.5
dt/IMG_7158.png - Industar-50-2 50mm f/3.5

DarkTable

KeyValue
Photo.LensMakeKMZ
Photo.LensModelIndustar-50-2 3.5/50
Image.LensInfo50/1 50/1 12/10 12/10
FocalLength50/1
FNumber35/10
Canon.LensModelIndustar-50-2 3.5/50
<!-- lensfun -->
<lens>
	<maker>KMZ</maker>
	<model>Industar-50-2 3.5/50</model>
	<model lang="ru">ИНДУСТАР-50-2 3.5/50</model>
	<mount>M42</mount>
...
</lens>
jpg/IMG_7159.JPG - Industar-61 L/Z (MC) 50mm f/2.8
dt/IMG_7159.png - Industar-61 L/Z (MC) 50mm f/2.8

DarkTable

KeyValue
Photo.LensMakeKMZ
Photo.LensModelIndustar-61L/Z-MC 2.8/50
Image.LensInfo50/1 50/1 35/10 35/10
FocalLength50/1
FNumber40/10
Canon.LensModelIndustar-61L/Z-MC 2.8/50
 -- none -- 
jpg/IMG_7160.JPG - Meyer-Optik Gorlitz Telemegor 180mm f/5.5
dt/IMG_7160.png - Meyer-Optik Gorlitz Telemegor 180mm f/5.5

DarkTable

KeyValue
Photo.LensMakeMeyer-Optik Gorlitz
Photo.LensModelTelemegor 180mm f/5.5
Image.LensInfo180/1 180/1 56/10 56/10
FocalLength180/1
FNumber55/10
Canon.LensModelTelemegor 180mm f/5.5
 -- none -- 
jpg/IMG_7161.JPG - Meyer-Optik Gorlitz Trioplan 50mm f/2.9 V
dt/IMG_7161.png - Meyer-Optik Gorlitz Trioplan 50mm f/2.9 V

DarkTable

KeyValue
Photo.LensMakeMeyer-Optik Gorlitz
Photo.LensModelTrioplan 1:2.9/50 V
Image.LensInfo50/1 50/1 29/10 29/10
FocalLength50/1
FNumber29/10
Canon.LensModelTrioplan 1:2.9/50 V
 -- none -- 
jpg/IMG_7162.JPG - Pentacon auto 29mm f/2.8
dt/IMG_7162.png - Pentacon auto 29mm f/2.8

DarkTable

KeyValue
Photo.LensMakePentacon
Photo.LensModelPentacon 29mm f/2.8 auto
Image.LensInfo29/1 29/1 28/10 28/10
FocalLength29/1
FNumber28/10
Canon.LensModelPentacon 29mm f/2.8 auto
 -- none -- 
jpg/IMG_7163.JPG - Pentacon auto 135mm f/2.8 MC
dt/IMG_7163.png - Pentacon auto 135mm f/2.8 MC

DarkTable

KeyValue
Photo.LensMakePentacon
Photo.LensModelPentacon 135mm f/2.8 auto MC
Image.LensInfo135/1 135/1 28/10 28/10
FocalLength135/1
FNumber28/10
Canon.LensModelPentacon 135mm f/2.8 auto MC
 -- none -- 
jpg/IMG_7164.JPG - Pentacon Prakticar 50mm f/1.8 MC
dt/IMG_7164.png - Pentacon Prakticar 50mm f/1.8 MC

DarkTable

KeyValue
Photo.LensMakePentacon
Photo.LensModelPrakticar 50mm f/1.8 MC
Image.LensInfo50/1 50/1 12/10 12/10
FocalLength50/1
FNumber18/10
Canon.LensModelPrakticar 50mm f/1.8 MC
 -- none -- 
jpg/IMG_7165.JPG - Samyang 85mm f/1.4 AS IF UMC
dt/IMG_7165.png - Samyang 85mm f/1.4 AS IF UMC

DarkTable

KeyValue
Photo.LensMakeSamyang
Photo.LensModel85mm f/1.4 IF UMC Aspherical
Image.LensInfo85/1 85/1 14/10 14/10
FocalLength85/1
FNumber14/10
Canon.LensModel85mm f/1.4 IF UMC Aspherical
<!-- lensfun -->
<lens>
	<maker>Samyang</maker>
	<model>Samyang 85mm f/1.4 IF UMC Aspherical</model>
	<mount>Canon EF</mount>
	<mount>Canon EF-M</mount>
	<mount>Fujifilm X</mount>
	<mount>Micro 4/3 System</mount>
	<mount>Nikon F AI</mount>
	<mount>4/3 System</mount>
	<mount>Pentax KAF</mount>
	<mount>Samsung NX</mount>
	<mount>Sony Alpha</mount>
	<mount>Sony E</mount>
...
</lens>

<!-- Adobe Camera Raw -->
stCamera:Lens="Samyang 85mm f/1.4 AS IF UMC"
stCamera:LensPrettyName="Samyang 85mm f/1.4 AS IF UMC"
stCamera:ProfileName="Adobe (Samyang 85mm f/1.4 AS IF UMC, Canon EOS M)"
jpg/IMG_1428.JPG - KMZ MC Zenitar 2.8/16
dt/IMG_1428.png - KMZ MC Zenitar 2.8/16

DarkTable

KeyValue
Photo.LensMakeKMZ
Photo.LensModelMC Zenitar 2.8/16
Image.LensInfo16/1 16/1 28/10 28/10
FocalLength16/1
FNumber40/10
Canon.LensModelMC Zenitar 2.8/16
<lens>
	<maker>KMZ</maker>
	<maker lang="ru">КМЗ</maker>
	<model>MC Zenitar 2.8/16</model>
	<model lang="ru">МС Зенитар 2.8/16</model>
	<mount>M42</mount>
	<mount>Canon EF</mount>
	<mount>Canon EF-S</mount>
	<mount>Pentax K</mount>
	<mount>Nikon F</mount>
	<type>fisheye</type>
	<cropfactor>1</cropfactor>
</lens>

jpg/IMG_1441.JPG - Auto Revuenon 1:1.2 f=55mm (Tomioka)
dt/IMG_1441.png - Auto Revuenon 1:1.2 f=55mm (Tomioka)

DarkTable

KeyValue
Photo.LensMakeRevuenon
Photo.LensModelAuto Revuenon 1:1.2 f=55mm (Tomioka)
Image.LensInfo55/1 55/1 12/10 12/10
FocalLength55/1
FNumber12/10
Canon.LensModelAuto Revuenon 1:1.2 f=55mm (Tomioka)
 -- none -- 
jpg/IMG_1434.JPG - Auto Revuenon 1:1.7 f=55mm
dt/IMG_1434.png - Auto Revuenon 1:1.7 f=55mm

DarkTable

KeyValue
Photo.LensMakeRevuenon
Photo.LensModelAuto Revuenon 1:1.7 f=55mm
Image.LensInfo55/1 55/1 17/10 17/10
FocalLength55/1
FNumber17/10
Canon.LensModelAuto Revuenon 1:1.7 f=55mm
 -- none -- 
jpg/IMG_1453.JPG - Auto Revuenon 1:3.5 f=28mm
dt/IMG_1453.png - Auto Revuenon 1:3.5 f=28mm

DarkTable

KeyValue
Photo.LensMakeRevuenon
Photo.LensModelAuto Revuenon 1:3.5 f=28mm
Image.LensInfo28/1 28/1 35/10 35/10
FocalLength28/1
FNumber35/10
Canon.LensModelAuto Revuenon 1:3.5 f=28mm
 -- none -- 
jpg/IMG_1459.JPG - Auto Revuenon 1:3.8 f=75-205mm
dt/IMG_1459.png - Auto Revuenon 1:3.8 f=75-205mm

DarkTable

KeyValue
Photo.LensMakeRevuenon
Photo.LensModelAuto Revuenon 1:3.8 f=75-205mm
Image.LensInfo75/1 205/1 38/10 38/10
FocalLength205/1
FNumber38/10
Canon.LensModelAuto Revuenon 1:3.8 f=75-205mm
 -- none -- 
jpg/IMG_1488.JPG - Novar Anastigmat 1:6.3 F=5 cm
dt/IMG_1488.png - Novar Anastigmat 1:6.3 F=5 cm

DarkTable

KeyValue
Photo.LensMakeZeiss Ikon
Photo.LensModelNovar Anastigmat 1:6.3 F=5 cm
Image.LensInfo50/1 50/1 64/10 64/10
FocalLength50/1
FNumber63/10
Canon.LensModelNovar Anastigmat 1:6.3 F=5 cm
 -- none -- 
jpg/IMG_7166.JPG - Zeiss Distagon T* 2.8/25 ZF.2
dt/IMG_7166.png - Zeiss Distagon T* 2.8/25 ZF.2

DarkTable

KeyValue
Photo.LensMakeZeiss
Photo.LensModelDistagon T* 2.8/25 ZF.2
Image.LensInfo25/1 25/1 28/10 28/10
FocalLength25/1
FNumber28/10
Canon.LensModelDistagon T* 2.8/25 ZF.2
<!-- lensfun -->
<lens>
	<maker>Zeiss</maker>
	<model>Zeiss Distagon T* 25mm f/2.8 ZF.2</model>
	<mount>Nikon F AI-S</mount>
...
</lens>

<!-- Adobe Camera Raw -->
stCamera:Lens="Zeiss Distagon T* 2.8/25 ZF.2"
stCamera:LensInfo="250/10 250/10 28/10 28/10"
stCamera:LensPrettyName="Zeiss Distagon T* 2,8/25 ZF.2"
stCamera:ProfileName="Adobe (Zeiss Distagon T* 2,8/25 ZF.2)"

Other tools

Exif Comments

When uploading a picture to FB, the comments in EXIF data are used to populate the image description. Unfortunately darktable adds "Developed with darktable.." when converting raw for further processing in GIMP, which may become pretty annoying. So i wrote this simple script, which will either throw the comments away or replace it with relevant data related to the hardware used for capturing the picture (lens name, camera name, exposure details).

#!/bin/bash

CLEAN=0

function get(){
        exiv2 -g ${1} -Pt -q ${pic}
}

while getopts "c" opt; do
        case ${opt} in
                c)      CLEAN=1
        esac
done

for pic in *.jpg; do
        echo "=== ${pic} ==="
        if [ ${CLEAN} -eq 0 ]; then
                DESC="$(get Exif.Photo.LensMake) $(get Exif.Photo.LensModel)\n$(get Exif.Canon.ImageType)\nISO$(get Exif.Photo.ISOSpeedRatings), $(get Exif.Photo.FNumber), $(get Exif.Photo.FocalLength), $(get Exif.Photo.ExposureTime)"
        else
                DESC=""
        fi
        echo -e "${DESC}"
        exiv2 -q -M"set Exif.Image.ImageDescription ${DESC}" \
                -M"set Exif.Photo.UserComment ${DESC}" ${pic}
done

link