PANDORE Version 6 | GREYC-IMAGE |
pedgeclosing tries to close open contours of the input image im_in by tracking contours along the gradient magnitude values given in the input image im_grad.
From the end points, the tracking is done in the direction given by the maximum gradient value limited to the directions specified by the parameter angle. If the maximum gradient value is null then the tracking is stopped. 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.
Returns the number of contours or FAILURE.
Closed contours yielded by a simple edge detection of tangram.pan:
psobel tangram.pan b.pan pbinarization 50 1e30 b.pan c.pan pskeletonization c.pan d.pan ppostthinning d.pan e.pan pedgeclosing 1 10 e.pan out.pan pstatus
Fermeture de contours.
Author: Régis Clouard