Mathematical Morphology – p.1/32 bloch ˜ ´ e -Saclay, Paris, Isabelle Bloch

Mathematical Morphology ´ ecom ParisTech, Universit ´ el http://www.perso.telecom-paristech.fr/ LTCI, T Mathematical Morphology – p.2/32 shape, , grey levels, colors neighborhood information theory topology geometry algebra ( theory) probabilities, random closed sets functions non linear non invertible strong properties associated algorithms

Introduction • • • • • • • • • • • • • Origin: study of porous media Principle: study of objects (images) based on: Mathematical bases: Main characteristics: • • • • Mathematical Morphology – p.3/32

Shape or spatial relationships ? Mathematical Morphology – p.4/32 Digital: ) B Continuous:

Structuring element shape size origin (not necessarily in examples: • • • • Mathematical Morphology – p.5/32 ∅} } B 6 = ∈ X ∩ } x X,y Y ˇ B ∈ ∈ | x n | R X,y y ∈ ∈ + x x x { | { = y = x + B B x { ⊕ X ∈ [ = x X Y = ⊕ X ) = X,B ( D

Binary : Binary dilation: • • ); Y,B ( Mathematical Morphology – p.5/32 D ∩ ) ∅} } B 6 = X,B ( ∈ X D ∩ } ⊆ x X,y Y ) ˇ B . ∈ ∈ | ) ′ x Y,B n B | R ∩ X,y y ⊕ ∈ X ∈ + ( x x ); x { ) | { X,B ( = y = , D D x ) Y,B + B ( B x ; D ]= { ⊕ X ′ Y,B B ; ∈ ( [ ) ⊆ = x X ′ ∈ ,B D ) ) Y O ∪ ) = ⊕ X,B ( X,B ) iff X,B ( X ) ( D ) = D X,B D ( [ ⊆ ⇒ ) D D X,B X,B ( ( Y D D )= X,B ⊆ ⊆ ( X D X Y,B ∪ ⇒ ′ X B (

Binary dilation D ⊆ Minkowski addition: Binary dilation: extensive ( increasing ( B commutes with , not with intersection: iterativity property: • • • • • • • Properties of dilation: Mathematical Morphology – p.6/32

Example of dilation Mathematical Morphology – p.7/32 ˇ B. ⊖ X = } X ∈ } y X + ⊆ x B B,x | ∈ n y R |∀ ∈ x x { { = ) = X,B ( E

Binary ); Y,B ( E Mathematical Morphology – p.7/32 ∪ ) X,B ( ˇ B. E on: ⊖ ⊇ X ] = ,B ) . C } ) ′ )] Y X ˇ B B ∪ , ∈ } ⊕ C X y X [( X + ( ); ⊆ ) X,B D x ( ; , E B B,x ) E B | Y,B ( ∈ )=[ ∈ n E ]= y R Y,B ′ O ; ( ⊆ ) |∀ ∈ X,B E ,B ) ( ) x x ) iff ∩ { { E ) X X,B ( X,B X,B ⊆ ( E = ( ) E X,B E ⊆ ( [ ) ) = E ⇒ ′ E X,B ( Y ]= E X,B ⊆ X,B ( ( ,B E ) X E Y ⇒ ∩ ′ B X

Binary erosion [( ⊆ E duality of erosion and dilation with respect to complementati anti-extensive ( increasing ( B commutes with intersection, not with union: iterativity property: • • • • • • Properties of erosion: Mathematical Morphology – p.8/32

Example of erosion Mathematical Morphology – p.9/32

Links with distances Mathematical Morphology – p.9/32

Links with distances Mathematical Morphology – p.10/32 ] ,B ) X,B ( E [ D = B X

Binary Mathematical Morphology – p.10/32 ] ,B ) X,B ( E [ D . ); ) = ′ B Y B n,n X ⊆ ). B B ); max( X ; X B X B = X ⇒ X = B ⊇ ) Y n ⊆ ) B X ′ ′ ⊆ n B X ( X X X ⇒ =( ′ ′ n B ) Binary opening n ⊆ X anti-extensive ( increasing ( idempotent ( B ( Morphological filter • • • • • ⇒ Properties of opening: Mathematical Morphology – p.11/32

Example of opening Mathematical Morphology – p.12/32 ] ,B ) X,B ( D [ E = B X

Binary Mathematical Morphology – p.12/32 ] ,B ) X,B ( D [ E ); ; ) ′ B = Y B n,n ). ⊆ X B B max( ; X X ′ X B = ); ⇒ = X B B ) n Y ) X ⊆ B ′ ⊆ n B ⊆ X ( X X X X ⇒ =( ′ ′ n B )

Binary closing n ⊆ X extensive ( increasing ( idempotent ( B ( Dual of opening. Morphological filter • • • • • • Properties of closing: ⇒ Mathematical Morphology – p.13/32

Example of closing Mathematical Morphology – p.14/32 } x ˇ B ∈ y | ) y ( f { ) = sup x )( f,B ( D , n R ∈ x ∀

Dilation of a by a flat Mathematical Morphology – p.14/32 } x ˇ B ∈ y | ) y ( f { ) = sup x ; ; )( ) ) f,B g,B g,B ( ( ( D D D , ∨ ∧ n ) ) R ; ∈ f,B f,B B ( ( x ∈ ∀ D D O ≤ )= ) g,B g,B ∨ ∧

Dilation of a function by a flat structuring element f f ( ( extensivity if increasingness; D D iterativity property. • • • • • Properties of functional dilation: Mathematical Morphology – p.15/32

Example of functional dilation Mathematical Morphology – p.16/32 } x B ∈ y | ) y ( f { ) = inf x )( f,B ( E , n R ∈ x ∀

Erosion of a function Mathematical Morphology – p.16/32 } x B ∈ y | ) y ( f { ) = inf x )( ; ; ) ) f,B ( g,B g,B ( ( E E E , ; ∨ ∧ n ) ) B R ∈ ∈ f,B f,B O x ( ( ∀ E E ≥ ) )= g,B g,B ∨ ∧

Erosion of a function f f ( ( functional dilation and erosion are dual operators; anti-extensivity if increasingness; E E iterativity property. • • • • • • Properties of functional erosion: Mathematical Morphology – p.17/32

Example of functional erosion Mathematical Morphology – p.18/32 ] ,B ) f,B ( E [ D = B f

Functional opening Mathematical Morphology – p.18/32 ] ,B ) f,B ( E [ D = B f

Functional opening anti-extensive; increasing; idempotent. morphological filter • • • Properties of functional opening: ⇒ Mathematical Morphology – p.19/32

Example of functional opening Mathematical Morphology – p.20/32 ] ,B ) f,B ( D [ E = B f

Functional closing Mathematical Morphology – p.20/32 ] ,B ) f,B ( D [ E = B f

Functional closing extensive; increasing; idempotent. duality between opening and closing morphological filter • • • • Properties of functional closing: ⇒ Mathematical Morphology – p.21/32

Example of functional closing x Mathematical Morphology – p.22/32 opening of f by B 1D structuring element erosion of f by B B origin

A simple 1D example f(x) Mathematical Morphology – p.23/32

Some applications of erosion and dilation Mathematical Morphology – p.23/32

Some applications of erosion and dilation Contrast enhancement Mathematical Morphology – p.23/32 ) x ( B E − ) x ( B D

Some applications of erosion and dilation Morphological gradient: Mathematical Morphology – p.24/32 n B ) n B ... ) 2 B ) 2 B ) 1 B ) 1 B f ((( ... (

Alternate Sequential Filters Mathematical Morphology – p.24/32 n B ) n B ... ) 2 B ) 2 B ) 1 B ) 1 B f ((( ... (

Alternate Sequential Filters Mathematical Morphology – p.24/32 n B ) n B ... ) 2 B ) 2 B ) 1 B ) 1 B f ((( ... (

Alternate Sequential Filters Mathematical Morphology – p.25/32 B f − f

Tophat tranform Mathematical Morphology – p.25/32 B f − f

Tophat tranform Mathematical Morphology – p.25/32 B f − f

Tophat tranform } r Mathematical Morphology – p.26/32 ≤ ) ) r x,Y Y,B ( \ X d X | ( n X } R D r r \ ∈ ] ≤ x X X ) { ∩ = = ) x,y } ( 1 ∞ ] ∅} Y X . X d 6 = ⊆ Y Y,B | ∩ ( ) Y ) X D 1 ∩ x,r ∈ ) ( y X )=[ Y,B { ( r x,r B ( D | [ X )= n Y,B B ( R | which intersect x,r X ∈ ( n D X X x R { B ∈ x )= { r )= Y,B r ( X Y,B E (

Geodesic operators and reconstruction X D Geodesic ball: Geodesic dilation: Digital case: Geodesic erosion: Reconstruction: Extends to functions = connected components of Mathematical Morphology – p.27/32

Opening by reconstruction: examples Mathematical Morphology – p.27/32 ion Union of openings using segments of length 20 and reconstruct

Opening by reconstruction: examples catchment basins Mathematical Morphology – p.28/32 minimum minimum

Watersheds: a poweful segmentation tool watersheds Mathematical Morphology – p.29/32

Watersheds and oversegmentation Mathematical Morphology – p.29/32

Watersheds and oversegmentation Mathematical Morphology – p.30/32

Separation of connected binary objects Mathematical Morphology – p.31/32 (only the selected minima) ) ∞ g,B ( g ∧ f E

Watersheds constraint by markers : function on which watersheds should be applied : marker function (selects regional minima) f g Reconstruction: Mathematical Morphology – p.31/32 adient. (c) Watersheds. on the closed gradient (d) (e) (a) (b) (c)

Watersheds constraint by markers (a) Original image (crop from(d) a Closing brain (size MRI). 1) (b) ofimage. Morphological the gr gradient. (e) Watersheds computed Mathematical Morphology – p.31/32 Reconstruction of the dient. (h) Watersheds. (i) (i) (j) (k) (f) (g) (h)

Watersheds constraint by markers (f) Markers from regional minima. (g) Reconstruction of the gra Markers in the central blackgradient. part (k) and Watersheds. on the image boundary. (j) al Mathematical Morphology – p.32/32 , Academic Press, , Masson, Paris, 1994. , Springer-Verlag, Berlin, 1999. Mathematical Morphology: From Theory to Morphologie mathématique Image Analysis and Mathematical Morphology, Part II: Theoretic , ISTE-Wiley, 2010. , Academic Press, London, 1988. Morphological Image Analysis Image Analysis and Mathematical Morphology

And much more... New-York, 1982. Advances Applications M. Schmitt and J. Mattioli, J. Serra, J. Serra (Ed.), P. Soille, L. Najman, H. Talbot (Eds.), • • • • • A few references: