Segmentation by discrete watersheds Part 2: Algorithms and Seeded - - PowerPoint PPT Presentation

segmentation by discrete watersheds part 2 algorithms and
SMART_READER_LITE
LIVE PREVIEW

Segmentation by discrete watersheds Part 2: Algorithms and Seeded - - PowerPoint PPT Presentation

Segmentation by discrete watersheds Part 2: Algorithms and Seeded watershed cuts Jean Cousty Four-Day Course on Mathematical Morphology in image analysis Bangalore 19-22 October 2010 J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math.


slide-1
SLIDE 1

Segmentation by discrete watersheds Part 2: Algorithms and Seeded watershed cuts

Jean Cousty Four-Day Course

  • n

Mathematical Morphology in image analysis

Bangalore 19-22 October 2010

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

1/34

slide-2
SLIDE 2

Thinnings: watershed algorithm

Thinnings: a new paradigm to compute watershed cuts

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

2/34

slide-3
SLIDE 3

Thinnings: watershed algorithm

Thinnings: a new paradigm to compute watershed cuts

Intuitively, a thinning consists of iteratively lowering the values of the edges which satisfy a certain property

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

3/34

slide-4
SLIDE 4

Thinnings: watershed algorithm

Thinnings: a new paradigm to compute watershed cuts

Intuitively, a thinning consists of iteratively lowering the values of the edges which satisfy a certain property

B-thinnings M -thinnings I -thinnings

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

3/34

slide-5
SLIDE 5

Thinnings: watershed algorithm

Local edge classification

The altitude of a vertex x, denoted F ⊖(x), is the minimal altitude of an edge which contains x:

F ⊖(x) = min{F(u) | u ∈ E and x ∈ u}

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

4/34

slide-6
SLIDE 6

Thinnings: watershed algorithm

Local edge classification

The altitude of a vertex x, denoted F ⊖(x), is the minimal altitude of an edge which contains x:

F ⊖(x) = min{F(u) | u ∈ E and x ∈ u}

5 5 8 1 4 5 2 3 4 7 4 6 3 4 5 4 5 1 1 2 3 a b c d e f g h i j k l m n

  • p
  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

4/34

slide-7
SLIDE 7

Thinnings: watershed algorithm

Local edge classification

The altitude of a vertex x, denoted F ⊖(x), is the minimal altitude of an edge which contains x:

F ⊖(x) = min{F(u) | u ∈ E and x ∈ u}

5 5 8 1 4 5 2 3 4 7 4 6 3 4 5 4 5 1 1 2 3 2 a b c d e f g h i j k l m n

  • p
  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

4/34

slide-8
SLIDE 8

Thinnings: watershed algorithm

Local edge classification

k k’<k k’’<k k k’<k k k k k

locally separating border inner

5 5 8 1 4 5 2 3 4 7 4 6 3 4 5 4 5 1 1 2 3 a b c d e f g h i j k l m n

  • p
  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

4/34

slide-9
SLIDE 9

Thinnings: watershed algorithm

Local edge classification

k k’<k k’’<k k k’<k k k k k

locally separating border inner

We say that u = {x, y} is a border edge for (for F) if:

F(u) = max(F(x), F(y)); and F(u) > min(F(x), F(y))

5 5 8 1 4 5 2 3 4 7 4 6 3 4 5 4 5 1 1 2 3 a b c d e f g h i j k l m n

  • p
  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

4/34

slide-10
SLIDE 10

Thinnings: watershed algorithm

Local edge classification

k k’<k k’’<k k k’<k k k k k

locally separating border inner

We say that u = {x, y} is a border edge for (for F) if:

F(u) = max(F(x), F(y)); and F(u) > min(F(x), F(y))

3 5 5 8 1 4 5 2 3 4 7 4 6 3 4 5 4 5 1 1 2 3 2 3 a b c d e f g h i j k l m n

  • p
  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

4/34

slide-11
SLIDE 11

Thinnings: watershed algorithm

