PANDORE Version 6 |
GREYC-IMAGE |
pperimeterselection
Selects regions from perimeter length.
Synopsis
pperimeterselection relation threshold [-m mask] [rg_in|-] [rg_out|-]
Description
pperimeterselection selects regions from their perimeter length.
The parameter relation specifies the order relation to
the threshold value that is used to select or not a region.
The region perimeter is the number of pixels on the region
boundary. The algorithm uses one quarter pixel
for concavity. For example, the perimeter is 7 pixels
for the following region (7=6+4*0.25) :
xx
xxxx
xx
For a region with 1 pixel, the perimeter is 1.
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 a positive integer defined in pixel unit.
Inputs
Outputs
Result
Returns the number of selected regions.
Examples
Selects regions that have a boundary > 50 pixels:
pperimeterselection 1 50 rin.pan rout.pan
See also
Region
C++ prototype
Errc PPerimeterSelection( const Reg2d &rg_in, Reg2d &rg_out, int relation, Ulong threshold );
Version française
Sélection de régions sur leur valeur de périmètre.
Author: Régis Clouard