Imaging Glossary › Flat-Field Correction
System Performance

Flat-Field Correction

Dividing out the light so every pixel tells the truth

View
Definition

A correction that removes vignettingLoading... and uneven illumination by dividing each image by a reference image of the illumination itself. The reference, the "flat", is an image of blank glass captured through the same objective, at the same lamp setting, filters and exposureLoading... as the images to be corrected. A dark frameLoading... is subtracted from both first:

corrected = (raw − dark) ÷ (flat − dark) × mean(flat − dark)

The reference must be clean. Anything in it, whether tissue, dust or a fiber, is divided into every corrected image as a bright ghost. Defocusing slightly while capturing it blurs specks on the slide away while still recording the light. Capture a fresh reference whenever the light path changes: another objective, lamp setting, filter or condenser position, or another day. A stale one leaves a pattern of its own, which a tiled scan repeats as visible seams. The same name is used in fluorescence and camera testing, where the flat is a uniformly lit field and it also removes pixel-to-pixel sensitivity differences.

The formula, term by term

corrected = (raw − dark) ÷ (flat − dark) × mean(flat − dark)

The dark frameLoading... is subtracted first from both the image and the reference, because the camera's offset is not light and must not be divided. Dividing by the dark-subtracted flat then removes the illumination pattern: a pixel that receives 70% of the center's light in the flat is divided by 0.7. Multiplying by the mean of the flat restores the original units, so blank glass in the corrected image reads the same average brightness it did before.

The correction is applied per channel in a color image, which also removes small color differences between center and edge.

Simplified

Take a picture of empty glass. It records exactly how uneven the lighting is: bright middle, dimmer corners. Divide every sample picture by it, and the unevenness cancels out.

First, subtract the camera's dark picture from both, because that part is the camera's own signal, not light. Then scale the result back so the brightness looks normal. Each color is corrected separately.

Capturing a reference you can trust

Use a clean, blank area of the slide, through the same objective and with the same lamp setting, filters, condenser position and exposure as the images it will correct. Defocus slightly: dust and debris on the slide blur into nothing, while the illumination, which is not in the specimen plane, is recorded unchanged.

Average several frames. Noise in the flat is divided into every corrected image, so a single noisy flat adds its noise to everything; averaging 16 frames reduces it by a factor of 4. Anything left in the flat, a speck, a fiber, tissue, appears in every corrected image as a bright ghost, so inspect it before use.

Simplified

Photograph a clean, empty part of the slide with everything set exactly as for your samples. Nudge the focus slightly off, so specks of dust blur away but the lighting pattern stays.

Take several pictures and average them, so the reference itself is not grainy. Then look at it closely: anything left in it, even a single speck, will show up as a ghost in every corrected picture.

Proving it worked, and knowing when to redo it

Correct a second, independent image of blank glass and measure what is left. The corner-to-center ratio should be within about 2% of 1.0, and the variation across the field should be small and structureless. In a tiled scan, a corrected blank or lightly stained area should show no tile-shaped grid.

A reference is valid only for the light path it was captured on. Capture a fresh one when you change objective, lamp setting, filter or condenser position, after realigning Köhler illuminationLoading..., and at least once per imaging day. In fluorescence the reference is a uniformly fluorescent slide instead of blank glass, and it also corrects pixel-to-pixel sensitivity differences in the sensor.

Simplified

To check it, correct a second picture of empty glass. The corners and the middle should now match within a couple of percent. In a scanned slide, the checkerboard pattern of tiles should be gone.

A correction picture only fits the setup it was taken with. Take a new one whenever you change the lens, the lamp, a filter or the alignment, and at least once a day.

Share This Term
Term Connections