RETRO (vipl) functions
LIBRARY ROUTINE
lvclose - Close boundaries on an image
LIBRARY CALL
int lvclose(
unsigned char *edge,
unsigned char *gradient,
int nc,
int nr,
int length,
int thresh)
INPUT
- edge - pointer on the data of a xvimage VFF_TYP_1_BYTE
"Boundaries" image
- gradient - pointer on the data of a xvimage VFF_TYP_1_BYTE
"Gradient" image
- nc - number of columns of both images
- nr - number of rows of both images
- length - minimum gap in pixel to close two edges.
- thresh - Threshold used to close the edges from the gradient
data
OUTPUT
- edge - holds the resulting image with closed boundaries
RETURN VALUE
TRUE (1) on success, FALSE (0) on failure
DESCRIPTION
lvclose uses a boundary image and a gradient image as input.
Then it tries to close the boundaries by following the maximum
gradient between two end points of two contours. Both have to
be pointers on xvimage data of VFF_TYP_1_BYTE data storage
type.
The new closing part of a boundary is kept if its length is at
least "Minimum_Gap_Size" pixels. This parameter is used to
prevent the result from being covered by small contours (edges
of noisy areas...).
The minimum gradient value "Gradient_Threshold" has to be set
up to indicate to the the closing process up to what value it
can follow a maximum gradient curve to close a boundary.
This Algorithm has been writen by:
Professor SERGE CASTAN, Prof CHEN and Dr ZHAO, IRIT, CNRS,
URA 1399, 118, route de Narbonne 31062 Toulouse FRANCE
ADDITIONAL INFORMATION
none
EXAMPLES
none
SIDE EFFECTS
none
RESTRICTIONS
lvclose will only work with VFF_TYP_1_BYTE images.
MODIFICATION
Fixed indexing bug in function max_grdt() so that no negative
indexes, same problem rechercher_candidats().
John Rasure Fri Feb 28 19:46:13 MST 1992
FILES
$RETRO/objects/library/vipl/src/lvclose.c
SEE ALSO
vipl(3)
COPYRIGHT
Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.