PANDORE Version 6 | GREYC-IMAGE |
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)
Returns the number of selected regions.
Selects regions with at least 2 holes (E=1-2=-1):
peulerselection 2 -1 rin.pan rout.pan
Sélection de régions sur leur valeur de nombre d'Euler.
Author: Régis Clouard