Skip to content

Threshold

The Threshold command is the primary segmentation step. It converts a greyscale image to a binary mask: pixels with intensity below the minimum threshold become 0 (background); pixels above become 65535 (foreground).

The output of Threshold feeds directly into Connected Components.

An automatic method analyses the histogram and finds the cut-point that best separates two populations

Define one threshold entry to produce a simple binary mask:

ParameterDescription
MethodManual or one of the auto-threshold algorithms
Min thresholdMinimum intensity to include as foreground
Max thresholdMaximum intensity to include as foreground (set to 65535 to disable)
UnitIntensity unit (Absolute 0–65535, Percent 0–100, or Relative 0–1)
Object classThe segmentation class assigned to objects detected by this threshold entry

Click + Add to define additional threshold entries for the same image. Each entry uses a different intensity range and assigns a different segmentation class, allowing two or more object populations to be detected from one image in a single step.

Under the hood, each threshold class maps to a distinct greyscale value in the binary output (65535 for the first class, decrementing for subsequent classes). Connected Components and Extract ROIs use these values to distinguish the populations.

When Method is not Manual, EVAnalyzer analyses the image histogram and computes a threshold automatically, following the same set of methods popularized by ImageJ’s Auto Threshold plugin. Each one makes a different assumption about what separates foreground from background, so the “best” method depends on the shape of your histogram:

MethodAssumptionReference
OtsuMaximizes between-class variance (the most widely used general-purpose method)Otsu, “A Threshold Selection Method from Gray-Level Histograms,” IEEE Trans. SMC, vol. 9, no. 1, pp. 62-66, 1979
LiMinimizes cross-entropy between the image and its thresholded versionLi & Lee, “Minimum Cross Entropy Thresholding,” Pattern Recognition, vol. 26, no. 4, pp. 617-625, 1993
MinErrorIteratively fits two Gaussians and minimizes classification errorKittler & Illingworth, “Minimum Error Thresholding,” Pattern Recognition, vol. 19, no. 1, pp. 41-47, 1986
TriangleGeometric: line from the histogram peak to its tail, threshold at max distanceZack, Rogers & Latt, “Automatic Measurement of Sister Chromatid Exchange Frequency,” J. Histochem. Cytochem., vol. 25, no. 7, pp. 741-753, 1977
MomentsPreserves the first three moments of the original histogramTsai, “Moment-Preserving Thresholding: A New Approach,” Computer Vision, Graphics, and Image Processing, vol. 29, no. 3, pp. 377-393, 1985
HuangMinimizes a fuzzy-set measure of image “fuzziness”Huang & Wang, “Image Thresholding by Minimizing the Measures of Fuzziness,” Pattern Recognition, vol. 28, no. 1, pp. 41-51, 1995
IntermodesAssumes a bimodal histogram; smooths until only two peaks remain, cuts between themPrewitt & Mendelsohn, “The Analysis of Cell Images,” Annals of the New York Academy of Sciences, vol. 128, no. 3, pp. 1035-1053, 1966
IsoDataIterative clustering around the mean of two classesRidler & Calvard, “Picture Thresholding Using an Iterative Selection Method,” IEEE Trans. SMC, vol. 8, no. 8, pp. 630-632, 1978
MaxEntropyMaximizes the combined Shannon entropy of foreground and backgroundKapur, Sahoo & Wong, “A New Method for Gray-Level Picture Thresholding Using the Entropy of the Histogram,” Computer Vision, Graphics, and Image Processing, vol. 29, no. 3, pp. 273-285, 1985
MeanThe average intensity of all pixels-
MinimumSmooths the histogram until it is bimodal, cuts at the valley between peaks-
PercentileAssumes a fixed fraction of pixels is foregroundDoyle, “Operations Useful for Similarity-Invariant Pattern Recognition,” J. ACM, vol. 9, no. 2, pp. 259-267, 1962
RenyiEntropyA generalization of MaxEntropy using Rényi entropySahoo, Wong & Chen, “Threshold Selection Using Rényi’s Entropy,” Pattern Recognition, vol. 30, no. 1, pp. 71-84, 1997
ShanbhagAn information-theoretic extension of Kapur’s methodShanbhag, “Utilization of Information Measure as a Means for Image Thresholding,” CVGIP: Graphical Models and Image Processing, vol. 56, no. 5, pp. 414-419, 1994
YenMaximizes a entropic correlation criterion between classesYen, Chang & Chang, “A New Criterion for Automatic Multilevel Thresholding,” IEEE Trans. Image Processing, vol. 4, no. 3, pp. 370-378, 1995

Auto-thresholds can fail on empty images (no objects, only noise) because they always find a separation. Prevent this by setting a non-zero Min threshold as a lower bound: if the computed value falls below it, EVAnalyzer uses the minimum instead.

Setting Max threshold to a value below 65535 restricts detection to pixels within the [min, max] range. This allows extraction of a specific intensity band - for example to separate bright artefacts from dim objects, or to extract the background itself by setting Min to 0 and Max to just below the signal level.