PANDORE Version 6 |
GREYC-IMAGE |
pblindedgeclosing
Performs edge closing using edge tracking.
Synopsis
pblindedgeclosing angle length [-m mask] [im_in|-] [im_out|-]
Description
pblindedgeclosing tries to close open contours
of the input image im_in by tracking contours.
From the end points, the tracking is done
using to the directions specified by the parameter angle.
If the tracking is longer than length, the tracking is stopped.
Warning: This operator need end points with only 1 neigbor.
Thius, it might be necessary
to use the operator ppostthinning
to ensure 1 pixel thickness.
Parameters
- angle specifies the angle of the tracking. Is is
an integer from [0..2]:
- If angle=0 then the tracking is done only in the same
direction as the end point (0 degree of freedom).
- angle=1 corresponds to 0, 45 and -45 degrees.
- angle=2 corresponds to 0, 45, 90, -45, -90 degrees.
- length specifies the maximum distance to the tracking.
Inputs
- im_in: a 2D grayscale unsigned char image (Img2duc) which contains the contours.
- im_grad: a 2D grayscale image which contains the gradient magnitude values.
Outputs
- im_out: a 2D grayscale image.
Result
Returns the number of contours or FAILURE.
Examples
Closed contours yielded by a simple
edge detection of tangram.pan:
psobel tangram.pan b.pan
pbinarization 27 1e30 b.pan c.pan
pskeletonization 8 c.pan d.pan
ppostthinning d.pan e.pan
pblindedgeclosing 1 10 e.pan out.pan
pstatus
See also
Contour
C++ prototype
Errc PBlindEdgeClosing( const Img2duc &im_in, Img2duc &im_out, int angle, int length );
Version française
Fermeture de contours par poursuite de contours.
Author: Régis Clouard