PDA

View Full Version : How does automatic white balance work?



Linwood Ferguson
10-17-2013, 11:19 AM
I've been trying to understand some differences in white balance between my two cameras (Nikon D800 and D4), and find that I don't know how it works in general. Several posting on the net seem to be guessing, and some describe old techniques (e.g. average all pixels and pretend it's grey).

So what does a modern camera do, specifically Nikon if that matters.

Specifically:

- Does the determination follow the auto-focus area, if you are using spot or center vs full image does the white balance come primarily from that area?

- Is the determination done at focus time with the AF sensor, or is it calculated in processing of the raw image result and then stored (raw) or applied (jpg)? (This also relates to area since in the former case it covers only the center portion of the image)

- Is there some generally understandable way to describe how the camera adjusts for different subject color (which might have no neutrals in them)? Cameras do pretty well whether you are taking pictures of very colorful items, monochrome, etc. Take a picture of a red bird and a green background and it comes out red; same red bird on a brown background generally comes out red (ok, maybe not perfect, but better than you might think if you try to think about the math). Kind of impressive - how does it know?

arash_hazeghi
10-17-2013, 12:37 PM
In general WB has nothing to do with AF, it uses the RGB meter sensor to determine the correct WB, it usually looks at the entire scene, however each camera has its own formulas for determining the correct WB. the values are calculated when metering and then applied to the RAW data when saving a JPEG. If you shoot RAW WB is irrelevant as you can always set it during RAW conversion.

Linwood Ferguson
10-17-2013, 12:42 PM
In general WB has nothing to do with AF, it uses the RGB meter sensor to determine the correct WB, it usually looks at the entire scene, however each camera has its own formulas for determining the correct WB. the values are calculated when metering and then applied to the RAW data when saving a JPEG. If you shoot RAW WB is irrelevant as you can always set it during RAW conversion.

When I said AF sensor I was vague, but I thought the non-imaging sensor below the mirror was used both for AF and metering?

But thanks, that confirms that it's not the imaging sensor post exposure that's used.

I realize shooting raw I can adjust, but shooting raw it's still handy to have the "auto" work well to save effort. What I'm seeing is two cameras that are significantly different on "auto" and was trying to understand better by some testing, so it is helpful to know how it is calculated.

arash_hazeghi
10-17-2013, 01:18 PM
The meter sensor and the AF sensor are two separate things. The AF sensor is located below the mirror but the meter sensor is located in the prism housing. They are entirely different sensors.

The WB algorithm is propriety to each camera, the pro bodies also have a denser RGB meter sensor (for e.g. 1DX has a 100K pixel RGB sensor while the 5D3 has a 1K pixel sensor) so the auto WB works better...

Linwood Ferguson
10-17-2013, 01:38 PM
Thanks. And I think I understand now why I was confused. The cameras are a D800 and D4 (Nikon) and all the Nikon literature talks of its "scene recognition" and "3D tracking" system working with the AF system. I assume it's to drive tracking information then to select a specific AF sensor as opposed to doing any AF itself. But that's somewhat off the topic...

So the RGB sensor (in this case 91k - Canon had to go a few better :) ) is what calculates white balance. Thanks.

Have you ever seen published any information on how?

Here's why I am asking. The D4 and D800 I have give significantly different "auto" results, in scenes as well matched as I can make. I'm just trying to understand what things affect it, so that I can determine how to tell if the difference is real, or an artifact of specific subject matter (much as picking a bad target when looking at focus can mislead you to think the focus is off).

Diane Miller
10-17-2013, 01:38 PM
Interesting question and information. I think too many people accept the camera's value as "the way it was."

BTW, is that a T-6?

Linwood Ferguson
10-17-2013, 01:43 PM
Interesting question and information. I think too many people accept the camera's value as "the way it was."

BTW, is that a T-6?

An old fighter trainer, from WW-II era. Which about exhausts what I know about it, other than it was a fun ride my wife bought for me.

