PANDORE Version 6 GREYC-IMAGE

popencontourselection



Selects open contour from length.



Synopsis

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

Description

popencontourselection selects open contours from their length. An open contour is a chain of connected non null pixels with 1 pixel thickness that begins and ends with an end point (a point with only one neighbor) and which has no junction. A closed contour and a barb are not considered as open contour.

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

Returns the number of selected open contours.

Examples

Selects open 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
   popencontourselection 1 5 e.pan out.pan
   pstatus

See also

Contour

C++ prototype

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

Version française

Selection des chaînes de contours ouvertes sur leur longueur.


Author: Régis Clouard