MAN page from RedHat Other XITE-3.3-3.i386.rpm
BIN_MH
Section: C Library Functions (3)
Updated: 16 Mar 1998
Index
NAME
bin_mh - binarize a gray-scale band usingMardia and Hainsworth`s method
SYNTAX
#include <
xite/binarize.h>
int bin_mh( IBAND inband, IBAND outband,
int use_sem_var, double convergence_limit );
DESCRIPTION
The input band
inbandis binarized using the method ofMardia and Hainsworth. The result is returned in
outband.Mardia and Hainsworth`s method first makes an initialbinarization. Then several steps are iterated untilconvergence is reached. First, the estimated mean values mu1and mu2, and the number of pixels n_i in both foreground andbackground of the current binarization are calculated. Then athreshold Tbased on these values is calculated. Then, foreach pixel, a weighted mean, G,of the pixel and its eightneighbors is calculated. If G<=T,the pixel is classifiedas ``black', otherwise ``white'. The weights on the neighborpixels, used to calculate G,may be equal, or they may becalculated based on a semivariogram approximation. Ifuse_sem_var>= 1, the semivariogram approach is used. Thelast step of each iteration is to smooth the new binary imageusing a (3 x 3) median filter. convergence_limitis used totest if convergence has been reached. The number of differentpixels of two successive binarizations is counted, andcompared to convergence_limit.
RESTRICTIONS
inbandand
outbandmust have pixel type unsigned byte.
SEE ALSO
binarize(1)
REFERENCES
K.V. Mardia & T.J. Hainsworth"A spatial thresholding method for image segmentation",IEEE Transactions on Pattern Analysis and MachineIntelligence, vol T-PAMI 10, no 6, pp 919-927, 1988.
RETURN VALUE
0 : ok
1 : Bad input pixel type
2 : Bad output pixel type
AUTHOR
Řivind Due Trier
ID
$Id: bin_mh.c,v 1.16 1997/01/14 15:46:53 svein Exp $
Index
- NAME
- SYNTAX
- DESCRIPTION
- RESTRICTIONS
- SEE ALSO
- REFERENCES
- RETURN VALUE
- AUTHOR
- ID
This document was created byman2html,using the manual pages.