Struggling to white balance an image (Darktable)

I was trying to follow the techniques of Boris’s video https://www.youtube.com/watch?v=BVjPnWy0BwY&t=1883s, plus some of his others.

@thehatterman
You might look at his videos: Boris Hajdukovic - YouTube.

The one I mention above is Darktable Episode 55: white balance and color grading with channel mixer.

Note the following caveat for color calibration:

The ability to use standard CIE illuminants and CCT-based interfaces to define the illuminant color depends on sound default values for the standard matrix in the input color profile module as well as reasonable RGB coefficients in the white balance module.

Some cameras, most notably those from Olympus and Sony, have unexpected white balance coefficients that will always make the detected CCT invalid even for legitimate daylight scene illuminants.
(darktable 4.9 user manual - color calibration)

1 Like

It’s a bank holiday here in the UK this weekend and it’s going to be wet with a big thuderstorm apparently, so it looks like I will be indoors watching youtube videos.Thanks for the recommendations.

Yep, that’s axactly what happens to me pretty much all the time. I always felt like I had to use a tone mapper (Filmic in my case) or bad things will happen. Technically I know what it is doing and I know why it is important, but again, in reality, turns out that I just prefer the look of many images when a tone mapper isn’t used.

I might get that printed on a t-shirt :smiley: I have been thinking about this as it happens, and know I should spend a bit more time composing my images and being more aware of the light, the highlights etc and be more mindful that I will need to edit.

2 Likes

I often find that an ‘S’-shaped tone curve greatly reduces cloud contrast i.e. drama and have been known to apply the opposite i.e. an upside-down S.

With many, if not most cameras, the manufacturers stretch out DR with a sigmoid response, if DPR’s testing is to believed, see https://www.dpreview.com/reviews/sigmadp2/11 … meaning that it comes built-in before anything is applied by the User/

DR in DPR’s case being from a back-lit Stouffer step-wedge to the converted 0-255 tone image.

1 Like

OK, a bit confused again. HaHaHa. Just when I was making headway, I am lost as to how the yellow became blue. I am going to do the exact same thing myself, and see again if I have actually grasped this concept.

A trick I think I first picked up from Boris is to use Color Balance RGB to over-saturate the colors while tweaking the white balance. Makes it much easier to see what is happening.

My current “WB Helper” preset:
image

How it looks with this image:

I consider it a technical correction step, and then add my own creative WB with Color Balance RGB. This is also how Color Calibration was intended to be used.

For those that don’t know about this way of working, this video by @s7habo shows it very well in practice:

Color Calibration expects D65 input, so leave the WB module on camera reference (which is the Adobe D65 matrix, I believe) or do a custom calibration as explained in the first part of this video:

3 Likes

I have watched that video by Aurellien Pierre a few times, I actually have it saved in my playlist. I have never been able to do the CC using the WB from a photo of a white patch on my monitor. It just doesn’t work and I have a really big Delta E. I keep meaning to try again with a photo of a grey card in normal sunlight.

I have been watching those videos and it just wasn’t clicking. I understand, but it isn’t being intuitive. Stumbled across this video which gives a demonstration that (for whatever reason) seems to be hitting home with me, thought it might be useful to post it.

Loosely assuming pure yellow to be 50 50 red/green… with no blue… the first two sections remove the red and green. and then picking the red or green to be 1 in the blue output provides blue…

You are doing the math on the input pixels remember… so a ballpark of what it means

255 255 0 lets say … so in section 1 red output is all taken from the blue input channel which is zero and red and green contribution is zero. Same logic in section 2 which is green output taken from the blue is also zero so you need to add blue some how so you add to the green or red to give you blue so you end up with like zero red zero green and now blue. You get blue because its based on the input value of the original yellow taken from green or red and multiplied to output a proportional blue…

Think matrices

In RGB = 255 255 0 = yellow

Co-effs:
Row 1 (red out) 0 0 1
Row 2 (grn out) 0 0 1
Row 3 (blu out) 0 1 0 (blu out could also be 1/3 1/3 1/3)