Local edge classification

k k’<k k’’<k k k’<k k k k k

locally separating border inner

We say that u = {x, y} is a border edge for (for F) if:

F(u) = max(F(x), F(y)); and F(u) > min(F(x), F(y))

3 5 5 8 1 4 5 2 3 4 7 4 6 3 4 5 4 5 1 1 2 4 5 a b c d e f g h i j l m n

  • p

k

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

4/34

slide-12
SLIDE 12

Thinnings: watershed algorithm

B-thinnings & B-cuts

The lowering of F at u is the map F ′ such that: F ′(u) = minx∈u{F ⊖(x)}; and F ′(v) = F(v) for any edge v ∈ E \ {u}.

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

5/34

slide-13
SLIDE 13

Thinnings: watershed algorithm

B-thinnings & B-cuts

Definition A map H is a B-thinning of F if H may be derived from F by iterative lowerings at border edges

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

5/34

slide-14
SLIDE 14

Thinnings: watershed algorithm

B-thinnings & B-cuts

Definition A map H is a B-thinning of F if H may be derived from F by iterative lowerings at border edges

5 5 8 1 4 5 2 3 4 7 4 6 3 4 5 4 5 1 1 2 3 a b c d e f g h i j k l m n

  • p
  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

5/34

slide-15
SLIDE 15

Thinnings: watershed algorithm

B-thinnings & B-cuts

Definition A map H is a B-thinning of F if H may be derived from F by iterative lowerings at border edges

3 5 5 8 1 4 5 2 3 4 7 4 6 3 4 5 4 5 1 1 2 3 2 3 a b c d e f g h i j k l m n

  • p
  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

5/34

slide-16
SLIDE 16

Thinnings: watershed algorithm

B-thinnings & B-cuts

Definition A map H is a B-thinning of F if H may be derived from F by iterative lowerings at border edges

5 5 8 1 4 5 2 3 4 7 4 6 3 4 5 4 5 1 1 2 2 3 2 2 a b c d e f g h i j k l m n

  • p
  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

5/34

slide-17
SLIDE 17

Thinnings: watershed algorithm

B-thinnings & B-cuts

Definition A map H is a B-thinning of F if H may be derived from F by iterative lowerings at border edges

5 5 8 1 4 5 2 3 4 7 4 6 3 4 5 4 5 1 1 2 2 a b c d e f g h i j k l m n

  • p
  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

5/34

slide-18
SLIDE 18

Thinnings: watershed algorithm

B-thinnings & B-cuts

Definition A map H is a B-thinning of F if H may be derived from F by iterative lowerings at border edges

5 5 8 1 4 5 2 3 4 7 4 6 3 4 5 4 5 1 1 2 2 2 2 1 a b c d e f g h i j k l m n

  • p
  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

5/34

slide-19
SLIDE 19

Thinnings: watershed algorithm

B-thinnings & B-cuts

Definition A map H is a B-thinning of F if H may be derived from F by iterative lowerings at border edges

5 5 8 1 4 5 2 3 4 7 4 6 3 4 5 4 5 1 1 2 2 1 1 1 a b c d e f g h i j k l m n

  • p
  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

5/34

slide-20
SLIDE 20

Thinnings: watershed algorithm

B-thinnings & B-cuts

Definition A map H is a B-thinning of F if H may be derived from F by iterative lowerings at border edges

5 5 8 1 4 5 2 3 4 7 4 6 3 4 5 4 5 1 1 2 1 a b c d e f g h i j k l m n

  • p
  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

5/34

slide-21
SLIDE 21

Thinnings: watershed algorithm

B-thinnings & B-cuts

Definition A map H is a B-thinning of F if H may be derived from F by iterative lowerings at border edges

5 5 8 1 4 5 2 3 4 7 4 6 3 4 5 4 5 1 1 1 1 a b c d e f g h i j k l m n

  • p
  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

5/34

slide-22
SLIDE 22

Thinnings: watershed algorithm

B-thinnings & B-cuts

Definition A map H is a B-thinning of F if H may be derived from F by iterative lowerings at border edges

5 5 8 1 5 2 7 4 6 4 5 4 1 1 1 1 1 1 1 1 1 a b c d e f g h i j k l m n

  • p
  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

5/34

slide-23
SLIDE 23

Thinnings: watershed algorithm

B-thinnings & B-cuts

Definition A map H is a B-thinning of F if H may be derived from F by iterative lowerings at border edges The map H is a B-kernel of F if H is a B-thinning of F and if there is no border edge for H.

5 5 8 1 5 2 7 4 6 4 5 4 1 1 1 1 1 1 1 1 1 a b c d e f g h i j k l m n

  • p
  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

5/34

slide-24
SLIDE 24

Thinnings: watershed algorithm

B-thinnings & B-cuts

Definition We say that S ⊆ E is a B-cut of F if there exists a B-kernel H

  • f F such that S is the set of all edges linking two distinct

minima of H.

5 5 8 1 5 2 7 4 6 4 5 4 1 1 1 1 1 1 1 1 1 a b c d e f g h i j k l m n

  • p
  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

5/34

slide-25
SLIDE 25

Thinnings: watershed algorithm

B-kernels, B-cuts & watersheds

Theorem A graph X is an MSF relative to the minima of F if and only if X is the graph of the minima of a B-kernel of F An edge set S ⊆ E is a B-cut of F if and only if S is a watershed

  • f F
  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

6/34

slide-26
SLIDE 26

Thinnings: watershed algorithm

Border thinning algorithm ?

B-thinnings:

Rely on a local condition

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

7/34

slide-27
SLIDE 27

Thinnings: watershed algorithm

Border thinning algorithm ?

B-thinnings:

Rely on a local condition Adapted to parallel strategies

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

7/34

slide-28
SLIDE 28

Thinnings: watershed algorithm

Border thinning algorithm ?

B-thinnings:

Rely on a local condition Adapted to parallel strategies

Problem But a same edge can be lowered several times

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

7/34

slide-29
SLIDE 29

Thinnings: watershed algorithm

Border thinning algorithm ?

B-thinnings:

Rely on a local condition Adapted to parallel strategies

Problem But a same edge can be lowered several times

1 2 3

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

7/34

slide-30
SLIDE 30

Thinnings: watershed algorithm

Border thinning algorithm ?

B-thinnings:

Rely on a local condition Adapted to parallel strategies

Problem But a same edge can be lowered several times

1 2 2

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

7/34

slide-31
SLIDE 31

Thinnings: watershed algorithm

Border thinning algorithm ?

B-thinnings:

Rely on a local condition Adapted to parallel strategies

Problem But a same edge can be lowered several times

1 2 1

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

7/34

slide-32
SLIDE 32

Thinnings: watershed algorithm

Border thinning algorithm ?

B-thinnings:

Rely on a local condition Adapted to parallel strategies

Problem But a same edge can be lowered several times

2 1

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

7/34

slide-33
SLIDE 33

Thinnings: watershed algorithm

Border thinning algorithm ?

B-thinnings:

Rely on a local condition Adapted to parallel strategies

Problem But a same edge can be lowered several times

1 1

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

7/34

slide-34
SLIDE 34

Thinnings: watershed algorithm

Border thinning algorithm ?

B-thinnings:

Rely on a local condition Adapted to parallel strategies

Problem But a same edge can be lowered several times

1

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

7/34

slide-35
SLIDE 35

Thinnings: watershed algorithm

Border thinning algorithm ?

B-thinnings:

Rely on a local condition Adapted to parallel strategies

Problem But a same edge can be lowered several times

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

7/34

slide-36
SLIDE 36

Thinnings: watershed algorithm

Border thinning algorithm ?

B-thinnings:

Rely on a local condition Adapted to parallel strategies

Problem But a same edge can be lowered several times Naive sequential algorithm runs in O(n2)

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

