PANDORE Version 6 |
GREYC-IMAGE |
psphericityselection
Selects regions from sphericity degree.
Synopsis
psphericityselection relation threshold [-m mask] [rg_in|-] [rg_out|-]
Description
psphericityselection selects regions from their sphericity degree.
The parameter relation specifies the order relation to
the threshold value that is used to select or not a region.
Sphericity measures the degree to which an
object approaches the shape of a sphere.
It is calculated using:
sphericity = rayon_inscribing / rayon_circumscribing.
The maximum value is 1.0 for a circle.
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 real value from [0..1]
which specifies a sphericity degree.
Inputs
- rg_in: a 2D or 3D region map.
Outputs
- rg_out: a 2D or 3D region map.
Result
Returns the number of selected regions.
Examples
Selects regions with the highest sphericity degree:
psphericityselection 3 0 a.pan b.pan
See also
Region
C++ prototype
Errc PSphericitySelection( const Reg2d &rg_in, Reg2d &rg_out, int relation, float threshold );
Version française
Sélection de régions sur leur valeur de sphéricité.
Author: Régis Clouard