so:
red out = 255x0+255x0+0x1 = 0
grn out = 255x0+255x0+0x1 = 0
blu out = 255x0+255x1+0x0 = 255…

and RGB out 0 0 255 = blue.

So couldnt it also be

Red out 0 0 0.8
Grn out 0 0 0.5
Blu out 1 0 0

This is the bit I think I am struggling with, the effect a mix has on the overall image while paying attention to 1 colour (or colour cast for example). I just go round in circles.

I do understand the matrix, that’s the easy part. If I write it down, I can do the maths without struggling. It’s just not intuitive to me as I look at colours.

It could, but remember that the middle of the example image is gray, say 128 128 128

So red out 128x0.8 = 102; grn out 128x0.5 = 64; blu out = 128x1 = 128; … and RGB 102 64 128 is not gray …

Ah, yes! You know, I think maybe I am just not capable of keeping track of this in real time. It’s not intuitive to me. It’s very understandable but it isn’t coming naturally to me. (I know what singing is, I know what to do, but I just can’t do it.)

The video about hue shifts in highlights is great. I understood it without difficulty. He explains it very well, but it just isn’t happening for me. I thought I had it nailed yesterday, but I try what I think I have learned in other photos and I am back to square one.

I can’t keep track of the effect on all of the colours in real time.

Can I pose my question another way. Forget the maths. Forget matrices. In terms of human perception, when I increase red in blue channel what will my eyes see. What should I be conscious off. Then, what else do I need to do to balance out the change I just made, without negating the effect of the change? I am really struggling to get an instinctive feel for this.

1 Like

First, let’s look at some defined colors:

ColorCheckerKoren_sRGB

Each square in the above has a defined RGB color, even the bottom row. The next row up is close to but not exactly the same* as the CIE primary and secondary RGB colors ( * because they are ink substitutes).

It helps when looking at a color to be able to estimate it’s RGB values before applying the mixer because those values are the inputs to the mixer. Otherwise, use a color picker.

My screen picker says that the blue square #13 is 49 61 151 and that the yellow square #16 is 238 200 31. By just increasing red in the blue channel can you imagine what should happen to those patches? Or any other patch for that matter? For example, what will happen to the mid-gray patch 122 121 119?

Talk to you tomorrow …

In the meantime this might help in relating RGB values to how they should be perceived by the human eye:

Sorry, I don’t understand what is meant by “balance out”, please clarify …

Maybe also try using RGB primaries instead and always use the vector scope. You can rotate the primaries and adjust the purity. That might be easier to visualize and you can see the tint which likely is what you perceive as the cast and you can shift it getting visual feedback from the vector scope

3 Likes

Is “the purity” in this case how far a color is along a line from the white reference to the color space boundary?

Just askin’ because I am not a dt User.

Yes and so essentially like adding or removing white that visually looks like saturation… You can see it in the vector scope very clearly and in many cases you can see a color cast in the vector scope so it’s maybe a slightly easier more visual way to correct things…

To keep the channels equal, so as the neutral greys remain neutral grays, how do you decide which other colour to adjust in whcih other channel.

The video by Boris, about hue shifts in highlights, is a very enjoyable watch. There is more to filmic than being a simple tone mapper, it was very interesting.

By now I hope that we realize that any single to one channel while leaving the other two channel totals unchanged will affect all the colors in a source image, including the neutrals if they exist. But, as already mentioned by Todd, by how much do they change?

In your case of just red into blue it depends on how much blue is in the source pixel. If the source pixel has no blue, then there will be no change in color. On the other hand, if the source pixel has blu 255 there will be no change unless the red-into-blue value is negative.

So, in the case of just red-into-blue and the color-checker we get this for 0.5R->B:

changed colors are to the left of the dividing line.

On the other hand, “balancing” the blue doesn’t seem to affect the degree of color change a huge amount either, even though the neutrals do get fixed.

With my learning experience gained in this discussion, I am less confident that the 3-channel color mixer is suitable for editing the flower image. Other methods are certainly more intuitive especially when combined with suitable masking.

Good luck with whatever path you choose!

1 Like