• Aucun résultat trouvé

Some properties of topological greyscale watersheds

N/A
N/A
Protected

Academic year: 2022

Partager "Some properties of topological greyscale watersheds"

Copied!
12
0
0

Texte intégral

(1)

HAL Id: hal-00621991

https://hal-upec-upem.archives-ouvertes.fr/hal-00621991

Submitted on 11 Sep 2011

HAL

is a multi-disciplinary open access archive for the deposit and dissemination of sci- entific research documents, whether they are pub- lished or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers.

L’archive ouverte pluridisciplinaire

HAL, est

destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d’enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

Some properties of topological greyscale watersheds

Gilles Bertrand

To cite this version:

Gilles Bertrand. Some properties of topological greyscale watersheds. procs. SPIE Vision Geometry

XII, 2004, France. pp.182-191. �hal-00621991�

(2)

Some properties of topological greyscale watersheds

Bertrand G.

Laboratoire A2SI, Groupe ESIEE, Cit´e Descartes BP 99, 93162 Noisy-le-Grand, France

ABSTRACT

In this paper, we investigate topological watersheds.1 For that purpose we introduce a notion of “separation between two points” of an image. One of our main results is a necessary and sufficient condition for a mapGto be a watershed of a mapF, this condition is based on the notion of separation. A consequence of the theorem is that there exists a (greedy) polynomial time algorithm to decide whether a mapGis a watershed of a map F or not. We also show that, given an arbitrary total order on the minima of a map, it is possible to define a notion of “degree of separation of a minimum” relative to this order. This leads to another necessary and sufficient condition for a mapGto be a watershed of a mapF. At last we derive, from our framework, a new definition for the dynamics of a minimum.

Keywords: discrete topology, graph, watershed, dynamics, separation

1. INTRODUCTION

The watershed transform2–8of greyscale images is very popular as an important step of image segmentation.9–11 Nevertheless, most existing approaches have three drawbacks:

- No clear formal definition of watersheds is used. As a consequence, no properties of these watersheds may be established.

- The watershed algorithms produce a binary result, that is, they lose the greyscale information that is present in the original image. This information may be useful for further processing (e.g., connection of corrupted contours).

- Most popular watersheds algorithms, based on the flooding paradigm, produce watersheds which are not necessarily on the most significant contours of the original image.12

We investigate a topological approach1which allows to precisely define a greyscale watershed transform as an ultimate “W-thinning”, a W-thinning is a kind of thinning which preserves the “lower connected components”

of the original image (see also13). Here, a greyscale image is considered as a map from the set of vertices of an arbitrary graph to the set of integers. This approach is very general (e.g. it applies to images of arbitrary dimensions) and it does keep track of the useful greyscale information. An algorithm was proposed for extracting such a watershed from a map. Nevertheless, at this time, no general properties of topological watersheds were proved.

In this paper we show that a topological watershed has several fundamental properties. We introduce a notion of “separation” between two pointsxand y: xand y are separated if the lowest altitude for joining x andy is strictly greater than the altitudes of bothxandy. We establish four theorems which are based on this notion of separation:

1) Roughly speaking, we define a mapGto be a separation of a mapF ifGis lower than F and if, whenever xandy are separated for F (by an altitudek), thenxandy are separated forG(by an altitudek). Our first theorem asserts that it is sufficient to consider the separation between vertices belonging to the minima of F andGto know whetherGis a separation ofF or not.

2) Our second theorem is a necessary and sufficient condition for a mapGto be a W-thinning of a mapF: a mapGis a W-thinning of a mapF if and only ifGis a separation of F and the minima ofGare “extensions”

of minima ofF. A consequence of this theorem is that there exists a (greedy) polynomial time algorithm to decide whether a mapGis a watershed of a mapF or not. This is an unexpected result because, in the classical

Further author information:

E-mail: g.bertrand@esiee.fr, Telephone: (33) 01 45 92 66 37

(3)

framework of homotopy (and simple points), such an algorithm cannot exist.14

3) Our third theorem gives another characterization of W-thinnings which are proved to be equivalent to the maps which “preserve the lower connected components”.

4) We show that, given an arbitrary total order on the minima of a map, it is possible to define a notion of

“degree of separation of a minimum” relative to this order. Loosely speaking, we establish that a mapGis a separation of a mapF if and only if Gpreserves the degree of separation of each minimum of F. Combined with our second theorem, this leads to another necessary and sufficient condition for a mapGto be a watershed of a mapF. At last, we propose a new definition of the dynamics.15, 16

An extended version of this paper will show the link between topological watersheds and minimum spanning trees.17 Forthcoming related papers will include properties of the dynamics,18 a new “emergence” paradigm for extracting topological watersheds,19 and quasi-linear time algorithms for topological watersheds.20, 21

2. BASIC DEFINITIONS

We define afinite graphas a pair (E,Γ) whereE is a finite set of elements called verticesor points and Γ is a map from E to P(E), P(E) being the family composed of all subsets of E. If y ∈ Γ(x), we say that y is adjacent tox. IfX⊆E andy∈Γ(x) for somex∈X, we say thaty is adjacent toX.

