Morphological Image Processing
Morphological Image Processing
08/12/24 7
Basic Set Theory
(a) (b) (c)
(d) and (e)
8
Basic Set Theory
9
Preliminaries (1)
► Reflection of set B is defined as
Bˆ {w | w b, for b B}
That is, if B is a set of points in 2-D, then ˆB is the set of points in B
whose (x, y) coordinates have been replaced by (−x,−y).
► Translation
08/12/24 10
Example: Reflection and Translation
08/12/24 11
Structure elements
► Structure elements (SE):
► Small sets or sub-images used to probe an image under study for properties
of interest
► Figure 9.2 shows several examples of digital sets (structuring elements) and
their reflection. The dot denotes the origin of
► the SE. Note that reflection consists simply of rotating an SE by 180° about
its origin, and that all elements, including the background and don’t care
elements, are rotated.
08/12/24 12
Examples: Structuring Elements (1)
origin
08/12/24 13
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.
08/12/24 14
Structuring Elements, Hits & Fits
B Structuring Element
08/12/24 15
Basic morphological operations
► Erosion
► Dilation
Opening object
Closing background
16
Erosion
08/12/24 17
Example of Erosion
08/12/24 18
Erosion Example
Original Image Processed Image With Eroded Pixels
08/12/24 21
Erosion Example
08/12/24 22
Erosion Example
After erosion
Original
with a disc of
image
radius 10
08/12/24 23
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
08/12/24 24
Examples of Dilation
08/12/24 25
Dilation Example
Original Image Processed Image
08/12/24 28
Dilation Example
08/12/24 29
08/12/24 30
Duality
► Erosion and dilation are duals of each other with respect to
set complementation and reflection
A B
c
A B
c
and
A B
c
Ac B
08/12/24 31
Duality
A B z | B Z A
c c
z | B Z A
c c
z | B Z Ac
Ac B
08/12/24 32
Duality
A
c
A B
c
z| B
Z
z | B
A
c
Z
Ac B
08/12/24 33
08/12/24 34
Opening and Closing
08/12/24 35
Opening and Closing
08/12/24 36
Opening
08/12/24 37
Opening Example
Original
Image
Image
After
Opening
08/12/24 38
Closing Example
Original
Image
Image
After
Closing
08/12/24 39
Useful: Opening & Closing
08/12/24 40
08/12/24 43
Duality of Opening and Closing
► Opening and closing are duals of each other with respect to set
complementation and reflection
ˆ
( A B) ( A B) c c
08/12/24 44
The Properties of Opening and Closing
► Properties of Opening
(a) A B is a subset (subimage) of A
(b) if C is a subset of D, then C B is a subset of D B
(c) ( A B) B A B
► Properties of Closing
B B1 , B2
B1 : object
B2 : background
A B A B1 ( Ac B2 )
08/12/24 47