CHAPTER 9
MORPHOLOGICAL
IMAGE PROCESSING
SOME BASIC CONCEPTS FROM SET THEORY
SOME BASIC CONCEPTS FROM SET THEORY
Translation
Reflection
LOGIC OPERATIONS INVOLVING BINARY
IMAGES
LOGIC OPERATIONS INVOLVING BINARY
IMAGES
A B
Dilation
With A and B as sets in Z2, the dilation of A by B is defined
as
ˆ
A B = z | ( B) z A
where B̂ : the reflection of B about its origin and shifting
this reflection by z
The dilation of A by B is the set of all displacements, z, such
that B̂ and A overlap by at least one element. Thus,
A B = z | [( Bˆ ) z A] A
Set B is referred to as the structuring element in dilation.
Dilation
Dilation Example
Structuring element
Erosion
For sets A and B in Z2, the erosion of A by B is defined
as
AΟB = z | ( Bˆ ) A z
where B̂ : the reflection of B about its origin and
shifting this reflection by z
The erosion of A by B is the set of all points z, such
that B, translated by z is contained in A.
( AOB ) = z | ( B ) z A
c c
( AOB) c = Ac Bˆ
= z | ( B ) z Ac = c
= z | ( B ) z Ac = Ac Bˆ
Erosion
Dilation and Erosion
Erosion Example
Opening and Closing
Opening:
smooth the contour of an object, break narrow isthmuses, and
eliminate thin protrusions.
The opening A by B is the erosion of A by B, followed by a
dilation of the result by B
A B = ( AΟB ) B
A B = ( B ) z | ( B ) z A
Closing:
smooth sections of contours but it generally fuses narrow
breaks and long thing gulfs, eliminates small holes, and fills
gaps in the contour.
A • B = ( A B )ΟB
Opening and Closing
Opening
Opening and Closing
Closing
Opening and Closing
Opening Example
Opening and Closing
Closing Example
Opening and Closing
Theopening operation satisfies the following
properties:
A B is a subset (subimage) of A.
If C is a subset of D, then C B is a subset of D B .
( A B) B = A B
The closing operation satisfies the following
properties:
A is a subset (subimage) of A • B .
If C is a subset of D, then C • B is a subset of D • B .
( A • B) • B = A • B
Opening and Closing
The Hit-or-Miss Transformation
A
*B = ( AOX ) Ac O(W − X ) B = ( X ,W − X )
The Hit-or-Miss Transformation
B = ( AOX ) Ac O(W − X )
A* B = ( X ,W − X )
HIT AND MISS TRANSFORM
DUALITY
DUALITY PROOF
EXAMPLES
a) Erosion
b) Dilation
L/2
L
L/2
L
EXERCISES
EROSION RESULT
MORPHOLOGICAL ALGORITHMS
Boundary Extraction
Region Filling
Connected Components Extraction
Convex Hull
Thinning
Pruning
Skeleton
Thickening
Some Basic Morphological Algorithms
Boundary Extraction
The boundary of a set A,
( A) = A − ( AOB)
where B is a suitable structuring element.
Some Basic Morphological Algorithms
Boundary Extraction Example
Some Basic Morphological Algorithms
Region Filling
The following procedure can fill the region:
X k = ( X k −1 B) Ac
where X0 = p, and B is the symmetric
structuring element shown in Fig. 9.15.
Note that p is the initial point we should
assign.
Some Basic Morphological Algorithms
Region Filling
0
1
X0=p
X k = ( X k −1 B) Ac
Some Basic Morphological Algorithms
Region Filling
Some Basic Morphological Algorithms
Extraction of Connected Components
X k = ( X k −1 B ) A
Some Basic Morphological Algorithms
Extraction of Connected Components
CONVEX HULL
Some Basic Morphological Algorithms
Thinning
The thinning of a set A by a structuring element B can
be defined in terms of the hit-or-miss transform:
A B = A − ( AO
* B)
= A ( AO
*B ) c
A more useful expression for thinning A symmetrically
is based on a sequence of structuring elements:
B = B1 , B 2 , B 3 ,..., B n
A B = ((...(( A B1 ) B 2 )...) B n )
Some Basic Morphological Algorithms
Thinning
Some Basic Morphological Algorithms
Skeletons
Summary of Morphological Operations
and Their Properties
Summary of Morphological Operations
and Their Properties
Summary of Morphological Operations
and Their Properties
Summary of Morphological Operations
and Their Properties
Extensions to Gray-Scale Images
Extensions to Gray-Scale Images
Extensions to Gray-Scale Images