Feature #9028

Set default lens model to "Standard" for LensFun lookup

Added by Torsten Bronger over 6 years ago. Updated over 4 years ago.

Start date:
Due date:
% Done:


Affected Version:
git development version
hardware architecture:


Some fixed-lens compact cameras don't report a lens model name. LensFun calls these lenses "Standard". Maybe it's good idea to set the lens model (not in the image info box on the left but just for lens correction) to "Standard" in this case so that lookup works immediately.

DSC00005.ARW - Sample RAW from Sony RX100M2 (19.7 MB) Matthew Harrison, 11/07/2014 12:19 AM

Canon_PowerShot_A640_&_compatibles--7.3mm--5.6_IMG_4609.JPG (1.75 MB) Torsten Bronger, 11/10/2014 10:00 AM

Canon_PowerShot_A640_&_compatibles,_with_CHDK_s_DNG--7.3mm--5.3_IMG_4609.DNG - Custom firmware --> proper lens name (6.16 MB) Torsten Bronger, 11/10/2014 03:45 PM

Associated revisions

Revision ac966940
Added by Roman Lebedev over 4 years ago

Lens IOP: set lens to fixed for fixed-lens compact camera. Fixes #9028

Revision 45974e16
Added by Roman Lebedev over 4 years ago

Lens IOP: compact cameras: fix lens detection. Refs #9028
E.g. when lens is "(65535)" or have correct lens name, but LF has only "fixed lens"


#1 Updated by Torsten Bronger over 5 years ago

I filed this issue against,5162.0.html

If this plan works, DT doesn't have to change with this respect.

#2 Updated by Torsten Bronger over 5 years ago

Unfortunately, neither ExifTool not Exiv2 are willing to implement this, largely because they fear additional maintenance burden.

I don't think that LensFun itself could be taught to do this because it doesn't know whether a certain lens name was deliberately chosen by the user, or read from EXIF data.

Proposed solution

If the lookup for possible lenses for the camera model returns a lens which is called "Standard", and the user has not set a lens model manually, Darktable should set it to "Standard", no matter what the EXIF data says.

#3 Updated by Torsten Bronger over 5 years ago

There is a better possible solution:

When the camera model is changed, or when the module is initialised, do the following: If no lens is set, and no lens model name is in EXIF data, and the camera mount name starts with a lower case letter, set the lens model to "Standard".

#4 Updated by Artur de Sousa Rocha about 5 years ago

Why not have a built-in list of compact cameras? This is similar to matching per-camera white balance presets.

#5 Updated by Torsten Bronger about 5 years ago

Current SVN lensfun lets you test for a fixed-lens camera by looking at the zeroth character in the mount's name: Iff it is a lower case letter, it is a fixed-lens camera.

By the way, the lensfun project is currently evaluating the possibility to re-name all fixed lenses into the name of the respective camera in order to make the combination (maker, model) globally unique (as primary key). Downside: You have to change all your old pictures in Darktable.

#6 Updated by Matthew Harrison over 4 years ago

I'm providing a RAW with this issue as requested by LebedevRI on IRC.

I have this problem with a Sony RX100M2. It's a major productivity drain as I have to manually select the correct lens on every photo. A fix would be greatly appreciated.

#7 Updated by Torsten Bronger over 4 years ago

I must correct and update my above "proposed solution".

Lensfun does not use the name "Standard" anymore for fixed lenses (because this led to ambiguous primary keys). Instead, the name is arbitrary, e.g. "Stylus 1 & compatibles". At the same time, we change the mount name for fixed lenses so that it starts with a lowercase letter -- and this is only true for fixed lenses.

New proposed solution

If the mount of the camera starts with a lowercase letter, set the default lens model to the shortest lens model in the list of possible lenses.

#10 Updated by Roman Lebedev over 4 years ago

  • Status changed from New to Fixed
  • % Done changed from 0 to 100

#11 Updated by Roman Lebedev over 4 years ago

  • Category set to Darkroom
  • Assignee set to Roman Lebedev
  • Target version set to Candidate for next major release
  • Affected Version set to git development version
  • System set to all
  • bitness set to 64-bit

Also available in: Atom PDF