How white balance changes RAW sensor data and why cameras correct color casts
Asked 2/11/2015
6 views
2 answers
0
I understand that white balance models the scene illumination using color temperature and a green–magenta shift, but I’m unclear on how the camera uses that information in practice.
How is RAW sensor data turned into RGB pixel values using white balance? If the red, green, and blue-filtered photosites in a small area all record the same photon count, why wouldn’t that simply become equal RGB output values? Why are the channels scaled or otherwise adjusted based on the light source?
Also, if white balance is set “correctly,” does that mean the light source itself should appear white? In real life, many light sources still look obviously warm, cool, or strongly colored.
Finally, if I want a photo to preserve the scene’s color cast instead of neutralizing it, is there a neutral or uncorrected white-balance approach that leaves the illumination’s tint visible?
Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0
Photography Stack Exchange contributor
11y ago
2 Answers
13
Our eyes and brain do things on a daily basis that make LSD's effects seem relatively tame.
One of the things our brains do is a color balancing activity of their own. No one knows why for certain, but its theorized we do it so that it would be easier to track prey as they dodge in and out of shadows (prey reflect the blue sky while in the shadow, so they become bluer). Regardless of why, our brains do it.
This is remarkably obvious if you are a diver. Reds get cut out by the water column rather rapidly. In fact, at 30m, red is a camouflage color. However, we don't perceive this when we dive. We think we're seeing perfect colors. Hold up a white card in 30m of water, and it looks "white" to you.
Now take a picture of that card. The camera sees raw photon counts. It's going to call it like it is. Far fewer red photons will hit the camera, so it will record less red in the picture. No problem!
The need for color balancing comes when you try to view those photos when you aren't 30m under water. Your brain will do its color balancing thing, like it did underwater, but now it does it with respect to the perceived lighting in the room. If you're in a reasonably lit room, your brain will tune itself to perceive a white object (like the unprinted white rim around a photo) as "white." Now the picture looks horribly blue. This is an accurate model of how many red photons hit your eye when you were at depth, but now your brain is no longer color correcting for it.
The solution is white-balancing. You pick a "white" object in the picture (which is actually a bunch of blueish pixels), and declare "I want people to think this is white." The software does some color mapping to effectively do what your brain was doing before. Once printed, this region of pixels takes on the color of the light in the room (usually rather yellowish), but now your brain properly does its corrections, and you perceive white!
That's almost the end of the story. This works remarkably well for printing. On a screen, the brain has a little more trouble making good guesses at color corrections because the brightness of the screen does not scale with the light in the room around you. If you're editing a photo professionally, its common to pick a room with very constant lighting, and "color balance" the monitor so that things it shows as "white" show up as "white" when printed!
Originally by user37696. Source · Licensed CC BY-SA 4.0
user37696
11y ago
0
Generated from our catalog & community — verify before relying on it.
White balance mainly compensates for the color of the illuminant so objects that should look neutral render neutral in the image. A camera sensor records absolute amounts of light through red, green, and blue filters; our eyes/brain partially adapt to illumination, so we often perceive different light sources as more neutral than they physically are.
In practice, white balance is usually applied as different gains to the RGB channels before or during RAW conversion/demosaicing. If the light is very warm, the camera boosts blue relative to red; under cool light it may boost red, etc. Equal photon counts at R, G, and B photosites do not necessarily mean a perceptually neutral color, because the sensor filters have different spectral responses and the scene illumination is not spectrally flat.
Correct white balance does not mean every light source will appear pure white. It means the rendering is referenced so neutral subjects appear neutral overall; the scene can still retain a warm or cool feel.
If you want to keep the visible color cast, use a different white balance than the “correct” neutralizing one, or leave RAW white balance largely for later adjustment in processing. There is no single universal ‘neutral/no-correction’ setting that matches human vision exactly.
Recommended products
UniqueBot
AI11y ago
Your Answer
Related Questions
Why do pure red, green, and blue values in a synthetic RAW shift when converted to JPEG?
How can I estimate an illuminant’s color temperature from a photo of a color chart?
Does a Bayer RAW file record one color value per photosite or full RGB per pixel?
How can I photograph the warm yellow color of sunlight on a wall without white balance neutralizing it?
Why does Rawstudio show 0–255 RGB values for a RAW image?