SlideShare a Scribd company logo
1
of
39
Morphological Image Processing
Digital Image Processing
2
of
39
Contents
Once segmentation is complete,
morphological operations can be used to
remove imperfections in the segmented
image and provide information on the form
and structure of the image
In this lecture we will consider
– What is morphology?
– Simple morphological operations
– Compound operations
– Morphological algorithms
3
of
39
1, 0, Black, White?
Throughout all of the following slides
whether 0 and 1 refer to white or black is a
little interchangeable
All of the discussion that follows assumes
segmentation has already taken place and
that images are made up of 0s for
background pixels and 1s for object pixels
After this it doesn’t matter if 0 is black, white,
yellow, green…….
4
of
39
What Is Morphology?
Morphological image processing (or
morphology) describes a range of image
processing techniques that deal with the
shape (or morphology) of features in an
image
Morphological operations are typically
applied to remove imperfections introduced
during segmentation, and so typically
operate on bi-level images
5
of
39
Quick Example
Images
taken
from
Gonzalez
&
Woods,
Digital
Image
Processing
(2002)
Image after segmentation Image after segmentation and
morphological processing
6
of
39
Structuring Elements, Hits & Fits
B
A
C
Structuring Element
Fit: All on pixels in the
structuring element cover
on pixels in the image
Hit: Any on pixel in the
structuring element covers
an on pixel in the image
All morphological processing operations are based
on these simple ideas
7
of
39
Structuring Elements
Structuring elements can be any size and
make any shape
However, for simplicity we will use
rectangular structuring elements with their
origin at the middle pixel
1 1 1
1 1 1
1 1 1
0 0 1 0 0
0 1 1 1 0
1 1 1 1 1
0 1 1 1 0
0 0 1 0 0
0 1 0
1 1 1
0 1 0
8
of
39
Fitting & Hitting
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 1 1 0 0 0 0 0 0 0
0 0 1 1 1 1 1 0 0 0 0 0
0 1 1 1 1 1 1 1 0 0 0 0
0 1 1 1 1 1 1 1 0 0 0 0
0 0 1 1 1 1 1 1 0 0 0 0
0 0 1 1 1 1 1 1 1 0 0 0
0 0 1 1 1 1 1 1 1 1 1 0
0 0 0 0 0 1 1 1 1 1 1 0
0 0 0 0 0 0 0 0 0 0 0 0
B C
A
1 1 1
1 1 1
1 1 1
Structuring
Element 1
0 1 0
1 1 1
0 1 0
Structuring
Element 2
9
of
39
Fundamental Operations
Fundamentally morphological image
processing is very like spatial filtering
The structuring element is moved across
every pixel in the original image to give a
pixel in a new processed image
The value of this new pixel depends on the
operation performed
There are two basic morphological
operations: erosion and dilation
10
of
39
Erosion
Erosion of image f by structuring element s
is given by f  s
The structuring element s is positioned with
its origin at (x, y) and the new pixel value is
determined using the rule:




