Professional Documents
Culture Documents
Lect 12
Lect 12
Lecture # 12
Morphological Operations
1
Morphological Algorithms
Using the simple technique we have looked at so far we
can begin to consider some more interesting morphological
algorithms
We will look at:
Boundary extraction
Region filling
Skeletonization
2
Boundary Extraction
The
Theboundary
boundaryofof set
set AAdenoted
denotedbyby β(A)
β(A) isisobtained
obtainedbyby
first
first eroding
eroding AAby
byaasuitable
suitablestructuring
structuringelement
element BBandand
then
thentaking
takingthe
thedifference
differencebetween
between AAand
anditsitserosion.
erosion.
( A) A ( A ! B)
3
Boundary Extraction
((AA)) AA((AA!! BB))
4
Boundary Extraction
A simple image and the result of performing boundary
extraction using a square 3*3 structuring element
5
Region (hole) Filling
Given a pixel inside a boundary, region filling attempts to fill
that boundary with object pixels (1s)
Given
Givenaapoint
pointinside
insidehere,
here,can
canwe
we
fill
fillthe
thewhole
wholecircle?
circle?
6
Region Filling
Let A is a set containing a subset whose elements are 8-connected
boundary points of a region, enclosing a background region i.e. hole
If all boundary points are labeled 1 and non boundary points are
labeled 0, the following procedure fills the region:
Inside the boundary
7
Region Filling
0 0 0 0 0 0 0 1 1 1 1 1 1 1
0 1 1 1 1 1 0 1 0 0 0 0 0 1
0 1 0 0 0 1 0 1 0 1 1 1 0 1 0 1 0
0 1 0 0 0 1 0 1 0 1 1 1 0 1 1 1 1
0 1 0
0 1 0 0 0 1 0 1 0 1 1 1 0 1
0 1 1 1 1 1 0 1 0 0 0 0 0 1
B
0 0 0 0 0 0 0 1 1 1 1 1 1 1
A Ac
Region Filling
0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 1 0 0 0 0
0 0 1 0 0 0 0 0 1 0 0 1 1 1 0 0 0
0 0 0 0 0 0 0 1 1 1 0 0 1 0 0 0 0
0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 B 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0
( X 0 B)
X0
X k 1 ( X k B ) Ac
k 1, 2,3,
Region Filling
0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0
0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0
0 1 1 1 0 0 0 1 0 1 1 1 0 1 0 0 1 1 0 0 0
0 0 1 0 0 0 0 1 0 1 1 1 0 1 0 0 1 0 0 0 0
0 0 0 0 0 0 0 1 0 1 1 1 0 1 0 0 0 0 0 0 0
0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0
0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0
X 1 ( X 0 B)
Ac X 1 ( X 0 B ) Ac
X k 1 ( X k B ) Ac
k 1, 2,3,
Region Filling
X k 1 ( X k B ) Ac
k 1, 2,3,
NOTE:
The intersection of dilation
and the complement of A
limits the result to inside
the region of interest
11
Region Filling: Example
12
Gray Level Image Morphological
Operations
Dilation & Erosion
Opening & Closing
Morphological Gradient
Top Hat & Bottom Hat
Transformations
Readings from Book (3 Edn.)
rd
• Morphological Operations
(Chapter – 9)
• Reading Assignment
• Connected Component
Acknowledgements
Digital Image Processing”, Rafael C. Gonzalez & Richard E. Woods, Addison-Wesley, 2002
Computer Vision for Computer Graphics, Mark Borg
Material in these slides has been taken from, the following resources
21