cross-section topology michel couprie contributors: g. bertrand m. couprie j.c. everat (phd) f.n....

63
Cross-section topology Michel Couprie Contributors: • G. Bertrand • M. Couprie • J.C. Everat (PhD) • F.N. Bezerra (PhD)

Upload: amberly-parks

Post on 24-Dec-2015

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Cross-section topology

Michel Couprie

Contributors:

• G. Bertrand

• M. Couprie

• J.C. Everat (PhD)

• F.N. Bezerra (PhD)

Page 2: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Functions of 2 variables

x

y

Page 3: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

On hills and dales

[Cayley 1859, Maxwell 1870…]

Page 4: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

BINARY IMAGES (SETS)

Page 5: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Topology preservation - notion of simple point

• A topology-preserving transformation preserves the connected components of both X and X

Page 6: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Simple point

Set X (black points)

• Definition (2D): A point p is simple (for X) if its modification (addition to X, withdrawal from X) does not change the number of connected components of X and X

Simple point of XSimple point of XNon-simple pointNon-simple point

Page 7: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Simple point: local characterization ?

Page 8: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Simple point: local characterization ?

Page 9: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Connectivity numbers

• T(p)=number of Connected Components of (X - {p}) N(p) where N(p)=8-neighborhood of p

• T(p)=number of Connected Components of (X - {p}) N(p)

• Characterization of simple points (local): p is simple iff T(p) = 1 and T(p) = 1

T=2,T=2 T=1,T=1 T=1,T=0 T=0,T=1

U

U

Interior point Isolated point

Page 10: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Homotopy

• We say that X and Y are homotopic (they have the same topology) if Y may be obtained from X by sequential addition or deletion of simple points

Page 11: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Homotopy: illustration

Page 12: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

GRAYSCALE IMAGES (FUNCTIONS)

Page 13: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Homotopy of functions

• Basic idea: consider the topology of each cross-section (threshold) of a function

• Given a function F (Z2 Z) and k in Z, we define the cross-section Fk as the set of points p of Z2 such that F(p) k

• We say that two functions F and G are homotopic if, for every k in Z, Fk and Gk are homotopic (in the binary sense)

[Beucher 1990…]

Page 14: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

F1 G1

Homotopy of functions

x

yF(x,y)

x

G(x,y)y

Page 15: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

x

yF(x,y)

F2

F1

x

G(x,y)

G2

G1

y

Homotopy of functions

Page 16: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

x

yF(x,y)

F3

F2

F1

x

G(x,y)

G3

G2

G1

y

Homotopy of functions

Page 17: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Destructible point [Bertrand 1997]

• Definition: a point p is destructible (for F) if it is simple for Fk, with k = F(p)

• Property: p is destructible iff its value may be lowered by one without changing the topology of any cross-section

• Definition: a point p is constructible (for F) if it is destructible for -F (duality)

Page 18: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Destructible point: examples

x

yF(x,y)

F3

F2

F1

Page 19: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Destructible point: examples

x

yF(x,y)

F3

F2

F1

Page 20: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Destructible point: examples

x

yF(x,y)

F3

F2

F1

Page 21: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Destructible point: counter-examples

x

yF(x,y)

F3

F2

F1

Componentdeleted

Componentsplitted

Backgroundcomponentcreated

Page 22: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Destructible point: counter-examples

x

yF(x,y)

F3

F2

F1

Componentdeleted

Componentsplitted

Backgroundcomponentcreated

Page 23: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Connectivity numbers

• N+(p) = {q in N(p), F(q) F(p)}• T+(p) = number of Conn. Comp. of N+(p)

.

• N--(p) = {q in N(p), F(q) < F(p)}• T--(p) = number of Conn. Comp. of N--(p)

.

• N++, T++, N-, T- : similar• If an adjacency relation (eg. 4) is chosen

for T+, T++, then the other adjacency (8) must be used for T-, T--

Page 24: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Destructible point: local characterization

