Correcting light fall off with Darktable

This is another question arising from my slide digitising project but it seems equally applicable to any photo taken through, shall I say, ‘custom’ optics or with less than perfect illumination… basically I mean situations where off the peg lens corrections are not available. In my case the issue can be from the backlight and also from light fall off in the optics of the camera that took the original image.

Searching around this topic turned up a suggestion to use the vignetting module. I spent some time playing with the sliders on an image of my backlight diffuser and managed to get the luminance (checked with the colour picker at various points around the image) nice and even.

Making that into a style and applying it to a real photo produced very disappointing results. Firstly the brightness at the edges was far too much - easy enough to change but having done that the sky looked good but everything else was washed out towards the edge of the frame.

I guess I could make a parametric mask to limit the effect of the vignette to the sky but is there a better way?

Taking a lesson from another field… in astrophotography we take ‘flat’ frames to characterise the variations in light transmission across the frame. These are then used as part of the stacking process. Is there a way to use a ‘flat’ frame in darktable?

vignetting uses non-linear, scene-referred data, and is ill-suited for technical corrections. You could try exposure instead, with a drawn (circular) mask.


Thanks, that works nicely and doesn’t wash out the colours at the edges.

It also stays where I put it if I then crop the photo off centre.

Hmm… I may have spoken too soon. The exposure module does what I want but when I save it as a style the mask is not present when the style is applied to another image.

Is there a way to replicate this change to other images?

Have you tried (partially) copying and pasting the history stack?

I have now. I used ‘copy parts’ and then ‘paste parts’.

The good news is that the drawn mask is copied across with the module. The bad news is that pretty much every other edit on the target image is wiped out by the paste. The history stack drops to 9 modules, mostly the fixed ones plus the pasted module. It’s not the starting module list though - filmic rgb is not there.

Not sure if this is the expected behaviour for ‘paste parts’. My guess is not. I’m on 3.4.0 BTW.

There’s a setting to specify whether to append the pasted changes or use them to overwrite the existing stack (+ apply the default modules and auto-applied presets):



Excellent. Success! Thanks - I has not spotted that setting.