lvclose(3)

LIBRARY ROUTINE
lvclose - Close boundaries in images

LIBRARY CALL
#include "vinclude.h"
int lvclose(edge,gradient,nc,nr,length,thresh)
unsigned char  *edge;
unsigned char  *gradient;
int            length,
               nc ,
               nr,
               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 - (int) number of columns of both images
    nr - (int) number of rows of both images
    length - (int) minimum gap in pixel to close two edges.
    thresh - (int) Threshold used to close the edges from the gradient data

    columns as img1 and img2.

OUTPUT

    edge - holds the resulting image with closed boundaries

MODIFICATIONS
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

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 others required parameters are :

nc  Number of columns

nr  Number of rows

length
    Minimum gap size that will be close

thresh
    Threshold use by the closing routine on the gradient image

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

SEE ALSO
vclose(1), intro(3), vipl(3), verror(3), vutils(3)

RESTRICTIONS
lvclose will only work with VFF_TYP_1_BYTE images.

AUTHOR
Pascal ADAM

COPYRIGHT
Copyright 1992, University of New Mexico. All rights reserved.