The graph (E,Γ) issymmetric if, for allxandy inE, we havex∈Γ(y) whenever y∈Γ(x); (E,Γ) isreflexive if, for anyxinE, we havex∈Γ(x).

LetX⊆E, apath inX is a sequenceπ=x0, ..., xk such thatxi∈X,i= 0, ..., k, andxi∈Γ(xi1),i= 1, ..., k.

We also say thatπis apath from x0 toxk. We say that X isconnected if, for anyxandy in X, there exists a path fromxtoy in X. We say thatY ⊆E is aconnected component of X ⊆E, ifY ⊆X,Y is connected, andY is maximal for these two properties. If X⊆E, we writeX ={x∈E; x6∈X}.

In the sequel of this paper, (E,Γ) will denote a finite reflexive and symmetric graph. For simplicity, we will furthermore assume thatEis connected. All notions and properties may be easily extended for non-connected graphs.

LetX⊆E and letx∈X. We say that the pointxis:

-a border point (for X)ifxis adjacent to at least one point of X.

-an inner point (forX)ifxis not a border point forX.

-W-simple (for X)ifxis adjacent to exactly one connected component ofX.

-separating (for X)ifxis adjacent to more than one connected component ofX.

We denote byF(E) the family composed of all maps onE to Z.

LetF ∈ F(E) and letk∈Z. We setFk={x∈E; F(x)≥k},Fk is thecross-section ofF at level k.

Letx∈E and letk=F(x). We say that the pointxis:

-a border point (for F)ifxis a border point forFk; -an inner point (forF)ifxis an inner point forFk; -W-destructible (for F) ifxis W-simple forFk; -separating (for F) ifxis separating for Fk.

LetF ∈ F(E) and letp∈E. We denote by [F\p] the element ofF(E) such that [F\p](p) =F(p)−1 and [F\p](x) =F(x) for allx∈E\ {p}.

LetF andGbe two elements ofF(E). We say that Gis aW-thinningofF, if:

i)G=F; or if

ii) there exists a mapH which is a W-thinning ofF and there exists a W-destructible point pforH such that G= [H\p].

We say thatGis a watershed ofF ifGis a W-thinning ofF and if there is no W-destructible point forG.

(4)

3 3 3 5 5 5 10 10 10 10 15 20 20 3 3 3 5 5 5 10 10 10 10 15 20 20 3 3 3 5 5 30 30 30 10 15 15 20 20 3 3 3 5 30 20 20 20 30 15 15 20 20 40 40 40 40 40 20 20 20 40 40 40 40 40 10 10 10 10 40 20 20 20 40 10 10 10 10 5 5 5 5 10 40 20 40 10 10 5 5 5 1 1 3 5 10 15 20 15 10 5 1 0 0 1 1 3 5 10 15 20 15 10 5 1 0 0 1 1 3 5 10 15 20 15 10 5 1 0 0

3 3 3 3 3 3 3 3 3 3 3 3 3

3 3 3 3 3 3 3 3 3 3 3 3 3

3 3 3 3 3 30 30 30 3 3 3 3 3

3 3 3 3 30 1 20 0 30 3 3 3 3

30 30 30 30 1 1 20 0 0 30 30 30 30

1 1 1 1 1 1 20 0 0 0 0 0 0

1 1 1 1 1 1 20 0 0 0 0 0 0

1 1 1 1 1 1 20 0 0 0 0 0 0

1 1 1 1 1 1 20 0 0 0 0 0 0

1 1 1 1 1 1 20 0 0 0 0 0 0

(a) (b)

Figure 1.(a) original image, (b) a watershed of (a)

In Fig. 1 (a), a mapF onE is depicted, here E is a subset ofZ2 (a rectangle). We consider the map Γ induced by the well-known “4-adjacency relation”.22 A watershed ofF (relative to (E,Γ)) is shown Fig. 1 (b).

LetF and K be elements of F(E) such thatK ≤F. We say that Gis aW-thinning of F constrained by K ifG is a W-thinning ofF such thatK ≤G. We say that Gis a watershed of F constrained by K ifG is a W-thinning ofF constrained by K and if any W-thinning H of G, with H 6=G, is such that the property K≤H is not true.

Ifxandy are two points ofE, we denote by Π(x, y) the set composed of all paths fromxto y inE.

LetF ∈ F(E). If πis a path inE, we set F(π) =M ax{F(z); for all pointsz appearing inπ}.

Ifx andy are two vertices of (E,Γ), we set F(x, y) =M in{F(π);π∈ Π(x, y)}, F(x, y) is the pass value for F between x and y. If X and Y are two subsets of E, the pass value for F between X and Y is defined by F(X, Y) =M in{F(x, y); x∈X, y∈Y}.

LetF ∈ F(E) and letk∈Z. A connected componentC ofFk is said to be a(regional) minimum (forF) ifC∩Fk−1=∅. We denote byM(F) the set composed of all minima ofF.

