Watersheds on weighted graphs

The watershed is an e¢ cient and versatile segmentation tool, as it partitions the images into disjoint catchment basins. We study the watershed on node or edge weighted graphs. We do not aim at constructing a partition of the nodes but consider the the catchment zones, i.e. the attraction zone of a drop of water. Often, such zones largely overlap. In a (cid:133)rst part we show how to derive from a node or edge weighted graph a (cid:135)ooding graph with the same trajectories of a drop of water, whether one considers its node weights alone or its edge weights alone. In a second part we show how to reduce the number of possible trajectories of a drop of water in order to generate watershed partitions.


Introduction
Catchment basins and watershed lines are topographical notions.A catchment basin is the attraction domain of a regional minimum: a drop of water falling everywhere within this domain glides towards this minimum.The catchment basins are therefore disjoint, and the lines which separate them are called watersheds.To produce such partitions, each point of the space has to be allocated to one and only one basin, excepted along the watershed lines.
The transposition of these concepts to image processing proved to be very e¢ cient for segmentation purposes [11] : the topographic surface being the gradient image of the image to segment.The inside of the objects being expressed by low gradient values in form of regional minima ; the boundaries of the object being expressed by high gradient values.The catchment basins of the gradient image form a partition of the image, where each region contains one and only one regional minimum.
On real topographical surfaces however, the watershed lines may contain thick zones, due to the presence of plateaus and button holes, i.e. large areas from where a drop of water may reach several distinct regional minima.The representation of images on digital grids introduces additional di¢ culties, due to the discretisation and the anisotropy of a grid.In order to overcome these di¢ culties, a large number of studies have been published on the watershed, re…ning the de…nitions and proposing sophisticated algorithms for producing partitions ( [9], [12], [1] ; see [20] for a recent bibliography).The watershed has been studied and used in two contexts: * For images, modelled as node weighted graphs.Reference [21] presents algorithms for watershed computing, and ref. [18] describes how the concept and the algorithms of watershed have been in ‡uenced by both theoretical considerations and hardware capabilities.
* For edge weighted graphs, in which the nodes represent regions or pixels and the weighted edges represent the dissimilarity between adjacent nodes.The waterfall hierarchy is based on a series of watersheds on such graphs ( [2]).J.Cousty et al studied these graphs and called watershed cut the graph obtained by cutting all edges linking two distinct basins ( [7]).
Two types of algorithms coexist.Shortest paths algorithm construct the zone of in ‡uence of the regional minima for various distance function associated to the topography ( [23,8,10,13,19]).Another class of algorithms are based on thinnings : the topographic surface is progressively lowered in such a way that the regional minima are expanded without merging with each other (S.Beucher et al [3] for geodesic binary thinnings, G.Bertrand [7] for grey tone thinnings based on W destructible points).
All these approaches simultaneously create catchment basins by extending the minima, while creating disjoint basins.We propose below another point of view, radically di¤erent, and which opens new horizons.We keep the framework of the …nite weighted graphs and take as basis of our study, the ‡ooding paths, i.e. the possible trajectories of a drop of water.A drop of water may reach several regional minima and belong to several overlapping catchment zones (a catchment zone contains the classical catchment basin).The development starts from the ‡ooding adjunction, and reaches the key notion of a ‡ooding graph, which uni…es the ‡ooding paths de…ned by nodes or by edges.
Ordering the ‡ooding paths according to their steepness and suppressing all those with a low steepness reduces (without modifying the node or edge weights) shrinks the catchment zones and reduce the domains where they overlap.A parallel algorithm implements this pruning of the graph.A …nal section shows how to extract the downstream or upstream of a node, and by combining them, the catchment zone of this node.Interestingly, no choice intervenes for establishing the catchment zones (1st step), and practically none for generating the watersheds (2nd step).
An early version of this work may be found in [17] and a method for implementing graph algorithms on images in [16].

