ImageProcessing11-Morphology
ImageProcessing11-Morphology
Image Morphology
c an b e used to
c al o pe rations m at ion on
logi f or
p let e, m orpho an d pr ovide in
ent at io n is com g me nt ed image
Once se
gm
t io n s in the se
ove im perfec of t he image
rem tructur e
m an d s
the for
https://towardsdatascience.com/understanding-morphological-image-processing-and-its-operations-7bcf1ed11756
Contents
In this lecture we will consider
• What is morphology?
• Simple morphological operations
• Compound operations
• Morphological algorithms
1, 0, Black, White?
0 0 1 0 0
1 1 1 0 1 0 0 1 1 1 0
1 1 1 1 1 1 1 1 1 1 1
1 1 1 0 1 0 0 1 1 1 0
0 0 1 0 0
Morphology
Fit: When all the pixels in the structuring element cover the pixels
of the object, we call it Fit.
Hit: When at least one of the pixels in the structuring element
cover the pixels of the object, we call it Hit.
Miss: When no pixel in the structuring element cover the pixels of
the object, we call it miss.
Structuring Elements,
Hits & Fits
B Structuring Element
A: FIT
B: HIT
A C: Miss
C
0 0 1 1 1 1 1 1 0 0 0 0 0 1 0
0 0 1 1 1 1 1 1 1 0 0 0 1 1 1
0 0 1 1 1 1 1 A
1 1 1 1 0 0 1 0
0 0 0 0 0 1 1 1 1 1 1 0 Structuring
Element 2
0 0 0 0 0 0 0 0 0 0 0 0
Fundamental Operations
Structuring Element
Erosion Example
Original Image Processed Image
Structuring Element
Erosion Example 1
After erosion
Original
with a disc of
image
radius 10
Erosion canErosion
stripcan
away extrusions
split apart
Structuring Element
Dilation Example
Original Image Processed Image With Dilated Pixels
Structuring Element
Dilation Example
Original image
Structuring element
Dilation Example
After dilation
Compound Operations
Most morphological operations are not performed using
either dilation or erosion; instead, they are performed
by using both. Two most widely used compound
operations are:
(a)Closing (by first performing dilation and then
erosion)
(b)Opening (by first performing erosion and then
dilation).
f ○ s = (f s) s
Original shape
After erosion After dilation
(opening)
After
Image
Image
Original
Opening
Opening Example
Opening Example
Original Image Processed Image
Structuring Element
Opening Example
Original Image Processed Image
Structuring Element
Closing
The closing of image f by structuring
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
After
Image
Image
Original
Closing
Closing Example
Closing Example
Original Image Processed Image
Structuring Element
Closing Example
Original Image Processed Image
Structuring Element
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Boundary (A) = A - (A Ɵ B)
Boundary (A) = A - (A Ɵ B)
Boundary Extraction
Why is Boundary Extraction
Important?
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
c
X k ( X k 1 B ) A k 1,2,3.....