LetF ∈ F(E). We say that X ⊆E is aflat zone for F if X is connected,F(x) = F(y) for all x, y in X, andX is maximal for these two properties. IfX is a flat zone, we denote byF(X) thealtitude of X,i.e., we haveF(X) =F(x) for anyx∈X.

Observe that a minimum is necessarily a flat zone. Furthermore a flat zoneX is a minimum for F if and only if any pointx∈X which is adjacent toX is such thatF(x)> F(X).

3. SEPARATION

We introduce the notion of separation which plays a key role in our framework.

LetF∈ F(E) and let xandy be two points inE.

We say thatxandy areseparated (forF)ifF(x, y)> M ax{F(x), F(y)}.

We say thatxandy arek-separated (forF)ifxandy are separated andk=F(x, y).

We say that x and y are linked (for F) if x and y are not separated, in other words x and y are linked if F(x, y) =M ax{F(x), F(y)}.

(5)

We say thatx dominates y (for F) ifF(x, y) = F(x), in other words,x dominates y if there is a path π in Π(x, y) such thatF(x)≥F(z), for allzin π.

We denote by Λ(F) the relation Λ(F) ={(x, y)∈E×E;xdominatesy}. We also set Λ(x, F) ={y∈E; (x, y)∈ Λ(F)}.

We observe that:

i) Two pointsxandy are linked forF if and only ify∈Λ(x, F) orx∈Λ(y, F).

ii) Ify ∈Λ(x, F) andx∈Λ(y, F), then we haveF(x) =F(y). The converse is, in general, not true.

iii) The relation Λ(F) is a preorder,i.e., Λ(F) is a reflexive and transitive relation.

iv) For anyx∈E, there is at least one minimumX forF such thatX⊆Λ(x, F).

v) A subsetX ofEis a minimum for F if and only if, for all pointsxin X, Λ(x, F) =X. vi) A pointxofE belongs to a minimum forF if and only if, for ally∈Λ(x, F),x∈Λ(y, F).

vii) IfX andY are two distinct minima forF, then, for allx∈X,y∈Y,xandy are separated.

viii) Letxand y be two points belonging to the same flat zone for F. Then, for each point z ofE, we have F(x, z) =F(y, z). The converse is, in general, not true.

Property 1: Let xand y be two points which are k-separated for F. Ifx dominates z, then z and y are k-separated.

Proof:

Letπ1 be a path fromxtoy such thatF(x, y) =k, thusk > M ax{F(x), F(y)}. Letπ2 be a path fromxto z such thatF(x, z) =F(x). We denote byπ21 the sequence obtained by reversingπ2.

The pathπ321·π1is a path fromzto y such thatF(π3) =k, thus, we must have F(z, y)≤k.

Supposeπ4is a path fromztoy. The pathπ52·π4is a path fromxtoysuch thatF(π5) =M ax[F(x), F(π4)].

We must haveF(π4)≥kotherwise we would haveF(x, y)< k, thus,F(z, y)≥k. Therefore we haveF(z, y) =k and, sinceF(z)≤F(x),F(z, y)> M ax{F(z), F(y)}.

Property 2: Let F ∈ F(E)and letk∈Z. Two pointsxandy belong to the same component ofFk if and only ifF(x, y)< k.

Proof:

We haveFk={x∈E; F(x)< k}. Thus two pointsxandy belong to the same component ofFk if and only if there is a pathπfromxtoy such thatF(π)< k.

Property 3: Let F ∈ F(E)and letk∈Z. Two points xandy belong to distinct components ofFk if and only ifF(x, y)≥k > M ax[F(x), F(y)].

Proof:

i) Ifxandy belong to distinct components of Fk, thenF(x, y)≥k(Prop. 2), furthermore, since xand y are inFk, we must haveF(x)< k andF(y)< k.

ii) IfF(x)< k and F(y)< k, then xand y belong to some components ofFk. Furthermore, if F(x, y) ≥k, these components must be distinct (Prop. 2).

The following property is a direct consequence of properties 2 and 3:

Property 4: Let F ∈ F(E). Two pointsxandy arek-separated forF, if and only if:

i)xandy belong to the same component ofFk+1; and ii)xandy belong to distinct components of Fk.

(6)

Property 5: Let F ∈ F(E)and let pbe a separating point, we setk=F(p). LetX andY be two distinct components ofFk adjacent top. Then anyxin X and anyy in Y arek-separated.

Proof: There exist two points x0 ∈ X and y0 ∈ Y which are adjacent to p, thus π =x0, p, y0 is a path.

Furthermore, there exists a pathπXinX fromxtox0and a pathπY inY fromy0toy. The pathπ0X·π·πY

is a path fromxtoy such thatF(π0)< k+ 1. Therefore,xandybelong to the same component ofFk+1. Since xandy belong to distinct components ofFk,xandy arek-separated (Prop. 4).

LetF andGbe two elements of F(E) such that G≤F. We say thatG is a separation of F if, for allx andyin E, ifxandy arek-separated forF, thenxandy arek-separated forG.

The following theorem asserts that it is sufficient to consider minima ofF for testing whetherGis a sepa- ration ofF or not.