7/34

slide-37
SLIDE 37

Thinnings: watershed algorithm

Towards a sequential linear-time algorithm . . .

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

8/34

slide-38
SLIDE 38

Thinnings: watershed algorithm

Towards a sequential linear-time algorithm . . .

Definition An edge u is M-border (for F) if u is a border edge for F and if

  • ne of its vertices belongs to a minimum of F

5 5 8 1 4 5 2 3 4 7 4 6 3 4 5 4 5 1 1 2 2 a b c d e f g h i j k l m n

  • p
  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

8/34

slide-39
SLIDE 39

Thinnings: watershed algorithm

Towards a sequential linear-time algorithm . . .

Definition An edge u is M-border (for F) if u is a border edge for F and if

  • ne of its vertices belongs to a minimum of F

5 5 8 1 4 5 2 3 4 7 4 6 3 4 5 4 5 1 1 2 2 2 2 1 a b c d e f g h i j k l m n

  • p
  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

8/34

slide-40
SLIDE 40

Thinnings: watershed algorithm

Towards a sequential linear-time algorithm . . .

Definition An edge u is M-border (for F) if u is a border edge for F and if

  • ne of its vertices belongs to a minimum of F

3 5 5 8 1 4 5 2 3 4 7 4 6 3 4 5 4 5 1 1 2 3 2 3 a b c d e f g h i j k l m n

  • p
  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

8/34

slide-41
SLIDE 41

Thinnings: watershed algorithm

Towards a sequential linear-time algorithm . . .

Definition An edge u is M-border (for F) if u is a border edge for F and if

  • ne of its vertices belongs to a minimum of F

We can then define M -thinnings, M -kernels and M -cuts of F

3 5 5 8 1 4 5 2 3 4 7 4 6 3 4 5 4 5 1 1 2 3 2 3 a b c d e f g h i j k l m n

  • p
  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

8/34

slide-42
SLIDE 42

Thinnings: watershed algorithm

Towards a sequential linear-time algorithm . . .

Definition An edge u is M-border (for F) if u is a border edge for F and if

  • ne of its vertices belongs to a minimum of F

We can then define M -thinnings, M -kernels and M -cuts of F

5 5 8 1 5 2 7 4 6 4 5 4 1 1 1 1 1 1 1 1 1 a b c d e f g h i j k l m n

  • p
  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

8/34

slide-43
SLIDE 43

Thinnings: watershed algorithm

M -kernels, M -cuts & watersheds

Theorem A graph X is an MSF relative to the minima of F if and only if X is the graph of the minima of a M -kernel of F An edge set S ⊆ E is an M -cut of F if and only if S is a watershed cut of F

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

9/34

slide-44
SLIDE 44

Thinnings: watershed algorithm

M -kernel Algorithm

Data: (V , E, F): an edge-weighted graph Result: F: an M -kernel of the input map, and its minima (VM, EM) L ← ∅ ;

1

Compute M(F) = (VM, EM) and F ⊖(x) for each x ∈ V ;

2

foreach u ∈ E outgoing from (VM, EM) do L ← L ∪ {u} ;

3

while there exists u ∈ L do

4

L ← L \ {u} ;

5

if u is border for F then

6

x ← the vertex in u such that F ⊖(x) < F(u) ;

7

y ← the vertex in u such that F ⊖(y) = F(u) ;

8

F(u) ← F ⊖(x) ; F ⊖(y) ← F(u) ;

9

VM ← VM ∪ {y} ; EM ← EM ∪ {u} ;

10

foreach v = {y′, y} ∈ E with y′ / ∈ VM do L ← L ∪ {v};

11

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

10/34

slide-45
SLIDE 45

Thinnings: watershed algorithm

M -kernel algorithm: analysis

Results Any edge is lowered at most once

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

11/34

slide-46
SLIDE 46

Thinnings: watershed algorithm

M -kernel algorithm: analysis

Results Any edge is lowered at most once Linear-time (O(|V | + |E|)) whatever the range of F

