SlideShare a Scribd company logo
Morphological Image Processing (2)
Digital Image Processing
Topics
 Morphological Operations
 Connected Component Extraction
 Convex Hull
 Thinning
 Thickening
 Skeleton
 Pruning
 Extension to gray level images
 Matlab Examples
Dilation and Erosion
 Dilation and Erosion are two basic operations in
morphological processing.
 Dilation of a setA in Z2 by a set B in Z2 is denoted by A B
and given by
Dilation
 The dilation ofA by B is the set of all displacements such that
A and overlap with at least one point
 B is called structuring element
Dilation
Erosion
 Erosion of a set A in Z2 by a set B in Z2 is denoted by
and given by:
Erosion ofA by B is the set of all points z such that B
translated by z is contained inA
Erosion
Opening
 Opening smoothes the outer contours, breaks narrow
connections, and eliminates small protrusions.
 Opening is defined as :
Closing
 Closing smoothes the object contour, fuses narrow
connections, eliminates small holes and gaps.
Extraction of Connected Components
 Begin with a point P inside the connected component,
iterate:
Until Xk = Xk-1
Initially X0 = P
Connected Component Extraction
Convex Hull
 A set is said convex if the straight line connecting any two
points of the set lies entirely withinA.
 Convex Hull of set S is the smallest convex setA that
contains S
 The set differenceA-S is called the convex deficiency of S
Computing Convex Hull
 Let Bi for i=1,2,3,4 represent the structuring elements
shown below
Convex Hull
 Repeat the following equation until converge
