PANDORE Version 6 GREYC-IMAGE

peulernumberselection



Selects regions from Euler number.



Synopsis

peulernumberselection relation threshold [-m mask] [rg_in|-] [rg_out|-]

Description

peulernumberselection selects regions from their Euler number. The parameter relation specifies the order relation to the threshold value that is used to select or not a region.

The Euler number E for a region is defined as 1 - the amount of holes H in the region. Conversely, the amount of holes H can be determined from the Euler number: H = 1 - E.

The algorithm used to calculated the Euler number uses the local operation:
Let X(R) the number of the following 2x2 patterns (r region label for region R, et 0 other labels):

0 0
0 r

Let V(R) the number of the following 2x2 pattern

0 r
r r

then Euler(R) = X(R) - V(R)

Parameters

Inputs

Outputs

Result

Returns the number of selected regions.

Examples

Selects regions with at least 2 holes (E=1-2=-1):

   peulerselection 2 -1 rin.pan rout.pan

See also

Region

C++ prototype

Errc PEulerNUmberSelection( const Reg2d &rg_in, Reg2d &rg_out, int relation, long threshold );

Version française

Sélection de régions sur leur valeur de nombre d'Euler.


Author: Régis Clouard