finds a global threshold value that partitions the intensity values in image into two intervals.

Details and Options

  • Thresholding is one of the most common techniques for binary clustering or segmentation.
  • FindThreshold works with 2D and 3D images as well as data arrays of any rank. It converts multichannel and color images into grayscale, and then finds a global threshold.
  • FindThreshold[image,Method->method] specifies the method to use to determine the threshold.
  • Possible settings for the Method option include:
  • {"BlackFraction",b}make a fraction b of all pixels black
    "Cluster"cluster variance maximization (Otsu's algorithm)
    "Entropy"histogram entropy minimization (Kapur's method)
    "Mean"use the mean level as the threshold
    "Median"use the median pixel level as the threshold
    "MinimumError"KittlerIllingworth minimum error thresholding method
  • The default setting is Method->"Cluster".


open allclose all

Basic Examples  (1)

Find the threshold of pixel intensities:

Use the threshold to perform an image binarization:

Scope  (3)

Find the clustering threshold for an array of data:

Find a threshold to segment a color image:

Find a threshold of a 3D volume:

Options  (2)

Method  (2)

Use the "MinimumError" method to classify data drawn from two Gaussian distributions:

Use the "BlackFraction" method to specify how much of the data should be below the threshold:

Applications  (1)

Find a cutoff for the vertical dimension of letters in a text image:

Wolfram Research (2010), FindThreshold, Wolfram Language function, (updated 2012).


Wolfram Research (2010), FindThreshold, Wolfram Language function, (updated 2012).


Wolfram Language. 2010. "FindThreshold." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2012.


Wolfram Language. (2010). FindThreshold. Wolfram Language & System Documentation Center. Retrieved from


@misc{reference.wolfram_2024_findthreshold, author="Wolfram Research", title="{FindThreshold}", year="2012", howpublished="\url{}", note=[Accessed: 23-May-2024 ]}


@online{reference.wolfram_2024_findthreshold, organization={Wolfram Research}, title={FindThreshold}, year={2012}, url={}, note=[Accessed: 23-May-2024 ]}