• The point p is destructible if and only if : T+(p) = 1 and T--(p) = 1

1 2 19 5 19 9 9

T+ = 1T-- = 1

1 2 89 5 89 1 1

T+ = 2T-- = 2

1 2 11 5 12 2 1

T+ = 0T-- = 1

destructible non-destructible non-destructible

Page 25: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Classification of points[Bertrand 97]

• The local configuration of a point p corresponds to exactly one of the eleven following cases:

– well (T- = 0)

– minimal constructible(T++ = T- = 1, T-- = 0)

– minimal convergent(T++ > 1, T-- = 0)

– constructible divergent (T++ = T- = 1, T-- > 1)

– peak (T+ = 0)

– maximal destructible(T+ = T-- = 1, T++ = 0)

– maximal divergent(T-- > 1, T++ = 0)

– destructible convergent (T+ = T-- = 1, T++ > 1)

– interior (T++ = T-- = 0)

– simple side (T+ = T-- = T++ = T- = 1)

– saddle (T++ > 1, T-- > 1)

Page 26: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Classification of points: examples

1 2 19 5 19 9 9

1 2 89 5 89 1 1

1 2 11 5 12 2 1

Simple side Saddle

Peak

1 2 19 9 19 9

1 29 9 9

1 1

1 2 15

Maximaldestructible

Maximaldivergent

Destructibleconvergent

5 5 55 5 55 5 5

Interior

1

2

199

995

Page 27: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Grayscale skeletons

• We say that G is a skeleton of F if G may be obtained from F by sequential lowering of destructible points

• If G is a skeleton of F and if G contains no destructible point, then we say that G is an ultimate skeleton of F

Page 28: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Ultimate skeleton: 1D example

Regional minima

Page 29: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Ultimate skeleton: illustration

Page 30: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Ultimate skeleton: illustration

Page 31: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Ultimate skeleton: 2D example

Original image F

Regionalminimaof F(white)

UltimateskeletonG of F

Regionalminimaof G(white)

Page 32: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Thinness

• In 1D, the set of non-minimal points of an ultimate skeleton is « thin » (a set X is thin if it contains no interior point). Is it always true in 2D ?

• The answer is no, as shown by the following counter-examples.

Page 33: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Thinness

11

31

3 3 3 3 3 3 3 31 1

111 1 1

13 3 3 3 3 3 3 3 3

3333 3

33

33

3 133

333

111 3 33 13 31 1 1 133 33 3

1 1 1 133 3 3 33 3 3 3 3 3 3 3 3

3 3 3 3 3 3 3 3 3

3 3 3 3 3 3 3 3 33333 3

33

33

333

333

3 333 333 33 333 3 3 3

3 3 3 3 3 3 3 3 3

1 1 1 1 11 11 1 1 1 1 1

1 1 11 1 11 1 11 1 1

1 1 11 1 11 1 11 1 1

3 3 3 3 3 33

333

333

3

333

333

3 3 3 3 3 3 3 3 3

3 3 3 3 3 3 3 3 3

322222

3 3 3 3 3 33

333

333

3

333

333

3 3 3 3 3 3 3 3 3

3 3 3 3 3 3 3 3 3

322222

2333

33

Page 34: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

2 22

22 2

Thinness

1 1 1 1 11 11 1 1

1 1 11 1 11 11 1 1

1 1 1

1 1 11

11 1 1 1

1 1 1 1 11 1 1 1 111

1 1 11 1 1

11

1 1 11 1 11 1 11 1 11 1 11 1 1

1 11 1 1

1 11 1 1

3 3 3 3 3 3 3 3 33 3 3 3 3

3 3 3

33

333

33 3

33 3

32 2

2 2 22 2 22 2 2

222

3

333

33333 3 3 3 3 3 3 3 33 3 3 3

3

333

33333

3 3 3 3 3

3

3

3

333

133

333

3 3 3 3

22

22

221

11

3 3 3 3 3

3

