• Aucun résultat trouvé

Segmentation by discrete watersheds Part 1: Watershed cuts

N/A
N/A
Protected

Academic year: 2022

Partager "Segmentation by discrete watersheds Part 1: Watershed cuts"

Copied!
93
0
0

Texte intégral

(1)

Segmentation by discrete watersheds Part 1: Watershed cuts

Jean Cousty Four-Day Course

on

Mathematical Morphology in image analysis

Bangalore 19-22 October 2010

(2)

An applicative introduction to segmentation in medicine

Magnetic Resonance Imagery (MRI) is more and more used for

cardiac diagnosis

(3)

An applicative introduction to segmentation in medicine

A cardiac MRI examination includes three steps:

Spatio-temporal acquisition (cin´e MRI)

Spatio-temporal acquisition during contrast agent injection (Perfusion)

Volumic acquisition after the evacuation of the contrast agent (delayed enhanced MRI)

im

(4)

An applicative introduction to segmentation in medicine

A cardiac MRI examination includes three steps:

Spatio-temporal acquisition (cin´e MRI)

Spatio-temporal acquisition during contrast agent injection (Perfusion)

Volumic acquisition after the evacuation of the contrast agent (delayed enhanced MRI)

im

(5)

An applicative introduction to segmentation in medicine

A cardiac MRI examination includes three steps:

Spatio-temporal acquisition (cin´e MRI)

Spatio-temporal acquisition during contrast agent injection (Perfusion)

Volumic acquisition after the evacuation of the contrast agent (delayed enhanced MRI)

im

(6)

Medical problem #1

Problem

Visualizing objects of interests in 3D or 4D images

rendu2

(7)

Medical problem #2

Problem

Determining measures useful for cardiac diagnosis

Infarcted volumes, ventricular volumes, ejection fraction, myocardial

mass, movement . . .

(8)

Technical problem

Problem

Segmentation of object of interest

A morphological solution

Watershed

(9)

Technical problem

Problem

Segmentation of object of interest A morphological solution

Watershed

(10)

Watershed: introduction

For topographic purposes, the watershed has been studied since

the 19th century (Maxwell, Jordan, . . . )

(11)

Watershed: introduction

For topographic purposes, the watershed has been studied since

the 19th century (Maxwell, Jordan, . . . )

(12)

Watershed: introduction

One hundred years later (1978), it was introduced by Digabel and

Lantu´ejoul for image segmentation

(13)

Watershed: introduction

One hundred years later (1978), it was introduced by Digabel and

Lantu´ejoul for image segmentation

(14)

Watershed: introduction

One hundred years later (1978), it was introduced by Digabel and

Lantu´ejoul for image segmentation

(15)

Watershed: introduction

One hundred years later (1978), it was introduced by Digabel and

Lantu´ejoul for image segmentation

(16)

Watershed: introduction

One hundred years later (1978), it was introduced by Digabel and

Lantu´ejoul for image segmentation

(17)

Watershed: introduction

One hundred years later (1978), it was introduced by Digabel and

Lantu´ejoul for image segmentation

(18)

Watershed: problem #1

Problem

How to define the watershed of digital image?

Which mathematical framework(s)? Which properties?

Which algorithms ?

(19)

Watershed: problem #1

Problem

How to define the watershed of digital image?

Which mathematical framework(s)?

Which properties?

Which algorithms ?

(20)

Watershed: problem #1

Problem

How to define the watershed of digital image?

Which mathematical framework(s)?

Which properties?

Which algorithms ?

(21)

Watershed: problem #1

Problem

How to define the watershed of digital image?

Which mathematical framework(s)?

Which properties?

Which algorithms ?

(22)

Watershed: problem #2

Problem

In practice: over-segmentation

(23)

Over-segmentation and region merging

Solution 1

Region merging methods consist of improving an initial

segmentation by progressively merging pairs of neighboring regions

infarctus myocarde cavité sanguine

Example : delayed enhanced cardiac MRI [DOUBLIER03]

(24)