Theorem 6 (restriction to minima): LetF andGbe two elements of F(E)such thatG≤F. The map Gis a separation ofF if and only if, for all distinct minimaX,Y in M(F),F(X, Y) =G(X, Y).

Proof:

i) SupposeGis a separation of F and letX,Y be distinct minima in M(F). LetF(X, Y) =k. For allx∈X, y∈Y,xandy arek-separated forF, hence they arek-separated forG.

Thus,G(X, Y) =M in{G(x, y); x∈X, y∈Y}=k=F(X, Y).

ii) SupposeG is not a separation of F, i.e., there exist two pointsx and y which arek-separated for F but not k-separated for G. If x and y are not k-separated for G, it means either G(x, y) 6= k, or G(x, y) = M ax{G(x), G(y)}. SinceG≤F, in both cases, we must haveG(x, y)< k. LetX andY be two minima for F such thatX⊆Λ(x, F) andY ⊆Λ(y, F), thusF({x}, X) =F(x)< kandF({y}, Y) =F(y)< k.

By Prop. 1, we haveF(X, Y) =k. SinceG({x}, X)≤F({x}, X)< kandG({y}, Y)≤F({y}, Y)< k, we have G(X, Y)≤M ax{G(X,{x}), G(x, y), G({y}, Y)}< k. Therefore,G(X, Y)6=F(X, Y).

4. MINIMA EXTENSIONS

If a mapGis a separation of a mapF, it may be seen thatGmay have more minima thanF. Since our purpose is to study W-thinnings and since W-thinnings cannot generate new minima, we introduce the following notion.

LetF andGbe two maps inF(E) such thatG≤F.

We say thatGis aminima extensionor am-extension ofF if there is a bijection:M(F)→ M(G) such that:

i) for allX ∈ M(F),X ⊆(X); and ii) for allX ∈ M(F),F(X) =G[(X)].

Property 7: Let G be a m-extension of F and let be the corresponding bijection. Then, for each X∈ M(G),−1(X) ={x∈X; F(x) =G(x)}.

Proof: LetX ∈ M(G). We first observe that, ifY is a minimum forF, and ifY∩X6=∅, thenY =1(X), otherwise(Y) andX would be distinct minima forGwith non empty intersection.

We have 1(X) ⊆ {x ∈ X; F(x) = G(x)}. Let x ∈ X, with F(x) = G(x). Suppose x 6∈ 1(X). Let Y be a minimum forF such thatY ∈Λ(x, F). It is not possible that Y =1(X), otherwise there would be a path of constant altitude betweenxand Y and we would have x∈ −1(X). Thus,Y 6=−1(X), and, by the preceding remark, we must have Y ∩X = ∅. Let π = x0, ..., xl be a path from x= x0 to xl ∈ Y and such that F(π) = F(x). Let i the smallest value such that xi 6∈X. Since X is a minimum for G, we must have

(7)

G(xi)> G(X). SinceF(xi)≥G(xi), we would haveF(xi)> F(x) which contradictsF(π) =F(x).

We observe that, ifGis a m-extension of F, andH is a m-extension of G, then H is a m-extension of F.

Furthermore, we have the two properties:

Property 8: Let GandH be m-extensions of F. IfG≤H, thenGis a m-extension ofH.

Proof: We denote byG andH the corresponding bijections relative toGandH, respectively.

The bijectionGH1:M(H)→ M(G) satisfies the condition ii) for m-extensions. Suppose the condition i) is not satisfied. It means there is a minimumX forH such thatX 6⊆GH1(X), we setY =GH1(X).

Since H1(X) ⊆ X and H1(X) ⊆Y, we have X ∩Y 6= ∅. Since X is connected, it means there is a point x∈ X∩Y which is adjacent to Y. We have H(x) = H(X) = G(Y). It is not possible that G(x) < G(Y), otherwiseY would not be a minimum forG. But sinceG≤H, we must haveG(x) =G(Y) andxwould belong toY.

Property 9: Let Gbe a m-extension of bothF andH. IfH ≤F, thenH is a m-extension ofF.

Proof: We denote byF andH the corresponding bijections relative toF andH, respectively.

The bijectionH1F :M(F)→ M(H) satisfies the condition ii) for m-extensions. LetX ∈ M(F). By Prop.

7, we have H1F(X) = {x ∈F(X); H(x) = G(x)}. We have X ⊆ F(X). Furthermore, for all x∈ X, F(x) =G(x). SinceG≤H≤F, we haveH(x) =G(x), for allx∈X. ThusX ⊆H1F(X): the mapH1F

satisfies the condition i) for m-extensions.

LetF andGbe two maps inF(E) such thatG≤F. We say thatGis am-cover ofF if any minimumX forGcontains at least one minimumY forF such thatG(X) =F(Y).

We say thatGis a strong separation ofF ifGis both a separation ofF and a m-cover of F.

Property 10: If Gis a strong separation ofF, thenGis a m-extension of F.

Proof: SupposeGis a strong separation of F.

