PANDORE Version 6 GREYC-IMAGE

pedgeclosing



Performs edge closing from gradient.



Synopsis

pedgeclosing angle length [-m mask] [im_in|-] [im_grad|-] [im_out|-]

Description

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.

Parameters

Inputs

Outputs

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 50 1e30 b.pan c.pan
   pskeletonization c.pan d.pan 
   ppostthinning d.pan e.pan
   pedgeclosing 1 10 e.pan out.pan
   pstatus

See also

Contour

C++ prototype

Errc PBlindEdgeClosing( const Img2duc &im_in, const Img2duc &ima, Img2duc &im_out, int angle, int length );

Version française

Fermeture de contours.


Author: Régis Clouard