White (dis)balance and Darktable

Here is an example of mine:

This is how the scene looks with white balance of the camera (color calibration module is turned off):

This is how the white balance looks with color calibration module:

I increased the saturation in both cases with color balance module, so you can see the color differences better.

In any case, both look boring. The sky was covered with a veil of clouds, so there was no direct sun. Nevertheless, I perceived the colors of the snow in shadows very discreetly bluish.

I adjusted the hue and chroma in the Color Calibration module to mimic this mood to a degree that I felt better suited the scene as I perceived it:

This was for me the starting point for further considerations how I can change/adapt the colors to my taste even more pleasantly.

At that point, it is no longer so important how the scene actually was, but what I found interesting in this scene:

The subtle difference in the color shading of the cold colors of the snow in bright area, the snow in the shadows and the color of the ice of the frozen pond. And this as a contrast to the subtle color shading of the warm colors of the branches, the tree trunks and the red leaves on the ground.

Although the scene is actually low in color, it was the subtle color variations between complementary color ranges that, in my opinion, made the scene visually interesting.

Of course, I only vaguely perceived this color mood on site, but it was enough to draw my attention.

3 Likes

It’s an interesting point. I prefer to have the color calibration module switched off by default, I start with WB set to “as shot” and I tweak it from there in the WB module until it ‘looks’ how I want it to.

However.

It’s my understanding that at least some of the tools in darktable work best and how they are designed, when when fed a technically neutral image. A neutral image also means that things like LUTs, and styles using color balance RGB for color grading for example, work more consistently from image to image.

I think that’s the main points that I know of - I choose to ignore those, but they are valid.

3 Likes

Just noticing your color harmony on the vectorscope. In your last video I found it really interesting around 54-55 min. When you shared the tip and hinted for your next video. At that point in the edit on my screen the green foliage in the foreground was a bit neon looking but that simple use of the triad harmony and the adjustment with the channel mixer left that foliage a much nicer and realistic looking hue to me anyway… definitely looking forward to the next video to see how you leverage that tool …

1 Like

You have been given some good answers here and @s7habo makes very informative and excellent videos on using DT.

For my 2 cents worth. I find DT is the best program I have used to correct the WB of images taken under extreme lighting such as red lights in the nocturnal house of a zoo. I can recover color in a scene like this using the white balance module alone with the color calibration module disabled. I have not found any program that can match DT under these extreme conditions.

For more normal photographs I often find the camera has done a nice job with WB and using as shot works fine for me. This can be achieved with WB module alone or WB module set to camera reference and color calibration set to as shot in camera. For the life of me I don’t understand why using two modules to achieve as shot in camera is benefical. I would love some one to explain to me the benefit if there is.

Now if I am not happy with as shot in the camera that is where the choice of two different modules can help. Firstly the white balance module alone provides a drop down selection of lighting conditions such as daylight, cloudy, incandesent etc for most but not all cameras. This is often sufficient for my needs. The WB module also has kelvin temperature and tint sliders which are very intuitive to use if you are experienced with that concept. So WB module alone for many images in my experience can be fine on its own to set white balance.

However, color calibration (CC) module in my opinion is not so intuitive to use. Especially for an inexperienced user. However, I concede for some images it can be very advantageous. For instance, you can use masks and multiple instances of CC module to correct mixed lighting conditions. But another great feature is the spot color mapping feature. I often use this to white balance a picture based on either a neutral color region or skin tones within an image. Lets be fair, many images we only have skintone to judge white balance on. So having some known values for skintones I can bring the colors in close.

The chroma sliders are really interesting. If I set the chroma slider to zero in the spot color mapping optons it will correct the image for a neural ‘grey’ target value. But then if I am unhappy with the correction because it has been too strong I can lower the chroma slider in the top section of the module. I call this the output chroma slider. This same technique works well when using skintone as a target. Because not everyone has the same skintone adjusting the output chroma slider can let me increase or decrease the strength of the correction applied.

Because I grew up in a world of color film color balanced for daylight I often set an image’s white balance to daylight in the white balance and/or calibration module and see how I feel about that color before doing adjustments. This is especially the case when processing another photographer’s image such as in the PlayRaw category of this forum.

4 Likes

I’d like to know that as well. It was probably discussed even CC was introduced, but I forget. What was the motivation for splitting white balance into two modules? What can CC do that the single module can’t?