i) LetX be a minimum forG. There exists a minimumY forF such thatY ⊆X andG(X) =F(Y). Suppose xand x0 are two elements of X such that x ∈ Y, x0 ∈ Y0, with Y0 ∈ M(F). Then we must have Y = Y0, otherwisexandx0 would be separated forF and linked forG. Thus, any minimumX forGcontains a unique minimumY forF, and furthermoreG(X) =F(Y).

ii) LetX be a minimum for F and letx∈X. Let Y be a minimum for Gsuch thatY ⊆Λ(x, G). ¿From i), there is a unique minimumX0 forF such that X0 ⊆Y. We must have X =X0, otherwisexand any element x0∈X0would be separated forF but not separated forG. Thus any minimum forFis contained in a minimum forG. Of course, this minimum is unique.

5. THE STRONG SEPARATION THEOREM

We are now in position to prove the equivalence between W-thinnings and strong separations. Beforehand, we have to establish the following property.

Property 11:

i) LetGandH be strong separations of F. IfG≤H, thenGis a strong separation ofH. ii) LetGbe a strong separation of bothF andH. IfH≤F, thenH is a strong separation ofF.

Proof:

i) The mapsGandH are m-extensions ofF (Prop. 10). By Prop. 8,Gis also a m-extension ofH. Thus, it is

(8)

sufficient to prove thatGis also a separation ofH.

LetX0 andY0 be two distinct minima forH, letX,Y be the corresponding minima forF, and letX00,Y00 be the corresponding minima forG. Thus, X ⊆X0 ⊆X00 and Y ⊆ Y0 ⊆Y00. We have F(X, Y) =H(X, Y) = H(X0, Y0) (H is a separation of F) and F(X, Y) = G(X, Y) = G(X0, Y0) (G is a separation of F). Thus, H(X0, Y0) =G(X0, Y0). Therefore, by Th. 6,Gis a separation ofH.

ii) The mapGis a m-extension ofF andH (Prop. 10). By Prop. 9,H is also a m-extension ofF. Thus, it is sufficient to prove thatH is also a separation ofF.

LetX andY be two distinct minima forF, letX0,Y0 be the corresponding minima for H, and letX00,Y00 be the corresponding minima forG. Thus, X ⊆X0 ⊆X00 and Y ⊆ Y0 ⊆Y00. We have F(X, Y) =G(X, Y) = G(X0, Y0) (G is a separation of F) and H(X, Y) = H(X0, Y0) = G(X0, Y0) (G is a separation of H). Thus, F(X, Y) =H(X, Y). Therefore, by Th. 6,H is a separation ofF.

Theorem 12 (strong separation): Let F andGbe two elements ofF(E).

The mapGis a W-thinning ofF if and only ifG is a strong separation ofF.

Proof:

1) Letpbe a W-destructible point forF. i) LetX be a minimum for [F\p].

Supposep∈X. We note that it is not possible thatX ={p}, otherwisepwould be an inner point forF. Thus X contains at least two points. We can see that X \ {p} is necessarily a minimum for F and that we have F[X\ {p}] = [F\p](X). Supposep6∈X. ThenX is a minimum forF and, trivially,F(X) = [F\p](X). Thus, in any cases, [F\p] is a m-cover ofF. By induction, if Gis a W-thinning ofF, thenGis a m-cover of F.

ii) Supposexand y arek-separated forF but not k-separated for [F\p]. We observe that we must have [F\p](x, y) =k−1. Thus, there is a pathπ=x0, ..., xl, withx0=x,xl=y, and such that [F\p](π) = (k−1).

Any path fromxto y contains an elementary path fromxto y, so we may suppose thatπ is elementary,i.e., that all points appearing inπare distinct. We note that:

- there should be somexi such thatxi=p, otherwisexand ywould not be k-separated forF; - for the same reason, we must haveF(p) =k;

- we must have F(xj) < k, for all 0 ≤ j ≤ l and j 6= i, otherwise, since π is elementary, we would have [F\p](π)≥k;

- we must have 0< i < l, otherwise, we would have F(x, y) =M ax{F(x), F(y)}, and xand y would not be separated forF;

-xi1andxi+1 should bek-separated forF, otherwise we would haveF(x, y)< k.

Thus, by Prop. 4,xi1andxi+1would belong to distinct components ofFk, andpwould not be W-destructible forF.

By induction, ifGis a W-thinning ofF, thenGis a separation ofF.

2) SupposeGis a strong separation ofF. LetH be a watershed ofF constrained byG. IfH=Gwe are done.

SupposeH 6=G.

The mapH is a strong separation ofF (first part of the proof), thusGis a strong separation ofH (Prop. 11).

Now, letpbe a point such thatH(p)> G(p) and which is not W-destructible forH. Thus, pmust be either an inner point or a separating point forH.

- Supposepis a separating point forH. We setk=H(p).

There should exist two pointsxandy which are adjacent topand which belong to distinct components ofHk. By Prop. 5,xandy arek-separated for H. The presence of the path π=x, p, yimplies that we would have G(x, y)≤(k−1). The pointsxandy would not bek-separated forG, thuspcannot be a separating point.

