bin_tfj
[ XITE Reference Manual | XITE home ]
Name
bin_tfj - binarize a gray-scale band using
Taxt, Flynn and Jain`s method
Syntax
#include <xite/binarize.h>
int bin_tfj( IBAND inband, IBAND outband,
int region_size, int step_size,
int training_size );
Description
The input band inband is binarized using the method of
Taxt, Flynn and Jain. The result is returned in outband.
Taxt, Flynn and Jain`s method divides the image into
non-overlapping windows of size (small_window_size x
small_window_size). For each window, a larger concentric
window of size (region_size x region_size) pixels. The
histogram of each of the larger windows is approximated by a
mixture of two Gaussian distributions. The parameters of the
mixture are estimated using an expectation-maximization (EM)
algorithm. In each small window, the pixels are classified
using the quadratic Bayes classifier.
A training set of training_size pixels are picked on random,
but edge pixels are avoided in the training set. The EM
algorithm requires global start values for the estimated class
means mu1 and mu2, and estimated standard deviations sigma1
and sigma2. These are obtained by k-means clustering of the
whole input band. The EM algorithm also needs an initial
estimate of the mixing weight pi, and pi = 0.5 is used.
Restrictions
inband and outband must have pixel type unsigned byte.
Return value
0 : ok
1 : Bad input pixel type
2 : Bad output pixel type
See also
binarize(1)
References
-
T. Taxt, P.J. Flynn & A.K. Jain
- "Segmentation of document images",
IEEE Transactions on Pattern Analysis and Machine
Intelligence,
vol T-PAMI 11, no 12, pp 1322-1329, 1989.
Files
src/binarize/bin_tfj.c
Author
Řivind Due Trier
Id
$Id: bin_tfj.c,v 1.15 1997/01/14 15:46:57 svein Exp $