How to make lens correction default to using lensfun database?

Each DNG raw image from my Leica Q2 Monochrom that I open in darktable shows vignetting in the corners until I go to the lens correction module and change the correction method from “embedded metadata” to “lensfun database”. How can I make this selection the default for images from the Q2 Monochrom so that I don’t have to manually make the change for each image?

This is with Darktable 5.6.0. I tested on both Linux and Windows, the the behaviour is the same on both platforms.

It would involve creating a preset, and specifying to auto-apply this module+preset to all or certain images.

I have not done this for lens correction, a specific camera, or a specific lens, so I’m unable to be more exact. But this is, I’m sure, where you need to be!

1 Like

Once you choose “lensfun database”, you can store that setting as a new preset.

You give it a name (e.g. Leica Q2 M) and in the dialog you enter the model of the camera or the lens for which you want to be automatically applied.

1 Like

You might need to set a hotkey that changes the correction method. I’m wondering if a preset, even for something this specific, might not work correctly for all images. (I think the aperture and focal length settings might be forced to ‘wrong’ values on different images)

I have photos take with different Nikon Z lenses and the correct lens is recognized each time from the metadata and correction applied with the corresponding 𝑓 number and focal length.

2 Likes

Thanks. I was able to make a preset to force use of the lensfun database for all images from camera model Q2 Monochrom.

3 Likes

I wonder if creating a style that includes some basic editing steps such as denoising, sharpening and lens correction would work for you.

1 Like

Or several. I use styles more for defining workflow than for defining looks.

Thank you for this thread! I never realised that I needed to make this change for one of my lenses. Using lens fun, rather than embedded data, makes a substantial difference to those images.

Now I have to automate that :slight_smile:

I had the same problem when darktable switched to embedded metadata by default, as the data in the Tamron 17-70/2.8 for Fuji is wrong at certain focal lengths (e.g. 20mm). I gave up on playing with preset, and patch the source code everytime I pull/recompile darktable instead :frowning: , e.g.: patch -p 1 < default_lensfun.patch

default_lensfun.patch (672 Bytes)

1 Like

Thanks! It’s certainly a never-say-never, but I am not comfortable with patching code, and wouldn’t do so unless it was something important to me.

Out of the two lenses I use on most outings, it affects only one, and that one will be less than five out of 50-100 shots. It is easier for me to manually change.

Oh… I probably have to resave the style with the new auto-apply preset. At some time, I’ll sort it. On the to-do list.