explanation of channel mixer working

A year ago I started using Darktable and, as many, digested all YouTube tutorials. One module stayed an enigma, the channel mixer. The DT manual on it is short and lacks background info, the tutorials vary in extent and approach: some intuitive, others mathematical. I frequently read blogs with statements as ‘I still have problems, don’t fully understand’. Some tutorials needed a second one as the first wasn’t sufficiently clear. Apparently a module hard to explain and grasp.
So I scraped all pieces of info together in an attempt to get my own head around. It took me a few weeks, but in the end I think I know how it operates. Due to the lack of background info I had to assume several mechanisms, which I deem logical (hope my educated guesses make sense).

All this resulted in the pdf attached. I hope that DT users facing the same mixer problems I as did, are helped by my approach and better understand the mixer (and its limitations).
color mixer.pdf (87.5 KB)

4 Likes

make it even easier…

The Channel Mixer.pdf (68.9 KB)

1 Like

I want to understand what is the physical difference between, say, green in the red channel and green in the blue channel.

Your paper says, "The other route is to ‘swap’ individual sensors. Of course, physical replacements are impossible, but the software can be instructed to label a green sensor as blue on or a blue one as red. Conceive the blue channel: the red and green sensors can be labelled as blue. The processing of the photo will lead to a stronger blue colour. In this way, the e.g. red channel can be augmented by swapping the blue / green sensors to red. "

If in color calibration I move the input G slider to the right in the red channel and the input G slider to the right in the blue channel, which pixels/sensors have I affected, and how have I affected them?

If you think of it this way. Each of the 3 sliders in each of the color groups is tied to the pixels you will change by moving the sliders . In the red group you only change the red of the pixels selected. You will change the in proportion to the slider value x the pixel value. This gets added to red value of the pixel. So say 128 0 0 If you move the g or blue slider nothing will change as the value is 0 for both. If now you have 128 64 0… red will be 64 X slider added to red… Again moving blue does nothing as blue is zero… So you are just doing selective multiplication on the r g and b values of a pixel and adding or subtracting that from whatever channel you are modifying…

1 Like

Hi

Thanks for taking the trouble e-mailing me.

Your question can for a large part be answered by reading this Wikipedia lemma: https://en.wikipedia.org/wiki/Bayer_filter. There you can find how a sensor is constructed, which is pivotal in understanding channel mixing.

You can read there that each sensor (or pixel) consists of four light sensitive elements: 1 for red and blue and 2 for green. Each element is light sensitive only and can’t detect color. There higher the light intensity falling on each element, the higher it gets charged. The manufacturer placed colored filters on the elements (red, green and blue), so now we know how much red, green and blue light charged the elements. The software simply detects the charges of each element and is told by the manufacturer that this element is a green one and its neighbor a blue or red one.

Now when channel mixing you (= the software) can increase the measured red element charge and your photo will turn red. You can also ask the software to redefine the charge of a blue element. You can choose it to be a red element from now on: you simply modify the label of that blue element. Blue becomes red, you swap it. If you do that for a percentage of the blue elements, you can increase the reds somewhat. The higher the percentage, the redder the photo will be. Mutatis mutandis, this applies to the green elements.

The difficulty with the channel mixer is that for each color channel you are offered three approaches: (for the red channel) 1] increase red, 2] swap blue for red and 3] swap green for red. So in total you have to face 9 possibilities and it is very difficult to predict the outcome. When few blue elements are present, swapping has little effect when you want to increase red. In the next photo that situation can be totally different. From photo to photo, your choices need to be different.

1 Like