• Aucun résultat trouvé

Connected operators

N/A
N/A
Protected

Academic year: 2022

Partager "Connected operators"

Copied!
58
0
0

Texte intégral

(1)

Connected operators

Jean Cousty MorphoGraphs and Imagery

2011

(2)

Introduction: a problem seen during practical session

Problem: Fill the holes of the cells

Closing by a structuring element, Holes are closed

But contours “have moved”

A connected closing by reconstruction

(3)

Introduction: a problem seen during practical session

Problem: Fill the holes of the cells Closing by a structuring element,

Holes are closed

But contours “have moved”

A connected closing by reconstruction

(4)

Introduction: a problem seen during practical session

Problem: Fill the holes of the cells Closing by a structuring element,

Holes are closed

But contours “have moved”

A connected closing by reconstruction

(5)

Outline of the lecture

1 Connectivity: reminder

2 Connected openings/closings: the case of sets

3 Connected opening: the case of grayscale images

4 Component tree

(6)

Connectivity: reminder

Connexit´ e

E is a set

G = (E, Γ) is a graph

(7)

Connectivity: reminder

Connected components of a set

Definition

Let X ⊆ E

The subgraph of G induced by X is the graph (X , Γ X ) such that

− →

Γ

X

= {(x, y) ∈ − →

Γ | x ∈ X , y ∈ X }

A connected component of the subgraph of G induced by X is simply called a connected component of X

C X denotes the set of all connected components of X

X ⊆ E (in black)

(E = Z 2 et Γ = Γ 4 )

(8)

Connectivity: reminder

Connected components of a set

Definition

Let X ⊆ E

The subgraph of G induced by X is the graph (X , Γ X ) such that

− →

Γ

X

= {(x, y) ∈ − →

Γ | x ∈ X , y ∈ X }

A connected component of the subgraph of G induced by X is simply called a connected component of X

C X denotes the set of all connected components of X

X ⊆ E (in black)

(E = Z 2 et Γ = Γ 4 )

(9)

Connectivity: reminder

Connected components of a set

Definition

Let X ⊆ E

The subgraph of G induced by X is the graph (X , Γ X ) such that

− →

Γ

X

= {(x, y) ∈ − →

Γ | x ∈ X , y ∈ X }

A connected component of the subgraph of G induced by X is simply called a connected component of X

C X denotes the set of all connected components of X

Partition of X into connected components

(E = Z 2 et Γ = Γ 4 )

(10)

Connectivity: reminder

Connected components of a set

Definition

Let X ⊆ E

The subgraph of G induced by X is the graph (X , Γ X ) such that

− →

Γ

X

= {(x, y) ∈ − →

Γ | x ∈ X , y ∈ X }

A connected component of the subgraph of G induced by X is simply called a connected component of X

C X denotes the set of all connected components of X

(E = Z 2 et Γ = Γ 4 )

(11)

Connected openings/closings: the case of sets

Connected openings/closings

Definition

A filter γ on E is a connected opening if

∀X ∈ P(E ), C

γ(X)

⊆ C

X

A filter φ on E is a connected closing if

∀X ∈ P(E ), C

γ(X)

⊆ C

X

Property

A connected opening γ is an opening

∀X , Y ∈ P(E ), X ⊆ Y = ⇒ γ(X ) ⊆ γ(Y ) (increasing)

∀X ∈ P(E ), γ(γ(X )) = γ(X) (idempotent)

∀X ∈ P(E ), γ(X ) ⊆ X (anti-axtensive)

(12)

Connected openings/closings: the case of sets

Connected openings/closings

Definition

A filter γ on E is a connected opening if

∀X ∈ P(E ), C

γ(X)

⊆ C

X

A filter φ on E is a connected closing if

∀X ∈ P(E ), C

γ(X)

⊆ C

X

Property

A connected opening γ is an opening

∀X, Y ∈ P(E ), X ⊆ Y = ⇒ γ(X ) ⊆ γ(Y ) (increasing)

∀X ∈ P(E ), γ(γ(X )) = γ(X ) (idempotent)

∀X ∈ P(E ), γ(X ) ⊆ X (anti-axtensive)

(13)

Connected openings/closings: the case of sets

Connected openings/closings

Definition

A filter γ on E is a connected opening if

∀X ∈ P(E ), C

γ(X)

⊆ C

X

A filter φ on E is a connected closing if

∀X ∈ P(E ), C

γ(X)

⊆ C

X

Property

A connected closing γ is a closing

∀X, Y ∈ P(E ), X ⊆ Y = ⇒ γ(X ) ⊆ γ(Y ) (increasing)

∀X ∈ P(E ), γ(γ(X )) = γ(X ) (idempotence)

∀X ∈ P(E ), X ⊆ γ(X ) (extensive)

(14)

Connected openings/closings: the case of sets

Example: area connected opening

Definition

Let λ ∈ N

The area connected opening of parameter λ is the operator α λ on E defined by

∀X ∈ P(E ), α

λ

(X ) = ∪{C ∈ C

X

| |C| ≥ λ}

X ⊆ E

(E = Z 2 et Γ = Γ 4 )

(15)

Connected openings/closings: the case of sets

Example: area connected opening

Definition

Let λ ∈ N

The area connected opening of parameter λ is the operator α λ on E defined by

∀X ∈ P(E ), α

λ

(X ) = ∪{C ∈ C

X

| |C| ≥ λ}

X ⊆ E

(E = Z 2 et Γ = Γ 4 )

(16)

Connected openings/closings: the case of sets

Example: area connected opening

Definition

Let λ ∈ N

The area connected opening of parameter λ is the operator α λ on E defined by

∀X ∈ P(E ), α

λ

(X ) = ∪{C ∈ C

X

| |C| ≥ λ}

α 1 (X )

(E = Z 2 et Γ = Γ 4 )

(17)

Connected openings/closings: the case of sets

Example: area connected opening

Definition

Let λ ∈ N

The area connected opening of parameter λ is the operator α λ on E defined by

∀X ∈ P(E ), α

λ

(X ) = ∪{C ∈ C

X

| |C| ≥ λ}

α 2 (X )

(E = Z 2 et Γ = Γ 4 )

(18)

Connected openings/closings: the case of sets

Example: area connected opening

Definition

Let λ ∈ N

The area connected opening of parameter λ is the operator α λ on E defined by

∀X ∈ P(E ), α

λ

(X ) = ∪{C ∈ C

X

| |C| ≥ λ}

α 13 (X )

(E = Z 2 et Γ = Γ 4 )

(19)

Connected openings/closings: the case of sets

Example: connected opening by reconstruction

Definition

Let M ⊆ E

The opening by reconstruction of (the marker) M is the operator ψ M on E defined by

∀X ∈ P(E ), ψ

M

(X ) = ∪{C ∈ C

X

| M ∩ C 6= ∅}

X ⊆ E et M (hatched dots)

(E = Z 2 et Γ = Γ 4 )

(20)

Connected openings/closings: the case of sets

Example: connected opening by reconstruction

Definition

Let M ⊆ E

The opening by reconstruction of (the marker) M is the operator ψ M on E defined by

∀X ∈ P(E ), ψ

M

(X ) = ∪{C ∈ C

X

| M ∩ C 6= ∅}

X ⊆ E

et M (hatched dots)

(E = Z 2 et Γ = Γ 4 )

(21)

Connected openings/closings: the case of sets

Example: connected opening by reconstruction

Definition

Let M ⊆ E

The opening by reconstruction of (the marker) M is the operator ψ M on E defined by

∀X ∈ P(E ), ψ

M

(X ) = ∪{C ∈ C

X

| M ∩ C 6= ∅}

0000 111100

11 00 11 00 11 0000 1111 0000 1111 00 11 00 11

0000 00 1111 11 0000 00 1111 11

00 11

X ⊆ E et M (hatched dots)

(E = Z 2 et Γ = Γ 4 )

(22)

Connected openings/closings: the case of sets

Example: connected opening by reconstruction

Definition

Let M ⊆ E

The opening by reconstruction of (the marker) M is the operator ψ M on E defined by

∀X ∈ P(E ), ψ

M

(X ) = ∪{C ∈ C

X

| M ∩ C 6= ∅}

0000 111100

11 00 11 00 11 0000 1111 0000 1111 00 11 00 11

0000 00 1111 11 0000 00 1111 11

00 11

ψ M (X )

(E = Z 2 et Γ = Γ 4 )

(23)

Connected openings/closings: the case of sets

Properties of connected filters

Property

γ is a connected opening ⇔ ?γ is a connected closing

Property (contour preservation)