The topography of node or edge weighted graphs
A non oriented graph G = [N; E] contains a set N of vertices or nodes and a set E of edges ; an edge being a pair of vertices.The nodes are designated with small letters: p; q; r:::The edge linking the nodes p and q is designated by e pq : A path, ; is a sequence of vertices and edges, interweaved in the following way: starts with a vertex, say p; followed by an edge e pq ; incident to p; followed by the other endpoint q of e pq ; and so on.
Edges and/or nodes may be weighted.Denote by F e and F n the sets of non negative weight functions on the edges and on the nodes respectively.The function 2 F e takes the value pq on the edge e pq ; the function 2 F n takes the weight p on the node p: For the same graph G; we designate G(nil; ); G( ; nil) and G( ; ) respectively the node weighted, edge weighted, edge and node weighted graph.

Flooding edges, ‡ooding paths, regional minima and catchment zones
A drop of water falling on a topographics surface follows a ‡ooding path.In order to be sure that each node is linked by a ‡ooding path with a regional minimum, we consider all ‡ooding paths which are physically possible: a drop of water may follow any motion, except ‡owing upstream.

Node weighted graphs
We consider a node weighted graph G(nil; ): A drop of water may quit a node p; follow the edge (p; q) and reach the node q if the nodes p and q verify n p n q .
De…nition 1 The edge (p; q) is a ‡ooding edge of its extremity p i¤ n p n q : De…nition 2 A path p e pq q e qs s::: is a ‡ooding path if each node except the last one is followed by one of its ‡ooding edges.
It follows that the weights along a ‡ooding path are never increasing.
De…nition 3 A regional minimum of G n is a maximal connected subgraph, in which all inside nodes have the same weight and all neighboring outside nodes have a higher altitude.
Criterion 4 A node p belongs to a regional minimum if no ‡ooding path with origin p leads to a lower node.

Edge weighted graphs
A drop of water at a node p compares the weights of all edges allowing to quit p and follows one of the adjacent the edges with the lowest weight.
De…nition 5 An edge (p; q) is a ‡ooding edge of the node p; if it is one of the lowest adjacent edges of p: De…nition 6 A path p e pq q e qs s::: is a ‡ooding path if each node except the last one is followed by one of its ‡ooding edges It follows that the the weights of the successive edges in a ‡ooding path are never increasing (if p; q and r are three successive nodes of a ‡ooding path, then e qr is one of the lowest edges of q and thus e pq e qr ): De…nition 7 A regional minimum is a maximal connected subgraph of G; in which all inside edges have the same weight and all edges linking an inside node with an outside node have higher weights.
The regional minima contain at least two nodes and isolated regional minima do not exist.
Criterion 8 A node p belongs to a regional minimum if no ‡ooding path with origin p contains an edge which is lower than the edges inside the minimum.

Common properties of node and edge weighted graphs
The de…nition of ‡ooding edges, ‡ooding paths and regional minima is not the same for node and edge weighted graphs.But given the de…nition of ‡ooding edges, paths and regional minima, they share in common the following properties.A drop of water only follows ‡ooding paths.

De…nition 9
The catchment zone of a regional minimum is the set of nodes linked with this minimum through a ‡ooding path.
Each node of a node or edge weighted graph either belongs to a regional minimum or is linked with a regional minimum through a ‡ooding path.
Corollary 10 Each node of a node or edge weighted graph belongs to at least one catchment zone.

