2

When I open a raw image, made with a Canon EOS 600D, UFRaw for some lenses does not automatically find the lens profile.

This is an example where it does find the profile:

From the EXIF information:
Lens Model: EF-S17-85mm f/4-5.6 IS USM
Lens Type: Canon EF-S 17-85mm f4-5.6 IS USM

From the lensfun database file slr-canon.xml:
Model: Canon EF-S 17-85mm f/4-5.6 IS USM

The lensfun profile for this lens has a crop factor of 1.611.

This one is NOT automatically found:

From the EXIF information:
Lens Model: EF-S18-135mm f/3.5-5.6 IS USM
Lens Type: (36912)

From the lensfun database file slr-canon.xml:
Model: Canon EF-S 18-135mm f/3.5-5.6 IS USM

The lensfun profile for this lens was made with a Canon EOS 7D Mark II, with a crop factor of 1.605.

The crop factor for the Canon EOS 600D in the lensfun database is 1.613.

Why is the Canon EF-S 18-135mm f/3.5-5.6 IS USM not automatically found?

  • Lenses don't have crop factors. Cameras do. More specifically, the sensors in cameras do. Are you asking why the second profile shows a crop factor of 1.605 instead of 1.613? – Michael C Jun 22 '18 at 8:40
  • No, I just mentioned it, in case it mattered. I am asking why one lens is automatically selected, and the other isn't. Both are in the lensfun database. – Ge We Jun 22 '18 at 13:12
  • ufraw hasn't been updated in several years, and at that time the lensfun support was still marked as experimental. Just out of curiosity, does more up-to-date software work? And, what version of the lensfun database do you have? – mattdm Jun 22 '18 at 13:47
  • UFRaw is ancient... See RawTherapee, Darktable, Photozone, all much better. See pxls.us where these are discussed (and where you can get in touch with the authors). – xenoid Jun 22 '18 at 15:17
  • Darktable uses lensfun, just like UFRaw. It shows the name of the camera, and says "unknown lens, select manually". For the lens it shows the lens type from the EXIF information, not the lens name. For some reason the lens type is (36912) in the EXIF. – Ge We Jun 22 '18 at 18:22
1

The lens type in Exif may not be mapped to a usable lens name by the software you're using. In the case of darktable, this depends on exiv2, which may not have this lens mapping if it's an older version of exiv2. To compound the problem, exiv2 may not continue to provide this functionality in the future, so even recent versions may exhibit this problem for recent lenses. The suggested solution is for users to provide their own mappings for the lenses they use.

Not a factor in this case, but as general information: Lensfun normally won't use a profile created using a camera with a smaller sensor for an image created using a camera with a larger sensor. This is because, while an adjustment in the opposite direction can be accurately calculated, this case would require assumptions about what the lens does in the areas near the edges that weren't part of the original profile.

  • But in this case, the 600D crops slightly tighter, at 1.613, than either whatever camera had the 1.611 crop factor or the 7DII at 1.605. So both profiles, the one that was automatically recognized and the one that was not, were both generated with cameras that do not crop quite as much as the 600D. – Michael C Jun 23 '18 at 6:23
  • @MichaelClark Thanks, yeah, I was pretty distracted when I attempted the answer, brainfarted juggling the different crops; I'll leave that info in because it might be generally useful, but edit the applicability to this case. – junkyardsparkle Jun 23 '18 at 7:20
  • I installed Darktable, which also showed the lens type as (36912), just like exiftool. I now also installed exiv2 (it wasn't installed, so are you sure Darktable depends on it?). This shows the following: $ exiv2 -p a _MG_4680.CR2 | grep -i lens Exif.CanonCs.LensType Short 1 Canon EF 70-300mm f/4-5.6 IS II USM (cropped because too long for a comment, and formatting is lost) This shows the correct lens type. The LensIDNumer that is mentioned in your suggested solution is not in the output (that might be Nikon specific?). – Ge We Jun 23 '18 at 8:16
  • Sorry, wrong test image (other lens). Results should be: ``$ exiv2 -p a _MG_4678.CR2 | grep -i lens Exif.CanonCs.LensType Short 1 Canon EF-S 18-135mm f/3.5-5.6 IS USM` – Ge We Jun 23 '18 at 8:25
  • Depending on how you obtained darktable, it may be a static build against an older exiv2; you would have to build it against the newer one. For mapping Canon lenses, it sounds like you would use the (untranslated) LensType value, "36912". – junkyardsparkle Jun 23 '18 at 18:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.