No need to sort No need to use a hierarchical/priority queue No need to use union-find structure

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

11/34

slide-47
SLIDE 47

Thinnings: watershed algorithm

M -kernel algorithm: analysis

Results Any edge is lowered at most once Linear-time (O(|V | + |E|)) whatever the range of F

No need to sort No need to use a hierarchical/priority queue No need to use union-find structure

The only required data structure is a list for the set L

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

11/34

slide-48
SLIDE 48

Thinnings: watershed algorithm

Watershed on plateaus?

(a) (b) (c) (a) Representation of an edge weighted graph (4-adjacency) Watersheds computed by B-kernel algorithms implementing set L

(b) as a LIFO list (c) as a priority queue with a FIFO breaking ties policy

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

12/34

slide-49
SLIDE 49

Thinnings: watershed algorithm

Watershed: pracical problem #2

Problem In practice: over-segmentation

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

13/34

slide-50
SLIDE 50

Thinnings: watershed algorithm

Over-segmentation

Solution 2 Seeded watershed (or marker based watershed)

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

14/34

slide-51
SLIDE 51

Thinnings: watershed algorithm

Over-segmentation

Solution 2 Seeded watershed (or marker based watershed) Methodology proposed by Beucher and Meyer (1993)

1 Recognition 2 Delineation (generally done by watershed) 3 Smoothing

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

14/34

slide-52
SLIDE 52

Thinnings: watershed algorithm

Over-segmentation

Solution 2 Seeded watershed (or marker based watershed) Methodology proposed by Beucher and Meyer (1993)

1 Recognition 2 Delineation (generally done by watershed) 3 Smoothing

Semantic information taken into account at steps 1 and 3

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

14/34

slide-53
SLIDE 53

Thinnings: watershed algorithm

Seeded watershed

Seeded segmentation is very popular

A user “marks by seeds” the object that are to be segmented

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

15/34

slide-54
SLIDE 54

Thinnings: watershed algorithm

Seeded watershed

Seeded segmentation is very popular

A user “marks by seeds” the object that are to be segmented

MSF cuts fall into this category

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

15/34

slide-55
SLIDE 55

Thinnings: watershed algorithm

Seeded watershed

Seeded segmentation is very popular

A automated procedure “marks by seeds” the object that are to be segmented

MSF cuts fall into this category

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

16/34

slide-56
SLIDE 56

Thinnings: watershed algorithm

Seeded watershed

Seeded segmentation is very popular

A automated procedure “marks by seeds” the object that are to be segmented

MSF cuts fall into this category A morphological solution Mathematical morphology is adapted to the design of such automated recognition procedure

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

16/34

slide-57
SLIDE 57

Thinnings: watershed algorithm

Seeded watershed: application

Myocardium segmentation in 3D+t cin´ e MRI

  • J. Cousty et al., 2007
  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

17/34

slide-58
SLIDE 58

Thinnings: watershed algorithm

Seeded watershed: application

Myocardium segmentation in 3D+t cin´ e MRI

  • J. Cousty et al., 2007

Cross-section by cross-section acquisition

FV ∂Ep ∂En CVG MVG

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

17/34

slide-59
SLIDE 59

Thinnings: watershed algorithm

Seeded watershed: application

Myocardium segmentation in 3D+t cin´ e MRI

  • J. Cousty et al., 2007

Cross-section by cross-section acquisition First, along time (ECG gated) im

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

17/34

slide-60
SLIDE 60

Thinnings: watershed algorithm

Seeded watershed: application

Myocardium segmentation in 3D+t cin´ e MRI

  • J. Cousty et al., 2007

Cross-section by cross-section acquisition First, along time (ECG gated) Then, in space

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

17/34

slide-61
SLIDE 61

Thinnings: watershed algorithm

Seeded watershed: application

Endocardial segmentation:

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

18/34

slide-62
SLIDE 62

Thinnings: watershed algorithm

