Morphological Image
Processing
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
2
Mathematic Morphology
mathematical framework used for:
pre-processing
noise filtering, shape simplification, ...
enhancing object structure
skeletonization, convex hull...
Segmentation
watershed,…
quantitative description
area, perimeter, ...
3
Z2 and Z3
set in mathematic morphology represent
objects 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 set
is the coordinates (x,y) of pixel belong to the
object and the gray levels Z3
4
Basic Set Theory
5
Reflection and Translation
Bˆ {w | w b, for b B}
( A) z {c | c a z, for a A}
6
Logic Operations
7
Example
8
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
9
Basic idea
in parallel for each pixel in binary image:
check if SE is ”satisfied”
output pixel is set to 0 or 1 depending on
used operation
10
How to describe SE
many different ways!
information needed:
position of origo for SE
positions of elements belonging to SE
11
Basic morphological operations
Erosion
Dilation
keep general shape but
combine to smooth with respect to
Opening object
Closening background
12
Erosion
Does the structuring element fit the
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
13
Dilation
Does the structuring element hit the
set?
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 Φ}
grow the object
14
Dilation : Bridging gaps
15
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
16
Combining erosion and
dilation
WANTED:
remove structures / fill holes
without affecting remaining parts
SOLUTION:
combine erosion and dilation
(using same SE)
17
Erosion : eliminating irrelevant
detail
structuring element B = 13x13 pixels of gray level 1
18
Opening
erosion followed by dilation, denoted ∘
A B ( A B) B
eliminates protrusions
breaks necks
smoothes contour
19
Application: filtering
20
Hit-or-Miss Transformation
⊛ (HMT)
find location of one shape among a set of shapes
”template matching
composite SE: object part (B1) and background
part (B2)
does B1 fits the object while, simultaneously,
B2 misses the object, i.e., fits the background?
21
Example
22
Example
23
Example
24
25
26
27
28