bin_wr1

[ XITE Reference Manual | XITE home ]

Name

bin_wr1 - binarize a gray-scale band using White and Rohrers first method.

Syntax

 #include <xite/binarize.h>

 int bin_wr1( IBAND inband, IBAND outband,
    int x_lookahead, int y_lookahead,
    int bias_mode, int bias_factor,
    int f_factor, int g_factor,
    int intermediate_images );

Description

The input band inband is binarized using White and Rohrer`s first method. The x_lookahead and y_lookahead parameters gives the number of lookahead pixels used in the biased running average that is used in deciding the threshold at each pixel location. Good values for x_lookahead and y_lookahead are 8 and 1, respectively.

Restrictions

inband and outband must have pixel type unsigned byte.

See also

binarize(1)

References

James M. White & Gene D. Rohrer
"Image Thresholding for Optical Character Recognition and Other Applications Requiring Character Image Extraction", IBM Journal of Research and Development, vol 27, no 4, pp 400-411, July 1983.

Return value

 0 : ok
 1 : Bad input pixel type
 2 : Bad output pixel type

Files

src/binarize/bin_wr1.c

Author

Řivind Due Trier

Id

$Id: bin_wr1.c,v 1.11 1997/01/14 15:46:58 svein Exp $