thresMlCentroid
[ XITE Reference Manual | XITE home ]
Contents
Name
thresMlCentroid - multi level thresholding by local centroid
method
thresMlCentroid [-m <m>] [-mean] [-median] [-eq] [-s <s>]
<inimage> [<output>]
For every band, the histogram is calculated. Then the
histogram is modified by moving histogram mass to the
local centroid of a histogram window of size (2*m)+1.
The mapping from old to new histogram is analyzed,
corresponding thresholds are calculated, and if an
output image is specified, the input image is thresholded.
If no output image is specified, the obtained thresholds
are written to standard output.
-
-m m
- Use histogram window of size (2*m)+1.
-
-mean
- Move histogram mass to local mean (default).
-
-median
- Move histogram mass to local median.
-
-eq
- If outimage is given, distriibute output pixel values.
-
-s s
- If outimage is given, scale pixel values with s.
Use either -mean or -median (or none), not both.
If no m argument is given, a loop over the m-values
5, 10, 15, 20, 25, 30, 35, 40, 45 and 50 is performed,
exiting if two consecutive runs give the same thresholding
result.
thresMl(1), thresMlAppScale(3), thresMlAppMean(3),
thresMlAppMedian(3), thresMlApply(3), histoCentroid(3),
thresMlCentroid(3), mkComCur(3), thresMlComCur(3),
thresMlComCur(1), thresMlReddi(3), thresMlReddi(1),
thresMlWaHa(3), thresMlWaHa(1)
Warning: Bad pixel type in band ..
Warning: Clustering never stable
Error : Bad m value: ..
Error : Bad number of arguments
inimage must have bands with pixel type unsigned byte.
Bands are handled one at a time, not multi-dimensionally.
-
[1] R. Wilson. H Knutsson and G.H. Granlund
- "The operational definition of the position of line
and edge" Proc. ICPR-82, Munich 1982.
-
[2] R. Wilson
- "A Class of local centroid algorithms for
classification and quantization in spaces of arbitrary
dimension"Linkoping Univ, Internal Report LiTH-ISY-I-0610
(1983).
Tor Lønnestad, BLAB, Ifi, UiO
thresMlCentroid -median mona.img
thresMlCentroid -mean -eq mona.img res.img
thresMlCentroid -s 2 -m 25 mona.img res.img
thresMlCentroid -verbose mona.img
$Id: thresMlCentroid.c,v 1.25 1997/01/14 13:06:21 svein Exp $