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

Details and Options

  • 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  (2)

Find the threshold of pixel intensities:

Find the clustering threshold for an array of data:

Scope  (2)

Find a threshold to segment an 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).


@misc{reference.wolfram_2020_findthreshold, author="Wolfram Research", title="{FindThreshold}", year="2012", howpublished="\url{}", note=[Accessed: 18-January-2021 ]}


@online{reference.wolfram_2020_findthreshold, organization={Wolfram Research}, title={FindThreshold}, year={2012}, url={}, note=[Accessed: 18-January-2021 ]}


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