Flat field images
I suggest a flat field feature in darktable. You can use it for removal of vignetting and sensor dust shadows. It can also correct colour casts, e.g. magenta corners.
My personal use-case are pictures taken with a close-up lens. LensFun doesn't have vignetting correction data for such composite lens setups. Moreover, such pictures have to be taken with small aperture, which causes dust shadows. Thus, flat field pictures come in handy.
As far as I can see, the following should be considered:
- The flat field correction takes place somewhere between "demosaic" and "lens" in iop_deps.pdf.
- There should be a "blur radius" slider, so that the flat field is blurred before division.
- Just my assumption: The flat field must be white-balanced before application so that the centre region is R = G = B = 1.0. This way, the centre region is not corrected. At the same time, the flat field is normalised by this (which is necessary).
- Normally, the user selects the flat-field image explicitly. One can set a default flat-fields directory in the settings.
- If the user marks a checkbox in the module, an auto-detection heuristics should find the flat field image in the flat-fields directory by EXIF data. (At least Rawtherapee has this feature; I don't know how it actually works.)
- Vignetting correction by LensFun must be disabled if a flat field is active.
Look at the Rawtherapee manual, page 49 for further information.