Morphological Image Processing
Morphological Image Processing
Introduction
03/31/16
Preliminaries (1)
Reflection
, is defined as
The reflection of a set B, denoted B
{w | w b, for b B}
B
Translation
03/31/16
Preliminaries (2)
03/31/16
origin
03/31/16
Origin of B visits
every element of A
At each location of
the origin of B, if B
is completely
contained in A,
then the location
is a member of the
new set, otherwise
it is not a member
of the new set.
03/31/16
Erosion
With A and B as sets in Z 2 , the erosion of A by B, denoted A
defined
A
B,
B z | ( B) Z A
03/31/16
B z | ( B ) Z A
c
Exampl
e of
Erosion
(1)
03/31/16
Exampl
e of
Erosion
(2)
03/31/16
10
Dilation
2
A
A B= z | B
z
and A
The set of all displacements z, the translated B
overlap by at least one element.
A A
A B z | B
z
03/31/16
11
03/31/16
12
03/31/16
13
Duality
A B
A B
c
and
A B
03/31/16
Ac B
14
Duality
A B
z | B Z A
z | B Z A
c
z | B Z Ac
Ac B
03/31/16
15
Duality
A B
A
A
z | B
z| B
Ac B
03/31/16
16
03/31/16
17
18
Opening
The opening of set A by structuring element B,
denoted A oB, is defined as
A oB U B Z | B Z A
03/31/16
19
Example: Opening
03/31/16
20
Example: Closing
03/31/16
21
03/31/16
22
AgB
A oB
03/31/16
)
( A oB
c
)
( A gB
c
23
Properties of Opening
Properties of Closing
24
03/31/16
25
The Hit-or-Miss
Transformation
if B denotes the set composed of
D and its background,the match
(or set of matches) of B in A,
denoted A B,
A * B A D Ac W D
B B1 , B2
B1 : object
B2 : background
A B A B1 ( Ac B2 )
03/31/16
26
Boundary Extraction
The boundary of a set A, can be obtained by first
eroding A by B and then performing the set
difference between A and its erosion.
( A) A A B
03/31/16
27
Example 1
03/31/16
28
Example 2
03/31/16
29
Hole Filling
A hole may be defined as a background region
surrounded by a connected border of foreground
pixels.
Let A denote a set whose elements are 8-connected
boundaries, each boundary enclosing a background
region (i.e., a hole). Given a point in each hole, the
objective is to fill all the holes with 1s.
03/31/16
30
Hole Filling
1. Forming an array X0 of 0s (the same size as the
array containing A), except the locations in X0
corresponding to the given point in each hole,
which we set to 1.
2. Xk = (Xk-1 + B) Ac
k=1,2,3,
03/31/16
31
Example
03/31/16
32
03/31/16
33
03/31/16
34
X k ( X k 1 B) A
B : structuring element
until X k X k -1
03/31/16
35
03/31/16
36
03/31/16
37
Gray-Scale Morphology
f ( x, y ) : gray-scale image
b( x, y ): structuring element
03/31/16
38
f ( x s, y t )
f b ( x, y ) (min
s ,t )b
f ( x s, y t )
f b ( x, y) max
( s ,t )b
03/31/16
39
03/31/16
40
f ( x s, y t ) bN ( s, t )
f bN ( x, y ) (min
s ,t )b
f ( x s, y t ) bN ( s, t )
f bN ( x, y ) max
( s ,t )b
03/31/16
41
03/31/16
42
03/31/16
43
Morphological Smoothing
03/31/16
44
Morphological Smoothing
03/31/16
45
Morphological Gradient
g ( f b) ( f b)
03/31/16
46
Morphological Gradient
03/31/16
47
That ( f ) f ( f ob)
Bhat ( f ) ( f b) f
03/31/16
48
03/31/16
49
03/31/16
50
Granulometry
03/31/16
51
Example
03/31/16
52
Textual Segmentation
03/31/16
53
Textual Segmentation
03/31/16
54