If γ is a connected opening or closing, then

∀X ∈ P(E ), ∀(x, y) ∈ − → Γ ,

|{x, y} ∩ γ(X )| = 1 = ⇒ |{x , y } ∩ X | = 1

(24)

Connected openings/closings: the case of sets

Properties of connected filters

Property

γ is a connected opening ⇔ ?γ is a connected closing

Property (contour preservation)

If γ is a connected opening or closing, then

∀X ∈ P(E ), ∀(x, y) ∈ − → Γ ,

|{x, y} ∩ γ(X )| = 1 = ⇒ |{x , y } ∩ X | = 1

(25)

Connected opening: the case of grayscale images

Grayscale connected opening/closing

Definition (connected opening)

An operator γ on I is a connected opening (on I) if

∀F ∈ I , γ(γ(F )) = γ(F) (idempotence)

∀F, H ∈ I, ∀k ∈ Z , F

k

⊆ H

k

= ⇒ γ(F)

k

⊆ γ(H)

k

(increasing)

∀F ∈ I , ∀k ∈ Z , C

[γ(F)k]

⊆ C

[Fk]

(connected, anti-extensive)

Definition (connected closing)

An operator γ on I is a connected closing (on I ) if

∀F ∈ I , γ(γ(F )) = γ(F) (idempotence)

∀F, H ∈ I, ∀k ∈ Z , F

k

⊆ H

k

= ⇒ γ(F )

k

⊆ γ(H)

k

(increasing)

∀F ∈ I , ∀k ∈ Z , C

[γ(F)

k]

⊆ C

[F

k]

(connected, extensive)

(26)

Connected opening: the case of grayscale images

Grayscale connected opening/closing

Definition (connected opening)

An operator γ on I is a connected opening (on I) if

∀F ∈ I , γ(γ(F )) = γ(F) (idempotence)

∀F, H ∈ I, ∀k ∈ Z , F

k

⊆ H

k

= ⇒ γ(F)

k

⊆ γ(H)

k

(increasing)

∀F ∈ I , ∀k ∈ Z , C

[γ(F)k]

⊆ C

[Fk]

(connected, anti-extensive)

Definition (connected closing)

An operator γ on I is a connected closing (on I) if

∀F ∈ I , γ(γ(F )) = γ(F) (idempotence)

∀F, H ∈ I, ∀k ∈ Z , F

k

⊆ H

k

= ⇒ γ(F)

k

⊆ γ(H)

k

(increasing)

∀F ∈ I , ∀k ∈ Z , C

[γ(F)

k]

⊆ C

[F

k]

(connected, extensive)

(27)

Connected opening: the case of grayscale images

Examples

The stack operator induced by α λ (where λ ∈ N) is a connected opening on I

The stack operator induced by ψ M (where M ⊆ E ) is a connected opening on I

The stack operator induced by any connected opening on E is a connected opening on I

I Altitudes

E

∀x ∈ {x, − + 1}

Connected components of the level sets (red)

J. Cousty : MorphoGraph and Imagery 11/28

(28)

Connected opening: the case of grayscale images

Examples

The stack operator induced by α λ (where λ ∈ N) is a connected opening on I

The stack operator induced by ψ M (where M ⊆ E ) is a connected opening on I

The stack operator induced by any connected opening on E is a connected opening on I

Altitudes

I

E

E = Z, ∀x ∈ E, Γ(x) = {x, x − 1, x + 1}

J. Cousty : MorphoGraph and Imagery 11/28

(29)

Connected opening: the case of grayscale images

Examples

The stack operator induced by α λ (where λ ∈ N) is a connected opening on I

The stack operator induced by ψ M (where M ⊆ E ) is a connected opening on I

The stack operator induced by any connected opening on E is a connected opening on I

Altitudes

I

E

E = Z, ∀x ∈ E, Γ(x) = {x, x − 1, x + 1}

J. Cousty : MorphoGraph and Imagery 11/28

(30)

Connected opening: the case of grayscale images

Examples

The stack operator induced by α λ (where λ ∈ N) is a connected opening on I

The stack operator induced by ψ M (where M ⊆ E ) is a connected opening on I

The stack operator induced by any connected opening on E is a connected opening on I

Altitudes

I

E

E = Z, ∀x ∈ E, Γ(x) = {x, x − 1, x + 1}

J. Cousty : MorphoGraph and Imagery 11/28