Over-segmentation and region merging

Solution 1

Region merging methods consist of improving an initial

segmentation by progressively merging pairs of neighboring regions

infarctus myocarde cavité sanguine

Example : delayed enhanced cardiac MRI [DOUBLIER03]

(25)

Over-segmentation and region merging

Solution 1

Region merging methods consist of improving an initial

segmentation by progressively merging pairs of neighboring regions

infarctus myocarde cavité sanguine

Example : delayed enhanced cardiac MRI [DOUBLIER03]

(26)

Over-segmentation and region merging

Solution 1

Region merging methods consist of improving an initial

segmentation by progressively merging pairs of neighboring regions

infarctus myocarde cavité sanguine

Example : delayed enhanced cardiac MRI [DOUBLIER03]

(27)

Over-segmentation and region merging

Solution 1

Region merging methods consist of improving an initial

segmentation by progressively merging pairs of neighboring regions

infarctus myocarde cavité sanguine

Example : delayed enhanced cardiac MRI [DOUBLIER03]

(28)

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

To kow more about this framework, wait for the second

lecture of today

(29)

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

To kow more about this framework, wait for the second

lecture of today

(30)

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

To kow more about this framework, wait for the second

lecture of today

(31)

Outline

1 Defining discrete watersheds is difficult Grayscale image as vertex weighted graphs Region merging problems

2 Watershed in edge-weighted graphs

Watershed cuts: definition and consistency

Minimum spanning forests: watershed optimality

(32)

Defining discrete watersheds is difficult

Can we draw a watershed of this image?

2 2 2 2 2

40 30 30 30 40 40 20 20 20 40 40 40 20 40 40 1 5 20 5 1

Image equipped with the 4-adjacency

Label the pixels according to catchment basins letters A,B and C

(33)

Defining discrete watersheds is difficult

Can we draw a watershed of this image?

A A A A A

40 30 30 30 40 40 20 20 20 40 40 40 20 40 40 B 5 20 5 C

Image equipped with the 4-adjacency

Label the pixels according to catchment basins letters A,B and C

(34)

Defining discrete watersheds is difficult

Possible drawings

A A A A A

40 30 30 30 40 40 20 20 20 40 40 40 20 40 40 B 5 20 5 C

A A A A A

A A A A A

40 20 20 20 40

B B 20 C C

B B 20 C C Topographical watershed

Conclusion

Not easy to define watersheds of digital images

(35)

Defining discrete watersheds is difficult

Possible drawings

A A A A A

40 30 30 30 40 40 20 20 20 40 40 40 20 40 40 B 5 20 5 C

A A A A A

A A A A A

C C C C C

B B C C C

B B C C C

Flooding from the minima

Conclusion

Not easy to define watersheds of digital images

(36)

Defining discrete watersheds is difficult

Possible drawings

A A A A A

40 30 30 30 40 40 20 20 20 40 40 40 20 40 40 B 5 20 5 C

A A A A A

A A A A A

40 A A A 40

B 40 A 40 C B B 20 C C Flooding with divide

Conclusion

Not easy to define watersheds of digital images

(37)

Defining discrete watersheds is difficult

Possible drawings

A A A A A

40 30 30 30 40 40 20 20 20 40 40 40 20 40 40 B 5 20 5 C

A A A A A

40 30 30 30 40

B B 20 C C

B B 20 C C

B B 20 C C Topological watershed

Conclusion

Not easy to define watersheds of digital images

(38)

Defining discrete watersheds is difficult

Possible drawings

A A A A A

40 30 30 30 40 40 20 20 20 40 40 40 20 40 40 B 5 20 5 C

A A A A A

40 30 30 30 40

B B 20 C C

B B 20 C C

B B 20 C C Topological watershed

Conclusion

Not easy to define watersheds of digital images

(39)

Defining discrete watersheds is difficult

Region merging: Problem #1

Problem : “When 3 regions meet”, [PAVLIDIS-77]

Is there some adjacency relations (graphs) for which any pair of

neighboring regions can always be merged, while preserving all

other regions?

(40)

Defining discrete watersheds is difficult

Region merging: Problem #1

Problem : “When 3 regions meet”, [PAVLIDIS-77]

Is there some adjacency relations (graphs) for which any pair of

neighboring regions can always be merged, while preserving all

other regions?

(41)

Defining discrete watersheds is difficult

Region merging: Problem #1

A B

C

D

Problem : “When 3 regions meet”, [PAVLIDIS-77]

Is there some adjacency relations (graphs) for which any pair of

neighboring regions can always be merged, while preserving all

other regions?

(42)

Defining discrete watersheds is difficult

Region merging: Problem #1

A B

C

D x

y

Problem : “When 3 regions meet”, [PAVLIDIS-77]

Is there some adjacency relations (graphs) for which any pair of

neighboring regions can always be merged, while preserving all

other regions?

(43)

Defining discrete watersheds is difficult

Region merging: Problem #1

A B

C

D

Problem : “When 3 regions meet”, [PAVLIDIS-77]

Is there some adjacency relations (graphs) for which any pair of

neighboring regions can always be merged, while preserving all

other regions?

(44)

Defining discrete watersheds is difficult

Region merging: Problem #1

adjacence directe adjacence indirecte ?

Problem : “When 3 regions meet”, [PAVLIDIS-77]

Is there some adjacency relations (graphs) for which any pair of

neighboring regions can always be merged, while preserving all

other regions?

(45)

Defining discrete watersheds is difficult

Region merging: Problem # 2

A cleft is a set of vertices from which a point cannot be removed while leaving unchanged the number of connected components of its complement

A cleft is thin if all its vertices are adjacent to its complement

Problem : Thick cleft (or binary watershed)

Is there some graphs in which any cleft is thin?

(46)

Defining discrete watersheds is difficult

Region merging: Problem # 2

A cleft is a set of vertices from which a point cannot be removed while leaving unchanged the number of connected components of its complement

A cleft is thin if all its vertices are adjacent to its complement

Problem : Thick cleft (or binary watershed)

Is there some graphs in which any cleft is thin?

(47)

Defining discrete watersheds is difficult

Region merging: Problem # 2

A cleft is a set of vertices from which a point cannot be removed while leaving unchanged the number of connected components of its complement

A cleft is thin if all its vertices are adjacent to its complement

Problem : Thick cleft (or binary watershed)

Is there some graphs in which any cleft is thin?

(48)

Defining discrete watersheds is difficult

Region merging: Problem # 2

A cleft is a set of vertices from which a point cannot be removed while leaving unchanged the number of connected components of its complement

A cleft is thin if all its vertices are adjacent to its complement

Problem : Thick cleft (or binary watershed)

Is there some graphs in which any cleft is thin?

(49)

Defining discrete watersheds is difficult

The familly of watersheds

Topological watersheds

Only watersheds that preserve the altitudes of the passes

On pixels

Fusion graphs

Link between thinness, region merging, and watersheds

On edges

Watershed cuts

Optimality, drop of water principle

Power watersheds

Framework for seeded image segmentation (graph cuts, random walker,. . .)

Energy minimization q= 2 =⇒uniqueness

Ultrametric watersheds

Hierarchical segmentation

On complexes

Simplicial stacks

Link between collapse, watersheds and optimal spanning forests

(50)

Watershed in edge-weighted graphs

Watershed in edge-weighted graphs

Let G = (V , E ) be a graph. Let F be a map from E to R

5 5

5 5

5

2 4 4

3 2 4

0 5 2

5 3

4

4

3

(51)

Watershed in edge-weighted graphs

Watershed in edge-weighted graphs

Let G = (V , E ) be a graph.

Let F be a map from E to R

5 5

5 5

5

2 4 4

3 2 4

0 5 2

5 3

4

4

3

(52)

Watershed in edge-weighted graphs

Image and edge-weighted graph

For applications to image analysis V is the set of pixels