- Suppose pis an inner point. We denote byD(p, G) the set composed of all pointsx such that there exists a descending path forGfrom pto x, i.e., a path xO, ..., xj such thatxO =p, xj =x, and G(xi)≤G(xi−1), i= 1, ..., j. It may be seen thatD(p, G) contains necessarily a minimum forG. LetX such a minimum. Since G is a m-extension of H, there is a minimum X0 for H such that X0 ⊆ X and H(X0) = G(X0) = G(X).

There exists a descending path forG from pto X0. Let π= x0, ..., xj be such a path, we havex0 =p, and H(xj) =G(xj) =H(X0). SinceH(p) > G(p) there exists a largest number i such that H(xi)6=G(xi), this number satisfiesi < j. ThusH(xi)> G(xi),H(xi+1) =G(xi+1), andG(xi+1)≤G(xi) (sinceπis descending).

(9)

Therefore, we must haveH(xi)> H(xi+1). In other words,xi should be a border point forH.

Since, from the preceding argument,xicannot be a separating point, it means thatxiwould be a W-destructible point forHsuch thatH(xi)> G(xi) which contradicts the fact thatH is a watershed ofF constrained byG.

Prop. 11 and Th. 12 lead to the following “confluence” property which shows that W-thinnings are related to greedy structures23:

Theorem 13 (confluence): Let F, G, H be maps in F(E) such that G is a W-thinning of F and G≤H ≤F.

The mapH is a W-thinning ofF if and only ifGis a W-thinning ofH.

Let us consider the following recognition problemP: given two mapsF andG≤F inF(E), decide whether Gis a W-thinning ofF or not. By definition,Gis a W-thinning ofF ifGmay be obtained fromF by iteratively lowering (by one) W-destructible points. If we directly use this definition for solvingP, we get an exponential method. By Th. 13,P may be solved by the following greedy method which is polynomial:

SetH =F;

i) arbitrarily select a pointpwhich is W-destructible forH and which satisfiesH(p)> G(p);

ii) doH = [H\p].

Repeat i) and ii) until stability;Gis a W-thinning ofF ifH=G, otherwiseGis not a W-thinning ofF.

The above confluence property does not hold in the framework of homotopic thinnings (by deformation retract,24 or by collapse,25 or by simple points removal22). A counter-example is the so-called Bing’s house.14 A 3D-cubeCmay be thinned till one pointP, but it may also be thinned till a Bing’s houseB. We may have P ⊆B ⊆C, but B cannot be thinned tillP. This very example shows that, in the general case, the above greedy method does not work for the recognition problem in the framework of homotopic thinnings.

Of course, W-thinnings preserve less topological characteristics than homotopic thinnings. Nevertheless, the confluence property ensures that arbitrary W-thinnings cannot get “stuck” in some configurations.

6. EXTENSIONS

In this section, we will prove the equivalence between W-thinnings and maps which preserve all “lower connected components”.

LetX be a subset ofE. We denote byC(X) the set composed of all connected components ofX.

LetX andY be subsets ofEsuch thatY ⊆X. Thecomponent map relative to(X, Y), is the mapfromC(X) toC(Y) such that, for anyC∈ C(X),(C) is the connected component ofY which containsC.

LetF,Gin F(E) such thatG≤F. Letk∈Z. Thek-component map relative to(F, G), is the component mapk relative to (Fk, Gk).

We say thatGis anextension ofF if, for anyk∈Z, k is a bijection.

Property 14: Let G be an extension of F. If X ∈ C(Fk) and Y ∈ C(Fl), then Y ⊆ X if and only if l(Y)⊆k(X).

Proof:

i) IfY ⊆X, we will havel(Y)∩k(X)6=∅, and, sinceGis a map, we must havel(Y)⊆k(X).

ii) SupposeY 6⊆X. Without loss of generality, supposel ≤k. Let Z be the element of C(Fk) which contains Y, we haveZ 6=X. Since, from i),l(Y)⊆k(Z), and since X 6=Z, k(X) and k(Z) are distinct: we must havel(Y)6⊆k(X).

(10)

Theorem 15: Let F,Gin F(E)such thatG≤F.

The mapGis a W-thinning ofF if and only ifG is an extension ofF.

Proof:

i) Letpbe a W-destructible point forF and letF0 = [F\p]. For any k6=F(p),C(Fk) =C(Gk), trivially k

is a bijection. Ifk=F(p), by the very definition of a W-destructible point, each component ofC(Fk0) contains one component ofC(Fk) and two distinct components ofC(Fk) are contained in distinct components ofC(Fk0).

Thus,k is a bijection. By induction, ifGis a W-thinning of F, thenGis an extension ofF. ii) SupposeGis an extension ofF.

- LetX be a minimum forGand letk=G(X) + 1, we haveX ∈ Ck(G). The setY =k1(X) is a component in Ck(F) and is a minimum for F otherwise there would exist Z ∈ Ck1(F), withZ ⊆Y and we would have k1(Z)∈ Ck1(G), withZ ⊆X. We have alsoY ⊆X andF(Y) =G(X). Thus,Gis a m-cover ofF.

