StrataQuest Home StrataQuest Glossary Foreground / Background
Image Processing & Correction

Foreground / Background

The thing you care about, and everything else

Definition
Foreground and background are the two regions a binary maskLoading... partitions an image into. The foreground is the set of pixels you've decided count — the cells, the tissue, the structures of interest. The background is everything else: glass, sample edges, debris, dim regions you've decided don't matter. The decision boundary between them — where a pixel just barely qualifies as foreground — is set by a thresholdLoading..., either chosen by hand or computed by an algorithm like Otsu's methodLoading....
Detection - Automatic Background Threshold params
Video · Primary
Detection - Total Area
Video · Primary
Supporting
H&EDSPTCH
Video · Supporting
Measurements Mask - Cellular
Video · Supporting
Where the threshold falls is a choice
Every position selects a different boundary
Foreground and background are not symmetric
Inversion is a button, not a default
"Background" doesn't mean "empty"
It just means "not what we're counting now"

The threshold as a knob

Imagine a slider, with the grayscale imageLoading... above and a black-and-white maskLoading... below. Slide right and the mask shrinks toward the brightest pixels. Slide left and it grows toward everything. There's a sweet spot — but it's an editorial choice, not a fact.

The threshold enginesLoading... let you set the slider numerically. Otsu's methodLoading... sets it for you by minimizing intra-class variance — finding the value that best separates the histogram's two modes. The Classifier engineLoading... skips the slider entirely and learns the boundary from your annotations. All three approaches are saying the same thing in different languages: somewhere in this image, foreground stops and background starts.

Share This Term
Term Connections