It’s explained in the manual
https://docs.darktable.org/usermanual/4.2/en/module-reference/processing-modules/color-calibration/

And in some threads:

1 Like

If the result using just whitebalance module is ok, then go with it. There’s no benefit in using additional tools just because they’re available if you’re already satisfied.
If you’re not satisfied with a simpler whitebalance approach, then it makes sense to use the additional capabilities of cc.
The benefit of cc is to have further options if the simple whitebalance isn‘t sufficient e.g. if you need to match a color target or want to handle different illumination situations etc.pp.
There’s no one size fits it all approach…

3 Likes

I have read this, but since photography is about the look if the look is right from the white balance module alone then I wonder what the advantage is. My current default is white balance camera reference and CC module set to as shot by camera. But am I really gaining anything from this? The deveopler AP is very good at telling us what is wrong with certain modules and I respect his incredible knowledge, but I always remember even him saying photography is about the look and if WB module alone gives the look I want then I wonder why I want to complicate the process by introducing the CC module. After all, other respected programs only offer the white balance module and are they so bad because of it? I say these comments with respect and not trying to be antagonistic.

1 Like

The journey from capturing the scene to the displayed image or exported jpg is all about controlling the loss of information.
It starts with selecting an exposure where you need to decide if you want to ditch shadows or highlights and continues through the digital process.
It’s all about control - if you use limited tools then you might not be able to keep information you want to keep. So it’s worth to have the algorithms that aren’t limited if you need to squeeze out something the limited functions can’t provide.
That’s the difference between darktable and several other tool: dt gives you the option to use it; it doesn’t expect you to be satisfied with tool that’s just ok for a 80% case
But it doesn’t make sense to worry about the third decimal place when rounding to an integer in the end.

1 Like

My Fuji camera tends to give strangely greenish renditions in daylight if I use WB+CC. With WB alone, everything looks normal, in the sense of “similar to the JPG”, and “similar to other raw developers”.

This is easy enough to counteract with a little bit of magenta color balance, or indeed a tweak to the CC white point, but it is annoying.

Then in general it doesn’t make sense to use cc for wb in your case.
Maybe it’s useful if you need to match a colorchecker.
(But then you‘re losing the Fuji color rendition :wink: )

But even then: Quote from APs introduction post:
I guess the whole question is : is 12 to 20% extra color precision worth a whole new complex module ?

The answer is yours

But remember the highest precision bonus (20%) was given in the worst lighting conditions, and that’s usually when you need it most. Make from that what you want.

2 Likes

You can argue if it does or does not accomplish this but the reason falls along these lines… this taken from the article I provided above…

1 Like

If its consistent then I think that assuming your camera is calibrated and your screen then perhaps the D65 values for your camera are off at least for your display.

Have you tried a preset for those created the way that AP demonstrated in his discussion about using the module?? Just a thought or stick to legacy if if works as it might not be worth the bother

Rawtherapee now has some of the same tools… its just not presented as “White balance” its packaged as color appearance model.

DIscussed a bit here and I think in much greater detail in a couple of other threads…

Perhaps the implementation and examples here in RT docs will make some sense of it to you…

https://rawpedia.rawtherapee.com/CIECAM02#Color_Appearance_&_Lighting_(CIECAM02/16)_et_Color_Appearance_(Cam16_&_JzCzHz)_-_Tutorial

If I were to write a book about image processing, this would be the title of the first chapter… :laughing:

Really, any rendition you make, JPEG, TIFF, display on computer, print to paper, is the result of information loss relative to the light at the scene. Most raw processors control this for you so you don’t have to worry much of it. My software, rawproc, does no such thing; you are responsible for the presence and ordering of each and every information-losing operation from raw file load to JPEG export. A bit of a PITA to work with sometimes, but it has afforded me the opportunity to learn the aspects and implications of information loss of every step. Been using it about 5 years now, still learning…

Yep, sounds about right to me. Thing is, globally in the image, what you do about WB for one part of a scene will only be “right” for parts of the scene lit by that particular illumination.

Your snow pictures may seem tame in that regard, but think it through, the lighting of the scene is nowhere near “black-body”, that is, full-spectrum. You’ve got clouds performing as a really large bandpass filter, and the shadows are then affected by that AND how the light was reflected into them. Forget about decent skin tones here, which require significant representation of most of the spectrum.