with
is the Hit-or-Miss operator
Assuming Convex Hull is 
4
1
)
(


i
i
D
A
C
Example (Convex Hull)
Improving Convex Hull Algorithm
 The algorithm can be improved by limiting the growth of the
algorithm beyond the maximum dimensions of the original
set.
Thinning and Thickening
 Thinning is an image-processing operation in which binary
valued image regions are reduced to lines
 The purpose of thinning is to reduce the image components
to their essential information for further analysis and
recognition
 Thickening is changing a pixel from 1 to 0 if any neighbors of
the pixel are 1.
 Thickening followed by thinning can be used for filling
undesirable holes.
 Thinning followed by thickening is used for determining
isolated components and clusters.
Thinning
 Thinning is defined in terms of hit or miss as
where B is a sequence of structuring elements like
{B} = {B1, B2, B3, …, Bn} and the operation can be given as
Thinning
 Sample set of structuring elements
Thinning Example
Thickening
 Thickening is the morphological dual of thinning and defined
as
or
Thickening Example
Skeleton
 The informal definition of a skeleton is a line representation
of an object that is:
 one-pixel thick,
 through the "middle" of the object, and,
 preserves the topology of the object.
Skeleton
 Skeleton is defined by
where
k is the last iterative step beforeA erodes to an empty set
Skeleton Example
Pruning
 Thinning and skeletonizing algorithms need a clean-up post-
processing
 The following steps are used for pruning:
 Thinning
 Find the end points
 Dilate end points
 Find the union of X1 and X3
Pruning Example
 Original image and structuring elements
Pruning Example
 Result of thinning and end points detected
Pruning Example
 Dilation of end points and the pruned image
Extension to Gray Level
 Dilation is expressed in 1D as
 Erosion is given by
Extension to Gray Level (2D Case)
 Dilation
 Erosion
Morphological Operations in MATLAB
 To create structuring element use strel(.)
SE = strel(shape, parameters)
Examples:
SE = strel('arbitrary', NHOOD)
SE = strel('diamond', R)
SE = strel('disk', R, N)
SE = strel('line', LEN, DEG)
SE = strel('octagon', R)
SE = strel('pair', OFFSET)
SE = strel('periodicline', P,V)
SE = strel('rectangle', MN)
SE = strel('square',W)
Morphological Operations in MATLAB
 SE=strel(NHOOD) is also a valid call for the function
 Use imerode(Im,SE) and imdialte(Im,SE) for erosion and
dilation respectively
 Use imopen(Im,SE) and imcolose(Im,SE) for openning and
closing
 For hit-or-miss use bwhitmiss(.)
 BW2 = bwhitmiss(BW1,SE1,SE2)
BW2 = bwhitmiss(BW1,INTERVAL)
Hit or Miss Example
Questions?

More Related Content

PPTX
Chapter 9 morphological image processing
PPTX
Chapter 9 morphological image processing
PPTX
Chapter 9 newer
PPTX
Morphological image processing basic.pptx
PPTX
Chapter 9 morphological image processing
PPTX
Morphological image Processing
PPT
morphological image processing
Chapter 9 morphological image processing
Chapter 9 morphological image processing
Chapter 9 newer
Morphological image processing basic.pptx
Chapter 9 morphological image processing
Morphological image Processing
morphological image processing

Similar to Digital Image Processing- morphological processing ppt (20)

PPT
DIP_14_54_boundary extraction in dip .ppt
PPT
Chapter_9_Morphological_Image_Processing.ppt
PPTX
Morphological Operations (2).pptx
PPT
dokumen.tips_computer-graphics-image-processing-chapter-9-computer-graphics-i...
PPT
Boundary Extraction
PDF
Morphological.pdf
PPTX
Lec7_AIP.pptx6666666666666666666666666666666666666666666666
PPT
Lec07-CH9-MORPHOL [Recovered].ppt
PPT
4_14755_CS213_20172018_1__2_1_Lecture_5.ppt
PPT
Morphological Image Processing
PPT
Morphology gonzalez-woods
PDF
Morphological image processing motes.pdf
PPT
morphological image processing
PPT
Morphological operations on digital image processing
PPT
EE 583-Lectursssse1sffgdhfdhgdhfdfdg0.ppt
PPTX
Image morphology
PDF
A novel embedded hybrid thinning algorithm for
PPTX
Morphological image processing
PDF
CV_Chap 3 Features Detection
DOC
An application of morphological
DIP_14_54_boundary extraction in dip .ppt
Chapter_9_Morphological_Image_Processing.ppt
Morphological Operations (2).pptx
dokumen.tips_computer-graphics-image-processing-chapter-9-computer-graphics-i...
Boundary Extraction
Morphological.pdf
Lec7_AIP.pptx6666666666666666666666666666666666666666666666
Lec07-CH9-MORPHOL [Recovered].ppt
4_14755_CS213_20172018_1__2_1_Lecture_5.ppt
Morphological Image Processing
Morphology gonzalez-woods
Morphological image processing motes.pdf
morphological image processing
Morphological operations on digital image processing
EE 583-Lectursssse1sffgdhfdhgdhfdfdg0.ppt
Image morphology
A novel embedded hybrid thinning algorithm for
Morphological image processing
CV_Chap 3 Features Detection
An application of morphological
Ad

Recently uploaded (20)

PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PPTX
Welding lecture in detail for understanding
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPTX
bas. eng. economics group 4 presentation 1.pptx
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PPT
Mechanical Engineering MATERIALS Selection
PPTX
Construction Project Organization Group 2.pptx
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PPTX
UNIT 4 Total Quality Management .pptx
PPT
Project quality management in manufacturing
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
OOP with Java - Java Introduction (Basics)
Model Code of Practice - Construction Work - 21102022 .pdf
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
Welding lecture in detail for understanding
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
UNIT-1 - COAL BASED THERMAL POWER PLANTS
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
Foundation to blockchain - A guide to Blockchain Tech
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
bas. eng. economics group 4 presentation 1.pptx
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
Mechanical Engineering MATERIALS Selection
Construction Project Organization Group 2.pptx
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
UNIT 4 Total Quality Management .pptx
Project quality management in manufacturing
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
OOP with Java - Java Introduction (Basics)
Ad

Digital Image Processing- morphological processing ppt

  • 1. Morphological Image Processing (2) Digital Image Processing
  • 2. Topics  Morphological Operations  Connected Component Extraction  Convex Hull  Thinning  Thickening  Skeleton  Pruning  Extension to gray level images  Matlab Examples
  • 3. Dilation and Erosion  Dilation and Erosion are two basic operations in morphological processing.  Dilation of a setA in Z2 by a set B in Z2 is denoted by A B and given by
  • 4. Dilation  The dilation ofA by B is the set of all displacements such that A and overlap with at least one point  B is called structuring element
  • 6. Erosion  Erosion of a set A in Z2 by a set B in Z2 is denoted by and given by: Erosion ofA by B is the set of all points z such that B translated by z is contained inA
  • 8. Opening  Opening smoothes the outer contours, breaks narrow connections, and eliminates small protrusions.  Opening is defined as :
  • 9. Closing  Closing smoothes the object contour, fuses narrow connections, eliminates small holes and gaps.
  • 10. Extraction of Connected Components  Begin with a point P inside the connected component, iterate: Until Xk = Xk-1 Initially X0 = P
  • 12. Convex Hull  A set is said convex if the straight line connecting any two points of the set lies entirely withinA.  Convex Hull of set S is the smallest convex setA that contains S  The set differenceA-S is called the convex deficiency of S
  • 13. Computing Convex Hull  Let Bi for i=1,2,3,4 represent the structuring elements shown below
  • 14. Convex Hull  Repeat the following equation until converge with is the Hit-or-Miss operator Assuming Convex Hull is  4 1 ) (   i i D A C
  • 16. Improving Convex Hull Algorithm  The algorithm can be improved by limiting the growth of the algorithm beyond the maximum dimensions of the original set.
  • 17. Thinning and Thickening  Thinning is an image-processing operation in which binary valued image regions are reduced to lines  The purpose of thinning is to reduce the image components to their essential information for further analysis and recognition  Thickening is changing a pixel from 1 to 0 if any neighbors of the pixel are 1.  Thickening followed by thinning can be used for filling undesirable holes.  Thinning followed by thickening is used for determining isolated components and clusters.
  • 18. Thinning  Thinning is defined in terms of hit or miss as where B is a sequence of structuring elements like {B} = {B1, B2, B3, …, Bn} and the operation can be given as
  • 19. Thinning  Sample set of structuring elements
  • 21. Thickening  Thickening is the morphological dual of thinning and defined as or
  • 23. Skeleton  The informal definition of a skeleton is a line representation of an object that is:  one-pixel thick,  through the "middle" of the object, and,  preserves the topology of the object.
  • 24. Skeleton  Skeleton is defined by where k is the last iterative step beforeA erodes to an empty set
  • 26. Pruning  Thinning and skeletonizing algorithms need a clean-up post- processing  The following steps are used for pruning:  Thinning  Find the end points  Dilate end points  Find the union of X1 and X3
  • 27. Pruning Example  Original image and structuring elements
  • 28. Pruning Example  Result of thinning and end points detected
  • 29. Pruning Example  Dilation of end points and the pruned image
  • 30. Extension to Gray Level  Dilation is expressed in 1D as  Erosion is given by
  • 31. Extension to Gray Level (2D Case)  Dilation  Erosion
  • 32. Morphological Operations in MATLAB  To create structuring element use strel(.) SE = strel(shape, parameters) Examples: SE = strel('arbitrary', NHOOD) SE = strel('diamond', R) SE = strel('disk', R, N) SE = strel('line', LEN, DEG) SE = strel('octagon', R) SE = strel('pair', OFFSET) SE = strel('periodicline', P,V) SE = strel('rectangle', MN) SE = strel('square',W)
  • 33. Morphological Operations in MATLAB  SE=strel(NHOOD) is also a valid call for the function  Use imerode(Im,SE) and imdialte(Im,SE) for erosion and dilation respectively  Use imopen(Im,SE) and imcolose(Im,SE) for openning and closing  For hit-or-miss use bwhitmiss(.)  BW2 = bwhitmiss(BW1,SE1,SE2) BW2 = bwhitmiss(BW1,INTERVAL)
  • 34. Hit or Miss Example