#cdf-show-file.cdf-text { top:105px; } .ObsBanner {color:black; width:430px; padding-left:7px; padding-right:7px; padding-top:6px; padding-bottom:6px; position:absolute; left:180px; top:125px; font-size:10px; font-weight:normal; font-family:Verdana, Arial, Helvetica, sans-serif; font-stretch:narrow; background:#fffdc8; border:solid 2px #ffbb33; line-height:16px; z-index:3;} .ObsBanner a:link {font-weight:bold; color:#cc6600;} .ObsBanner a:hover {font-weight:bold; color:#cc6600;} .ObsBanner a:visited {font-weight:bold; color:#cc6600;} THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT. SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
 BUILT-IN MATHEMATICA SYMBOL See Also »| More About »

# Threshold

 Threshold[data] thresholds data by replacing values close to zero by zero. Thresholdthresholds data using threshold specification tspec. Thresholdthresholds an image. Thresholdthresholds 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",} {"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:
 Out[1]=
 Out[2]=

Perform a clustering threshold on an image:
 Out[1]=
Use a threshold function:
 Out[2]=

Keep largest data values:
 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
 Site Index Choose Language
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF