Thesis (PDF) - Signal & Image Processing Lab
Thesis (PDF) - Signal & Image Processing Lab
Thesis (PDF) - Signal & Image Processing Lab
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
80 CHAPTER 6. EXTREMA-WATERSHED TREE EXAMPLE<br />
Figure 6.3: The Extrema Watershed Tree associated to the example in Fig. 6.2.<br />
Algorithm 3 Create maxima watershed tree<br />
A list of symbols :<br />
Eq A sorted queue of edges in G containing extremum region.<br />
Ngh A sorted queue of edges, a subset of Eq, neighbors of Vextr, V2.<br />
Lbl The current label number, initialized to zero.<br />
1: Find all extremum region ,Vextr, in G.<br />
2: Find all edges connected to the extremum regions and put them in Eq.<br />
3: Sort Eq according to the comparison function in alg. 2.<br />
4: while Eq not empty do<br />
5: (Vextr, V2) ← F irst(Eq)<br />
6: Lbl = Lbl + 1<br />
7: Create new vertex V<br />
8: Lbl(V ) ← Lbl<br />
9: GL(V ) ← GL(V2) ⊲ The new vertex always gets GL other then extremum<br />
10: Size(V ) ← Size(Vextr) + Size(V2)<br />
11: F ather(Vextr) ← V ; F ather(V2) ← V<br />
12: Ngh ← all pairs in Eq containing Vextr or V2<br />
13: Substitute Vextr and V2 by V in Ngh.<br />
14: Remove all pairs in Ngh where the first vertex is not extremum anymore.<br />
15: Sort Ngh according to the comparison function in alg. 2.<br />
16: Merge Eq and Ngh preserving the order.<br />
17: end while<br />
18: Root ← Lbl ⊲ the last added label is defined as the root