
- •Segmentation
- •Watershed segmentation
- •Watershed algorithms
- •Vincent-Soille algorithm
- •Watershed
- •Traditional watershed uses dams
- •Watershed results
- •Watershed leads to oversegmentation
- •Markers solve this problem
- •Marker-based watershed
- •Simplified Vincent-Soilles
- •only needs to be done once initially (can use connected components)
- •Simplified Vincent-Soilles
- •Watershed example
- •Watershed example
- •Watershed example
- •Watershed example
- •Watershed example
- •Watershed example
- •Watershed example
- •Watershed example
- •Watershed example
- •Watershed example
- •Watershed example
- •Watershed example
- •Watershed example
- •Watershed example
- •Watershed example
- •Fast forward…
- •Watershed example
- •Marker-based watershed example
- •Marker-based watershed example
- •Marker-based watershed example
- •Marker-based watershed example
- •Marker-based watershed example
- •Marker-based watershed example
- •Marker-based watershed example
- •Marker-based watershed example
- •Marker-based watershed example
- •Marker-based watershed example
- •Marker-based watershed example
- •Marker-based watershed example
- •Fast forward…
- •Marker-based watershed example
- •Marker-based watershed
- •Why are ridges needed?
- •Another example

Marker-based watershed example
|
|
|
|
|
(shaded pixels are on frontier) |
||
8 |
7 |
5 |
4 |
|
|||
2 |
0: (1,3) |
|
|||||
9 |
6 |
2 |
1 |
1: (3,1), (2,3), (1,4), (4,4) |
|||
4 |
2 |
7 |
|
4 |
2: (2,1), (4,1), (1,2), (4,3) |
||
|
0 |
1 |
8 |
2 |
3: (4,0), (3,2), (0,3), (2,4) |
||
6 |
4: (3,0), (0,2), (4,2) |
||||||
1 |
|
6 |
1 |
5: (2,0) |
|
||
gradmag image |
6: (1,1), (0,4), (3,4) |
||||||
u u u u 1 |
7: (1,0), (2,2) |
||||||
u u 1 |
1 |
1 |
8: (0,0), (3,3) |
||||
9: (0,1) |
|
||||||
u 0 u |
1 |
1 |
Step 10: k=3 |
||||
pixel list |
|||||||
0 |
0 |
0 |
u 1 |
Grow catchment basins |
|||
|
|||||||
u 0 0 |
u 1 |
|
|
labels
S. Birchfield, Clemson Univ., ECE 847, http://www.ces.clemson.edu/~stb/ece847

Marker-based watershed example
|
|
|
|
|
(shaded pixels are on frontier) |
||
8 |
7 |
5 |
4 |
|
|||
2 |
0: (1,3) |
|
|||||
9 |
6 |
2 |
1 |
1: (3,1), (2,3), (1,4), (4,4) |
|||
4 |
2 |
7 |
|
4 |
2: (2,1), (4,1), (1,2), (4,3) |
||
|
0 |
1 |
8 |
2 |
3: (4,0), (3,2), (0,3), (2,4) |
||
6 |
4: (3,0), (0,2), (4,2) |
||||||
1 |
|
6 |
1 |
5: (2,0) |
|
||
gradmag image |
6: (1,1), (0,4), (3,4) |
||||||
u u u u 1 |
7: (1,0), (2,2) |
||||||
u u 1 |
1 |
1 |
8: (0,0), (3,3) |
||||
9: (0,1) |
|
||||||
u 0 u |
1 |
1 |
Step 11: k=3 |
||||
pixel list |
|||||||
0 |
0 |
0 |
u 1 |
Expand frontier |
|||
|
|||||||
u 0 0 |
u 1 |
|
(nowhere to expand) |
||||
|
|
labels
S. Birchfield, Clemson Univ., ECE 847, http://www.ces.clemson.edu/~stb/ece847
Fast forward…

Marker-based watershed example
8 7 5 4 3
9 6 2 1 2
4 2 7 3 4
3 0 1 8 2
6 1 3 6 1
gradmag image
0 0 1 1 1
0 0 1 1 1
0 0 0 1 1
0 0 0 0 1
0 0 0 0 1
0:(1,3)
1:(3,1), (2,3), (1,4), (4,4)
2:(2,1), (4,1), (1,2), (4,3)
3:(4,0), (3,2), (0,3), (2,4)
4:(3,0), (0,2), (4,2)
5:(2,0)
6:(1,1), (0,4), (3,4)
7:(1,0), (2,2)
8:(0,0), (3,3)
9:(0,1)
pixel list Final result
(but note that ties can be broken in other ways)
labels
S. Birchfield, Clemson Univ., ECE 847, http://www.ces.clemson.edu/~stb/ece847

Marker-based watershed
threshold |
chamfer |
watershed |
edges |
image
|
or |
gradient |
markers |
|
|
magnitude |
|
watershed
S. Birchfield, Clemson Univ., ECE 847, http://www.ces.clemson.edu/~stb/ece847

Why are ridges needed?
threshold
image
gradient magnitude
•Ridge markers define background region
•Without them, one object will spill over into background and disappear
markers
watershed
S. Birchfield, Clemson Univ., ECE 847, http://www.ces.clemson.edu/~stb/ece847

Another example
image |
markers |
gradient magnitude |
watershed |
S. Birchfield, Clemson Univ., ECE 847, http://www.ces.clemson.edu/~stb/ece847