darktable icon indicating copy to clipboard operation
darktable copied to clipboard

For the modern workflow, treat user-set WB just like 'as shot to reference'

Open kofa73 opened this issue 1 month ago • 2 comments

Is your feature request related to a problem? Please describe. as-shot to reference uses multipliers from the camera to ensure a better WB (important for demosaicing and highlight reconstruction) than what camera reference (D65) would provide. However, the user can pick an even better set of multipliers by sampling an area of the image. In fact, some images (especially those shot with 'UniWB' -- see https://discuss.pixls.us/t/experimenting-with-icc-preference-profile-and-working-profile/54473) have a horrible set of in-camera multipliers. Those multipliers should be treated the same way as in-camera ones.

Describe the solution you'd like Replace double as_shot[4] in dt_dev_chroma_t with double effective_coeffs[4] or similar. In temperature.c, set late_correction to true not only for "as shot to reference", but also for "by spot" and "user defined", if the scene-referred workflow is used. Update all code that relies on in-camera multipliers to use effective_coeffs, including color calibration, which reads coefficients directly from the image (find_temperature_from_raw_coeffs) -- I think as_shot should be the same (except for normalisation -- extracted from the same image data; temperature.c#reload_defaults -> _find_coeffs).

Alternatives Leave as-is, one can simply turn off color calibration for those special images and use 'legacy' WB.

I'm willing to take this on, but will need support from core devs.

kofa73 avatar Dec 06 '25 08:12 kofa73

Hi @kofa73 , in general i think this idea is good. The module in question is quite a tricky beast though and has rough edges.

jenshannoschwalm avatar Dec 09 '25 06:12 jenshannoschwalm

I'll take it slow. Thanks for the heads-up.

kofa73 avatar Dec 09 '25 20:12 kofa73