PANDORE Version 6 |
GREYC-IMAGE |
pdensityselection
Selects regions from density degree.
Synopsis
pdensityselection relation threshold [-m mask] [rg_in|-] [im_in|-] [rg_out|-]
Description
pdensityselection selects regions from their density factor.
The parameter relation specifies the order relation to
the threshold value that is used to select or not a region.
Density measures the ratio nbetween the number of pixels in the region
given in im_in and the area surface of the region in rg_in.
It is calculated using:
density = number of pixel / area.
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 density degree.
Inputs
- rg_in: a 2D region map.
- im_in: a 2D image of bytes.
Outputs
Result
Returns the number of selected regions.
Examples
Selects regions with the highest density factor:
pdensityselection 3 0 a.pan tangram.pan b.pan
See also
Region
C++ prototype
Errc PDensitySelection( const Reg2d &rg_in, const Img2duc &ims, 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