- Let X and Y be two minima for F and let F(X, Y) = k. Thus, X and Y are subsets of a component Z ∈ Ck+1(F). The setk+1(Z) is in Ck+1(G), it containsX and Y (from Prop. 14), thus G(X, Y)≤k. In a reverse way, ifZ ∈ C(Gl) containsX andY,−1l (Z)∈ Cl(F) containsX andY (from Prop. 14), thus we must haveG(X, Y) =k: Gis a separation ofF. From Th. 12,Gis a W-thinning of F

7. ORDERED MINIMA AND THE DYNAMICS

Let us consider the following recognition problemP0: given two mapsF andG≤F inF(E), decide whetherG is a separation ofF or not. If we directly apply the definition of a separation, we have to compute all the values F(x, y), x∈ E and y ∈E, check from these values which pairs of points are separated, and, for these pairs, check ifF(x, y) =G(x, y). We can say that n2 pass values relative to F, withn =|E| are used to solve P0. Theorem 6 asserts that, in fact, it is sufficient to consider pass values between minima ofF. Thus m2 values relative toF are sufficient, withm=|M(F)|. This shows that the above n2 values contain some “redundant information”. In this section, we will see that, again, thesem2 values contain redundant information and that onlym−1 values are necessary to solveP0.

LetF∈ F(E) and let E be a family composed of non empty subsets ofE.

Let≺be an ordering on E,i.e.,≺is a relation onE which is transitive and trichotomous (for anyX,Y in E, one and only one ofX ≺Y, Y ≺X,X =Y is true).

We denote byX the element ofE such that, for allY ∈ E \ {X},X≺Y. LetX ∈ E. The pass value ofX for(F,≺) is the numberF(X,≺) such that:

- IfX =X, thenF(X,≺) =∞; and

- IfX 6=X, thenF(X,≺) =M in{F(X, Y); for allY ∈ E such thatY ≺X}.

Theorem 16 (ordered minima): Let F,Gbe elements of F(E) such thatG≤F.

Let ≺be an ordering on the minima of F. The map Gis a separation of F if and only if, for each minimum X forF, we haveF(X,≺) =G(X,≺).

Proof: By Th. 6, ifGis a separation ofF, thenF(X,≺) =G(X,≺).

SupposeG≤F is not a separation ofF. By Th. 6, it means that there exist two distinct minima forF, sayX andY, such thatF(X, Y)6=G(X, Y). We setk=F(X, Y), thusG(X, Y)< k.

By Prop. 4, there exist two distinct componentsX0 andY0 of Fk such that X ⊆X0, Y ⊆Y0. Furthermore, there exists a componentCofFk+1 such thatX0 ⊆C andY0 ⊆C.

LetX00(resp. Y00) be the minimum forF which is a subset ofX0 (resp. Y0) such thatX00≺Z(resp. Y00≺Z), for allZ∈ M(F),Z⊆X0andZ6=X00(resp. Z ⊆Y0andZ6=Y00). By Prop. 2 and 4, we haveF(X, X00)< k, F(Y, Y00)< k, andF(X00, Y00) =k.

SinceG(X00, Y00)≤M ax{G(X00, X), G(X, Y), G(Y, Y00)}, and sinceG≤F, we haveG(X00, Y00)< k.

Without loss of generality, supposeY00≺X00. We observe that, since all minimaZforFsuch thatF(X00, Z)< k satisfyX00≺Z, we must haveF(X00,≺)≥k. Furthermore, sinceY00≺X00, we haveF(X00,≺)≤k. The result

(11)

isF(X00,≺) =k.

But G(X00,≺) < k, which follows from G(X00, Y00) < k and Y00 ≺ X00. ¿From this we conclude that F(X00,≺)6=G(X00,≺).

The above definition of the pass value of a minimum leads to a new notion of dynamics the definition of which is given below. In a forthcoming paper,18 it will be shown that this notion “encodes more topological features” than the original one.15

Let F ∈ F. Let ≺ be an ordering onM(F). We say that ≺ is analtitude ordering on M(F) if X ≺ Y wheneverF(X)< F(Y).

Let≺be an altitude ordering ofM(F) and let X be a minimum for F. The dynamics ofX for(F,≺) is the valueDyn(X;F,≺) =F(X,≺)−F(X).

In Fig. 2, a topological watershed (b) of the original image (a) is represented. The minima of the watershed (c) illustrate the well-known over-segmentation problem. Using the methodology introduced in mathematical morphology15 and our notions, we can extract all the minima which have a dynamics (according to an altitude ordering) greater than a given threshold (here 20), and suppress all others with a geodesic reconstruction . We obtain the image (d), the watershed (e), and the minima (f).

(a) (b) (c)

(d) (e) (f)

Figure 2. (a): original image, (b): a topological watershed of (a), (c): the minima of (b), (d): a filtering of (a) with ordered dynamics, (e): a topological watershed of (d), (f): the minima of (e).

(12)

REFERENCES

