PANDORE Version 6 GREYC-IMAGE

pcompactnessselection



Selects regions from compactness factor.



Synopsis

pcompactnessselection relation threshold [-m mask] [rg_in|-] [rg_out|-]

Description

pcompactnessselection selects regions from their compactness degree. The parameter relation specifies the order relation to the threshold value that is used to select or not a region.

Compactness represents the degree to which the shape region is compact. It is defined as the ratio of the area of a region to the area of a circle with the same perimeter. It is calculated as follows:

compactness = (4*PI*area) / (perimeter*perimeter)

For a circle, the compactness is 1.0, for a square, it is PI/4 and for an infinitely long and narrow shape, it is zero.

Parameters

Inputs

Outputs

Result

Returns the number of selected regions.

Examples

Selects regions with the highest compactness factor:

   pcompactnessselection 3 0 rin.pan rout.pan

See also

Region

C++ prototype

Errc PCompactnessSelection( const Reg2d &rg_in,Reg2d &rg_out, int relation, float threshold );

Version française

Sélection de régions sur leur valeur de compacité.


Author: Régis Clouard