And yes -- same with exposure, focus, etc. Or computers. After all, if you read it on the internet it must be true - same applies if you read it on the back of your DSLR. :)

arash_hazeghi
10-17-2013, 02:49 PM
again, if you shoot RAW you don't have to rely on AWB, just simply set it during conversion if you see a color cast.

Linwood Ferguson
10-17-2013, 02:59 PM
again, if you shoot RAW you don't have to rely on AWB, just simply set it during conversion if you see a color cast.

Really, I understand. But try shooting sometime with it preset to something like florescent, and see how big a pain it is to re-set every image in post.

I don't need auto-focus or auto-exposure either, but it's nice to have. :)

Diane Miller
10-17-2013, 03:09 PM
Of course it's best to get it as close as you can in-camera because the RAW converters I know will read that value as a starting point.

With Lightroom, you can set the desired value for one shot and select other frames desired from the filmstrip and Sync the WB setting to them. Then if some need tweaking, that's easy on a frame-by-frame basis, or a second sync of a subset of the frames.

I don't know about other RAW processors but I'd assume it should be possible for many others as well.

arash_hazeghi
10-17-2013, 03:30 PM
what is exactly your question/goal? I don't understand.

Linwood Ferguson
10-17-2013, 03:35 PM
what is exactly your question/goal? I don't understand.

Understanding, mostly.

On a lot of sports I shoot with a D4, and as a second body a D800. For indoor and night I never look at the auto-white balance result, as I blow in something learned as a good average for that venue when I post process. But for day sports (clouds coming and going) I generally leave the auto setting and then only adjust the ones that need it.

Frequently for day images, but sometimes when Lightroom hasn't finished processing I look at the OOC image for night, I notice the color is significantly different for the D4 and D800. Sometimes.

So I went outside with a tripod and took some images with both - significant difference (like 5000 vs 6000 degrees).

Which set me to finding when it is different, when it is not, etc. Which led to trying to understand better how the "auto" worked and what might affect it.

The problem isn't worth a trip to Nikon or anything, but it is odd that it is different.

I wasn't trying to recreate that thread (I was discussing this on Nikonians), but since this forum seemed to have people with a strong scientific bent frequenting it, I thought I might get a better understanding of how the white balance actually worked.

arash_hazeghi
10-17-2013, 03:49 PM
Are you asking why the AWB is different between D800 and D4 ?

I already answer that, I repeat : because they are two different cameras, have different WB algorithm and are probably tuned differently. D800 is a landscape camera so it's probably tuned to produce warm punchy tones by default, as opposed to a pro body which is tuned to be as neutral as possible.

you can just look at them side by side and decide which one is closer to the original scene if that's what you want.

edit: they seem to have the same meter sensor according to Nikon spec sheets.

Linwood Ferguson
10-17-2013, 03:58 PM
Are you asking why the AWB is different between D800 and D4 ?

I already answer that, I repeat : because they are two different cameras, have different meter sensors, different WB algorithm and are probably tuned differently.

Thanks. And here all along I was thinking they were the same camera, like a multiple personality disorder from Nikon. :e3

But seriously, thanks for the insight on where it is calculated.

arash_hazeghi
10-17-2013, 04:31 PM
if you do a google search you can find more insight into D4's features, including AWB

http://imaging.nikon.com/lineup/dslr/d4/features01.htm

"Incorporating years of research into ambient lighting, the unique Nikon auto white balance technologies in the D4 are capable of identifying and compensating for a broad range of artificial and natural light sources. Using data from the image sensor and 91K-pixel RGB sensor, the camera can automatically render white as white with supreme accuracy, or can incorporate the warmth of ambient, incandescent lighting as required."


It seems the D800 also uses the same 91K pixel unit, so my guess is the main difference comes from how they are tuned to produce different colors given their application.


Imaging resource has measured WB and color saturation for OOC JEPG, you can read their opinion and findings.

http://www.imaging-resource.com/PRODS/nikon-d4/nikon-d4A5.HTM