Research and development - White-Balance: auto -temperature correlation - tests - finding the optimum settings

Excuse my bad english :slight_smile:

The recently released ‘dev’ version ‘69c1caa’ of March 19, 2023, contains changes that concern the colorimetry of RT, and in particular the « white balance ».

Two new features appear on the screen, in ‘White balance’:

  • the “multipliers” of white balance channels. These are displayed, but you cannot modify them, they are given for information.
  • a " checkbox “Observer 10° instead of Observer 2°” - (Observer 10° by default), acts on all the colorimetry:
    ** either for the automatic white balance calculations,
    ** or for the " Custom " white balance,
    ** or for the " Camera " mode, in this case, the temperatures and ‘tint’ are changed, but not the channel multipliers.

All the colorimetry is affected. I reproduce here the tooltip that concerns “Observer”:

« The color management in Rawtherapee (White balance, channel multipliers, highlight recovery,…) uses the spectral data of the illuminants and colors.

Observer is an important parameter of this management which takes into account the angle of perception of the eye. In 1931 it was fixed at 2° (privileges the use of the cones). In 1964 it was fixed at 10° (privileges the use of the cones, but partially takes into account the rods).

To avoid a (rare) drift of the colors due to the choice Observer 10° - probably due to the conversion matrix - Observer 2° must be selected.

In a majority of cases Observer 10° (default) will be a more relevant choice ».

Thanks to the excellent work of @Lawrence37 , the access to this essential parameter of the colorimetry is now possible directly from the GUI. Thanks to him.
Automatically the system will determine according to the versions of RT 5.8 or earlier, 5.9, which version of Observer to use.

Another improvement concerns the Automatic white balance “Temperature correlation” (Itcwb). This method based on the correlation of several colors of the image with spectral reference data has been improved to :

  • on the one hand to make it compatible with the different versions of RT that contain Itcwb, 5.9, and versions that allow the use of “Inpaint opposed” (Highlight Reconstruction)
  • on the other hand potential improvements have been deliberately hidden. An average default setting is selected.

What I propose to you, is to make you an actor, if you want, of the improvement of this automatic white balance (temperature correlation - Itcwb).

A Pull Request is open:

Recall, you can easily access the PR executables

Several tuning parameters are available. To do this in the PR concerned - branch “whitebalanceopt” go to Preferences > Color Management > White Balance automatic temperature correlation > check the corresponding box:

  • directly via the GUI interface: 6 parameters are accessible,
  • or by other means (pp3, compilation): 4 parameters.

Rawpedia has been updated, in good english. Thanks to @Wayne_Sutton and @Morgan_Hardwood for their contribution.

The goal is to find a better default setting than the current one. Obviously this is a compromise, because we cannot make these 10 settings continuously accessible. Maybe 1 or 2 settings should be made accessible.
If you agree to participate, please fill in your opinion directly in the PR

Thanks in advance



Thanks to the excellent improvement made by @Lawrence37 , you can now directly access (Windows & Linux) the “pre-dev builds”

Moreover @reffort did several tests on the PR which led me to some changes



I’ve been testing “temperature correlation” with this branch on a variety of photos I’ve taken over the last 20 years. Probably experimented with about 70 photos. Just played around with the settings and subjectively evaluating the results. Cameras used are RICOH GRII, Pentax K-1, Pentax K-3II.

My impression is that it often, compared to my in camera WB, and my subjective judgement, goes a bit green. Often “entire CIE” improves things but sometimes SRGB wins out. REC2020 is almost always a bit green.

The temperature is minimally affected by the different settings, tint changes more visibly. It’s extremely rare to see results with to much magenta. My experiments ended up being primarily about finding the least green result. So far I’ve not reached a conclusion as to what settings would be best for me as sometimes it’s one and sometimes the other.

Note that it’s not extremely green just a very small tint.

1 Like


Thank you for this return

Two settings have a (slight) effect on the green.
The first is the choice of Observer. Oberver 10° takes into account the rods, in addition to the cones of the eye, and therefore can make the image a little greener. As the manufacturers (and Adobe) inform the illuminant but not Observer, we are in the unknown.
Maybe Observer 2° is more relevant?
It is easy to put Observer 2° for Itcwb and leave Observer 10° for general colorimetry, but ??

The second is “Find green student”. In principle, when an illuminant is pure, green is at 1. This slider searches in the 2 to 6 best correlation results (6 is the worst - approximately depending on the choice 50 greens or more are tested), the green that will be closest to 1.


I did try that setting on almost all images as well. Sometimes it helped sometimes it made things even more green.

I will do more testing, particularly see how it handles a bunch of photos taken under changing light but in the same place/subject.

More green, curious :slight_smile:

Be carefull with illuminant, Itcwb works well with :

  • Blackbody 2000K to 4000K
  • Daykight 4000K to 12000K

Otherwise ???

Thank you again


This is in a room with enormous amounts of glazing (nearly two full walls). Some small lamps were on though, perhaps that’s enough to throw it off?

As you can see from the tools on the right the “after” image to the right has 10° observer. The “before” to the left was with 2° observer.

Can’t share the image unfortunately as it’s full of people whose faces I’d rather not put online without asking first. Will see if I can find a raw to share.

Changing “maximum of colours used in picture” has quite radical differences between two numbers. Here I’m just switching between 33 and 34, It’s not progressive but some numbers give very different results. After 34 it sort of looks the same until 46, 47 which again show a radical difference. As does 64,65 the latter being the maximum. Perhaps I’m mistaken to expect it to even out with more samples? 63 and 65 look similar with only 64 giving very different (in this case better) results.

All my testing has been with a minimal profile but testing further I noticed that “automatic ca correction” (raw tab) affects colours even more now? Is that possible? Global colours are quite radically altered now, it used to be more minor.

I will have a look

Thank you



I reproduce the texts that I have just written in the PR

I do not dispute that the results have changed. Hence the interest of this collective work.
Essentially this is due to the increase in the nature and number of spectral data, and in particular to the 4 data close to neutral.
Indeed the system is complex and by summarizing, compares the data of the image with spectral data (known) of reference.

I deactivated (easier to neutralize than to create) the added data.
To avoid confusion I have changed the labels of the “sampling” choices, because I see that your attention is focused on the choice - srgB - Rec2020, etc. This choice is only one of many criteria, there are more than 10, and probably not the most important.

I won’t describe the algorithm again, Rawpedia is sufficiently documented, but simplified:

  • we start from the “camera” values of the image as a basis
  • we calculate the RGB multipliers for this “green” and all the temperatures provided in the temperature range
  • we evaluate the colors present in the image - by limiting them by “sampling”, we draw up a histogram
  • we calculate the “xy” data of the 200 spectral data from a matrix calculation involving the color, the illuminant, Observer
  • we evaluate the result.
  • we calculate a first correspondence between the image data and the spectral data, to keep only a limited number
  • then from these values, we seek the value of green.
  • substantially the same calculations, multipliers, spectral data are repeated, but for a large number of greens (at least 50 - possible choice in pp3). For each of these “green” data, “temp” is recalculated.
  • we calculate the correlations, and the choice is made in the best “student” / green compromise.

Reference spectral data is at least as important - if not more - than “sampling”… My last choice (adding near-neutral data) doesn’t turn out good. If you validate this “return” I would then see to add only the data at the limits of the Rec2020, Prophoto gamuts.

Thank you again, I really appreciate it because that’s the purpose of this PR - instead of me doing it alone.


I’m not going to - unless you ask me to - repeat the exchanges there are in the PR.

The color drift problem is I think due to the addition of 4 “neutral” colors in the reference spectral data.
You can follow the progress in the PR and of course intervene if you wish.

Thank you

Salut Jacques,

I noticed that when I apply Temperature correlation on a JPG, the photo gets a strong blue cast. The correlation factor is shown as 1000.0000, which is “a bit” high.

And with raws, I often notice a slight color shift, like so. On the left: neutral profile + Auto tonecurve, on the right idem + Temp. Correlation.

Another one.

That’s my experience as well but you can change the parameters and get better results. Only trouble is I haven’t found combinations that consistently do well.

Yeah, same here.


“Itcwb” like “RGB grey” only works with Raw.

Which version did you use ?


OK. Perhaps an idea (for later) to hide/gray out that function with non-raws?

Version: 5.9-198-g6569925cd


Ok, thank you :slight_smile:

I copy the text of the PR

Thank you all for your participation. I’m going to ask you for a break, which I hope will not be too long, to work out some ideas regarding Itcwb.
I think the major problem is between the correspondence between the xy data of the image and that of the spectral data.
I reviewed the code, found 2 or 3 small anomalies, but nothing that led me to review the algorithm in depth.
Maybe I will change 1 or 2 parameters or give access to 1 or 2 more parameters, but the problem is on the side of the spectral data.

I’m going to do a “mapping” of the spectral data, over the entire visible spectrum and see if I don’t have to put slightly redundant data (quite easy to do, but difficult to explain).

@paulmatthijsse can you upload the Raw file of the cathedral (dump398 - if of course you have the right), because it seems to me a support for the analysis of the data) .
Thank you


Bien sûr Jacques. It’s the Cathedral La Major in Marseille, taken two weeks ago during a pleasant and sunny morning photo walk.

DSC_8078.NEF (18.4 MB)


Merci, je l’avais reconnue