Completing the missing weights
For a node weighted graph Consider the node weighted graph G(nil; ): A drop of water may ‡ow through a ‡ooding edge e pq from p to q if p q and in both direction if p = q : Each edge e pq is a ‡ooding edge as p q of q p : In any case, the weight p _ q represents the weight of the node from where a drop of water crossing the edge e pq may come from.
We de…ne the operator en from F n into F e : !en .The function en of F e takes the value ( en ) pq = p _ q on the edge e pq : Each edge e ps with extremity p gets a weight p _ s p : Only the ‡ooding edges of G(nil; ), such as e pq ; verifying p q get the weight p : Thus these edges are the lowest adjacent edges of p, i.e. ‡ooding edges in the graph G( en ; nil): Lemma 11 Each ‡ooding edge in the graph G(nil; ) also is a ‡ooding edge in the graph G( en ; nil) The reverse is not true and the graphs G(nil; ) and G( en ; nil) do not have the same regional minima as shown by the counter-example in …g.1.
For an edge weighted graph Consider the edge weighted graph G( ; nil): A drop of water leaving a node p always follows a ‡ooding edge of p: We de…ne the operator " ne from F e into F n : !" ne .The function " ne of F n takes on the node p the weight of the ‡ooding edges of p; i.e. (" ne ) p = V ps (r neighbors of p) . Consider now a ‡ooding edge e pq of extremity p : (" ne ) p = V ps (r neighbors of p) (" ne ) q showing that e pq also is a ‡ooding edge of p in the graph G(nil; " ne ): Lemma 12 Each ‡ooding edge in the graph G( ; nil) also is a ‡ooding edge in the graph G(nil; " ne ) The reverse is not true and the graphs G( ; nil) and G(nil; " ne ) do not have the same regional minima as shown by the counter-example in …g.2.
" ne is an erosion from F e into F n e = en " ne is an opening from F e into F e ' n = " ne en is a closing from F n into F n Furthermore as " ne = (" ne en ) " ne = ' n " ne ; for in F e the function " ne in F n is closed by the closing ' n : Symetrically as en = ( en " ne ) en for in F n ; the function en in F e is opened by the opening e : These operators belong to a larger family of operators between nodes, edges, faces of planar graphs (in [14] for constructing micro-viscous levelings and …lters, in [6] for binary …lters).The ‡ooding adjunction has already been used for studying the watershed and waterfall algorithms in ( [15]).

Flooding graphs
3.1.1Identity of the ‡ooding edges in both node and edge weighted graphs ?
Lemma 9 states: each ‡ooding edge in the graph G(nil; ) also is a ‡ooding edge in the graph G( en ; nil) : Replacing by the function en in the lemma 10 shows that each ‡ooding edge in the graph G( en ; nil) also is a ‡ooding edge in the graph G(nil; " ne en ): It follows: Lemma 13 In the case where " ne en = ' n = ; both graphs G(nil; ) and G( en ; nil) have the same ‡ooding edges.
Similarly lemma 10 states: each ‡ooding edge in the graph G( ; nil) also is a ‡ooding edge in the graph G(nil; " ne ): Replacing by the function " ne in the lemma 9 shows that each ‡ooding edge in the graph G(nil; " ne ) also is a ‡ooding edge in the graph G( en " ne ; nil): It follows: Lemma 14 In the case where en " ne = e = ; both graphs G( ; nil) and G(nil; " ne ) have the same ‡ooding edges.
In general however, the node weights of a graph G(nil; ) are not invariant by ' n and the edge weights of a graph G( ; nil) not invariant by e : The next section shows how to edit the graph G without modifying the weights of the nodes (resp.edges) so that ' n = (resp.e = ) be satis…ed.
We say that a graph G(nil; ) or G( ; ) is invariant by the closing if ' n = : We say that a graph G( ; nil) or G( ; ) is invariant by the opening e if e = :

Invariant graphs by the closing ' n
Consider an arbitrary node weighted graph G(nil; ).Its node weights are arbitrary and are in general not closed by ' n unless the following lemma is veri…ed.

Lemma 15
The node weights of a node weighted graph G(nil; ) are invariant by the closing ' n if and only if the graph has no isolated regional minima.
Proof.For each neighbor s of p; we have e ps = p _ s p .If p is not an isolated regional minimum, there exists a neighbor q of p verifying p q ; we have e pq = p _ q = p and (' ) p = " e e = p : If on the contrary p is an isolated regional minimum, for each neighbor s of p; we have e ps = p _ s > p and (' ) p = " e e > p : If G(nil; ) has isolated regional minima, we add a sel ‡oop edge linking each isolated regional minimum with itself and get a new graph G n invariant by ' n : Furthermore, the dilation en applied to the node weights of G n or to the node weights of G n produce the same edge weights (the relation en ' n = en shows that only the nodes invariant by ' n contribute to the dilation en ).

Lemma 16
The graph G is invariant by the closing ' n : Furthermore it has the same ‡ooding paths, regional minima and catchment zones as the original graph G: Proof.Adding loop edges linking isolated regional minima with themselves does not change their nature of being regional minima.It does not either impact the ‡ooding paths.Hence the catchment zones remain the same.
On the graph G(nil; ) the node function is invariant by closing: = ' n = " ne en : If we assign to the edges of the graph the weight = en ; then = " ne en = " ne : Such a graph is called ‡ooding graph and will be studied below.
Fig. 1A presents a node weighted graph G(nil; ) with 3 isolated regional minima.Adding sel ‡oop edges linking each such minimum with itself produces a graph G(nil; ) invariant by ' n in …g.1B.The dilation e = en produces the edge weights in the ‡ooding graph G( en ; ) in …g.1C.

Invariant graphs by the opening e
Consider an arbitrary edge weighted graph G( ; nil): The edge weights are arbitrary and are in general not open by e unless the following lemma is veri…ed.
Lemma 17 An edge weighted graph G( ; nil) with edge weights is invariant by the opening e if and only if each of its edges is a ‡ooding edge of one of its extremities.
Proof.Suppose the edge (p; q) is not one of the lowest neighboring edges of p; i.e. (" ne ) p < e pq : If it is also not the lowest neighboring edge of q; then (" ne ) q < e pq and ( e ) pq = ( en " ne ) pq = (" ne ) p _ (" ne ) p < e pq : Inversely, if (p; q) is one of the lowest neighboring edges of one of its extremities, say p; then (" ne ) p = e pq : And ( e ) pq = ( en " ne ) pq = (" ne ) p _(" ne ) p e pq : But e ; being an opening, is antiextensive: e : So ( e ) pq = e pq : Hence all edges of G( ; nil) which are not ‡ooding edges for one of their extremities have their weight lowered by e : If we cut these edges, we obtain a new graph # G( ; nil), which is invariant by e : Furthermore the erosion " ne applied to the edge weights of G( ; nil) or to the edge weights of # G( ; nil) produce the same node weights (the relation " ne e = " ne shows that only the edges invariant by e contribute to the erosion " ne .)

Lemma 18
The graph # G is invariant by the opening e : Furthermore it has the same ‡ooding paths, regional minima and catchment zones as the original graph G: Proof.The edges which are suppressed are the edges which are not the lowest edges of one of their extremities, such edges are never followed by a drop of water falling on a node: they do not belong to any ‡ooding path nor to the regional minima.
The operator # transforms an arbitrary edge weighted graph G( ; nil) into a graph # G( ; nil) invariant by the opening e : This means that e = e e = en " ne e: If we assign to the nodes of the graph the weight n = " ne e; then e = en " ne e = en n: Again we get a ‡ooding graph.
Fig. 2A shows an arbitrary edge weighted graph G( ; nil) , …g.2B the graph # G( ; nil) in which all edges not invariant by e have been suppressed, and …g.2C the ‡ooding graph # G( ; " ne ) with node weights = " ne :

Flooding graphs
We already met ‡ooding graphs in the preceding section.We now de…ne and study such graphs.
De…nition 19 An edge and node weighted graph G( ; ) is a ‡ooding graph i¤ its weights ( ; ) verify = en and = " ne Replacing by its value we get = en = en " ne = e : Replacing by its value we get = " ne = " ne en = ' n : Hence the following corollary.
Corollary 20 A ‡ooding graph is invariant by the opening e and by the closing ' n : As established above, as is invariant by e ; each edge is the lowest edge of one of its extremities.The node weights being invariant by ' n ; G has no isolated regional minima.
The preceding section may be summarized by the following corollary.
Flooding edges and ‡ooding paths Le G( ; ) be a ‡ooding graph.A ‡ooding graph has no isolated regional minima and to each node may be associated a ‡ooding edge with the same weight.According to lemma 13 and 14; the ‡ooding edges of the graph G(nil; ) and of the graph G( ; nil) are identical.Hence the ‡ooding paths, made of successive ‡ooding edges also are identical.As each ‡ooding edge has the same weight as its origin, node weights and edge weights of a ‡ooding path are absolutely redundant.
Lemma 22 The regional minima of the graph G(nil; ) and of the graph G( ; nil) are identical.The …rst are de…ned for node weighted graphs, the last for edge weighted graphs.
Proof.The ‡ooding paths of G(nil; ) and G( ; nil) are identical ; applying the criteria 4 and 8 shows that G(nil; ) and G( ; nil) have the same regional minima.
Having the same ‡ooding paths and the same regional minima, both graphs also have the same catchment zones.
Theorem 23 For a ‡ooding graph G; the ‡ooding paths, regional minima and catchment zones of the graphs G(nil; ) and G( ; nil) are identical Corollary 24 An arbitrary node weighted graph G(nil; ) has the same ‡ooding paths, regional minima and catchment zones as the edge weighted graph G( en ; nil).An arbitrary edge weighted graph G( ; nil) has the same ‡ooding paths, regional minima and catchment zones as the node weighted graph # G(nil; " ne ).

Oriented ‡ooding graphs
In fact the ‡ooding paths, regional minima, and catchment zones only depend upon the relative altitudes of neighboring nodes.It is possible to encode these relations in form of an oriented graph and forget the values of nodes and edges.We associate to the ‡ooding graph G an oriented graph (or digraph) !G ( ; ) by replacing an edge e pq by an arrow !pq if e pq is a ‡ooding edge of origin p: If e pq is a ‡ooding edge of both extremities, we create two arrows !pq and !qp if n p = n q .The loop edge linking an isolated regional minimum node m with itself also is replaced by an arrow !mm: The ‡ooding paths of G simply become the oriented paths of !G; which are su¢ cient for characterizing regional minima or catchment basins.For instance, a regional minimum of G is characterized in !G by the fact that: a) any two nodes are linked by a path along which the successive nodes are linked by two arcs, in both directions ; b) a regional minimum has no incoming arc.Having the same ‡ooding paths and regional minima as the initial graph G; the oriented graph !G also has the same catchment zones.

A visual summary 3.3.1 For an initially node weighted graph
Fig. 1 presents all avatars of a node weighted graph encountered so far.A: a node weighted graph G(nil; ) O: the graph G( en ; nil) ; the graphs G(nil; ) and G( en ; nil) do not have the same regional minima B: the graph G(nil; ) obtained by adding to G(nil; ) loop edges connecting each isolated regional minimum with itself.C: the ‡ooding graph G( en ; ) D: the edge weighted graph G( en ; nil) E: the ‡ooding digraph !G( en ; ) F: the digraph without any weights !G(nil; nil) The sign , indicates an inversible transformation preserving regional minima and catchment zones The sign ) marks an operator preserving regional minima and catchment zones, but is not reversible.The …gures 1 (A,B,C,D,E F) have the same ‡ooding paths, regional minima and catchment basins.The sign , indicates an inversible transformation preserving regional minima and catchment zones The sign ) marks an operator preserving regional minima and catchment zones, but is not reversible.