(31)

Connected opening: the case of grayscale images

Examples

The stack operator induced by α λ (where λ ∈ N) is a connected opening on I

The stack operator induced by ψ M (where M ⊆ E) is a connected opening on I

The stack operator induced by any connected opening on E is a connected opening on I

Altitudes

I

E

E = Z, ∀x ∈ E, Γ(x) = {x, x − 1, x + 1}

J. Cousty : MorphoGraph and Imagery 11/28

(32)

Connected opening: the case of grayscale images

Examples

The stack operator induced by α λ (where λ ∈ N) is a connected opening on I

The stack operator induced by ψ M (where M ⊆ E) is a connected opening on I

The stack operator induced by any connected opening on E is a connected opening on I

Altitudes

I

E

E = Z, ∀x ∈ E, Γ(x) = {x, x − 1, x + 1}

J. Cousty : MorphoGraph and Imagery 11/28

(33)

Connected opening: the case of grayscale images

Grayscale connected opening

Definition

Let F ∈ I

The opening by reconstruction of (the marker) F is the operator ψ F on I defined by

∀H ∈ I , ∀k ∈ Z , [ψ

F

(H)]

k

= ψ

[Fk]

(H

k

)

E Altitudes

H F

H in black, F in blue

(34)

Connected opening: the case of grayscale images

Grayscale connected opening

Definition

Let F ∈ I

The opening by reconstruction of (the marker) F is the operator ψ F on I defined by

∀H ∈ I , ∀k ∈ Z , [ψ

F

(H)]

k

= ψ

[Fk]

(H

k

)

E Altitudes

H F

H in black, F in blue

(35)

Connected opening: the case of grayscale images

Grayscale connected opening

Definition

Let F ∈ I

The opening by reconstruction of (the marker) F is the operator ψ F on I defined by

∀H ∈ I , ∀k ∈ Z , [ψ

F

(H)]

k

= ψ

[Fk]

(H

k

)

E F

Altitudes

H

ψ F (H) (in black)

(36)

Connected opening: the case of grayscale images

Properties

Property (duality)

An operator φ is a connected closing on I if and only if its dual ?φ is a connected opening on I, where

∀F ∈ I , ?φ(F) = −φ(−F )

Property (contour preservation)

If γ is a connected opening or closing on I, then

∀F ∈ I , ∀(x , y ) ∈ − →

Γ , γ(F)(x) 6= γ(F )(y ) = ⇒ F (x) 6= F(y )

(37)

Connected opening: the case of grayscale images

Properties

Property (duality)

An operator φ is a connected closing on I if and only if its dual ?φ is a connected opening on I, where

∀F ∈ I , ?φ(F) = −φ(−F )

Property (contour preservation)

If γ is a connected opening or closing on I, then

∀F ∈ I , ∀(x , y ) ∈ − →

Γ , γ(F)(x) 6= γ(F )(y ) = ⇒ F (x) 6= F(y )

(38)

Component tree

Component tree

