Introducing color calibration module (formerly known as channel mixer rgb)

@paperdigits has resolved this now. If you print a page from the user manual website it should now exclude the header, sidebar, breadcrumbs and previous/next page links.

2 Likes

Wow thanks guysā€¦no expectation of a fix on my part more of an observation so thanks. You are assembling such a nice resource only fair that you can output it to reflect thatā€¦thanks againā€¦.

2 Likes

General question for those who tested the calibration module : how do you like it so far compared to white balance ?

3 Likes

Better control and result

I have not played much with it. Iā€™ve only used it as a new ā€˜white balanceā€™ (but I rarely used the channel mixer previously).
Itā€™s a bit confusing why the ā€˜temperatureā€™ readings are different from the WB module (e.g. for a daylight shot I got 5527 K in the WB module (ā€˜legacyā€™ mode); I get CCT = 4467 K in the ā€˜colour calibrationā€™ (ā€˜modernā€™ mode) and at the same time temperature = 4466 K on the slider; if I select ā€˜as shotā€™ in the ā€˜illuminantā€™ drop-down, the CCT changes slightly to 4466 K, the value previously shown on the slider. I know theyā€™re just numbers and I donā€™t really care, but I do notice the inconsistencies and some may get confused (well, Iā€™m also confused, but I just ignore it for now).

Quality-wise I donā€™t see a difference (I see that there is a difference, I just donā€™t see it as better or worse). I have not tried re-processing any shots taken under difficult lighting (mixed, LED etc.).

I have tested the module and it works pretty great. I hardly ever used the RGB mixer, and I donā€™t really see why I should now. But for the white balancing through CAT part I find that things are pretty much spot on in many (most?) cases. However, in some situations I get a worse white balancing results than by simply using the white balance module. This has probably to do with the CAT. But if someone can tell me how I can improve this with the color calibration module, I look forward to learn. (My minor gripe with this poorer result is that the module is called ā€˜color calibrationā€™ which implies things should be very / more accurate).

Source file: _DSC2866.DNG (20.7 MB) (original author unknown)

Using default scene-referred and white balancing area on the third grey spot:


_DSC2866_01.DNG.xmp (17.9 KB)

Using default scene-referred, white balancing to camera reference, color calibration with CIECAM16 and selected area on the third grey spot (* Bradford does virtually the same). This gives an unexpected blue tint to the white patch.


_DSC2866_02.DNG.xmp (20.5 KB)

As long as camera auto-wb was correct, the old white balance module gave decent results. But I found its control sliders not so good, so wb adjustments were a bit of luck.

The new color calibration module is lot more useful, especially to control faulty wb. But even with the initial settings I often find that my pictures look better regarding colors. Without calibration the images often have a tiny green-ish look. With calibration module the images look more neutral and a bit brighter. Here is a short comparison (left = wb, right = calibration) with auto-settings:

Regarding CAT adjustments I find that the color picker works really well, whereas ā€œ(AI) detect from image surfacesā€¦ā€ always detects a temperature of 5002K! Is this a bug?

A shiny diamond is the new channel mixer. I have some pictures with highly saturated colors in direct sunlight. With the new channel mixer I can prepare those pictures to fit better into the small gamut of sRGB / JPEG files, and retain a bit of texture without clipping these channels.

2 Likes

I like the fact that it is maskable, it allows me to fix situation with mixed lighting.
The auto AI feature works well too.
In general I have the feeling it performs better under difficult light.
Like others, I am a bit puzzled with the temperature K readings, they looks different from the ones I am used too.
Also, the camera WB presets (Daylight, Cloudy, Shade, etc.) are gone, any chance to replicate those in the new module ?
The gamut compression is nice, but I would like to have more range in the slider, to fix led blue lights etc.

1 Like

The masking feature is fabulous. During confinement Iā€™ve been taking a lot of photos of street scenes with brightly-lit buildings and deeply shaded streets and lower stories. Once figuring out general masking in DT (I donā€™t find the combination of drawn and parametric masks to be very intuitive), I can quickly come up with a pleasing white balance for the entire scene.

I just tried that image. The CAT relies on the usual white balance to correct the image to D65, so that the color input profile gets predictable. But for the Sony from that picture, the red white-balance coeff is 2.67, which is massive and probably wrong (most sensors are between 2 and 2.33). If you force a red coeff of 2.0 in white balance module, then retry the color calibration sampling from any grey patch, then it will work.

Problem here is we stack the color calibration on top of white balance and input color profile, so we expect/pray for anything else having been profiled properly.

I got the smell of the red factor issue because cyan is the opponent color.

All the CCT computations there are approximations. The temperature slider of color calibration computes the XYZ coordinates of the illuminant from an approximation based on temperature input. Then the CCT display tries to find the best temperature match from an approximation based on XYZ input. Having only 1 K of error in the roundtrip is actually impressive. And you get rounded to 1 K, so a visible difference of 1K could be an actual difference of 0.5 K.

Donā€™t even try to compare temperature readings from both modules. Again, color calibration takes an input that is already pre-corrected by white balance and input profile.

Right click on slider, input value on keyboard up to 10.

1 Like

On that point, it might be time to check the WB coefficients of your camera.

If your screen is properly calibrated to D65, just display a grey gradient on it, shoot it with your camera, then open the raw in darktable and do a spot-white balance on the whole ramp in the white balance module.

Finally, compare the RGB coeffs you got with the sampling with the ā€œcamera referenceā€ ones, and report here in case of large shift.

1 Like

Would it be possible to add a warning + tooltip to the UI that warns the user and proposes this fix in case the multipliers seem fishy? We could get it in the docs, but users, so far, have not been very good at reading that.

Itā€™s just something I noticed on one picture so far, letā€™s try to understand what happens first, see how frequent it is, then decide about what we do.

@anon41087856 Itā€™s not necessarily just the red channel coefficient. Hereā€™s another image from the same camera with red = 2,672 when the wb is set to camera reference. But applying the color calibration does not give a cyan hue to the white patch.

_DSC3684.ARW (47.1 MB)
_DSC3684.ARW.xmp (18.1 KB)


Again, image is not mine and exact source is unknown.

All I can say is your problematic sample is very peculiar. The light source is suspicious in the first place, itā€™s around 2400 K with seemingly low color reproduction index. Since I donā€™t know anything about the conditions of the shot, itā€™s hard for me to conclude where the failure is.

For cases like this, the white balance module is more robust. As I said above, more robust usually means less accurate, but predictably inaccurate.

To solve this kind of issue, I guess we will have to perform chromatic adaptation in spectral (which is planned for the future, I have all the coding bits required, just need to wire them).

2 Likes

Regarding color calibrator

So I noticed and maybe this is intended that if you use the color picker in the CAT tab the transform skips to Linear Bradford if you are on another transform. You can then go back to the transform you were using and so I was wondering why it jumps to that?? AI edges/ surfaces also jumps to linear Bradford however with surfaces the illuminant jumped to daylight but edges jumps to Planckianā€¦I will need to test more images and maybe this is to be expected??

The Bradford transform is known to be more accurate than CAT16 for daylight illuminants, and CAT16 is known to hold the gamut better in case of difficult illuminants.

Whenever an auto illuminant is loaded (by reading the raw EXIF, sampling a surface or machine learning detection), there is a check that computes how far this illuminant is from daylight and black body: if close enough, Bradford is chosen, if not, it defaults to CAT16.

Same thing with the GUI. If the illuminant is less than 2.5% away from daylight, you are prompted with the temperature/daylight GUI. If it is closer to blackbody, you are prompted to temperature/planckian GUI. Else the program goes directly to custom hue/saturation GUI.

So the program always offers you the easiest method that ensure maximum accuracy.

1 Like

Could somebody explain what is ā€œcamera referenceā€ (D65) in the white balance module?

To be more specific:
I am currently working with dng files converted from Canonā€™s cr3 (since cr3 files cannot be read yet by exiv2/darktable), so the ā€œcamera referenceā€ setting in white balance module does not seem to work (quite logically I supposed, since itā€™s a camera-dependent setting it probably need to be defined first).

With the ā€œmodernā€ option for chromatic adaptation, the white-balance module stays on ā€œcameraā€ setting and the color calibration module have adaptation=none.
If I manually set the white balance module to ā€œcamera referenceā€, it does not work (it does not change the channels coefficients).

Should I change the temperature de 6502 K and tint to 1 or wouldnā€™t it work that way?
Is there a way to determine the correct channel coefficients for camera reference/D65?

I can also continue to use just the white balance module without the new CAT, but since it give better results for my older cr2 files, I want to see if a can already switch to the modern way! :slight_smile:

Camera reference is a set of WB coefficients that make D65 light shot by this camera a neutral color. You can see that as the bare minimum for removing the green cast and ensuring the validity of the input color profile.

It doesnā€™t work for DNG because they have their own built-in profiles and it needs special handling that is not coded in darktable now.

1 Like

Ok, thanks.

Does the color calibration module relies on an exact D65 setting (then, I suppose I could determine the corresponding channel coefficients by taking a picture of neutral grey lighted by day light?) or would it work with a approximate setting in white balance module (enough to removed the green cast and be around the validity of the input color profile)?

Also: if I store a auto preset for CAT=Linear Bradford (for this camera), will it do the same thing as the ā€œmodernā€ option (for a working camera / raw) or is this option cleverer than just a auto preset?