Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Data Manipulation > Image Processing & Analysis > Segmentation Analysis > Threshold >

Threshold

Threshold[data]
thresholds data by replacing values close to zero by zero.
Threshold
thresholds data using threshold specification tspec.
Threshold
thresholds an image.
Threshold
thresholds a sound object.
  • The data can be a rectangular array of any depth.
  • The threshold specification tspec can be of the form .
  • Possible tfun names and options include:
{"Hard",}
{"Soft",}
{"Firm",,r,p}
{"PiecewiseGarrote",}
{"SmoothGarrote",,n}
{"Hyperbola",delta}
{"LargestValues",k}keep the largest k data points
  • In all cases is assumed to be a positive number or a thresholding function tfunc to compute . Each should return a positive number.
  • The parameter conditions for are that is a positive real and a positive real number between 0 and 1.
  • The parameter conditions for is to have be a positive real number.
  • The threshold can be automatically computed using the following methods:
{"BlackFraction",b}make a fraction b of all pixels be 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"Kittler-Illingworth minimum error thresholding method
Zero out elements that are very close to 0:
Perform a clustering threshold on an image:
Use a threshold function:
Keep largest data values:
Zero out elements that are very close to 0:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
 
Perform a clustering threshold on an image:
In[1]:=
Click for copyable input
Out[1]=
Use a threshold function:
In[2]:=
Click for copyable input
Out[2]=
 
Keep largest data values:
In[1]:=
Click for copyable input
Out[1]=
thresholding is similar to Chop:
Data values with absolute value below threshold are set to 0:
thresholding performs a shrinking operation:
Data values below a certain threshold are set to 0; those above are "shrunk" by :
thresholding is a compromise between and thresholding:
thresholding has uniformly smaller variance than thresholding:
In the limit , threshold performs thresholding:
In the limit , threshold performs thresholding:
thresholding:
This is similar to thresholding with the advantage of having a single parameter :
thresholding:
In the limit , goes to thresholding:
New in 8.0
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF