chapter9 morphological image processing
TRANSCRIPT
-
7/31/2019 Chapter9 Morphological Image Processing
1/58
Chapter 9: Morphological
Image Processing
Digital Image Processing
-
7/31/2019 Chapter9 Morphological Image Processing
2/58
2
Mathematic Morphology used to extract image components that are
useful in the representation and description of
region shape, such as boundaries extraction
skeletons
convex hull
morphological filtering thinning
pruning
-
7/31/2019 Chapter9 Morphological Image Processing
3/58
3
Mathematic Morphologymathematical framework used for:
pre-processing noise filtering, shape simplification, ...
enhancing object structure skeletonization, convex hull...
Segmentation watershed,
quantitative description area, perimeter, ...
-
7/31/2019 Chapter9 Morphological Image Processing
4/58
4
Z2
and Z3
set in mathematic morphology representobjects in an image binary image (0 = white, 1 = black) : the
element of the set is the coordinates (x,y)of pixel belong to the object Z2
gray-scaled image : the element of the setis the coordinates (x,y) of pixel belong to theobject and the gray levels Z3
-
7/31/2019 Chapter9 Morphological Image Processing
5/58
5
Basic Set Theory
-
7/31/2019 Chapter9 Morphological Image Processing
6/58
6
Reflection and Translation},|{ Bfor bbwwB
},|{)( Afor azaccA z
-
7/31/2019 Chapter9 Morphological Image Processing
7/587
Logic Operations
-
7/31/2019 Chapter9 Morphological Image Processing
8/588
Example
-
7/31/2019 Chapter9 Morphological Image Processing
9/58
Structuring element (SE)
9
small set to probe the image under study for each SE, define origo shape and size must be adapted to geometricproperties for the objects
-
7/31/2019 Chapter9 Morphological Image Processing
10/58
Basic idea in parallel for each pixel in binary image:
check if SE is satisfied
output pixel is set to 0 or 1 depending onused operation
10
-
7/31/2019 Chapter9 Morphological Image Processing
11/58
How to describe SE many different ways!
information needed: position of origo for SE
positions of elements belonging to SE
11
-
7/31/2019 Chapter9 Morphological Image Processing
12/58
Basic morphological operations Erosion
Dilation
combine to Opening object
Closening background
12
keep general shape but
smooth with respect to
-
7/31/2019 Chapter9 Morphological Image Processing
13/58
Erosion Does the structuring element fit theset?
erosion of a set A by structuring elementB: all z in A such that B is in A whenorigin of B=z
shrink the object
13
}{ Az|(B)BA z
-
7/31/2019 Chapter9 Morphological Image Processing
14/58
Erosion
14
-
7/31/2019 Chapter9 Morphological Image Processing
15/58
Erosion
15
-
7/31/2019 Chapter9 Morphological Image Processing
16/58
16
Erosion
}{ Az|(B)BAz
-
7/31/2019 Chapter9 Morphological Image Processing
17/58
Dilation Does the structuring element hit theset?
dilation of a set A by structuringelement B: all z in A such that B hits Awhen origin of B=z
grow the object17
}{ A)Bz|(BAz
-
7/31/2019 Chapter9 Morphological Image Processing
18/58
Dilation
18
-
7/31/2019 Chapter9 Morphological Image Processing
19/58
Dilation
19
-
7/31/2019 Chapter9 Morphological Image Processing
20/58
20
Dilation
}{ A)Bz|(BA z
B = structuring element
-
7/31/2019 Chapter9 Morphological Image Processing
21/58
21
Dilation : Bridging gaps
-
7/31/2019 Chapter9 Morphological Image Processing
22/58
useful erosion
removal of structures of certain shape and
size, given by SE Dilation
filling of holes of certain shape and size,
given by SE
22
-
7/31/2019 Chapter9 Morphological Image Processing
23/58
Combining erosion and
dilation WANTED:
remove structures / fill holes
without affecting remaining parts
SOLUTION:
combine erosion and dilation
(using same SE)
23
-
7/31/2019 Chapter9 Morphological Image Processing
24/58
24
Erosion : eliminating irrelevant
detail
structuring element B = 13x13 pixels of gray level 1
-
7/31/2019 Chapter9 Morphological Image Processing
25/58
Openingerosion followed by dilation, denoted
eliminates protrusions
breaks necks smoothes contour
25
BBABA )(
-
7/31/2019 Chapter9 Morphological Image Processing
26/58
Opening
26
-
7/31/2019 Chapter9 Morphological Image Processing
27/58
Opening
27
-
7/31/2019 Chapter9 Morphological Image Processing
28/58
28
Opening
BBABA )(
})(|){( ABBBA zz
-
7/31/2019 Chapter9 Morphological Image Processing
29/58
Closingdilation followed by erosion, denoted
smooth contour
fuse narrow breaks and long thin gulfs eliminate small holes
fill gaps in the contour
29
BBABA )(
-
7/31/2019 Chapter9 Morphological Image Processing
30/58
Closing
30
-
7/31/2019 Chapter9 Morphological Image Processing
31/58
Closing
31
-
7/31/2019 Chapter9 Morphological Image Processing
32/58
32
Closing
BBABA )(
-
7/31/2019 Chapter9 Morphological Image Processing
33/58
33
PropertiesOpening(i) AB 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 BClosing(i) A is a subset (subimage) of AB
(ii) If C is a subset of D, then C B is a subset of D B(iii) (A B) B = A B
Note: repeated openings/closings has no effect!
-
7/31/2019 Chapter9 Morphological Image Processing
34/58
Duality Opening and closing are dual with respect
to complementation and reflection
34
)()( BABAcc
-
7/31/2019 Chapter9 Morphological Image Processing
35/58
35
-
7/31/2019 Chapter9 Morphological Image Processing
36/58
36
-
7/31/2019 Chapter9 Morphological Image Processing
37/58
Useful: open & close
37
-
7/31/2019 Chapter9 Morphological Image Processing
38/58
Application: filtering
38
-
7/31/2019 Chapter9 Morphological Image Processing
39/58
Hit-or-Miss Transformation
(HMT) find location of one shape among a set of shapes
template matching
composite SE: object part (B1) and backgroundpart (B2)
does B1 fits the object while, simultaneously,B2 misses the object, i.e., fits the background?
39
-
7/31/2019 Chapter9 Morphological Image Processing
40/58
40
Hit-or-Miss Transformation
)]([)( XWAXABAc
-
7/31/2019 Chapter9 Morphological Image Processing
41/58
41
Boundary Extraction
)()( BAAA
-
7/31/2019 Chapter9 Morphological Image Processing
42/58
42
Example
-
7/31/2019 Chapter9 Morphological Image Processing
43/58
43
Region Filling
,...3,2,1)( 1
kABXX
c
kk
-
7/31/2019 Chapter9 Morphological Image Processing
44/58
44
Example
-
7/31/2019 Chapter9 Morphological Image Processing
45/58
45
Extraction of connected
components
-
7/31/2019 Chapter9 Morphological Image Processing
46/58
46
Example
iii
-
7/31/2019 Chapter9 Morphological Image Processing
47/58
Convex hull
A set Ais issaid to be
convex ifthe straightline segmentjoining anytwo pointsin A liesentirely
within A.
i
iDAC
4
1)(
,...3,2,1and4,3,2,1)( kiABXXii
k
i
k
47
-
7/31/2019 Chapter9 Morphological Image Processing
48/58
48
-
7/31/2019 Chapter9 Morphological Image Processing
49/58
49
Thinning
cBAA
BAABA
)(
)(
-
7/31/2019 Chapter9 Morphological Image Processing
50/58
50
Thickening
)( BAABA
K
ASAS )()(
-
7/31/2019 Chapter9 Morphological Image Processing
51/58
51
Skeletons kkASAS
0
)()(
BkBAkBAASk
)()()(
})(|max{ kBAkK
))((0
kBASA k
K
k
-
7/31/2019 Chapter9 Morphological Image Processing
52/58
52
}{BAX H 3 3 i l f 1
-
7/31/2019 Chapter9 Morphological Image Processing
53/58
53
Pruning
}{1 BAX
AHXX )( 23
314 XXX
H = 3x3 structuring element of 1s)( 1
8
12
k
k
BXX
-
7/31/2019 Chapter9 Morphological Image Processing
54/58
54
-
7/31/2019 Chapter9 Morphological Image Processing
55/58
55
-
7/31/2019 Chapter9 Morphological Image Processing
56/58
56
-
7/31/2019 Chapter9 Morphological Image Processing
57/58
57
-
7/31/2019 Chapter9 Morphological Image Processing
58/58
5 basic structuring elements