PANDORE Version 6 |
GREYC-IMAGE |
pconvexityselection
Selects regions from convexity degree.
Synopsis
pconvexityselection relation threshold [-m mask] [rg_in|-] [rg_out|-]
Description
pconvexityselection selects regions from their convexity degree.
The parameter relation specifies the order relation to
the threshold value that is used to select or not a region.
Convexity is the relative amount that a region differs
from a convex region. It is calculated as follows:
convexity = region area / convex hull area.
The maximum value is 1.0 for convex region (eg. circle, square).
Parameters
- relation is an integer from [-3,3] which specifies
the order relation to the threshold value:
- relation = 3: regions with the maximum value.
- relation = 2: regions >= threshold.
- relation = 1: regions > threshold.
- relation = 0: regions = threshold.
- relation = -1: regions < threshold.
- relation = -2: regions <= threshold.
- relation = -3: regions with the minimum value.
- threshold is an real value from [0..1]
where 1 is for convex shape.
Inputs
Outputs
Result
Returns the number of selected regions.
Examples
Selects regions with convexity degree ≥ 0.5:
pconvexityselection 2 0.5 rin.pan rout.pan
See also
Region
C++ prototype
Errc PConvexitySelection( const Reg2d &rg_in, Reg2d &rg_out, int relation, Ushort threshold );
Version française
Sélection de régions sur leur valeur de convexité.
Author: Régis Clouard