Professional Documents
Culture Documents
2.30 07 2022 - Unit2afinal
2.30 07 2022 - Unit2afinal
AND SEGMENTATION
unit 2
Dr. Saranya.K.C
SENSE
Dr.Saranya.K.C
VIT
Introduction
Dr.Saranya.K.C
VIT
Preliminaries (1)
• Reflection
• Translation
Dr.Saranya.K.C
VIT
Example: Reflection and Translation
Dr.Saranya.K.C
VIT
Preliminaries (2)
Fit
Hit
miss
Dr.Saranya.K.C
VIT
Examples: Structuring Elements (1)
origin
Dr.Saranya.K.C
VIT
Examples: Structuring Elements (2)
Accommodate the
entire structuring
elements when its Origin of B visits
origin is on the every element of A
border of the
original set 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.
Dr.Saranya.K.C
VIT
Erosion
A B z | ( B) Z Ac
Dr.Saranya.K.C
VIT
Example
of Erosion
(1)
Dr.Saranya.K.C
VIT
Example
of Erosion
(2)
Dr.Saranya.K.C
VIT
Dilation
2
With A and B as sets in Z , the dilation of A by B,
denoted A B, is defined as
µ A
A B= z | B
z
µ and A
The set of all displacements z , the translated B
overlap by at least one element.
A B z | B
µ A A
z
Dr.Saranya.K.C
VIT
Examples of Dilation (1)
Dr.Saranya.K.C
VIT
Examples of Dilation (2)
Dr.Saranya.K.C
VIT
DUALITY
• Erosion and dilation are duals of each other with respect to
set complementation and reflection
A B µ
Ac B
c
and
µ
B
c c
A B A
Dr.Saranya.K.C
VIT
Dr.Saranya.K.C
VIT
Dr.Saranya.K.C
VIT
Dr.Saranya.K.C
VIT
Opening and Closing
Dr.Saranya.K.C
VIT
Opening and Closing
Dr.Saranya.K.C
VIT
Opening
Dr.Saranya.K.C
VIT
Example: Opening
Dr.Saranya.K.C
VIT
Example: Closing
Dr.Saranya.K.C
VIT
Dr.Saranya.K.C
VIT
Duality of Opening and Closing
AgB µ)
( A oB
c c
c µ
c
A o B ( A gB )
Dr.Saranya.K.C
VIT
The Properties of Opening and Closing
• Properties of Opening
(a) A o B is a subset (subimage) of A
(b) if C is a subset of D, then C o B is a subset of D o B
(c) ( A o B) o B A o B
• Properties of Closing
• 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
Dr.Saranya.K.C
VIT
Example 1
Dr.Saranya.K.C
VIT
Dr.Saranya.K.C
VIT
Example 2
Dr.Saranya.K.C
VIT
Some Basic Morphological Algorithms (2)
• Hole Filling
A hole may be defined as a background region surrounded by
a connected border of foreground pixels.
Dr.Saranya.K.C
VIT
Some Basic Morphological Algorithms (2)
• 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.
Then, Xk contains all the filled holes. The set union of Xk and I contains
all the filled holes and their boundaries.
Dr.Saranya.K.C
VIT
Example
Dr.Saranya.K.C
VIT
Dr.Saranya.K.C
VIT
Some Basic Morphological Algorithms (3)
Dr.Saranya.K.C
VIT
Some Basic Morphological Algorithms (3)
X k ( X k 1 B ) A
B : structuring element
until X k X k -1
Dr.Saranya.K.C
VIT
Dr.Saranya.K.C
VIT
Dr.Saranya.K.C
VIT
Some Basic Morphological Algorithms (5)
• Thinning
The thinning of a set A by a structuring element B, defined
A B A ( A * B)
A ( A * B) c
Dr.Saranya.K.C
VIT
Some Basic Morphological Algorithms (5)
B B1
, B 2
, B 3
,..., B n
where B i is a rotated version of B i -1
Dr.Saranya.K.C
VIT
Dr.Saranya.K.C
VIT
Some Basic Morphological Algorithms (6)
• Thickening:
Dr.Saranya.K.C
VIT
Some Basic Morphological Algorithms (6)
Dr.Saranya.K.C
VIT
Filling Holes
1 I ( x, y ) if ( x, y ) is on the border of I
F ( x, y )
0 otherwise
then
c
H R ( F )
D
Ic
Dr.Saranya.K.C
VIT
SE : 3 3 1s.
Dr.Saranya.K.C
VIT
c
H R ( F )
D
Ic
Dr.Saranya.K.C
VIT
Border Clearing
It can be used to screen images so that only complete objects
remain for further processing; it can be used as a singal that
partial objects are present in the field of view.
Dr.Saranya.K.C
VIT
Dr.Saranya.K.C
VIT
Summary (1)
Dr.Saranya.K.C
VIT
Summary (2)
Dr.Saranya.K.C
VIT
Dr.Saranya.K.C
VIT
Dr.Saranya.K.C
VIT
Gray-Scale Morphology
f ( x, y ) : gray-scale image
b( x, y ): structuring element
Dr.Saranya.K.C
VIT
Gray-Scale Morphology: Erosion and Dilation by
Flat Structuring
f b ( x, y) (min
s ,t )b
f ( x s, y t )
f b ( x, y) max
( s ,t )b
f ( x s, y t )
Dr.Saranya.K.C
VIT
Dr.Saranya.K.C
VIT
Gray-Scale Morphology: Erosion and Dilation by
Nonflat Structuring
f bN ( x, y) (min
s ,t )b
f ( x s, y t ) bN ( s, t )
f bN ( x, y) max
( s ,t )b
f ( x s, y t ) bN ( s, t )
Dr.Saranya.K.C
VIT
REFERENCE
• Computer Vision: Algorithms and Applications
by Richard Szeliski Springer, 2011
• Gonzalez, Rafael C.., Woods, Richard
Eugene. Digital Image Processing. United
Kingdom: Pearson, 2018.
Dr.Saranya.K.C
VIT
• Refer class notes
Dr.Saranya.K.C
VIT