thresRidCal
[ XITE Reference Manual | XITE home ]
Name
thresRidCal - threshold by the Ridler and Calvard method
Syntax
#include <xite/threshold.h>
int thresRidCal( histogram h );
Description
thresRidCal calculates the threshold value by using
the method of Ridler and Calvard, 1972. Initially,
the threshold value is set to the average brightness.
Then, iteratively, the threshold is set to the average
of the mean of the pixels below the threshold, and the
mean of the pixels above the threshold. When the
threshold value is constant, iteration terminates.
The actual thresholding is not performed, see the
routine "threshold".
Restrictions
Return value
threshold value. Pixel values up to, and including,
the returned threshold value, is below the threshold.
If any kind of error, -1 is returned.
Author
Tor L|nnestad, BLAB, ifi, UiO
Id
$Id: thresRidCal.c,v 1.18 1996/11/08 14:06:10 svein Exp $