Morphological Image Processing
Dr. Nilamani Bhoi
Associate Professor
Dept. of Electronics and Telecommunication
Veer Surendra Sai University of Technology, Burla
Introduction
– “Morphology “ – a branch in biology that deals with
the form and structure of animals and plants.
– “Mathematical Morphology” – as a tool for
extracting image components, that are useful in the
representation and description of region shape.
– The language of mathematical morphology is – Set
theory.
– Unified and powerful approach to numerous image
processing problems.
– In binary images , the set elements are members of
the 2-D integer space – Z . where each element (x,y) is
a coordinate of a black (or white) pixel in the image.
4/18/2025 Dr. Nilamani Bhoi, Associate Professor, ETC Engg, VSSUT Burla 2
Basic Concepts in Set Theory
• Subset
Morphological Image Processing
• Union
• Intersection
disjoint / mutually exclusive
• Complement
• Difference
• Reflection
• Translation
4/18/2025 Dr. Nilamani Bhoi, Associate Professor, ETC Engg, VSSUT Burla 3
Logic Operations Involving Binary Pixels and
Images
Morphological Image Processing
• The principal logic operations used in image processing
are: AND, OR, NOT (COMPLEMENT).
• These operations are functionally complete.
• Logic operations are preformed on a pixel by pixel basis
between corresponding pixels (bitwise).
• Other important logic operations :
XOR (exclusive OR), NAND (NOT-AND)
• Logic operations are just a private case for a binary set
operations, such : AND – Intersection , OR – Union,
NOT-Complement.
4/18/2025 Dr. Nilamani Bhoi, Associate Professor, ETC Engg, VSSUT Burla 4
Morphological Image Processing
4/18/2025 Dr. Nilamani Bhoi, Associate Professor, ETC Engg, VSSUT Burla 5
Morphological Image Processing
Morphological Operations
• Basic Morphological Operations
• Dilation
• Erosion
• Opening
• Closing
Positioned image and structuring element are used in morphological operations
4/18/2025 Dr. Nilamani Bhoi, Associate Professor, ETC Engg, VSSUT Burla 6
Structuring Elements
Morphological Image Processing
A structuring element is a shape mask used in
the basic morphological operations.
They can be any shape and size that is
digitally representable, and each has an origin.
box
hexagon disk
something
box(length,width) disk(diameter)
4/18/2025 Dr. Nilamani Bhoi, Associate Professor, ETC Engg, VSSUT Burla 7
Dilation
Morphological Image Processing
• Dilation of A by B: AB
A B {z | (Bˆ)z A } A B {z | [(Bˆ)z A] A}
X B p Z : p x b, x X and b B
2
4/18/2025 Dr. Nilamani Bhoi, Associate Professor, ETC Engg, VSSUT Burla 8
Dilation
Morphological Image Processing
Dilation expands the connected sets of 1s of a binary image.
It can be used for
1. growing features
2. filling holes and gaps
4/18/2025 Dr. Nilamani Bhoi, Associate Professor, ETC Engg, VSSUT Burla 9
Dilation with Structuring Elements
Morphological Image Processing
The arguments to dilation and erosion are
1. a binary image B
2. a structuring element S
dilate(B,S) takes binary image B, places the origin
of structuring element S over each 1-pixel, and ORs
the structuring element S into the output image at
the corresponding position.
0000 dilate 0110
1
0110 0111
11
0000 0000
S
B origin BS
4/18/2025 Dr. Nilamani Bhoi, Associate Professor, ETC Engg, VSSUT Burla 10
Dilation – Example 1
Morphological Image Processing
4/18/2025 Dr. Nilamani Bhoi, Associate Professor, ETC Engg, VSSUT Burla 11
Dilation – Example 2
Morphological Image Processing
4/18/2025 Dr. Nilamani Bhoi, Associate Professor, ETC Engg, VSSUT Burla 12
Assignment-XI
Morphological Image Processing
Perform Dilation operation on image A with structuring element B
0 0 0 0 0
0 0 1 0 0
A= 0 1 1 0 0
0 0 1 1 0
0 0 0 0 0
1 1 0
1 1 0
B=
1 0 0
4/18/2025 Dr. Nilamani Bhoi, Associate Professor, ETC Engg, VSSUT Burla 13
Erosion
Morphological Image Processing
• Erosion of A by B: A B
A B = {z | (B)z A}.
XB p Z 2 : p x b X b B
4/18/2025 Dr. Nilamani Bhoi, Associate Professor, ETC Engg, VSSUT Burla 14
Erosion
Morphological Image Processing
Erosion shrinks the connected sets of 1s of a binary image.
It can be used for
1. shrinking features
2. Removing bridges, branches and small protrusions
4/18/2025 Dr. Nilamani Bhoi, Associate Professor, ETC Engg, VSSUT Burla 15
Erosion with Structuring Elements
Morphological Image Processing
erode(B,S) takes a binary image B, places the origin
of structuring element S over every pixel position, and
ORs a binary 1 into that position of the output image only if
every position of S (with a 1) covers a 1 in B.
origin
0 0 1 1 0 0 0 0 0 0
1 erode
0 0 1 1 0 0 0 1 1 0
1
0 0 1 1 0 0 0 1 1 0
1
1 1 1 1 1 0 0 0 0 0
B S B S
4/18/2025 Dr. Nilamani Bhoi, Associate Professor, ETC Engg, VSSUT Burla 16
Erosion – Example 1
Morphological Image Processing
4/18/2025 Dr. Nilamani Bhoi, Associate Professor, ETC Engg, VSSUT Burla 17
Erosion – Example 2
Morphological Image Processing
4/18/2025 Dr. Nilamani Bhoi, Associate Professor, ETC Engg, VSSUT Burla 18
Opening and Closing
Morphological Image Processing
• Opening: Erosion followed by Dilation
• Opening A by B: A ○ B = (A B) B
• Smoothes Contours, Breaks narrow bridges,
Eliminates thin protrusions
• Closing: Dilation followed by Erosion
• Closing A by B: A ● B = (A B) B
• Smoothing, Closes small holes and channels
4/18/2025 Dr. Nilamani Bhoi, Associate Professor, ETC Engg, VSSUT Burla 19
Opening and Closing with Structuring Element
Morphological Image Processing
4/18/2025 Dr. Nilamani Bhoi, Associate Professor, ETC Engg, VSSUT Burla 20
Opening: Example 1
Morphological Image Processing
4/18/2025 Dr. Nilamani Bhoi, Associate Professor, ETC Engg, VSSUT Burla 21
Opening: Example 1
Morphological Image Processing
4/18/2025 Dr. Nilamani Bhoi, Associate Professor, ETC Engg, VSSUT Burla 22
Closing: Example 2
Morphological Image Processing
4/18/2025 Dr. Nilamani Bhoi, Associate Professor, ETC Engg, VSSUT Burla 23
Closing: Example 2
Morphological Image Processing
4/18/2025 Dr. Nilamani Bhoi, Associate Professor, ETC Engg, VSSUT Burla 24
Thank You
4/18/2025 Dr. Nilamani Bhoi, Associate Professor, ETC Engg, VSSUT Burla 25