For an initially edge weighted graph
O: the graph G(nil; " ne ) has not the same regional minima as the graph G( ; nil) B: the graph # G( ; nil) obtained by suppressing the non ‡ooding edges of G( ; nil) C: the node and edge weighted ‡ooding graph # G( ; " ne ) D: the node weighted graph # G(nil; " ne ) E: the node and edge weighted ‡ooding digraph !# G( ; " ne ) F: the ‡ooding digraph without weights !# G(nil; nil) The sign , indicates an inversible transformation preserving regional minima and catchment zones The sign ) marks an operator preserving regional minima and catchment zones, but is not reversible.All …gures 2(A,B,C,D,E,F) have the same ‡ooding paths, regional minima and catchment basins.

Partial conclusion
It is possible to derive from each node (resp.edge) weighted graph a ‡ooding graph and from the ‡ooding graph an edge (resp.node) weighted graph.A digraph without edge or node weights may also be derived from the ‡ooding graph.All these graphs have the same catchment zones.For this reason, all watershed algorithms developed for node (resp.edge) weighted graphs also apply to edge (resp.node) weighted graphs.It is su¢ cient to apply them to the derived node (resp.edge) weighted graph.
Furthermore new algorithms, as the one presented below, may be developed applicable to the ‡ooding digraphs.

