PANDORE Version 6 |
GREYC-IMAGE |
pvarianceselection
Selects regions from variance factor.
Synopsis
pvarianceselection relation threshold [-m mask] [rg_in|-] [im_in|-] [rg_out|-]
Description
pvarianceselection selects regions from their variance factor.
The parameter relation specifies the order relation to
the threshold value that is used to select or not a region.
The region variance is calculated as follows:
var = ((n*sigma2)-(sigma*sigma)) / (n*n)
where sigma is the sum of gray levels of the region,
where sigma2 is the sum of the square of the gray levels of the region,
where n is the number of pixels of the region.
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 positive value.
Inputs
- rg_in: a region map.
- im_in: a grayscale image.
Outputs
Result
Returns the number of selected regions.
Examples
Selects regions with a variance ≤ 20:
pvarianceselection -2 20 rin.pan rout.pan
See also
Region
C++ prototype
Errc PVarianceSelection( const Reg2d &rg_in, Img2duc &im_in, Reg2d &rg_out, int relation, float threshold );
Version française
Sélection de régions sur leur valeur de variance.
Author: Régis Clouard