Probl` eme

How to implement a connected operator?

Data structure: component tree How to build other connected operators?

Criterion on the nodes of the component tree

(39)

Component tree

Notation

In the following, the symbol I denotes a grayscale image

on E: I ∈ I

(40)

Component tree

Connected component of an image

Definition

We denote by C I the union of the sets of connected components of the level sets of I

C

I

= ∪{C

[Ik]

| k ∈ Z }

Each element in C I is called a connected component of I

Altitudes

I

E

Components of I (bold red lines)

(41)

Component tree

Component tree

Definition

Let C 1 and C 2 be two components of I in C I We say that C 1 is a child of C 2 (for I) if

C

1

⊆ C

2

∀C

0

∈ C

I

, if C

1

⊆ C

0

⊆ C

2

then C

0

= C

2

or C

0

= C

1

The component tree of I is the graph A I = (C I , Γ I ) such that (C

1

, C

2

) ∈ Γ

I

if C

2

is a child of C

1

Altitudes

I

The relation “is child of” is

represented by red arrows

(42)

Component tree

Component tree

Definition

Let C 1 and C 2 be two components of I in C I We say that C 1 is a child of C 2 (for I) if

C

1

⊆ C

2

∀C

0

∈ C

I

, if C

1

⊆ C

0

⊆ C

2

then C

0

= C

2

or C

0

= C

1

The component tree of I is the graph A I = (C I , Γ I ) such that (C

1

, C

2

) ∈ Γ

I

if C

2

is a child of C

1

Altitudes

I

The relation “is child of” is

represented by red arrows

(43)

Component tree

Arborescence

Property

If the graph (E , Γ) is connected, then the component tree of I is an arborescence of root E

Altitudes

I

E

(44)

Component tree

Simplifying an image by razings

A leaf of the component tree A I of I is called a regional maximum of I

A leaf of the component tree A −I of −I is called a regional minimum of I

Given a criterion, it is possible to iteratively remove the leaves of the tree A I

Such removal is called a razing

(45)

Component tree

Razing: intuition

Altitudes

I

E

Successive razing steps

A maximum has been removed

(46)

Component tree

Razing: intuition

Altitudes

I

E

Successive razing steps

A maximum has been removed

(47)

Component tree

Razing: intuition

Altitudes

I

E

Successive razing steps

A maximum has been removed

(48)

Component tree

Razing: intuition

Altitudes

I

E

Successive razing steps

A maximum has been removed

(49)

Component tree

Razing: definition

Definition

Let x ∈ E

The elementary razing ν x of I at x is defined b

x

(I )](y) = I (y) − 1 if x and y belong to a same maximum of I [ν

x

(I )](y) = I (y) otherwise

An image obtained from I by composition of elementary razings is

called a razing of I

(50)

Component tree

Simplifying an image by razings

What criterion (attribute) for selecting a maxima to raze?

(51)

Component tree

Razing by area

Altitudes

I

E

surface

(52)

Component tree

Razing by depth, or dynamics

Altitudes

I

E

profondeur

(53)

Component tree

Razing by volume

volume

E Altitudes

I

(54)

Component tree

Flooding

The dual of a razing is called a flooding

A flooding removes minima by iteratively increasing their values

Property (contour preservation)

If F is a razing or a flooding of I , then

∀(x , y ) ∈ − →

Γ , F(x ) 6= F (y) = ⇒ I (x) 6= I (y )

Remark. An operator produces razings is not necessarily an opening

(counter-examples: razing by dynamics or volume)

(55)

Component tree

Flooding

The dual of a razing is called a flooding

A flooding removes minima by iteratively increasing their values

Property (contour preservation)

If F is a razing or a flooding of I , then

∀(x , y ) ∈ − →

Γ , F(x) 6= F (y) = ⇒ I (x ) 6= I (y )

Remark. An operator produces razings is not necessarily an opening

(counter-examples: razing by dynamics or volume)

(56)

Component tree

Flooding

The dual of a razing is called a flooding

A flooding removes minima by iteratively increasing their values

Property (contour preservation)

If F is a razing or a flooding of I , then

∀(x , y ) ∈ − →

Γ , F(x) 6= F (y) = ⇒ I (x ) 6= I (y )

Remark. An operator produces razings is not necessarily an opening

(counter-examples: razing by dynamics or volume)

(57)

Component tree

Exercise

Draw the image F obtained by razings all components of depth is less than 12

Compare the number of maxima of F and of I

Altitudes

I

E

(58)

Component tree

Exercise

Draw the image H obtained by the dual of the previous one, (i.e., the flooding that removes all components of depth is less than 12) Help

1 Draw −I

2 Apply a razing to −I

3 Inverse the obtained result

Compare the numbers of minima of H and of I

Altitudes

I

E

Références

Documents relatifs

This study aimed at quantifying over a four year period (2007-2010), the impacts of a legume cover crop (Pueraria phaseoloides) to N nutrition, water status,

the systematic role of consonant clusters in primary stress placement in Modern Latin words and borrowings (Fournier 2010a,b).. Small effect

In this paper, we will see that a surjective linear local automorphism θ of a von Neumann algebra N is a Jordan isomorphism. In case N is properly infinite, θ is an automorphism. On

All the rings considered in this paper are finite, have an identity, subrings contain the identity and ring homomorphism carry identity to identity... Corbas, for

In the first case we obtain a discrete space, in the second case the so-called co- finite topology (proper closed subsets are finite; all subsets

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

He identified renewable energy as the key to 'green plastics' and showed the potential of using biomass not only as feedstock but also as a vehicle for processing

All pointing tasks were feasible without clutching, but clutch-less movements were harder to perform, caused more errors, required more preparation time, and were not faster