|
SOLUTIONS
|
BUILT-IN MATHEMATICA SYMBOL
Threshold[data]
thresholds data by replacing values close to zero by zero.
Threshold[data, tspec]
thresholds data using threshold specification tspec.
Threshold[image, ...]
thresholds an image.
Threshold[sound, ...]
thresholds a sound object.
DetailsDetails
- Threshold works with 3D as well as 2D images, and also with data arrays of any rank.
- Threshold[data] is equivalent to Threshold[data, {"Hard", 10-10}].
- The threshold specification tspec can be of the form
. - Possible tfun names and options include:
-
{"Hard",
}![0 TemplateBox[{x}, Abs]<=delta; x TemplateBox[{x}, Abs]>delta 0 TemplateBox[{x}, Abs]<=delta; x TemplateBox[{x}, Abs]>delta](Files/Threshold.en/2.png)
{"Soft",
}![ 0 TemplateBox[{x}, Abs]<=delta; sgn(x) (TemplateBox[{x}, Abs]-delta) TemplateBox[{x}, Abs]>delta; 0 TemplateBox[{x}, Abs]<=delta; sgn(x) (TemplateBox[{x}, Abs]-delta) TemplateBox[{x}, Abs]>delta;](Files/Threshold.en/3.png)
{"Firm",
,r,p}![ 0 TemplateBox[{x}, Abs]<=delta-delta p r; (sgn(x) (delta+delta r-delta p r) (TemplateBox[{x}, Abs]-delta+delta p r))/(delta r) delta-delta p r<TemplateBox[{x}, Abs]<=delta+delta (-p) r+delta r; x TemplateBox[{x}, Abs]>delta+delta (-p) r+delta r; 0 TemplateBox[{x}, Abs]<=delta-delta p r; (sgn(x) (delta+delta r-delta p r) (TemplateBox[{x}, Abs]-delta+delta p r))/(delta r) delta-delta p r<TemplateBox[{x}, Abs]<=delta+delta (-p) r+delta r; x TemplateBox[{x}, Abs]>delta+delta (-p) r+delta r;](Files/Threshold.en/4.png)
{"PiecewiseGarrote",
}![0 TemplateBox[{x}, Abs]<=delta; x-(delta^2)/x TemplateBox[{x}, Abs]>delta 0 TemplateBox[{x}, Abs]<=delta; x-(delta^2)/x TemplateBox[{x}, Abs]>delta](Files/Threshold.en/5.png)
{"SmoothGarrote",
,n}
{"Hyperbola",
}![ 0 TemplateBox[{x}, Abs]<=delta; sgn(x) sqrt(x^2-delta^2) TemplateBox[{x}, Abs]>delta; 0 TemplateBox[{x}, Abs]<=delta; sgn(x) sqrt(x^2-delta^2) TemplateBox[{x}, Abs]>delta;](Files/Threshold.en/8.png)
{"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
New in 8.0 | Last modified in 9
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »




