TL;DR: should I create a custom white-balance preset for my camera to make daylight-lit photos not showing an “invalid CCT” illuminant in color calibration module, or if I wait until devs add support for my camera in rawspeed things will fix by themselves?
The situation:
I got a new Panasonic DC-TZ99 camera
I filed an issue to add support for it in darktable, in the meantime I manually added an alias to DC-TZ96 in cameras.xml, to let darktable read the RW2.
Photos taken under daylight (both sunny and overcast days)
White balance module is on, in “as shot to reference” mode (default settings).
Color calibration module is on, CAT16 adaptation (scene-referred default)
The problem:
Color calibration module defaults to custom illuminant because it detects an invalid CCT.
I also have to do some hue and chroma corrections to the illuminant to remove tint from the photos, in most of the photos.
for photos taken in daylight, I expected that the illuminant should be daylight
it’s a bit annoying to have two dimensions to correct (hue and chroma) instead of one (temperature) or zero (if the default settings could get the white balance right)
I know that, as explained under “caveats” section of manual, I can create a white balance preset for my camera, taking a photo of a white calibrated monitor, but my monitor isn’t calibrated (well, I calibrated it only with Windows monitor calibration tool, that relies on my eyes, not with a physical calibration tool), and I would have to find a calibrated one.
My question is: does my problem arise from the fact that I manually added my camera as an alias of TZ96, and if I wait enough, with a proper white balance matrix for my camera added by darktable devs in a future DT version, the problem will be fixed? In this case, should I provide a full set of RAW samples for white balance, as described in this post?
Or maybe the problem is inherent in my camera’s sensor and the only way to fix it is to make a custom white balance preset?
First off, the “invalid” means that the detected illuminant does not fit the model for “daylight” or “blackbody”.
It’s very easy to get such an “invalid CCT”, even taking pictures under daylight: if you work e.g. under trees, or with mixed light in the scene (sun+shadow!). Or if you have strong colours in your scene, or reflections off e.g. a coloured wall or a lawn (even with the wall outside the image), and you use an auto white balance (camera or darktable). A custom white balance as you described won’t help there.
Those auto methods are based on the observation that the “average scene” is grey (or at least has a known, constant tint). The auto method corrects so that the average for your image corresponds to grey…
So, if you know your image is taken under daylight, why not just set that as illuminant?
As for the number of dimensions to correct: you need two parameters to fully set a white balance. White balancing is nothing but setting multipliers for the R, G and B channels. The multiplier for G is set to 1.0, so you need two parameters, one for R and one for B.
And yes, it’s annoying to set several parameters. But the system always sets both, we’re lucky that in some common situations we can predict one or both of them.
“invalid” CCT, in itself, is not a problem. However, if you get casts often, the matrix darktable uses for your camera might be off. I’d open a ticket.
Here is the RAW sample I’ve uploaded for the camera support issue: here it seems to me that default settings do a good job in white balance (but still default to a custom illuminant).
Here are two photos in which I had to move hue toward green to make colors look ok to my eyes:
However, @rvietor answer made me start thinking that the green cast may be due to the scene (maybe reflection from the lawn?). Other photos taken another day have green/blue casts also, but there were vegetation too that could have altered the light.
So, if you know your image is taken under daylight, why not just set that as illuminant?
I’ve tried, but the result seems to me way worse than with default custom illuminant.
Edit: if needed, these RW2 files are under CC0 license.
Made more photos in different light conditions: there’s no sistematic color casts in new photos, only in those mentioned above, and thus probably were due to particular scene lighting (reflections, vegetation…).
White balance usually do a good job, thus I can live with the “custom illuminant”, given that normally I haven’t to touch it.