Professional Documents
Culture Documents
Chapter 09 Mathematical Morphology
Chapter 09 Mathematical Morphology
Christophoros Nikou
cnikou@cs.uoi.gr
Images taken from: R. Gonzalez and R. Woods. Digital Image Processing, Prentice Hall, 2008
A B {w | w A OR w B}
A B {w | w A AND w B}
A B {w | w A, w B} A Bc
Ac {w | w A}
C. Nikou – Digital Image Processing
9 Preliminaries (cont.)
The above operations assume that the
images containing the sets are binary and
involve only the pixel location.
Union and intersection are different when we
define set operations involving intensity
values:
A B max(a, b) | a A, b B
z
The elements of the sets
are gray values on the
A B min(a, b) | a A, b B
same location z.
A B {z | ( B) z A}
A B {z | ( B) z A } c
15x15 45x45
A B {z | ( Bˆ ) z A }
Equivalently: A B {z | [( Bˆ ) z A] A}
A B ( B) z | ( B) z A
C. Nikou – Digital Image Processing
28 Opening (cont.)
Notice the difference with the simple erosion:
A B {z | ( B) z A} A B ( B) z | ( B) z A
( A B)c Ac Bˆ ( A B)c Ac Bˆ
( A B) A Bˆ
c c
( A B) A Bˆ
c c
Opening: A B A
C D C B D B
( A B) B A B
A A B
Closing:
C D C B D B
( A B) B A B
The last properties, in each case, indicate that
multiple openings or closings have no effect after
the first application of the operator
C. Nikou – Digital Image Processing
34 Morphological Filtering Example
A A B
Background noise completely removed (noise
components smaller than the SE).
The size of the dark noise elements in the fingerprint
structure increased (inner dark structures).
C. Nikou – Digital Image Processing
36
Morphological Filtering Example
(cont.)
A B ( A B) B A B
A B A B B
A B B [ A B B] B ( A B) B
A ( A B) B
A * B ( A B) ( A Bb ) c
A * D ( A D) Ac (W D)
X k ( X k 1 B) Ac , k 1, 2,3,...
- Problem.
The result is convex
but greater than the
true convex hull.
Original set A Ac
Thickened set
Thinning of Ac obtained by
complementing the
result of thinning.
The morphological
formulation does not
guarantee connectivity.
RGD ( F ) DG( k ) ( F )
with k such that:
RGE ( F ) EG( k ) ( F )
with k such that:
( k 1)
E (F ) E
(k )
G G (F )
The example is left as an exercise!
C. Nikou – Digital Image Processing
80
Applications
Opening by Reconstruction
In morphological opening, erosion removes small
objects and dilation attempts to restore the shape of
the objects that remain without the small objects.
Original image I
f b ( x, y) (min{
s ,t )b
f ( x s, y t )}
f b ( x, y) max{
( s ,t )b
f ( x s, y t )}
Similarly,
( f b)c ( x, y) ( f c bˆ)( x, y)
Radius 1
Original image
Radius 3 Radius 5
g ( f b) ( f b)
Original Dilation
image
Erosion Difference
Closing with a SE
Original image of radius 30 (small
blobs are removed)
with Dg(0) ( f ) f
with Eg(0) ( f ) f
R (F ) D (F )
D
g
(k )
g
( k 1)
D (F ) D
(k )
g g (F )
R (F ) E (F )
D
g
(k )
g
( k 1)
E (F ) E
(k )
g g (F )
OR( n ) ( f ) R Df ( f nB)
Dilation
(SE 1x21)