otherwise
0
fits
if
1
)
,
(
f
s
y
x
g
11
of
39
Erosion Example
Structuring Element
Original Image Processed Image With Eroded Pixels
12
of
39
Erosion Example
Structuring Element
Original Image Processed Image
13
of
39
Erosion Example 1
Watch out: In these examples a 1 refers to a black pixel!
Original image Erosion by 3*3
square structuring
element
Erosion by 5*5
square structuring
element
14
of
39
Erosion Example 2
Original
image
After erosion
with a disc of
radius 10
After erosion
with a disc of
radius 20
After erosion
with a disc of
radius 5
Images
taken
from
Gonzalez
&
Woods,
Digital
Image
Processing
(2002)
15
of
39
What Is Erosion For?
Erosion can split apart joined objects
Erosion can strip away extrusions
Watch out: Erosion shrinks objects
Erosion can split apart
16
of
39
Dilation
Dilation of image f by structuring element s is
given by f s
The structuring element s is positioned with
its origin at (x, y) and the new pixel value is
determined using the rule:





otherwise
0
hits
if
1
)
,
(
f
s
y
x
g
17
of
39
Dilation Example
Structuring Element
Original Image Processed Image
18
of
39
Dilation Example
Structuring Element
Original Image Processed Image With Dilated Pixels
19
of
39
Dilation Example 1
Original image Dilation by 3*3
square structuring
element
Dilation by 5*5
square structuring
element
Watch out: In these examples a 1 refers to a black pixel!
20
of
39
Dilation Example 2
Structuring element
Original image After dilation
Images
taken
from
Gonzalez
&
Woods,
Digital
Image
Processing
(2002)
21
of
39
What Is Dilation For?
Dilation can repair breaks
Dilation can repair intrusions
Watch out: Dilation enlarges objects
22
of
39
Compound Operations
More interesting morphological operations
can be performed by performing
combinations of erosions and dilations
The most widely used of these compound
operations are:
– Opening
– Closing
23
of
39
Opening
The opening of image f by structuring
element s, denoted f ○ s is simply an erosion
followed by a dilation
f ○ s = (f s) s

Original shape After erosion After dilation
(opening)
Note a disc shaped structuring element is used
Images
taken
from
Gonzalez
&
Woods,
Digital
Image
Processing
(2002)
24
of
39
Opening Example
Original
Image
Image
After
Opening
Images
taken
from
Gonzalez
&
Woods,
Digital
Image
Processing
(2002)
25
of
39
Opening Example
Structuring Element
Original Image Processed Image
26
of
39
Opening Example
Structuring Element
Original Image Processed Image
27
of
39
Closing
The closing of image f by structuring
element s, denoted f • s is simply a dilation
followed by an erosion
f • s = (f s)s

Original shape After dilation After erosion
(closing)
Note a disc shaped structuring element is used
Images
taken
from
Gonzalez
&
Woods,
Digital
Image
Processing
(2002)
28
of
39
Closing Example
Original
Image
Image
After
Closing
Images
taken
from
Gonzalez
&
Woods,
Digital
Image
Processing
(2002)
29
of
39
Closing Example
Structuring Element
Original Image Processed Image
30
of
39
Closing Example
Structuring Element
Original Image Processed Image
31
of
39
Morphological Processing Example
Images
taken
from
Gonzalez
&
Woods,
Digital
Image
Processing
(2002)
32
of
39
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
There are lots of others as well though:
– Extraction of connected components
– Thinning/thickening
– Skeletonisation
33
of
39
Boundary Extraction
Extracting the boundary (or outline) of an
object is often extremely useful
The boundary can be given simply as
β(A) = A – (AB)
Images
taken
from
Gonzalez
&
Woods,
Digital
Image
Processing
(2002)
34
of
39
Boundary Extraction Example
A simple image and the result of performing
boundary extraction using a square 3*3
structuring element
Original Image Extracted Boundary
Images
taken
from
Gonzalez
&
Woods,
Digital
Image
Processing
(2002)
35
of
39
Region Filling
Given a pixel inside a boundary, region filling
attempts to fill that boundary with object
pixels (1s)
Images
taken
from
Gonzalez
&
Woods,
Digital
Image
Processing
(2002)
Given a point inside
here, can we fill the
whole circle?
36
of
39
Region Filling (cont…)
The key equation for region filling is
Where X0 is simply the starting point inside
the boundary, B is a simple structuring
element and Ac is the complement of A
This equation is applied repeatedly until Xk
is equal to Xk-1
Finally the result is unioned with the original
boundary
Images
taken
from
Gonzalez
&
Woods,
Digital
Image
Processing
(2002)
.....
3
,
2
,
1
)
( 1 


  k
A
B
X
X c
k
k
37
of
39
Region Filling Step By Step
Images
taken
from
Gonzalez
&
Woods,
Digital
Image
Processing
(2002)
38
of
39
Region Filling Example
Images
taken
from
Gonzalez
&
Woods,
Digital
Image
Processing
(2002)
Original Image One Region
Filled
All Regions
Filled
39
of
39
Summary
The purpose of morphological processing is
primarily to remove imperfections added during
segmentation
The basic operations are erosion and dilation
Using the basic operations we can perform
opening and closing
More advanced morphological operation can
then be implemented using combinations of all
of these
40
of
39
Structuring Elements, Hits & Fits
41
of
39
HIT!
FIT!
42
of
39
MISS!
MISS!
43
of
39
Erosion Example
Structuring Element
44
of
39
Dilation Example
Structuring Element
45
of
39
Opening Example
Structuring Element
Original Image Processed Image
46
of
39
Closing Example
Structuring Element
Original Image Processed Image
47
of
39
Region Filling Step By Step
Images
taken
from
Gonzalez
&
Woods,
Digital
Image
Processing
(2002)
48
of
39
Region Filling Step By Step
Images
taken
from
Gonzalez
&
Woods,
Digital
Image
Processing
(2002)

More Related Content

PPTX
Introduction in Image Processing Matlab Toolbox
PPTX
Chapter 9 morphological image processing
PPTX
Introductory Digital Image Processing using Matlab, IIT Roorkee
PPT
morphological image processing
PPTX
Comparison between JPEG(DCT) and JPEG 2000(DWT) compression standards
PPTX
Image processing second unit Notes
PPSX
Image Processing: Spatial filters
PPTX
Image Processing Using MATLAB
Introduction in Image Processing Matlab Toolbox
Chapter 9 morphological image processing
Introductory Digital Image Processing using Matlab, IIT Roorkee
morphological image processing
Comparison between JPEG(DCT) and JPEG 2000(DWT) compression standards
Image processing second unit Notes
Image Processing: Spatial filters
Image Processing Using MATLAB

What's hot (20)

PPTX
Jpeg dct
PPTX
Unit 2. Image Enhancement in Spatial Domain.pptx
PPT
Image enhancement in the spatial domain1
PPTX
Watershed
PPSX
Edge Detection and Segmentation
PPTX
Matlab and Image Processing Workshop-SKERG
PPTX
Introduction to Image Processing:Image Modalities
PPTX
Digital Image Processing
PPTX
Intensity Transformation
PPTX
Chapter 8 image compression
PDF
Image Segmentation
POTX
Presentation of Lossy compression
PPTX
Chapter 3 image enhancement (spatial domain)
PPTX
Basic Relationships between Pixels- Digital Image Processing
PDF
PPTX
Digital Image restoration
PPTX
Digital image processing2.pptx
PPTX
Lzw compression ppt
PPTX
Image Restoration (Order Statistics Filters)
Jpeg dct
Unit 2. Image Enhancement in Spatial Domain.pptx
Image enhancement in the spatial domain1
Watershed
Edge Detection and Segmentation
Matlab and Image Processing Workshop-SKERG
Introduction to Image Processing:Image Modalities
Digital Image Processing
Intensity Transformation
Chapter 8 image compression
Image Segmentation
Presentation of Lossy compression
Chapter 3 image enhancement (spatial domain)
Basic Relationships between Pixels- Digital Image Processing
Digital Image restoration
Digital image processing2.pptx
Lzw compression ppt
Image Restoration (Order Statistics Filters)
Ad

Similar to DigitalImageProcessing 9-Morphology.ppt (20)

PPT
morphological tecnquies in image processing
PDF
Lec_9_ Morphological ImageProcessing .pdf
PPT
Image processing spatialfiltering
PPTX
COM2304: Morphological Image Processing
PPTX
Digital image processing DIP
PPTX
Morphological image processing basic.pptx
PPT
dokumen.tips_computer-graphics-image-processing-chapter-9-computer-graphics-i...
PPT
morphological image processing
PPT
SpatialFiltering2 (1).ppt complete guide
PPTX
chapter 5 morphologiical processing.pptx
PDF
CV_Chap 3 Features Detection
PPTX
Morphological image processing
PPT
Spatial domain filtering.ppt
PPTX
Morphological Operations (2).pptx
PDF
Content Based Image Retrieval Approach Based on Top-Hat Transform And Modifie...
PPTX
Unit 5 Morphological Image Processing Advanced Topics in Digital Image Proce...
PPT
Spatial filtering
DOC
An application of morphological
PPT
EE 583-Lectursssse1sffgdhfdhgdhfdfdg0.ppt
PPT
Morphological operations on digital image processing
morphological tecnquies in image processing
Lec_9_ Morphological ImageProcessing .pdf
Image processing spatialfiltering
COM2304: Morphological Image Processing
Digital image processing DIP
Morphological image processing basic.pptx
dokumen.tips_computer-graphics-image-processing-chapter-9-computer-graphics-i...
morphological image processing
SpatialFiltering2 (1).ppt complete guide
chapter 5 morphologiical processing.pptx
CV_Chap 3 Features Detection
Morphological image processing
Spatial domain filtering.ppt
Morphological Operations (2).pptx
Content Based Image Retrieval Approach Based on Top-Hat Transform And Modifie...
Unit 5 Morphological Image Processing Advanced Topics in Digital Image Proce...
Spatial filtering
An application of morphological
EE 583-Lectursssse1sffgdhfdhgdhfdfdg0.ppt
Morphological operations on digital image processing
Ad

Recently uploaded (20)

PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
Construction Project Organization Group 2.pptx
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPT
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
PPTX
Lecture Notes Electrical Wiring System Components
PPTX
web development for engineering and engineering
PPTX
Sustainable Sites - Green Building Construction
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PPTX
OOP with Java - Java Introduction (Basics)
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PPTX
Geodesy 1.pptx...............................................
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PDF
Well-logging-methods_new................
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PDF
composite construction of structures.pdf
PPTX
additive manufacturing of ss316l using mig welding
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Construction Project Organization Group 2.pptx
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
Automation-in-Manufacturing-Chapter-Introduction.pdf
CYBER-CRIMES AND SECURITY A guide to understanding
Operating System & Kernel Study Guide-1 - converted.pdf
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
Lecture Notes Electrical Wiring System Components
web development for engineering and engineering
Sustainable Sites - Green Building Construction
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
OOP with Java - Java Introduction (Basics)
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
Geodesy 1.pptx...............................................
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
Well-logging-methods_new................
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
composite construction of structures.pdf
additive manufacturing of ss316l using mig welding

DigitalImageProcessing 9-Morphology.ppt