thresMinErrEqVar

[ XITE Reference Manual | XITE home ]

Name

thresMinErrEqVar - minimum error thresholding with equal variances.

Syntax

 #include <xite/threshold.h>

 int thresMinErrEqVar( histogram h, int tinit );

Description

thresMinErrEqVar calculates the threshold value by using the minimum error thresholding technique with equal variances as in Gonzalez and Wintz. Initially, the threshold value t is set according to tinit.

 0 <= tinit <= 255, then t = tinit
 tinit = -1, then t = the average of all the pixels
 tinit = -2, then t = the result from thresRidCal(h)

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 , plus a compensation factor depending on the variance of the distribution. This variance is the average of the variance below and above the threshold. When the threshold value remains constant, iteration terminates.

The actual thresholding is not performed, see the routine "threshold".

Reference

Gonzales, Rafael C & Wintz, Paul: "Digital Image Processing" Addison-Wesley, 1977.

Return value

The threshold value. Pixel values up to, and including, the return value, is below the threshold.

Author

Olav Borgli, Fritz Albregtsen, BLAB, ifi, UiO

Id

$Id: thresMinErr.c,v 1.25 1997/03/17 13:45:07 svein Exp $