E corresponds to an adjacency relation on V , (e.g., 4- or 8-adjacency in 2D)

F is a “gradient” of I : The altitude of u, an edge between two pixels x and y, represents the dissimilarity between x and y

F (u) = | I (x) − I (y ) | .

(53)

Watershed in edge-weighted graphs

Regional minima

00 2 1

2

3 2 3

4 5 4

5 5

7 7 7

7 6 2

Definition

A subgraph X of G is a minimum of F (at altitude k ) if:

X is connected; and

k is the altitude of any edge of X ; and

the altitude of any edge adjacent to X is strictly greater than k

(54)

Watershed in edge-weighted graphs

Extension

a subgraph X

an extension Y of X

Definition (from Def. 12, (Ber05))

Let X and Y be two non-empty subgraphs of G

We say that Y is an extension of X (in G ) if X ⊆ Y and if any

component of Y contains exactly one component of X .

(55)

Watershed in edge-weighted graphs

Extension

a subgraph X an extension Y of X

Definition (from Def. 12, (Ber05))

Let X and Y be two non-empty subgraphs of G

We say that Y is an extension of X (in G ) if X ⊆ Y and if any

component of Y contains exactly one component of X .

(56)

Watershed in edge-weighted graphs

Extension

a subgraph X an extension Y of X

Definition (from Def. 12, (Ber05))

Let X and Y be two non-empty subgraphs of G

We say that Y is an extension of X (in G ) if X ⊆ Y and if any

component of Y contains exactly one component of X .

(57)

Watershed in edge-weighted graphs

Extension

a subgraph X an extension Y of X

Definition (from Def. 12, (Ber05))

Let X and Y be two non-empty subgraphs of G

We say that Y is an extension of X (in G ) if X ⊆ Y and if any

component of Y contains exactly one component of X .

(58)

Watershed in edge-weighted graphs

Extension

a subgraph X an extension Y of X

Definition (from Def. 12, (Ber05))

Let X and Y be two non-empty subgraphs of G

We say that Y is an extension of X (in G ) if X ⊆ Y and if any

component of Y contains exactly one component of X .

(59)

Watershed in edge-weighted graphs

Extension

a subgraph X an extension Y of X

Definition (from Def. 12, (Ber05))

Let X and Y be two non-empty subgraphs of G

We say that Y is an extension of X (in G ) if X ⊆ Y and if any

component of Y contains exactly one component of X .

(60)

Watershed in edge-weighted graphs

Extension

a subgraph X an extension Y of X

Definition (from Def. 12, (Ber05))

Let X and Y be two non-empty subgraphs of G

We say that Y is an extension of X (in G ) if X ⊆ Y and if any

component of Y contains exactly one component of X .

(61)

Watershed in edge-weighted graphs

Extension

a subgraph X an extension Y of X

Definition (from Def. 12, (Ber05))

Let X and Y be two non-empty subgraphs of G

We say that Y is an extension of X (in G ) if X ⊆ Y and if any

component of Y contains exactly one component of X .

(62)

Watershed in edge-weighted graphs

Graph cut

a subgraph X a (graph) cut S for X

Definition (Graph cut)

Let X be a subgraph of G and S ⊆ E , a set of edges.

We say that S is a (graph) cut for X if S is an extension of X and

if S is minimal for this property

(63)

Watershed in edge-weighted graphs

Watershed cut

The church of Sorbier (a topographic intuition)

Definition (drop of water principle)

The set S ⊆ E is a watershed cut of F if S is an extension of M(F ) and if for any u = { x 0 , y 0 } ∈ S , there exist h x 0 , . . . , x n i

and h y 0 , . . . , y m i , two descending paths in S such that:

1 x n and y m are vertices of two distinct minima of F ; and

2 F (u) ≥ F ( { x 0 , x 1 } ) if n > 0 and F (u) ≥ F ( { y 0 , y 1 } ) if m > 0

(64)

Watershed in edge-weighted graphs

Watershed cut: example

2 6 6

2 6 5

5 7 3

