Exif.CanonCs.LensType Short 1 Canon EF-M 22mm f/2 STM
And this name is what’s appearing in the lens correction module in darktable v2.4.1 (I’m using Ubuntu 16.04 and I installed darktable via the ppa) I’ve checked in lensfun; support was added in 2014.
But underneath that entry in the lens correction module in darktable it says “camera/lens not found. Please select manually” and it lets me choose canon, then the lens, in the lens box. At this point the controls underneath the lens name magically appear. However, there is no change whatsoever in the picture no matter how much I change the values in the controls.
If I change the empty camera field (above the lens name) I can select a camera, but my camera (canon eos m100) is not in there. (It IS picked up on automatically by the “denoise(profiled)” module though). Once you’ve put a camera in there you cannot remove it! It says “working” when I randomly select a camera, but again, no difference in output.
What do I need to do to get lens correction to pick up this lens, and apply correction for it? For now i’m only using darktable with one camera and one lens, so I don’t mind hard-coding it somehow if that’s possible, although I’ll probably start using it with another camera before long.
OK I downloaded, built and installed lensfun (It wasn’t installed before, and - despite what you might find on the internet - it’s not in the usual ubuntu repository). Then I ran your command, but there’s no difference. Do I have to integrate lensfun and darktable in some way?
(Should I be concerned than none of the lensfun xml files contain a reference to my camera? The lens IS mentioned though).
Lensfun only cares about lenses, it doesn’t know about cameras. However the name needs to match exactly! Are you sure that the exif name and the one in lensfun are the same?
Is there a tool for checking lensfun - i just grepped that. Perhaps there are nulls or whitespace or something. Or perhaps the version of lensfun which darktable uses is old/not configured right?
@LebedevRI does dt not use the lens database installed system-wide when one does lensfun-update-data? @xyzzy I edited your post to make your XML and Exiv2 code fragments readable, you can edit your post to learn how I did that.
darktable uses whatever lensfun version it was built against, which in turn uses it’s database.
Since 16.04 still ships with lensfun 0.2.8, naturally, lensfun-update-data does not exist there.
And if you either install newer lensfun from ppa, or build one locally, that will either result in the broken system (see all the posts about lensfun ABI breakage), or the dt will still be using the old lensfun.
Which version of lensfun is darktable currently using (how can I check for myself)?
I’m already using that PPA, as it seemed the happy middle way between building from source and manually downloading and installing zips. Seems that the PPA lags the main build though; which do you think I should be using?
I’m not using the ubuntu darktable; i’m using the one from the ppa as described on the darktable install page.
I’m a bit confused. Does darktable ship with its own version of lensfun, or does it rely on there already being one installed? What’s the best way of ensuring that darktable and lensfun are up to date; supposing that I contact lensfun and they add support for my camera?
lensfun is used for lens correction.
If the lens correction module isn’t showing your camera or lens, or a wrong one,
then please report that to those folks.
I understand that, and I’m going to contact them about that.
In the meantime I’m going to try and add an entry to lensfun for my camera, given that the only info apparently needed is the sensor crop, mount etc.
So my question is, having rebuilt lensfun with my/their edit in place, do I just have to rebuild darktable from source on my machine and it’ll pick up those changes?
If the only thing missing initially from lensfun was the camera, then there is zero (actually negative) profit from building local version of lensfun.
Just find the mil-canon.xml installed by liblensfun-data, and edit it, adding that camera of yours.
But first, do report that to lensfun.
OK, I had four mil-canon.xml files on my system and eventually I found the one which worked.
Interestingly, they’ve tweaked the crop factor for the lens to 1.613, and ditto for the m3, a similar camera to the m100, so i’ve applied those changes too.
Still curious how I’d apply the changes lensfun might eventually make, if you’re recommending not installing lensfun from source.