Seeded watershed: application

Endocardial segmentation: Upper threshold (recognition)

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

18/34

slide-63
SLIDE 63

Thinnings: watershed algorithm

Seeded watershed: application

Endocardial segmentation: Upper threshold (recognition) Geodesic dilation in a lower threshold (delineation)

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

18/34

slide-64
SLIDE 64

Thinnings: watershed algorithm

Seeded watershed: application

Epicardial segmentation:

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

19/34

slide-65
SLIDE 65

Thinnings: watershed algorithm

Seeded watershed: application

Epicardial segmentation: Internal and external markers (recognition):

Repulsed dilation Homotopic dilation

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

19/34

slide-66
SLIDE 66

Thinnings: watershed algorithm

Seeded watershed: application

Epicardial segmentation: Internal and external markers (recognition):

Repulsed dilation Homotopic dilation

Watershed in 4D space

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

19/34

slide-67
SLIDE 67

Thinnings: watershed algorithm

Seeded watershed: application

Epicardial segmentation: Internal and external markers (recognition):

Repulsed dilation Homotopic dilation

Watershed in 4D space Smoothing (alternated sequential filters)

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

19/34

slide-68
SLIDE 68

Thinnings: watershed algorithm

Seeded watershed: application

res

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

20/34

slide-69
SLIDE 69

Thinnings: watershed algorithm

Seeded watershed for Diffusion Tensor Images (DTIs)

DTI 3D Diffusion Tensor Image equipped with the direct adjacency Edges weighted by the Log-Euclidean distance between tensors

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

21/34

slide-70
SLIDE 70

Thinnings: watershed algorithm

Seeded watershed for Diffusion Tensor Images (DTIs)

DTI

seeds

3D Diffusion Tensor Image equipped with the direct adjacency Edges weighted by the Log-Euclidean distance between tensors

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

21/34

slide-71
SLIDE 71

Thinnings: watershed algorithm

Seeded watershed for Diffusion Tensor Images (DTIs)

DTI

seeds segmentation by MSF cuts

3D Diffusion Tensor Image equipped with the direct adjacency Edges weighted by the Log-Euclidean distance between tensors Seeds automatically obtained from a statistical atlas

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

21/34

slide-72
SLIDE 72

Thinnings: watershed algorithm

Discrete optimization for seeded segmentation

Minimum spanning forests Shortest paths spanning forests Min-cuts Random Walkers

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

22/34

slide-73
SLIDE 73

Thinnings: watershed algorithm

Connection value

Definition Let π = x0, . . . , xℓ be a path in G.

ΥF(π) = max{F({xi−1, xi}) | i ∈ [1, ℓ]}

5 5 8 1 4 5 2 3 4 7 4 6 3 4 5 4 5 1 1 2 3 a b c d e f g h i j k l m n

  • p

ΥF(a, e, f , g) = 4

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

23/34

slide-74
SLIDE 74

Thinnings: watershed algorithm

Connection value

Definition Let π = x0, . . . , xℓ be a path in G.

ΥF(π) = max{F({xi−1, xi}) | i ∈ [1, ℓ]}

The connection value between two points x and y is

ΥF(x, y) = min{ΥF(π) | π path from x to y}

5 5 8 1 4 5 2 3 4 7 4 6 3 4 5 4 5 1 1 2 3 a b c d e f g h i j k l m n

  • p

ΥF(a, e, f , g) = 4 ΥF(a, g) = 4

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

23/34

slide-75
SLIDE 75

Thinnings: watershed algorithm

Connection value

Definition Let π = x0, . . . , xℓ be a path in G.

ΥF(π) = max{F({xi−1, xi}) | i ∈ [1, ℓ]}

The connection value between two points x and y is

ΥF(x, y) = min{ΥF(π) | π path from x to y}

The connection value between two subgraphs X and Y is

ΥF(X, Y ) = min{ΥF(x, y) | x ∈ V (X), y ∈ V (Y )}

