FindThreshold

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

Details and OptionsDetails 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".

ExamplesExamplesopen allclose all

Basic Examples  (3)Basic Examples  (3)

Find the threshold of pixel intensities:

In[1]:=
Click for copyable input
Out[1]=

Find a threshold of a 3D volume:

In[1]:=
Click for copyable input
Out[1]=

Find the clustering threshold for an array of data:

In[1]:=
Click for copyable input
Out[1]=
Introduced in 2010
(8.0)
| Updated in 2012
(9.0)