Reducing the watershed zones
Each node linked by a ‡ooding path with several distinct regional minima belongs to the corresponding catchment zones.This makes adjacent catchment zones overlap.We aim at reducing these overlaping zones, but without any arbitrary choice between equivalent ‡ooding paths.
Ordering the ‡ooding paths according to their steepness and keeping only the steepest one drastically reduces the overlaping zones of adjacent basins: all edges not belonging to these steepest paths are suppressed.The weights of the nodes or the edges of the graph are not modi…ed.The graph simply has less edges and a drop of water less available trajectories and less freedom to reach distinct regional minima.The sign , indicates an inversible transformation preserving regional minima and catchment zones The sign ) marks an operator preserving regional minima and catchment zones, but is not reversible.

An order relation between ‡ooding paths
Consider a ‡ooding graph G( ; ): A ‡ooding path containing the series of nodes (p 1 ; p 2 ; :::p k = m) ending at a node m belonging to a regional minimum may be prolongated into a path of in…nite length: a) if the regional minimum contains another node q; then the path will inde…nitely go back and forth between m and q ; b) if the regional minimum is isolated, it has been completed by a self-loop between m and itself and the path will inde…nitely cycle along this loop.

The k steep ‡ooding paths and k steep catchment zones
The preorder relation k is total, as it permits to compare all paths with the same origin p.The lowest of them are called the k steep paths of origin p: If a path is the k steep of origin p and if for each node q of ; the sub-path of origin q is itself k steep of origin q; we say that is uniformly k steep and write k steep: For instance a ‡ooding path is a 1 steep path, as each node is followed by one of its lowest adjacent edges (the algorithm for constructing waterfalls in [10] and for constructing watershed cuts in [5] are based on 1 steep paths).In a 2 steep path, each node is linked by an edge with one of its lowest neighboring nodes ( [19,13] de…ne the catchment basins as Voronoï tessellation of the regional minima for the topographic distance ; the geodesics are then 2 steep paths).
The k steep catchment zone associated to a regional minimum m i is de…ned as the set of nodes linked by a k steep path with this minimum.If l > k; then any l steep path is also a k steep path.As a consequence, any l steep catchment zone is included in a larger k steep catchment zone.Increasing the index l reduces the overlapping catchment zones between basins.
An 1 steep path of origin p is at the same time 1 steep, as any of its sub-paths is an 1 steep path.Such 1 steep catchment zones rarely overlap, at least if one considers natural images: it only happens if a node is linked with two distinct minima by two ‡ooding paths holding exactly the same weights.In particular, if the regional minima have distinct weights, it cannot happen and the catchment zones are in reality catchment basins and form a partition.