5 5 8 1 4 5 2 3 4 7 4 6 3 4 5 4 5 1 1 2 3 a b c d e f g h i j k l m n

  • p

ΥF(a, e, f , g) = 4 ΥF(a, g) = 4 ΥF({a, b}, {g, h, d})

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

23/34

slide-76
SLIDE 76

Thinnings: watershed algorithm

Subdominant ultrametric

Remark The connection value is a (ultrametric) distance in a graph

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

24/34

slide-77
SLIDE 77

Thinnings: watershed algorithm

MSFs preserve connection values

Theorem If Y is an MSF relative to X, Then, for any two distinct components A et B of X :

ΥF(A, B) = ΥF(A′, B′)

where A′ et B′ are the two components of Y that contains A et B

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

25/34

slide-78
SLIDE 78

Thinnings: watershed algorithm

Shortest paths spanning forests

Remark The connection value is a (ultrametric) distance in a graph

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

26/34

slide-79
SLIDE 79

Thinnings: watershed algorithm

Shortest paths spanning forests

Definition Let X be a graph (the seeds) We say that Y is a shortest path forest relative to X if

Y is a forest relative toX and for any x ∈ V (Y ), there exists, from x to X, a path π in Y such that F(π) = F({x}, X)

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

26/34

slide-80
SLIDE 80

Thinnings: watershed algorithm

MSFs and shortest paths forests

Property If Y is a MSF relative to X, then Y is a shortest path spanning forest relative to X

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

27/34

slide-81
SLIDE 81

Thinnings: watershed algorithm

MSFs and shortest paths forests

Property If Y is a MSF relative to X, then Y is a shortest path spanning forest relative to X

2 8 8 9 2 8 8 9

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

27/34

slide-82
SLIDE 82

Thinnings: watershed algorithm

MSFs and shortest paths forests

Property If Y is a MSF relative to X, then Y is a shortest path spanning forest relative to X

2 8 8 9 2 8 8 9

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

27/34

slide-83
SLIDE 83

Thinnings: watershed algorithm

MSFs and shortest paths forests

Property If Y is a MSF relative to X, then Y is a shortest path spanning forest relative to X

2 8 8 9 2 8 8 9

Remark The converse is, in general, not true

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

27/34

slide-84
SLIDE 84

Thinnings: watershed algorithm

MSFs and shortest paths forests

Property If Y is a MSF relative to X, then Y is a shortest path spanning forest relative to X

2 8 8 9 2 8 8 9

Remark The converse is, in general, not true No connection value preservation

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

27/34

slide-85
SLIDE 85

Thinnings: watershed algorithm

MSFs and shortest paths forests

Property If Y is a MSF relative to X, then Y is a shortest path spanning forest relative to X

2 8 8 9 2 8 8 9

Remark The converse is, in general, not true No connection value preservation

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

27/34

slide-86
SLIDE 86

Thinnings: watershed algorithm

Synthetic image example

Image Dissimilarities MSF cut (white) - seeds (red) SPF cut (white) - seeds (red)

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

28/34

slide-87
SLIDE 87

Thinnings: watershed algorithm

Shortest path forests and watersheds

Property The graph X is a shortest path spanning forest relative to the minima of F if and only if X is an MSF relative to the minima of F

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

29/34

slide-88
SLIDE 88

Thinnings: watershed algorithm

Shortest path forests and watersheds

Property The graph X is a shortest path spanning forest relative to the minima of F if and only if X is an MSF relative to the minima of F Property Let X be a graph (the seeds) A subset S of E is a watershed of the flooding of F by X if and

  • nly if S is a cut induced by a shortest path spanning forest

relative to X

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

29/34

slide-89
SLIDE 89

Thinnings: watershed algorithm

Min-cuts

Definition Let X be a graph (the seeds) Let C ⊆ E be a cut relative to X The cut C is called a minimum cut (min-cut) relative to X if, for any cut C ′ relative to X we have F(C) ≤ F(C ′)

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

30/34