3

3

333

33

333

3 3 3 3

2 2 22 22

22 2

2 2 2

2 22

22 2

3 3 3 3 3 3 3 3 33 3 3 3 3

3 3 3

33

333

33 3

33 3

3

2 2 22 2 22 2 2

222

3

333

33333 3 3 3 3 3 3 3 33 3 3 3

3

333

33333

2 2 22 2 22 2 2

2

Page 35: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Basic algorithm

Basic ultimate grayscale thinning(F)

Repeat until stability: Select a destructible point p for F F(p) := F(p) – 1

Inefficient: O(n.g), where: n is the number of pixels g is the maximum gray level

Page 36: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Lowest is best

The central point is destructible: it can thus be lowered down to 5 without changing the topology.

It can obviously be lowered more:- down to 3 (since there is no value between

6 and 3 in the neighborhood)- down to 1 (we can check that once at level

3, the point is still destructible)

3 1 19 6 19 9 9

Page 37: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Two special values

If p is destructible, we define:

-(p)=highest value strictly lower than F(p) in the neighborhood of p

-(p)=lowest value down to which F(p) can be lowered without changing the topology

3 1 19 6 19 9 9

Here: -(p)=3

-(p)=1

Page 38: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Better but not yet good

If we replace: F(p) := F(p) – 1 in the basic algorithm

by: F(p) := -(p), we get a faster algorithm. But its complexity is still bad. Let us show why:

Page 39: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Fast algorithm

Fast ultimate grayscale thinning(F)

Repeat until stability: Select a destructible point p for F of minimal graylevel

F(p) := -(p)

- Can be efficiently implemented thanks to a hierarchical queue- Execution time roughly proportional to n (number of pixels)

Page 40: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Complexity analysis: open problem

1 1 1 1 11 11 1 1

1 1 11 1 11 11 1 1

1 1 1

1 1 11

11 1 1 1

1 1 1 1 11 1 1 1 111

1 1 11 1 1

11

1 1 11 1 11 1 11 1 11 1 11 1 1

1 11 1 1

1 11 1 1

3 3 3 3 3 3 3 3 33 3 3 3 3

422

3

333

33333 3 3 3 3 3 3 3 33 3 3 3

3

333

33333

1 11

1 11

33

333

333

34

4 4 4444

444

3

2 2 22 2 22 2 2

3241

1 1 1

1 1 11

1 1 1

Page 41: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Non-homotopic operators

• Topology preservation: strong restriction

• Our goal: Change topology in a controlled way

over segmentation

regional minima

segmented regions

Page 42: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Altering the topology

• Control over topology modification.

• Criteria:– Local contrast : notion of -skeleton

– Regional contrast : regularization– Size : topological filtering– Topology : crest restoration

Page 43: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

-destructible point

-destructible

not -destructible

Illustration (1D profile of a 2D image)

Page 44: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

-destructible point

• Definition:

Let X be a set of points, we define F-(X)=min{F(p), p in X}

Let be a positive integer

A destructible point p is -destructible

A k-divergent point p is -destructible if at least k-1 connected components ci (i=1,…,k-1) of N--(p) are such that F(p) - F-

(ci)

Page 45: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

-skeleton : examples

= 0 = 15 = 30

Page 46: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Topological filtering

A: original C: reconstruction ofB under A

B: thinning+peak deletion

Page 47: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Topological filtering (cont.)

Original image

Page 48: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Topological filtering (cont.)

Homotopic thinning (n steps)

Page 49: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Topological filtering (cont.)

Peak deletion

Page 50: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Topological filtering (cont.)

Homotopic reconstruction

Page 51: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Topological filtering (cont.)

Final result

Page 52: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Topological filtering (cont.)

Comparison with other approaches (median filter, morphological filters) : better preservation of thin and elongated features

Page 53: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Crest restoration

• Motivation

Thinning + thresholding

GradientOriginal image

Page 54: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Crest restoration (cont.)

