bin_yb
[ XITE Reference Manual | XITE home ]
Name
bin_yb - binarize a gray-scale band using
Yanowitz and Bruckstein`s method
Syntax
#include <xite/binarize.h>
int bin_yb( IBAND inband, IBAND outband,
int threshold, double beta,
int max_iterations );
Description
The input band inband is binarized using the method of
Yanowitz and Bruckstein. The result is returned in outband.
A potential surface passing through the image at local maxima
of the gradient image is used as a thresholding surface. The
gradient magnitude image is computed, using for example
Sobel`s edge operators. This image is thresholded using
threshold. However, if threshold == 0, Otsu`s method is
used. The thresholded image is thinned to one-pixel wide
lines, to identify edge pixels. The original image is smoothed
by a (3x3) mean filter to remove stochastic noise. A potential
surface is constructedby an iterative interpolation scheme.
The interpolation surface is made to pass through the edge
pixels. An interpolation residual R(x,y) is calculated for
each non-edge pixel, and the new pixel value P(x,y) at
iteration n is calculated as
P[n](x,y) = P[n-1](x,y) + (beta * R[n](x,y)) / 4
Yanowitz and Bruckstein recommended to use 1.0 < beta < 2.0
for fast convergence (over-relaxation). However, we found that
by using beta > 1.0, P(x,y) started to diverge after 5-10
iterations. So beta <= 1.0 must be used, and beat = 1.0
works well. A maximum number of max_iterations is perfromed.
Next, the image is binarized using the thresholding surface.
In the original algorithm, so-called "ghost" objects are
removed by a validation step. This validation step is in a
separate library function named rem_ghost.
Restrictions
inband and outband must have pixel type unsigned band.
See also
binarize(1)
References
-
S.D. Yanowitz & A.M. Bruckstein
- "A New Method for Image Segmentation",
Comput. Vision Graphics Image Proc., vol 46, no 1, pp 82-95,
April 1989.
Return value
0 : ok
1 : Bad input pixel type
2 : Bad output pixel type
Files
src/binarize/bin_yb.c
Author
Řivind Due Trier
Id
$Id: bin_yb.c,v 1.16 1997/01/14 15:46:59 svein Exp $