slide-90
SLIDE 90

Thinnings: watershed algorithm

Min-cuts

Definition Let X be a graph (the seeds) Let C ⊆ E be a cut relative to X The cut C is called a minimum cut (min-cut) relative to X if, for any cut C ′ relative to X we have F(C) ≤ F(C ′)

a: an image with seeds X in red and blue, b (resp. c): MSF cut (resp. min-cut) relative to X (white) where F is the gradient of (a) (resp. its inverse) [from All` ene et al., IVC 2010]

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

30/34

slide-91
SLIDE 91

Thinnings: watershed algorithm

Weight transformation

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

31/34

slide-92
SLIDE 92

Thinnings: watershed algorithm

Weight transformation

Let g be a decreasing (resp. increasing) map in R+

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

31/34

slide-93
SLIDE 93

Thinnings: watershed algorithm

Weight transformation

Let g be a decreasing (resp. increasing) map in R+ X MINimum SF for F iff X is a MAXimum SF (resp. MINSF) for g ◦ F

5 5 5 5 5 2 4 4 3 2 4 5 2 5 3 4 3 4

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

31/34

slide-94
SLIDE 94

Thinnings: watershed algorithm

Weight transformation

Let g be a decreasing (resp. increasing) map in R+ X MINimum SF for F iff X is a MAXimum SF (resp. MINSF) for g ◦ F

3 2 1 1 2 1 3 3 2 1 1 5

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

31/34

slide-95
SLIDE 95

Thinnings: watershed algorithm

Weight transformation

Let g be a decreasing (resp. increasing) map in R+ X MINimum SF for F iff X is a MAXimum SF (resp. MINSF) for g ◦ F Let F p : F p(u) = [F(u)]p

3 2 1 1 2 1 3 3 2 1 1 5

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

31/34

slide-96
SLIDE 96

Thinnings: watershed algorithm

Weight transformation

Let g be a decreasing (resp. increasing) map in R+ X MINimum SF for F iff X is a MAXimum SF (resp. MINSF) for g ◦ F Let F p : F p(u) = [F(u)]p X MAXSF for F p iff X MAXSF for F

5 5 5 5 5 2 4 4 3 2 4 5 2 5 3 4 3 4

p p p p p p p p p p p p p p p p p p p

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

31/34

slide-97
SLIDE 97

Thinnings: watershed algorithm

Weight transformation

Let g be a decreasing (resp. increasing) map in R+ X MINimum SF for F iff X is a MAXimum SF (resp. MINSF) for g ◦ F Let F p : F p(u) = [F(u)]p X MAXSF for F p iff X MAXSF for F Property not verified by min-cuts

5 5 5 5 5 2 4 4 3 2 4 5 2 5 3 4 3 4

p p p p p p p p p p p p p p p p p p p

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

31/34

slide-98
SLIDE 98

Thinnings: watershed algorithm

Watershed & min-cuts

Theorem There exists a real k such that for any p ≥ k

any min-cut for F p is a MAXSF cut for F p All` ene et al., Some links between extremum spanning forests, watersheds and min-cuts, IVC 2010

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

32/34

slide-99
SLIDE 99

Thinnings: watershed algorithm

Watershed & min-cuts: illustration [All` ene2010]

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

33/34

slide-100
SLIDE 100

Thinnings: watershed algorithm

Random walks

Similar results hold true for random walks segmentation See L. Najman’s talk next week

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

34/34

slide-101
SLIDE 101

Thinnings: watershed algorithm

Summary

Defining watershed in discrete spaces is difficult

Grayscale image as vertex weighted graphs Region merging problems The large familly of watersheds

Watershed in edge weighted graphs

Watershed cuts: a consistent framework Minimum spanning forests: watershed optimality Thinnings: watershed algorithms

Seeded segmentation

Watershed in practical applications Comparison with other method of combinatorial optimization

  • J. Serra, J. Cousty, B.S. Daya Sagar : Course on Math. Morphology

35/34