PANDORE Version 6 | GREYC-IMAGE |
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.
Returns the number of selected regions.
Selects regions with the highest compactness factor:
pcompactnessselection 3 0 rin.pan rout.pan
Sélection de régions sur leur valeur de compacité.
Author: Régis Clouard