White balance in post is essentially a global operation, and what you do to make “white=white” for one part of the scene will not be optimal for other parts with different illumination. There are two fundamental ways to affect white balance in post, 1) a set of three RGB multipliers, numbers that are literally multiplied with every corresponding channel value in the image to skew the data around to “white=white”, and 2) chromatically, where the image colors are shifted to a particular color temperature using the same transform as that for gamut conversion. Most software does only #1; darktable apparently now can do either. In terms of information loss, #2 intuitively sounds better to me but I have no analysis to support that. I’ve actually done #2 with custom camera color profiles, seems to look better but is a real PITA to do.

The only time I get bothered by doing anything other than just accepting “as-shot” is for interior images with low-temp interior lighting which also contain windows looking out on daylit areas. There’s no winning globally with these, balance for inside and the daylit parts go cobalt-blue, balance for the outside and the interior goes fire-engine red. Time for masks…

I think the overall strategy for “global” is to pick the part of the scene you want to look “white=white” and anchor WB to that, let the rest go to where it might. That for me provides the best renders in most situations. If I want it to be good all-over, I worry the scene’s lighting when taking the captures.

Right now, I’m doing a lot of “engineering photography” supporting a vintage railcar restoration. The thing is housed in a large tent made of coated canvas-sort of fabric, and the interior lighting is a garish orange-yellow. To make matters more interesting, they’ve strung a set of LED worklights in the interior, so I get shots like this:

White balance, fuggetaboutit…

4 Likes

As I understand it from the warning displayed by Color calibration when old WB (in other mode than set illuminant @ 6500K) is in use and CC is not in pass-through (WB applied 2 times), in term of interface, would it be smart to add Old white balance options as an additiona “legacy” in the list of “adaptation modes” of CC ?

That is the pass through mode no?? THere is a recent change in the workflows forcing the CAT upon module acitvation…this is a concious decision even when the workflow is set to none so now you have to create a preset to pass through so that when you manually activate CC that you don’t get the double wb…but it would be the mode… not sure how legacy would be different unless you mean CC automatically sensing a non D65 in WB?? Or do you mean adding temp and tint??

Taken from the manual… I think it would be clear that this would not make sense for calculations in the CAT colorspace… esp given the statement in the last line

"Chromatic adaptation aims to predict how all surfaces in the scene would look if they had been lit by another illuminant. What we actually want to predict, though, is how those surfaces would have looked if they had been lit by the same illuminant as your monitor, in order to make all colors in the scene match the change of illuminant. White balance, on the other hand, aims only at ensuring that whites and grays are really neutral (R = G = B) and doesn’t really care about the rest of the color range. White balance is therefore only a partial chromatic adaptation.

Chromatic adaptation is controlled within the Chromatic Adaptation Transformation (CAT) tab of the color calibration module. When used in this way the white balance module is still required as it needs to perform a basic white balance operation (connected to the input color profile values). This technical white balancing (“camera reference” mode) is a flat setting that makes grays lit by a standard D65 illuminant look achromatic, and makes the demosaicing process more accurate, but does not perform any perceptual adaptation according to the scene. The actual chromatic adaptation is then performed by the color calibration module, on top of those corrections performed by the white balance and input color profile modules. The use of custom matrices in the input color profile module is therefore discouraged. Additionally, the RGB coefficients in the white balance module need to be accurate in order for this module to work in a predictable way."

2 Likes

That’s a very nice example!

2 Likes

From what I remember from Aurélien Pierre’s explanation, i’ts a “chicken and egg” problem. What it boils down to is:
you can only do correct white balancing after you have colours, so after you set the input profile, but you need some kind of white balance to do your demosaicing. And the demosaic module comes before the input profile…

So he used the original WB module to set a standard white balance so the demosaicing works, then he added the color calibration after the input profile.

5 Likes

Funny, I found you can apply WB before demosaic, just need to respect the mosaic organization. I had to write a separate image walk algorithm for it, but for a few years now my default toolchain has WB before demosaic, as-shot, and all is well. Now, can’t do patch selected WB, but that’s only because I haven’t written a mosaic-aware patch algorithm yet. I haven’t picked through the demosaic algorithms to see the dependency, so for now I’ll just respect the assertion…