Method by pruning the graph
We now present a local pruning operator which, when applied iteratively, suppresses the highest edge of the paths which are not k steep ; with each iteration the steepness increases by 1: The pruning is applied on the oriented digraph associated to the initial graph.It makes use of the orientation of the arcs and of the weights of the nodes.The weights of the edges are redundant, as each arc has the same weight as its origin.
We de…ne an erosion and a pruning on the digraph.The erosion !" n assigns to each node the weight of its lowest target node (if !pq is an arrow, then p is the origin and q the target of the arrow).The pruning 2 considers all arrows with the same origin and suppresses all those whose target has not a minimal weight.

Keeping only k steep paths
Consider a ‡ooding graph !G : We start with the pruning 2 !G ; after which only 2 steep paths survive.We then iteratively apply the operator 2 !" n to the graph.We call k !G the result of applying k 2 times the operator 2 !" n to the graph 2 Proof.Suppose that after iterating (k 3) times the operator 2 !" n on 2 !G ; we get a (k 1) steep graph.Consider now two paths = (p 1 ; p 2 ; :::p k ) and 0 = (p 1 ; p 0 21 ; :::p 0 k ) in this graph.The weights of p i and p 0 i are i and 0 i : The k 1 …rst nodes have identical weights but the last ones verify k > 0 k ; indicating that 0 is steeper than : Eroding the graph !G once assigns to the node p 1 the weight 2 = 0 2 and to the nodes p 2 and p 0 2 the weights 3 = 0 3 : The subsequent pruning 2 preserves the edges (p 1 ; p 2 ) and (p 1 ; p0 2 ): With successive erosions, the weights of the nodes along the paths and 0 …le past the two …rst nodes.Since the weights of the nodes p 2 and p 0 2 are equal after each of these erosions, the operator 2 preserves both edges (p 1 ; p 2 ) and (p 1 ; p 0 2 ).The erosion k 2 assigns to the node p 1 the weight k 1 = 0 k 1 and to the nodes p 2 and p 0  ; hence they are identical.Similarly the paths !qp B rst k 1 ( 2 ) and 1 are two oriented paths with origin q of length k are identical.We have If the weight of the arcs !qp and !p q is and the weights of the path 2 are ( 1 ; 2 ; :::; k ); then !pqB rst k 1 ( ! qpB rst k 1 ( 2 )) = ( ; ; 1 ; ::: k 2 ) = the graph G plateaus with a depth larger than k: Applying the operator k did not succeed in letting a smaller value than occupy the node p or the node q: However, after with the operator 1 , such a situation cannot happen any more and no plateaus subsist.

