Imaging Glossary › White Balance
Cameras & Sensors

White Balance

Making blank glass read as neutral gray

View
Definition

A color camera records exactly the light it is given, and a microscope lamp is not white: a halogen lamp is strongly yellow (see color temperatureLoading...). White balance scales the camera's red, green and blue gains so that a reference that should be colorless — blank glass, with no tissue, debris, bubbles or coverslip edge in view — records as neutral gray.

Set it on blank glass, never on tissue: the camera makes whatever you point it at neutral, so balancing on stained tissue shifts every other color to compensate. Set it at the lamp voltage, filters and exposure you will image with, save it with the acquisition settings, and turn auto white balanceLoading... off for stained sections.

For quantitative brightfield work this is not cosmetic. Color deconvolutionLoading... assumes the background is neutral white; a residual color castLoading... adds optical densityLoading... to one channel everywhere, and the algorithm reports it as stain.

Blank glass is the only honest reference

A color camera does not know what white is. Each channel reports the light its pixels collected, multiplied by a gain. Under a halogen lamp at about 3,200 K, blank glass might read, for example, R 230, G 180, B 105 with all gains at 1.0. White balance sets the gains so that the same glass reads equal values in all three channels: here about ×1.00, ×1.28 and ×2.19, scaled so the brightest channel stays below clippingLoading....

The reference has to be blank glass, imaged through the same objective, condenser setting, filters, lamp voltage and exposure you will acquire with. Whatever is in view becomes the definition of neutral. Balance on tissue and the camera makes that tissue gray, shifting every other color to compensate.

Simplified

The camera has no idea what white is. It just counts light in red, green and blue. A microscope lamp gives off much more red than blue, so empty glass looks yellow to the camera. White balance turns the blue and green up until empty glass reads plain gray.

Do it on empty glass, with the microscope set up exactly as you will use it. If you point the camera at tissue instead, it makes the tissue gray and every other color goes wrong to match.

Why it decides your stain numbers

Color deconvolutionLoading... works in optical densityLoading...: OD = log10(I0 ÷ I), where I0 is the brightness of blank glass. Most implementations assume I0 is the same in every channel. If blank glass actually reads 230, 180 and 105 while the algorithm assumes 255, every pixel, empty glass included, carries an extra 0.045 OD in red, 0.151 in green and 0.385 in blue.

That pattern, little red absorption and a lot of blue, is close to the absorption shape of DABLoading.... So an unbalanced background is reported as faint brown stain across the entire field. Thresholds then count glass as positive, and intensity measurements on real stain are inflated by the same offset.

Simplified

Stain-measuring software assumes empty glass is pure white. If the camera sees it as yellow, the software reads that yellow as a little bit of stain, everywhere, including on glass with nothing on it.

Yellow happens to look a lot like faint brown DAB. So an unbalanced camera adds a thin layer of fake DAB to the whole image. Cells look more positive than they are, and empty areas can be counted as stained.

Gain is not free

Balancing by gain multiplies the weakest channel, and its noise with it. At ×2.19, blue noise rises by the same factor, and if the camera applies the gain digitally after conversion, the blue values are also spread apart, leaving unused levels between them. Strongly stained areas, which are already darkest in blue, then sit on the noisiest, coarsest channel.

The better fix is in the light. A blue daylight-conversion filter, which many brightfield microscopes ship with, raises the effective color temperatureLoading... toward daylight so the gains can stay near 1.0. And keep the lamp at the voltage you balanced at: dimming it lowers its color temperature and undoes the balance. Use a neutral density filterLoading... to dim instead.

Simplified

Turning a color up also turns up its noise. Under a yellow lamp, blue gets turned up the most, and blue is exactly where dark brown stain is measured. So heavy correction makes the most important channel the grainiest.

It is better to fix the light itself. A blue filter in the lamp path makes the light whiter, so the camera barely has to correct. And never dim the lamp to make the image darker. Use a gray filter instead, because dimming the lamp turns it yellower.

Keep it with the data

A white balance is part of the acquisition, like exposure. Record the three gains with each session, along with lamp voltage, filters and objective, and re-check whenever any of them changes. Turn auto white balanceLoading... off before you start, or it will quietly replace your setting frame by frame.

Save one image of blank glass per session. It proves the balance after the fact: its color should be neutral, with a color castLoading... ΔE under about 3. It also doubles as the reference for flat-field correctionLoading..., so the same capture serves both.

Simplified

Write down the color settings every time you image, the same way you write down exposure. If you change the lamp, a filter or the objective, set the white balance again. And make sure the camera's automatic color mode is off, or it will keep changing your setting behind your back.

Take one picture of empty glass each session. It proves later that the colors were right, and it is also the picture you need to correct uneven lighting.

Share This Term
Term Connections