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

Can you scavenge any code from DT-chart??

Please provide the RAW.

Yes :slight_smile:

On this matter, one issue I can potentially foresee (but haven’t yet tested, so it could be a non-issue) is to do with Presets. I have a lot of Presets in current channel mixer, which I will certainly recreate in calibration module. But will Presets also save cat White balance information? Will one be able to save Presets that affect only channel mixer part of calibration module and leave the cat settings unaffected?

Here you go: PB290050.ORF (17.5 MB)

I think in that case, you’ll have to save a preset with White Balance set to “none (bypass)” and use that preset on a second instance of the CAT module.

1 Like

It looks like an error on your side. The legacy WB set with camera default produces Lab = 33, 0.02, 0.09 and the modern CAT gives Lab = 33, -0.02, 0.03.

Setting the color calibration to D50 actually results in a no-op, so I don’t understand what you have been doing.

Thanks for checking. Pretty interesting…

I suppose we are still talking about the “camera reference” setting here, right? What kind of white balance coefficients do you get then with that RAW file?

When the legacy WB module is set to camera reference, I definitely don’t get a and b coordinates near zero . I’ve attached a sidecar file which has only white balance and the fixed modules enabled - then I get about (L, a, b) = (53.07, -2.35, 6.44) and a yellow tint on the image. This is using a very recent git build from yesterday (fa7c79659f997e193f597c20699245eef2d8d1ca).

PB290050.ORF.xmp (6.0 KB)

Indeed, my bad on this one!

No, I mean the coeffs put by the camera in EXIF, aka what is applied when you first open the file in darkroom, with legacy chroma adaptation and with modern chroma adaptation.

Ok, one XMP is worth a thousand words :slight_smile: . So the D65 default WB coeffs are wrong for your camera. This comes from Adobe standard matrix. I will try to see if I can make the modern CAT work with a user preset instead of indirect computations.

2 Likes

I have a fix for you, that allows color calibration to use user presets in white balance module. So you can put the right D65 coeffs (profiled yourself) in a preset, auto-apply it for any picture from that camera, then set color calibration illuminant to “as shot in camera”, make that another preset auto-applied for the same camera, and be done.

5 Likes

Seems to work great! Thank you.

Merged in master.

6 Likes

I have been experimenting with this iop for a few weeks, and there are some aspects that make it somehow difficult to use for me:

  1. Auto white balance as the starting point: when I click on the eyedropper for AWB, it changes the illuminant in most cases. So you should switch-back manually to “custom” to be able to have full control over the white balance. This becomes cumbersome in the long run because you would need to do more clicks for a simple thing. Relying on “as shot in camera” as the starting point is even worse because when you switch to “custom” and try to change one of the sliders, the WB is changed thoroughly.

  2. hue/chroma sliders: I have already read your argument about the tint slider and I understand it from the technical viewpoint. But as a user when I want to fine-tune the white balance with “custom” illuminant, I find tuning hue/chroma sliders more difficult than the tint/temp sliders in the WB iop. In other words, I feel the tint/temp is more intuitive.

@anon41087856 Thanks for your development of this module. I’ve been using it, but really haven’t done anything more than what I have done with the old mixer. So I can’t comment on the improvements. I also know you never sleep, and would have to give up eating to get more hours in the day. And this has probably been asked before, but I haven’t seen it. And I’m not a developer, so I’m just asking for someone else to work up my desires. That said, I would like to see all three R and G and B sliders displayed at the same time. :grin:

1 Like

That would be actually misleading, are you sure you understand what the channel mixer is doing ?

Also, I have another GUI in mind for a later date, much more simple, in the HSL spirit (but not using actual HSL because that sucks).

2 Likes

Like GIMP has is what I meant.

If I may throw in a (simple) question: When using CAT with a custom illuminant, what is the color relative to? Is it D50?

I mean: if I set the illuminant to white (zero saturation), what color temperature does that correspond to?

Aaand… this is again one of those moments where I could have easily found the answer by trying it. D50 it is :sweat_smile:

Many thanks for this new module. There’s a fair bit to explore. I’ve re-processed some daylight shots to try the AI detect (surfaces), and it it seems to give more natural-looking results than I achieved previously. So a great start to me using this. Thanks again.

2 Likes

CAT is always test illuminant to reference illuminant. The white balance module goes from whatever to D65 because it’s the reference at this point of the pipe. Then color calibration goes from whatever to D50. Also, white does not exist, there is only some spectrum emmited at peak luminance of the current display medium. So we only ever match colors to account for that change of peak luminance spectrum when swapping media, to somewhat preserve the appearance of the surfaces in the scene.

1 Like

I agree that white is not a colour, but a context. It’s just that most people (me included) have been thinking of illuminants in terms of colour temperature/tint for years, so it is helpful (even if not accurate) to have a mental translation for that, at least for now.

For example: I know I shot a scene in 6500K-ish daylight. When setting that in the calibration module, I now know that I’m looking for a blue-ish hue and that helps me finding the correct setting quicker.

If the output reference for the module would have been D65, I would instead have looked for a ‘white’ illuminant for 6500K, and for ‘orange’ for the photo I took in sunlight.

Hi,

I was playing with the new “Color Calibration” module. The results I got, surprised me! I will explain myself.

I tried to compare the traditional way of adjusting the White Balance (Classical WB) with the new one obtained after applying the new pipeline for White Balance (WB + Color Calibration). These ways give me really different results, at least with my Sony A6000 pictures from RAW.

My setups for the two ways were:

  • Classical one: WB is active having chosen “to as shot”. “Color Calibration” was inactivated (see shot 1).


    Shot 1.

  • New one: WB was active having chosen “reference point D65”; and Calibration Color was active with any adaptation different from “none” (so CAT is active) and illuminant = “as shot in camera”.
    In this way, the module shows an invalid status “CCT: 4086 K (Invalid)”, being the result on the shot (shot 2) quite similar to the one of the classical way. I assume that after the error the adaptation for CAT was disabled.

image
Module setup after choosing any valid adaptation and illuminant as “shot in camera”


Shot 2

At this point, I tried to set adaptation to CAT16 and illuminant to “Daylight”, getting shot 3, which is really different from the classical way (choosing different adaptations or illuminant as “same as the pipeline (D50)” show really similar results to shot 3). I think there is too much green in this shot! (shot 3). Something similar happens with both ‘AI detect’ modes for illuminant.


Shot 3

Therefore, after experiencing this I’m wondering?

  • Is it a Darktable error the ‘disable status’ after choosing “as shot in camera”?
  • It does not make sense to adjust to “as shot in camera” with CAT adaptation being active?
  • Is not there too much green in shot 3 after applying any valid “CAT adaptation”?
  • Am I doing something wrong?

I’m not an expert in color science, so maybe my thoughts don’t make sense. Anyway, I will thank any comments on my experience that could improve my knowledge of how to use this really interesting module. And of course, thanks a lot to Darktable people for they efforts.

Fer

1 Like