50

50

50

50

50

5090

90

240

0

0

0

0

0

00

0

0

50

50

50

50

50

50

50

50

5090

90

50

60

0

40

40

90

4060

0

0

50

50

50

50

50

240

50

50

50240

240

240

0

60

0

60

40

2400

0

0

50

50

50

50

240

50

50

50

50240

240

240

0

0

0

0

240

00

0

0

50

50

50

• p is a separating point if– there is k such that T(p, Fk)=2

• p is extensible if– p is a separating point, and

– p is a constructible or saddle point, and

– there is a point q in its neighborhood that is an end point or an isolated point for Fk, with k=F(p)+1

Page 55: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Crest restoration (cont.)

50

50

50

50

50

5090

90

240

0

0

0

0

0

00

0

0

50

50

50

50

50

50

50

50

5090

90

50

60

0

40

40

90

4060

0

0

50

50

50

50

50

240

50

50

50240

240

240

0

60

0

60

40

2400

0

0

50

50

50

50

240

50

50

50

50240

240

240

0

0

0

0

240

00

0

0

50

50

50

• p is a separating point if– there is k such that T(p, Fk)=2

• p is extensible if– p is a separating point, and

– p is a constructible or saddle point, and

– there is a point q in its neighborhood that is an end point or an isolated point for Fk, with k=F(p)+1

Page 56: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Crest restoration (cont.)

240 502400 2400 50

50

50

50

50

2400

0

00

0

0

50

50

50

50

50

50

50240

50

60

0

40

90

60

0

0

50

50

50

50

240

50

50

50240

2400

60

0

60

2400

0

0

50

50

50

50

50

50

50240

2400

0

0

00

0 50

50

240

90

90

240

50

500

0

50

50

40

40

5040

0

240 502400 2400 50

50

50

50

50

2400

0

00

0

0

50

50

50

50

50

50

50240

50

60

0

4060

0

0

50

50

50

50

240

50

50

50240

2400

60

0

60

2400

0

0

50

50

50

50

50

50

50240

2400

0

0

00

0 50

50

240

240

50

500

0

50

50

40

40

5040

0

240 502400 2400 50

50

50

50

50

2400

0

00

0

0

50

50

50

50

50

50

50240

50

60

0

40

90

60

0

0

50

50

50

50

240

50

50

50240

2400

60

0

60

2400

0

0

50

50

50

50

50

50

50240

2400

0

0

00

0 50

50

240

240

50

500

0

50

50

40

40

5040

0

240

240 240

240

240

Page 57: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)
Page 58: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Crest Restoration: result

‘Significant’ crests have been highlighted (in green)

Before crest restoration:

After crest restoration:

Page 59: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Crest restoration (cont.)

Thinning +thresholding

Thinning +crest restoration +

thresholdingGradient

Page 60: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Crest restoration (cont.)

Thinning +crest restoration +

thresholding(1 parameter)

Thinning+hysteresis thresholding

(2 parameters)

Thinning+hysteresis thresholding

(2 parameters)

Page 61: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Conclusion

• Strict preservation of both topological and grayscale information

• Combining topology-preserving and topology-altering operators

• Control based on several criteria (contrast, size, topology)

Page 62: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

Perspectives

• Study of complexity

• Extension to 3D

• Topology in orders (G. Bertrand)

Page 63: Cross-section topology Michel Couprie Contributors: G. Bertrand M. Couprie J.C. Everat (PhD) F.N. Bezerra (PhD)

References

• G. Bertrand, J. C. Everat and M. Couprie: "Image segmentation through operators based upon topology", Journal of Electronic Imaging, Vol. 6, No. 4, pp. 395-405, 1997.

• M. Couprie, F.N. Bezerra, Gilles Bertrand: "Topological operators for grayscale image processing", Journal of Electronic Imaging, Vol. 10, No. 4, pp. 1003-1015, 2001.

• www.esiee.fr/~coupriem/Sdi/publis.html