6 5 3

1 2

5 6 7

5 7 3

4

5

8 3

(65)

Watershed in edge-weighted graphs

Watershed cut: example

2 6 6

2 6 5

5 7 3

6 5 3

1 2 8

5 6 7

5 7 3

4

5

3

(66)

Watershed in edge-weighted graphs

Watershed cut: example

2 6 6

2 6 5

5 7 3

6 5 3

1 2 8

5 6 7

5 7 3

4

5

3

(67)

Watershed in edge-weighted graphs

Watershed cut: example

2 6 6

2 6 5

5 7 3

6 5 3

1 2 8

5 6 7

5 7 3

4

5

3

(68)

Watershed in edge-weighted graphs

Watershed cut: example

2 6 6

2 6 5

5 7 3

6 5 3

1 2 8

5 6 7

5 7 3

4

5

3

(69)

Watershed in edge-weighted graphs

Watershed cut: example

2 6 6

2 6 5

5 7 3

6 5 3

1 2 8

5 6 7

5 7 3

4

5

3

(70)

Watershed in edge-weighted graphs

Steepest descent

2 6 6

2 6 5

5 7 3

6 5 3

1 2 8

5 6 7

5 7 3

4 5 3

Definition

Let π = h x 0 , . . . , x l i be a path in G .

The path π is a path with steepest descent for F if:

∀ i ∈ [1, l ], F ({ x i−1 , x i }) = min {x

i−1

,y}∈E F ({ x i −1 , y })

(71)

Watershed in edge-weighted graphs

Catchment basins by a steepest descent property

Definition

Let S be a cut for M (F ), the minima of F

We say that S is a basin cut of F if, from each point of V

to M (F ), there exists, in the graph induced by S , a path with

steepest descent for F

(72)

Watershed in edge-weighted graphs

Catchment basins by a steepest descent property

Theorem (consistency)

An edge-set S ⊆ E is a basin cut of F if and only if S is a

watershed cut of F

(73)

Watershed in edge-weighted graphs

Illustration to grayscale image segmentation

(74)

Watershed in edge-weighted graphs

Illustration to grayscale image segmentation

(75)

Watershed in edge-weighted graphs

Illustration to mesh segmentation

(76)

Watershed in edge-weighted graphs

Watershed optimality?

Problem

Are watersheds optimal segmentations?

Which combinatorial optimization problem do they solve?

(77)

Watershed in edge-weighted graphs

Relative minimum spanning forest: an image intuitition

cut forest spanning regions

(78)

Watershed in edge-weighted graphs

Relative forest: a botanical intuition

A tree (Lal Bagh)

(79)

Watershed in edge-weighted graphs

Relative forest: a botanical intuition

Cuting the roots yield a forest of several trees

(80)

Watershed in edge-weighted graphs

Relative forest: a botanical intuition

Roots may contain cycles

(81)

Watershed in edge-weighted graphs

Relative forest

a subgraph X a forest Y relative to X

Definition

Let X and Y be two non-empty subgraphs of G . We say that Y is a forest relative to X if:

1 Y is an extension of X ; and

2 any cycle of Y is also a cycle of X

(82)

Watershed in edge-weighted graphs

Minimum spanning forest

The weight of a forest Y is the sum of its edge weights i.e.

P

u∈E(Y ) F (u).

Definition

We say that Y is a minimum spanning forest (MSF) relative to X if Y is a spanning forest relative to X and

if the weight of Y is less than or equal to the weight of any other

spanning forest relative to X

(83)

Watershed in edge-weighted graphs

Minimum spanning forest

The weight of a forest Y is the sum of its edge weights i.e.

P

u∈E(Y ) F (u).

Definition

We say that Y is a minimum spanning forest (MSF) relative to X if Y is a spanning forest relative to X and

if the weight of Y is less than or equal to the weight of any other

spanning forest relative to X

(84)

Watershed in edge-weighted graphs

Minimum spanning forest: example

5 5

5 5

5

2 4 4

3 2 4

0 5 2

