Visualization

Histogram

What an image looks like before you look at it

View
Definition
Take an 8-bit grayscale imageLoading... and count how many pixels hold each value from 0 to 255. Those 256 counts are its histogram, and a multi-channel image has one per channel. Spikes at 0 or at the top of the range mean saturation, and sparse occupancy means the bit depthLoading... isn't fully used. Intensity engines such as thresholdingLoading..., OtsuLoading... and LUTLoading... construction work from histograms internally.
Dynamic range - 16bit to 8bit normalization
Video · Primary
Supporting
Detection - Automatic Background Threshold params
Video · Supporting
Detection - Nuclei Segmentation Classic
Video · Supporting
User Interface - Dimensions (8bit FL)
Video · Supporting
Dynamic range - 16bit to 8bit normalization 4m
Video · Supporting
Diagrams - How to create Histograms and Scattergrams
Video · Supporting
Dynamic range - 16bit to 8bit normalization 6m
Video · Supporting
Distribution Shape
See the population structure
Gate Guidance
Find the valley between populations
Quality Assessment
Evaluate staining and detection
Population Statistics
Mean, median, spread, percentiles

How It Works

The histogram is a diagram, created with Add Diagram, that shows the distribution of any per-cell measurement:

  1. Measurement selection. Choose any column from the measurement table: marker intensity, area, compactness or a derived value.
  2. Binning. The measurement range is divided into bins of equal width, and each bin counts the cells whose values fall in its range.
  3. Display. Bar height is the count (or frequency) of cells in each bin. It can be drawn as bins, as a line or as a line with fill, and cutoffs and rectangular gates can be placed on it.
  4. Statistics. The Percent option on the histogram toolbar shows percentages for the histogram, and the Statistics Report can extract values such as percent, count, min and max for the events in a quadrant or gate.
Simplified

A histogram counts how many cells have each measurement value and draws the counts as bars. Peaks are populations, valleys are natural classification boundaries, and the width of a peak shows how much the measurement varies.

Science Behind It

Histogram as probability density (Gonzalez & Woods): Divide each bin count by the total, p(r_k) = n_k/N, and the histogram approximates the probability density of pixel (or cell) intensities. Every threshold method rests on that reading. Otsu's method, for one, treats the histogram as a mixture of two distributions and finds where they separate best. The histogram is the empirical estimate of the measurement's distribution.

Histogram equalization (Gonzalez & Woods): Equalization spreads the histogram across all available gray levels, using the cumulative distribution function as the transform: s_k = CDF(r_k). It helps when you compare samples with different staining intensity ranges, because it normalizes the dynamic range. The price is that it distorts the proportional relationship between intensity and expression.

Gray levels and noise (Pawley): The number of meaningful gray levels depends on the signal-to-noise ratio: g = 1 + SNR. With 100 photons per pixel, SNR = 10, which gives about 11 distinguishable levels. Below 25 photons per pixel, the histogram has only about 5 meaningful bins. If a measurement is too imprecise to fill more than a few bins, no histogram of it can show fine population structure.

Bimodality as a test: Two genuine peaks mean two distinct populations, which is the basis for reliable binary gating. Hartigan's dip test checks this formally: if the histogram is significantly bimodal (p below 0.05), the two populations are statistically distinguishable and a threshold between them is meaningful. If it is not, a binary gate imposes an artificial division on a continuous distribution.

Simplified

The histogram is the measured distribution of your values, and Otsu's method, like every threshold method, finds the natural boundaries in it. How many meaningful bins it has depends on the measurement's precision, which depends on how many photons were collected. Two well-separated peaks are the best case for gating; one featureless peak means the marker may not divide the cells into useful categories.

Practical Example

Reading Ki-67 staining before analysis:

  • Two clear populations. The histogram is bimodal, with a clear valley at intensity 80: the negative population peaks at 30 and the positive at 150. A gate at 80 separates them cleanly.
  • One continuous population. The histogram has a single peak at 50 with a long right tail and no clear positive population. A gate anywhere divides a continuous distribution arbitrarily.
  • A bright background. The histogram is bimodal, but the negative peak sits at 120 (high background) and the positive at 180, and the populations overlap extensively. Run Background Removal before gating.

The histogram shows you which case you have before you invest time in analysis. Checking it is a quick quality-control step for any tissue analysis workflow.

Simplified

Look at the histogram before you analyze. If you see two clear peaks with a valley between them, set the gate in the valley. If you see one broad peak and no valley, the marker may not classify these cells. If high background shifts everything bright, apply Background Removal first.

Connected Terms

Share This Term
Term Connections