PANDORE Version 6 GREYC-IMAGE

pclosedcontourselection



Selects closed contour from length.



Synopsis

pclosedcontourselection relation length [-m mask] [im_in|-] [im_out|-]

Description

pclosedcontourselection selects closed contours from their length. A closed contour is a chain of connected non null pixels with 1 pixel thickness that forms a loop.

The parameter relation specifies the order relation to the length value that is used to select or not a contour.

Warning: if the contour is not 1 pixel thickness, the operator may have unpredictable behavior. It might be necessary to use the operator ppostthinning to guaranty 1 pixel thickness.

Parameters

Inputs

Outputs

Result

The number of selected contours.

Examples

Selects the longest closed contours from contours yielded by a simple edge detection of tangram.pan:

   psobel tangram.pan b.pan
   pbinarization 45 1e30 b.pan c.pan
   pskeletonization c.pan d.pan 
   ppostthinning d.pan e.pan
   pclosedcontourselection 3 5 e.pan out.pan
   pstatus

See also

Contour

C++ prototype

Errc PClosedContourSelection( const Img2duc &im_in, Img2duc &im_out, int relation, int length );

Version française

Sélection des chaînes de contours fermées sur leur longueur.


Author: Régis Clouard