5 3

4

4 3

If Y is a MSF relative to X , there exists a unique cut S for Y and this cut is also a cut for X ;

In this case, we say that S is a MSF cut for X .

(85)

Watershed in edge-weighted graphs

Minimum spanning forest: example

5 5

5 5

5

2 4 4

3 2 4

0 5 2

5 3

4 3

4

If Y is a MSF relative to X , there exists a unique cut S for Y and this cut is also a cut for X ;

In this case, we say that S is a MSF cut for X .

(86)

Watershed in edge-weighted graphs

Minimum spanning forest: example

5 5

5 5

5

2 4 4

3 2 4

0 5 2

5 3

4 3

4

If Y is a MSF relative to X , there exists a unique cut S for Y and this cut is also a cut for X ;

In this case, we say that S is a MSF cut for X .

(87)

Watershed in edge-weighted graphs

Minimum spanning forest: example

5 5

5 5

5

2 4 4

3 2 4

0 5 2

5 3

4 3

4

If Y is a MSF relative to X , there exists a unique cut S for Y and this cut is also a cut for X ;

In this case, we say that S is a MSF cut for X .

(88)

Watershed in edge-weighted graphs

Minimum spanning forest: example

5 5

5 5

5

2 4 4

3 2 4

0 5 2

5 3

4 3

4

If Y is a MSF relative to X , there exists a unique cut S for Y and this cut is also a cut for X ;

In this case, we say that S is a MSF cut for X .

(89)

Watershed in edge-weighted graphs

Watershed optimality

Theorem

An edge-set S ⊆ E is a MSF cut for the minima of F if and only

if S is a watershed cut of F

(90)

Watershed in edge-weighted graphs

Minimum spanning tree

Computing a MSF ⇔ computing a minimum spanning tree

Best algorithm [CHAZEL00]: quasi-linear time

Problem

Can we reach a better complexity for computing watershed cuts?

A morphological solution

To know the answer, come back after the coffee break

(91)

Watershed in edge-weighted graphs

Minimum spanning tree

Computing a MSF ⇔ computing a minimum spanning tree Best algorithm [CHAZEL00]: quasi-linear time

Problem

Can we reach a better complexity for computing watershed cuts?

A morphological solution

To know the answer, come back after the coffee break

(92)

Watershed in edge-weighted graphs

Minimum spanning tree

Computing a MSF ⇔ computing a minimum spanning tree Best algorithm [CHAZEL00]: quasi-linear time

Problem

Can we reach a better complexity for computing watershed cuts?

A morphological solution

To know the answer, come back after the coffee break

(93)

Watershed in edge-weighted graphs

Minimum spanning tree

Computing a MSF ⇔ computing a minimum spanning tree Best algorithm [CHAZEL00]: quasi-linear time

Problem

Can we reach a better complexity for computing watershed cuts?

A morphological solution

To know the answer, come back after the coffee break

Références

Documents relatifs

Aujourd'hui comme toujours, le bus 91JLdesservait notre ligne était si bourré que, déjà avant daniv e r à notre arrêt, on voyait une foultitude de bras et de jambes émergeant

Moving to the fully parallel implementation on the GPU, developed according to Algorithm 1, Table 2 shows that the bot- tleneck on step 1 is completely mitigated, whereas for step 2

In one of the four classes of graphs introduced in [8], called the class of perfect fusion graphs, any pair of neighboring regions A, B can always be merged, without problems with

A topological watershed and its divide constitute an interesting segmentation which satisfies important properties (see [18], [23], [25]) not guaranteed by most popular

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

On the other hand, there exists some graphs which are not perfect fusion graphs and in which any topological watershed is thin (see for instance Fig. 1.2) can be seen as a

The purpose of this note is to give a short proof of a weighted version of the Hardy’s inequality in the sequence case.. This includes the known case of classical polynomial

We propose in this paper an interactive segmentation method based on watershed and graph cuts to extract liver tumors boundaries in 3D CT images.. 3 MICCAI 2008 is the