Demonstration
Fig. 5A (resp.…g.6A) is the same ‡ooding digraph as in …g.1E (resp.…g.2E) in which we only keep the node weights.The successive drawings of …g.5 represent the evolution of the graph during the successive operations, alternatively pruning 2 and eroding !" n until stability.After each iteration, the overlapping zones of neighboring catchment zones is reduced.At each iteration, up to convergence the catchment zone get reduced.

Downstream and upstream construction
In a k steep (resp. 1 steep) graph, each ‡ooding path is a k steep (resp. 1 steep) path.Following these paths either downstream or upstream permits to segment graphs or parts of graphs.The objects of interest are marked by assigning a label to one or several inside nodes in each object.Distinct objects get distinct labels.Two adaptative operators are used, one for propagating the labels upstream, the other for propagating them downstream.

Downstream operator
If the node p holds a label : for each node q such that p ! q : assign the label to q: If several nodes with an arrow towards q hold distinct labels, one assigns to q one of them (according to any arbitrary or speci…c rule).
This operator is applied until stability.

Upstream operator
If the node q holds a label : for each node p such that p ! q : assign the label to p: If several nodes with distinct labels are the target of an arrow with origin p; one of them is assigned to p (according to any arbitrary or  1) : The resulting graph is cut in 4 connected components, each containing one regional minimum.
The resulting graph is cut in 4 connected components, each containing one regional minimum.

speci…c rule).
This operator is applied until stability.