1. M. Couprie and G. Bertrand, “Topological grayscale watershed transform,” in SPIE Vision Geometry V Proceedings,3168, pp. 136–146, 1997.

2. J. Maxwell, “On hills and dales,”Philosophical Magazine, pp. 233–240, December 1870.

3. F. Maisonneuve, “Sur le partage des eaux,” tech. rep., CMM, Ecole des Mines, Dec. 1982.

4. F. Meyer, “Un algorithme optimal de ligne de partage des eaux,” in Actes du 8`eme Congr`es AFCET, pp. 847–859, (Lyon-Villeurbanne, France), 1991.

5. L. Vincent and P. Soille, “Watersheds in digital spaces: An efficient algorithm based on immersion simu- lations,”IEEE Trans. on PAMI13, pp. 583–598, June 1991.

6. F. Meyer, “Topographic distance and watershed lines,” Signal Processing 38, pp. 113–126, July 1994.

Special issue on Mathematical Morphology.

7. L. Najman and M. Schmitt, “Watershed of a continuous function,”Signal Processing38, pp. 99–112, 1994.

Special issue on Mathematical Morphology.

8. J. Roerdink and A. Meijster, “The watershed transform: Definitions, algorithms and parallelization strate- gies,”Fundamenta Informaticae41, pp. 187–228, 2000.

9. S. Beucher and C. Lantu´ejoul, “Use of watersheds in contour detection,” inProc. Int. Workshop on Image Processing, Real-Time Edge and Motion Detection/Estimation, (Rennes, France), 1979.

10. S. Beucher and F. Meyer, “The morphological approach to segmentation: the watershed transformation,”

in Mathematical Morphology in Image Processing, E. Dougherty, ed., pp. 433–481, Marcel Decker, 1993.

11. L. Najman and M. Schmitt, “Geodesic saliency of watershed contours and hierarchical segmentation,”

IEEE Trans. on PAMI18, pp. 1163–1173, December 1996.

12. L. Najman and M. Couprie, “Watershed algorithms and contrast preservation,”Lecture Notes in Computer Sciences2886, pp. 62–71, 2003.

13. M. Couprie and G. Bertrand, “Tesselations by connection in orders,” in Discrete geometry for computer imagery, LNCS, Springer Verlag, 1953, pp. 15–26, 2000.

14. R. Bing, “Some aspects of the topology of 3-manifolds related to the poincar´e conjecture,” Lectures on Modern Mathematics II , pp. 93–128, 1964. T.L. Saaty ed, Wiley.

15. M. Grimaud, “A new measure of contrast: Dynamics,” inSPIE Vol. 1769, Image Algebra and Morphological Processing III, pp. 292–305, 1992.

16. F. Meyer, “The dynamics of minima and contours,” inISMM 3rd, R. S. P. Maragos and M. Butt, eds., Computational Imaging and Vision, pp. 329–336, Kluwer Academic Publishers, 1996.

17. G. Bertrand, “On topological watersheds,” 2004. submitted.

18. G. Bertrand, “On dynamics,” 2004. in preparation.

19. M. Couprie, L. Najman, and G. Bertrand, “Watersheds and the emergence paradigm.” submitted.

20. L. Najman and M. Couprie, “Quasi-linear algorithm for the component tree,” inIS&T/SPIE Symposium on Electronic Imaging 2004, Vision Geometry XII, 2004.

21. M. Couprie, L. Najman, and G. Bertrand, “Quasi-linear algorithms for topological watershed,” 2004.

submitted.

22. T. Kong and A. Rosenfeld, “Digital topology: introduction and survey,” Comp. Vision, Graphics and Image Proc.48, pp. 357–393, 1989.

23. B. Korte and L. Lov´asz, “Structural properties of greedoids,”Combinatorica3, pp. 359–374, 1983.

24. J. Stillwell,Classical topology and combinatorial group theory, Springer-Verlag, 1980.

25. P. Giblin,Graphs, surfaces and homology, Chapman and Hall, 1981.

Références

Documents relatifs

Matthiesen have been able to extend Theorem 1.5 to any complete Riemann- ian metric on surfaces of finite topological type (with or without boundary, with or without finite area);

ABSTRACT. However if the norm of X is locally uniformly rotund, then the set of norm attaining elements of norm one is w ⇤ -G. There exist separable spaces such that N A is a

In this paper we have explored, from a purely descriptive perspective, the within-sample dynam- ics and out-of-sample evolution of some key node and link statistic

Our main result shows that a compact, asymptotically stable attractor of a continuous dynamical system defined on a locally compact metric space is a weak deformation retract of

can indicate that the notion of locally vaguely separable space applies to the spaces of arithmetic almost-periodic functions which constitute an other family of

Banach algebras is given by a theorem due to Gleason which became clas- sical and states that the subset of the structure space of a complex Banach algebra A formed by

nings of a wedge of spheres is reduced to the classification of concordance classes of embeddings of a number of solid tori in the boundary of a

Furthermore, this approach yields higher cardinality versions of the above statements so as to apply to arbitrary products of ordered spaces without countability