Morphological PDF
Morphological PDF
Chapter 9: Morphological
Image Processing
Mathematic Morphology
n used to extract image components that are
useful in the representation and description of
region shape, such as
n boundaries extraction
n skeletons
n convex hull
n morphological filtering
n thinning
n pruning
2
Basic Set Theory
3
Reflection and Translation
ˆ
B = {w | w ∈ −b, for b ∈ B}
( A) z = {c | c ∈ a + z, for a ∈ A}
4
Example
5
Structuring element (SE)
§ small set to probe the image under study
§ for each SE, define origo
§ shape and size must be adapted to geometric
properties for the objects
6
Basic morphological operations
n Erosion
n Dilation
7
Erosion
Does the structuring element fit the
n
set?
erosion of a set A by structuring element
B: all z in A such that B is in A when
origin of B=z
A − B = {z|(B)z ⊆ A}
shrink the object
8
Erosion
9
Erosion
10
Erosion
A − B = {z|(B)z ⊆ A}
11
Dilation
n Does the structuring element hit the
set?
n dilation of a set A by structuring element
B: all z in A such that B hits A when
origin of B=z
A ⊕ B = {z|(Bˆ )z ∩ A ≠ Φ}
n grow the object
12
Dilation
13
Dilation
14
Dilation
B = structuring element
A ⊕ B = {z|(Bˆ )z ∩ A ≠ Φ}
15
Dilation : Bridging gaps
16
useful
n erosion
n removal of structures of certain shape and
size, given by SE
n Dilation
n filling of holes of certain shape and size,
given by SE
17
Combining erosion and
dilation
n WANTED:
n remove structures / fill holes
n without affecting remaining parts
n SOLUTION:
n combine erosion and dilation
n (using same SE)
18
Erosion : eliminating irrelevant
detail
A B = ( A − B) ⊕ B
n eliminates protrusions
n breaks necks
n smoothes contour
20
Opening
21
Opening
22
Opening
A B = ( A − B) ⊕ B
A B = ∪{( B) z | ( B) z ⊆ A} 23
Closing
dilation followed by erosion, denoted •
A • B = ( A ⊕ B) − B
n smooth contour
n fuse narrow breaks and long thin gulfs
n eliminate small holes
n fill gaps in the contour
24
Closing
25
Closing
26
Closing
A • B = ( A ⊕ B) − B
27
Properties
Opening
(i) A°B is a subset (subimage) of A
(ii) If C is a subset of D, then C °B is a subset of D °B
(iii) (A °B) °B = A °B
Closing
(i) A is a subset (subimage) of A•B
(ii) If C is a subset of D, then C •B is a subset of D •B
(iii) (A •B) •B = A •B
c ˆc
( A • B) = ( A B)
29
30
31
Useful: open & close
32
Application: filtering
33
Hit-or-Miss Transformation
⊛ (HMT)
n find location of one shape among a set of shapes
template matching
c
A ∗ B = ( A − X ) ∩ [ A − (W − X )]
35
Boundary Extraction
β ( A) = A − ( A − B)
36
Example
37
Region Filling
c
X k = ( X k −1 ⊕ B) ∩ A k = 1,2,3,...
38
Example
39