ART, lensfun and lens correction...

ART uses lensfun, right? Well I’m confused a bit (which happens all too often). It’s not an ART issue, but it may be something with lensfun based on what I’m seeing.

Per the lensfun coverage page, my lenses and friends:

manufacturer             model              crop   distortion  TCA  vignetting  note
  Sigma         17-70mm f/2.8-4.5 DC Macro  1.611     yes      no       no      [1]
  Sigma         17-70mm f/2.8-4.5 DC Macro  1.523     yes      yes      no      [2]
  Canon         EF 70-200mm f/4L USM        1.0       yes      no       no      [1]
  Canon         EF 70-200mm f/4L IS USM     1.0       yes      yes      yes     [2]

1. My lenses
2. Not mine but apparently what lensfun is choosing, see below

This is as of today (June 19), taken from the lensfun source.

In metadata, ART correctly identifies my camera and the lenses:

  • Camera: EOS Rebel T8i
  • Sigma: Sigma 17-70mm f/2.8-4.5 DC Macro
  • Canon: EF70-200mm f/4L USM

In the Profiled Lens Correction tool:

Sigma 17-70mm f/2.8-4.5 DC Macro



It looks like lensfun is selecting the 1.5 crop factor lens instead of mine, based on the available corrections here and what’s in the lensfun list. I can’t see nor manually choose based on crop factor.

Canon EF70-200mm f/4L USM


Before I enabled Profiled Lens Correction and selected Automatic from database, the Sigma was still listed in the manual section (from previous tests). When I clicked Automatic from database, it changed to this lens: Not mine but the later IS version. So I assume that’s the profile selected by lensfun. The available corrections reflect the lensfun list for the IS version.

However, if I manually select the correct (i.e. my) lens, the available corrections properly reflect the list.


So why is lensfun selecting the wrong lenses, despite the fact they’re identified correctly? Or am I doing something wrong?

Just for giggles, I compared with darktable which also uses lensfun (right?). It also picked the IS Canon version by default and although it shows the right name for the Sigma, I can’t tell if it’s the correct one.

I realize I could save the correct lens (for the Canon at least) in a profile but then I get only geometric correction, rather than the (likely not quite correct) vignetting correction. TCA is definitely wrong and I leave it disabled.

A side story is, I shot 30 vignette and TCA calibration shots (per lens) and submitted them to lensfun only to learn they can’t process CR3 raw files. Argghh. And to add insult to injury, I can’t even find the correct Adobe LCP files for these lenses, despite them being supported by Adobe. They’re not included with the DNG converter.


But on a brighter note, ART itself is working great as usual. :slight_smile: I just wish I could take full advantage of the images I get from my lenses.

If ART is using exiv2 to extract metadata and do the matching of the lens, it can be extremely problematic. There are several threads here on the forum discussing in deep detail what the issue is and why its a hard problem. I’m mobile or I’d dig them out.

Of course you should just use a profile to set the lens correction.

Sorry this isn’t a real answer :slight_smile:

1 Like

For a given image, take a look at the lens nomenclature offered in the raw file as given with exiftool. For my older Nikons, I don’t even get a nomenclature, they apparently only started including it with the Z series. Make sure you diffferentiate between actual metadata and the exiftool composite tags, where exiftool will manufacture a lens name using a wonky eight-tag lookup table…

1 Like

have a look at User's portal · darktable-org/darktable Wiki · GitHub
If exiv2 is also used for art that might be a way to override the lens identification

1 Like


You can safely use the parameters measured with a (sensor) crop factor of 1.5 also on a larger factor, everything should work just fine. It’s the other way round that is problematic, but in that case art will show you a warning (:warning:).

Regarding lens matching, what the others said :slight_smile:


1 Like

Good info - I’ll take a look at all suggestions.

Also, I found and downloaded the (now discontinued) Adobe Lens Profile Creator tool. I’ve not read it all yet but it has documentation on how to create custom LCP files. It’s a 28-page PDF… sure hope it’s not 28 pages of procedure for each aperture at each focal length! LOL

From a brief scan I’m guessing the biggest challenge might be getting properly-lighted calibration images, as they’re the basis for vignetting correction. Maybe it’s not as critical as I’m imagining. Need to read. If this will work, it would probably be my best bet since it’ll be completely customized for my actual lenses.

And it’s not like my images are all blurry and distorted without correction. Well, at least as long as I do my job at the camera! But I’d like to get “L” images from my “L” lens, even if it is a few years old. KnowhutImean? :slight_smile:


Regarding the LCPs in the DNG Converter, I think I found both of your lenses in my copy. Just to make sure we’re looking in the same place, here’s where I found them on my Windows tablet:


Look in the Canon directory for Canon LCPs, Sigma/Canon for the Sigma Canon-mount lenses…

Yeah, that’s where I’ve been looking. Here’s what I have:

C:\ProgramData\Adobe\CameraRaw\LensProfiles\1.0\Canon>dir | grep "EF 70-200mm f4"
Canon (Canon EF 70-200mm f4L IS II USM) - RAW.lcp
Canon EOS 5D Mark II (Canon EF 70-200mm f4L IS USM) - RAW.lcp
Canon EOS 5D Mark II (Canon EF 70-200mm f4L USM) - RAW.lcp       [1]

C:\ProgramData\Adobe\CameraRaw\LensProfiles\1.0\Sigma\Canon>dir |  grep "17-70mm"
Canon (SIGMA 17-70mm F2.8-4 DC MACRO OS HSM C013) - RAW.lcp
Canon (Sigma_17-70mm_F2.8-4.5_DC_MACRO_HSM ) - RAW.lcp           [2]
Canon (Sigma_17-70mm_F2.8-4_DC_MACRO_OS_HSM ) - RAW.lcp
  1. That’s my lens, but it’s apparently a special profile for use when on a 5D MkII and I have an 850D. Would it work properly, maybe sans an extra feature or two? Dunno. ISTR I tried it and the vignetting looked a bit off, but it bears a revisit.

  2. My lens is the original non-OS, non-HSM version. This one is not stabilized but I don’t know if the HSM (Hypersonic Motor) version was different optically. I read one review that said it was an optical upgrade. The other two have a larger zoom aperture than mine (f/4 vs. f/4.5).

I know for a fact using TCA correction on my Canon lens from one of the other 70-200 f/4 profiles actually creates bad green CA. So the optics are net different, even within the f/4 family.

If you have more than these profiles, I’m all ears! :smiley: I guess the real answer is to replace all my old lenses with new ones. Tell you what I’ll send you my wife’s phone number and let you field that idea with her… LOL

1 Like

After reading this bit I was hopeful it might be an easy fix, but apparently not. It appears exiv2 correctly identifies my lenses:

Exif.Photo.LensModel         Ascii      20  EF70-200mm f/4L USM
Exif.CanonCs.LensType        Short       1  Canon EF 70-200mm f/4L USM
Exif.Canon.LensModel         Ascii     138  EF70-200mm f/4L USM

Exif.Photo.LensModel         Ascii       1
Exif.CanonCs.LensType        Short       1  Sigma 17-70mm f/2.8-4.5 DC Macro
Exif.Canon.LensModel         Ascii     138

The Sigma doesn’t populate as much as the Canon but what’s there is exactly correct.

…starting to read the Adobe Lens Profile Creator docs now…



Just to double check, did you remember to turn off raw ca correction when testing? Otherwise you would be correcting twice…

For vignette correction, an alternative is to use flat fields.

I’ll check that. I can’t say for sure… too many things I was into at the time!