Remark
It is the …rst time that we meet an arbitrary choice in this paper.This choice occurs if there is a con ‡ict between several downstream or upstream regions withs distinct labels.

Extraction of one or marked catchment zones
The downstream and upstream operators permit toselectively extract one or several catchment zones in an image or in a graph.A ‡ooding graph is …rst produced, transformed in its ‡ooding digraph and then pruned in order to extract a k steep or 1 steep digraph.
One or several nodes are then assigned labels.These labels are …rst propagated downstream ; after convergence, the resulting labeled nodes contain the regional minima of the labeled catchment zones ; their upstream propagation extracts the marked catchment zones.Fig. 7 presents a digital elevation model of a landscape containing multiple rivers belonging to distinct geographical catchment basins.A node has been marked in the left image.The downstream of this node is a river and a regional minimum, illustrated in the central image.The upstream of this river constitutes the catchment zone of the marked node.
As the value k increases, the catchment zones get smaller and becomecloser and closer to the ideal catchment zones associated to 1 steep: Already small values of k give acceptable approximations of catchment zones.In …g.8 we compare the catchment zones extracted from the same ‡ooding digraph after only a few steps of pruning.The …rst one has been obtained for 3 !G ; : the second for 4 !G ; the third for 6 !G : This last one is almost identical with the catchment zones associated to 1 !G : As the operator k is extremely simple, it may be easily implemented in any architecture.Therefore, it is not costly to apply it to the ‡ooding digraph for small values of k.A parallel algorithm as in [12] will give better results as the original paper which only considers 2 steep graphs.
The 1 steep paths are extremely narrow.In …g. 9 we have marked a few minor rivers.The downstream operator nicely and selectively extracts the complete river having the marked points as origins.

Conclusion
Considering overlapping catchment zones in place of a partition of catchment basins has opened new perspectives.Representing the topographic   In a ‡ooding graph, the ‡ooding paths, regional minima and catchment basins remain the same whether one considers the node weights only or the edge weights only.We have shown how to transform any node or edge weighted graph into a ‡ooding graph.Like that, all algorithms developed for node weighted graphs or for edge weighted graphs may be applied on the ‡ooding graph.
By reducing the number of available trajectories a drop of water may follow, the catchment zones also overlap less.An iterative pruning algorithm progressively suppresses ‡ooding paths according to their steepness.According to the degree of pruning, approximative catchment basins or exact catchment basins may then be obtained, with minimal arbitrary choices.
As the remaining ‡ooding paths are extremely selective, they lead to new applications: following the downstream or the upstream of a node, studying the local orientation of the steepest paths, constructing adaptive neighborhoods for …ltering images.

Fig. 2
Fig.2 presents all avatars of an edge weighted graph encountered so far: A: an edge weighted graph G( ; nil)

Figure 1 :
Figure 1: A: a node weighted graph G(nil; ) ; O: G( en ; nil) ; B: G(nil; ) ; C: the ‡ooding graph G( en ; ) ; D: the edge weighted graph G( en ; nil) ; E: the ‡ooding digraph !G( en ; ) ; F: the digraph without any weights !G(nil; nil)The sign , indicates an inversible transformation preserving regional minima and catchment zones The sign ) marks an operator preserving regional minima and catchment zones, but is not reversible.

Figure 3 : 1 :
Figure 3: In a k steep graph, each oriented path is a k steep path

Figure 4 :
Figure 4: For k large enough, there are no double arcs anymore in the graph k !G

Figure 7 :
Figure 7: Left: a node p is marked ; Centre: Downstream of the node ; Right: Upstream of the downstream=catchment zone containing p

Figure 8 :
Figure 8: Extraction of a marked catchment zone.Details showing the evolution of the contour after respectively 1, 2, 4 and an in…nite number of pruning steps.

Figure 9 :
Figure 9: Left: a number of pixels are marked Right: Downstream of the markers = rivers