Estimating the actual scene illuminant via white balance color temperature?

When I have a profile applied, created based on the measured camera SSFs, and then adjust the white balance slider in RawTherapee using the pick function on a neutral gray target: Does the color temperature shown by the slider roughly matches the color temperature at the real scene?

Under the assumption of course of a similar characteristic light curve used for the profile as it is in the scene, i.e. a smooth continuous single peak curve without strange multiple peaks. But with the profile color temperature for example being stdA and the real scene more around sunlight.

I’m asking as I look at various test images and notice the exact same color temperature as result when picking the same spot independent from the profile generated for stdA, D50 or D65. The base of all those SSF-based profiles are the same SSFs as it is the same camera used.

Note, that the SSF-based profile is a single-illuminant DCP profile where you can define the illuminant freely during creation of the DCP file as the SSFs are independent from any illuminant.

The context of my question is a research project I do for identifying the scene’s color temperature which is not known, only the general characteristic is known and the camera’s SSFs are also known.

The results will be public, but I don’t like to talk much about the details here for now.

I’m sure The RT devs have a better answer, but it’s probably that the picker is looking at the raw image before color conversion.

That would explain the same result as I compare within the same DNG image, especially as my DNG is converted from the pure camera data without any further information than the bare pixels and the conversion tool most likely adds some default attributes.

It can be tough sometimes teasing out the other processing to isolate the effect of a single variable. Even in my hack raw processor where I have explicit control over each operator and their order, I’ve got to pay attention to display rendition which has two functions, color and tone conversion. I recently exposed browser behavior where, if there’s an embedded profile in an image, Chrome appears to convert it to sRGB for display, even without color management set up in the computer…

Yes, through similar effects when using other image viewer I’ve been through already back then when I used ICC profiles instead of now DCP profiles. That’s why I now use only DCP and RawTherapee to view my results and then create a plain standard sRGB JPG or PNG from them if needed.

1 Like

Are you using a dual-illuminant DCP? Hardest part of making one these days is finding a tungsten bulb for the StdA target shot… :crazy_face: I haven’t tried one yet, but it’s supposed to handle color better if you’re shooting at less-than daylight temps.

Would this be good enough or would it need to be more precise?? 60W Vintage Edison G30 Vanity Tungsten Incandescent Filament Light Bulb, E26 Sta | eBay

Product description says it’s 2700K. The nearest standard illuminant is StdA, at 2856K, but in dcamprof you can specify the temperature directly, e.g.,

-i 2700K

:slight_smile: Halogen but 2850…

From the mainstream standpoint where we process all our pictures with a D65 or D50 set of primaries, any effort to interpolate between two primary sets that cover the illuminant range has to be better, no? Even if the numbers are bit off… ??

1 Like

I am not certain, but I always thought the idea is that you want to interpolate between two black body emitters with different temperatures. Mixing two different types of light sources seems like a bad idea in terms of calibration ( only change one variable at a time!).

Edit: @ggbutcher I think there is some spectral processing going on while making the DCP. Perhaps with the right flags, it could work to mix and match.

Wouldn’t daylight and a tungsten bulb be just that? If not, I messed up a profile I made for @hanatos

With spectral data and dcamprof, you can make a dual illuminant profile by making two spectral profiles, one D65 the other whatever you choose for the low end, and then combine the two with dcamprof make-profile. No target shots…

I was commenting on the idea of combining shots of a color chart under daylight and halogen, and combining those for a dual-illuminant DCP. I’m not sure that’s a great idea.

What’s wrong with halogen? It’s a tungsten radiator surrounded with halogen gas. Does that affect the black-body reference? If so, all my spectral work is shot… 'cept, I get great dE against the common training spectra…

Eh, my mind is not awake - it’s 5 am and I couldn’t sleep anymore. Of course a halogen lamp has a tungsten filament and should give a similar spectrum as an incandescent bulb. What the influence of the halogens is, I am actually not sure of and a quick Google search didn’t provide me with any reliable comparison spectra between halogen and incandescent.

1 Like

For my experiment I generate the profile mathematically from the measured spectral sensitivity function of the camera. That’s the camera response function for each RGB channel separately measured every 10nm over the spectrum. No actual test target photo is taken for this process. For generating a profile from that, dcamprof only offers the single illuminant mode, not the dual. Or at least I couldn’t figure out yet how to create a dual profile in that mode.

About tungsten vs halogen-tungsten I found this: Fig.3 shows the differences in the spectrum in the visible light range. The shape of the complete curves appears to be the same as a blackbody, but the part used by the camera is a bit different in the green. And they mention how the first halogen bulbs used iodine which added a purple color, but today’s don’t have that anymore.

1 Like

I did just this about a month ago. Here’s the script, just change out your .tif names for the target shots.

#make the daylight profile:
scanin -v -p -dipn nikon_d7000-colorchecker-D65-2022-06-28.tif $CHARTFILE $CIEFILE
dcamprof make-profile -r D65 -n nikon_d7000 -i D65 nikon_d7000-colorchecker-D65-2022-06-28.ti3 nikon_d7000-colorchecker-D65-2022-06-28.json

#make the tungsten profile:
scanin -v -p -dipn nikon_d7000-colorchecker-3200k-2022-06-14.tif $CHARTFILE $CIEFILE
dcamprof make-profile -r StdA -n nikon_d7000 -i 3200K nikon_d7000-colorchecker-3200k-2022-06-14.ti3 nikon_d7000-colorchecker-3200k-2022-06-14.json

#glom them together for the dual-illuminant profile:
dcamprof make-dcp nikon_d7000-colorchecker-3200k-2022-06-14.json nikon_d7000-colorchecker-D65-2022-06-28.json nikon_d7000.dcp
1 Like

Thanks, that last part, joining them together I missed and got it now working as dual profile!

Nice to see it relatively confirmed!
I’ll do some further experiments under known light sources with removed meta data from the raw images to verify.

All that is of course under the assumption of this single peak smooth spectrum as otherwise you would need a multi channel spectrometer.