PANDORE Version 6 GREYC-IMAGE

pcontourselection



Selects contour chain from length.



Synopsis

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

Description

pcontourselection selects open contours from their length. A contour chain is a sequence of connected non null pixels with 1 pixel thickness that begins and ends at an end point or a junction. A close contour, a barb and a line are considered as piecewise contour chains:

         /      \          /
 --------  or    ----------
         \      /          \

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 contours with length greater than 5 pixels 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
   pcontourselection 1 100 e.pan out.pan
   pstatus

See also

Contour

C++ prototype

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

Author: Régis Clouard