I just made several modifications and added spectral colors
I just made several modifications and added spectral colors
Some additional information.
I just added a commit (in wb_research), because I forgot (age?) compatibility in 5.9 disabling new features.
The limits I set that make “Camera” look “out” are arbitrary and easy to change (tint > 1.5 or t< 2800 or t > 9000). Be careful, however, not to enter settings (it is hard code) at the limits of the possible.
In the same way I trigger 2 passes if (a priori) the “camera” settings are at the reasonable limits of eliminating D50 and D65 - arbitrarily I chose 4000K (tropics…) and 7100K (overcast weather at Western latitudes. …).
Why 2 passes and not more. First it reruns the whole algo and starts resources. Secondly, it’s a bit like the cat biting its tail, because it looks (only a little) like “AWB temp bias” and I had to tinker around with AWB temp bias so that there was still a answer. But i will see if we can do better.
Another important point, I put by default - General colorimetry and not only Itcwb, Observer at 2°. It seems that RT behaves better - probably the Color Matrix should be generated with Observer 2°?.
Reminder: don’t forget to reset to neutral to take into account the new default settings;
I found and corrected 2 errors (mine more than 5 years ago), in the calculation of XYZ values from spectral data and “Blackbody” illuminant (tem < 4000°K).
This was to lead to bad results (correlation coefficient etc.) especially for Itcwb.
I know I’ve said this many times, but I think the current version (commit d57c6cc) is worth trying.
I tried to solve the squaring of the circle (otherwise said the cat biting its tail).
I modified the algo in such a way that it can either work in 2 passes when the conditions are required or in a single pass. the checkbutton “Removed 2 pass algorithm” allows it.
I added in the GUI the deltaE of the patch between the image data and the spectral data (this assumes that there is enough spectral data).
You thus have 3 indicators (GUI) which allow (perhaps) to optimize the system. None is perfect, each has its relevance:
The 2-pass algorithm tries a compromise between deltaE and Correlation factor.
In wb_research I just made several adjustments
After several hesitations I chose by default Observer 2° for all the colorimetry (general and Itcwb), this always looks better. But 5.9 compatibility is ensured by pp3
I simplified the GUI with removal of some settings (min size, ponderation).
The display of minimum data values is now more consistent. In addition I set a minimum number of pixels taken into account (this can in some cases change the result)
Last commit in “wb_research” 521382a, makes some adjustments (spectral colors, 2-pass threshold, etc.)
Version: 5.9-339-gea648e5ea Branch: wb_research Commit: ea648e5ea Commit date: 2023-05-02
The results are now very stable and the defaults good. Very little can be gained by changing the settings. Excellent results!
At first I thought that Observer 10° also produced very good (if sligthly more green) results but in overcast conditions and some other scenarios the green tint was to strong. So overall Observer 2° produces better results across a wide variety of samples.
Thank you for your ratings, whether on Pixls.us or PR.
Indeed after many tests I think that Observer 2° by default is better.
I made many modifications, in particular the number of spectral colors is now at 406. This element is essential to ensure the functioning of the algorithm.
Other modifications have been adjusted concerning both the thresholds where the 2-pass mode is engaged, or the taking into account of “Auto grey”
I just added a gamut control on the image data for the histogram, this can bring small changes.
I asked myself a lot of questions about images below 3000K. I was able to see that if I replaced the basic “color matrix” which is in D65, with the one found in the Exif of the dngs relating to stdA, the result was noticeably better. This is an observation, but it is almost impossible in the current code of RT to put 2 “Color Matrix”. Moreover the work to be done would be considerable, it would be necessary to seek this matrix for all the boxes… On the other hand how to choose. The impact is not only on Itcwb but on all colorimetry.
I just pushed these last changes as well in “wb_research” as in “whitebalanceopt” (PR).
Thank you if you can evaluate, then the question will arise of “merge” the PR in dev (and under what conditions at the GUI level).
Un lien sur mon Drive. j’ai testé ton dernier RT-6643 de ce matin.
Une suite saisies-écran sur deux Raw (NEF) l’un en paysage l’autre en “intérieur”. Chaque série BdB de l’APN et Observer 2°, avec chacun des 4 choix
Le lien : Shadow Drive
Si tu le désires j’ai des NEF ISO élevés.
Chapeau bas pour tout ce travail.
Merci Alain pour cette évaluation en français, et merci pour ton commentaire
Oui, les NEF m’intéressent
Ok pour les fichiers NEF.
Envoie-moi ton adresse.
Mon adresse mail: email@example.com
puis tu auras le lien sur mon cloud “Shadow” d’ OVH pour les télécharger…
I’m updating “wb_research” (commit 106cdd5), including the GUI - to enable ‘merge’ with dev. I also added some tooltips to (hopefully) make it easier to understand.
I started updating Rawpedia - in French, and in English. New paragraphs appear as:
But there is still a lot to do on Rawpedia regarding Itcwb
First off, thanks a lot indeed for your efforts on improving RawTherapee
I am a huge fan of this sofware which I use on a daily basis at work!
I have just tried your latest build (5.9-341-gb8703c705) on Windows 10, but I am not sure I am using it correctly
At work, a colleague of mine has a Kenko color meter (KCM-3100).
He kindly helped me to measure the kelvin temperature which was around 5300.
Afterwards, I took 4 shots (NIKON D700 - iso 200, F8, 1/13 on a tripood):
1 - custom camera (automatic)
2 - 5260 k (manual white-balance). The closest to the Kenko (and to my eyes…).
3 - 3030 k (manual white-balance). It was completely wrong (on purpose!). There was a blueish cast.
4 - 9090 k (manual white-balance). It was again completely wrong. There was a yellowish cast, as a result.
I have tried the algorithm, at first, without changing anything to no avail. The cast persisted (3030 and 9090k).
Then I have also tried checking observer 10 instead of 2.
What I am supposed to do to get it working?
In the past days, I have also tried the same steps with a Nikon D850 to no avail (with previous builds of yours). Once again the manual white balance was wrong (on purpose).
Of course, I can share the NEFs, if needed…
Here is a video with all my steps (image 3 and 4):
Thanks a lot in advance!
First, thank you for testing
I think it is (perhaps) a matter of algorithm trigger thresholds, which I have set arbitrarily - therefore, to be checked with perhaps (or not) a solution. Can you provide the NEFs
Hello @jdc !
Here is the link to download from dropbox a ZIP folder with the 4 NEFs images relating to my test:
My best regards and, once again, thanks a lot indeed for your work on RawTherapee all these past years!
I change the threshold settings when camera is “out”…
commit wb_research 21edc7c03
Probably it will need other adjustments…But the exercise is a bit curious
I have just pushed on wb_reserach and in the PR some changes to take into account these particular cases.
If the choice offered between 2 settings concerns a temperature close to or lower than 3000K the results are suspicious probably because of the color matrix (elaborated in RT - extract from Adobe DNG converter ) which is illuminant D65
The checkbox “Remove 2 passes algorithm”, allows you to switch (when possible) between the 2 choices - in the (majority) case where only one choice is offered, this checkbox is inactive (I haven’t found a way in this last case to hide it)
Version: 5.9-347-g002748143 Branch: wb_research Commit: 002748143 Commit date: 2023-05-06
I accidentally (lucky for testing purposes) took this photo with the wrong WB settings today. Not intending to test itcwb. It clearly picks up camera wb and adjusts “around” it producing results wrong in the same direction as the camera wb.
For my other 100 or so shots itcwb refines in camera wb resulting in better WB. Even then though it seems that it stays to close to the camera WB. When the camera goes a bit cool so does itcwb? Perhaps the results are as they should but i get a bit suspicious when it always follows the camera, is this expected from the algo or is it just a coincidence?
When testing the files from Rawpedia the green foyer image is corrected but my image below isn’t.
2305061158_K-1_053.DNG (45.2 MB)
Thanks again for this new build (5.9.348-gda9521f7c) which I have just tested on Windows 10
Now, the NEFs images pertaining to the Nikon D700 work all fine as regards the white balance. Great work indeed
With this new build I also tested other images from a Nikon D850.
Once again, the white balance was completely wrong since I wanted to test the new algorithm. Sorry about that
No previous build has ever been able to remove automatically (by way of the observer 2 - 10 options) the wrong white-balance.
Unfortunately, even this new build does not work fine with my images.
I must apply the other manual sliders available to get the correct white-balance (notably the AWB temperature bias slider).
Here is a screenshot of them (the first picture is correct; the second is wrong on purpose as regards the wb):
If you are interested here a link (Microsoft - OneDrive) to download the white flower (rosacea_fiore_wb) and the bike (moto_wb):
My best regards!
Just a different question
At work, in the afternoon, I take some shots with a Nikon D850.
The light comes laterally from a window and no artificial light (lamps) is present. Very simple setup.
Even with the automatic settings from the camera (D850) once in a while the images have a slight blue cast. Nothing very damaging yet…
Since I usually put a white background it is very easy to fix them later on with RawTherapee (e.g. with the white color picker). Sometimes I have got even a color checker (Xrite) to improve the final colors.
In short, here is an image with this slight blue cast:
Here is a link in case you are interested to take a look:
I have tried today’s build but I am unable to fix them by only checking observer 2 and 10.
Thanks a lot, as usual, for your patience
Following your 2 sets of examples, I made a small improvement, still in case the “camera” values are “out”, by looking for another reference with “auto wb grey”.
Excuse my (very) bad english.
But before I comment on your remarks, a few detours on colorimetry, and that applied to Itcwb.
First thing, colorimetry is a very complex science and there is no right approach, you just have to open several software to see the differences. If I look at Darktable, how many changes in a short time, even if the approach and vocabulary are different from Rawtherapee.
How to solve the white balance problem (there must be the same problem with the different Cameras and their auto systems). The system has a very large number of unknowns and is theoretically totally indeterminate.
Indeed, and it is a mathematical law (which is apparently correct in the current state of science) where a perceived color is the matrix composition in the visible color range 350nm to 830nm of:
To sum up, the problem is almost completely indeterminate and it is necessary to make certain shortcuts (one can speak of false inferences), but it is necessary to find an acceptable workaround that works “almost” in 95% of cases. Aiming for 100% is utopia, whether in terms of the camera (auto or not) or the software (auto or not). Even AI couldn’t do it, too many unknowns and ultimately who can say “what’s good?”
To refine this approach, which is essentially mathematical and acts globally on the image, 2 factors can be taken into account:
Next will come…
Before continuing on Itcwb, another detour using “Pick”. This command assumes (algorithm) that the reference gray is perfect (R=G=B or “a” and “b” from Lab to zero). Which is not the case in the Colorchecker24… Just try each of the gray boxes to see the difference. On the other hand once done this assumes the linear colorimetric extrapolation laws - which is not the case. In addition, as before, this command performs a mathematical correction and does not take human perception into account. Nevertheless, it is often an acceptable approach. Certainly it’s easier (less efficient) than a spectro (and 200 colors to measure), but which will systematically include a Colorchecker in each shot