SlideShare a Scribd company logo
2
Most read
5
Most read
6
Most read
LECTURE 15: IMAGE MORPHOLOGY EXAMPLES
©2017Marwa_Ahmeid Page 1
1. (a) Give a morphological algorithm for converting an 8-connected binary boundary to
an m-connected boundary (see Section 2.5.2). You may assume that the boundary is
fully connected and that it is one pixel thick
(b) Does the operation of your algorithm require more than one iteration with each
structuring element? Explain your reasoning.
(c) Is the performance of your algorithm independent of the order in which the structuring
elements are applied? If your answer is yes, prove it; otherwise give an example
that illustrates the dependence of your procedure on the order of application of the
structuring elements.
a) With reference to the discussion in Section 2.5.2, m-connectivity is used to avoid multiple
paths that are inherent in 8-connectivity. In one-pixel-thick, fully connected boundaries, these
multiple paths manifest themselves in the four basic patterns shown here:
The solution to the problem is to use the hit-or-miss transform to detect the patterns and
then to change the center pixel to 0, thus eliminating the multiple paths. A basic sequence of
morphological steps to accomplish this is as follows:
LECTURE 15: IMAGE MORPHOLOGY EXAMPLES
©2017Marwa_Ahmeid Page 2
where A is the input image containing the boundary.
b) Only one pass is required. Application of the hit-or-miss transform using a given Bi finds
all instances of occurrence of the pattern described by that structuring element.
c) The order does matter. For example, consider the sequence of points shown in next figure
and assume that we are traveling from left to right. If B1 is applied first, point a will be deleted
and point b will remain after application of all other structuring elements. If, on the other hand,
B3 is applied first, point b will be deleted and point a will remain. Thus, we would end up with
different (but of course, acceptable) m-paths.
2. How can the given object be cleaned up by using morphological operations? (The outline
of the zero in the image should be closed.)
0 0 0 0 0 0 0 0 0
0 0 1 1 0 1 1 0 0
0 0 1 0 1 0 0 1 0
0 0 0 0 0 0 1 0 0
0 0 1 0 0 0 1 0 0
0 1 1 1 1 1 1 0 0
0 0 0 0 0 0 0 0 0
LECTURE 15: IMAGE MORPHOLOGY EXAMPLES
©2017Marwa_Ahmeid Page 3
The morphological operation closing is used to close the outline of the zero in the image A given
As
0 0 0 0 0 0 0 0 0
0 0 1 1 0 1 1 0 0
0 0 1 0 1 0 0 1 0
0 0 0 0 0 0 1 0 0
0 0 1 0 0 0 1 0 0
0 1 1 1 1 1 1 0 0
0 0 0 0 0 0 0 0 0
LECTURE 15: IMAGE MORPHOLOGY EXAMPLES
©2017Marwa_Ahmeid Page 4
3. Give the structuring element and morphological operation(s) that produced each of the
results shown in images (a) through (d). Show the origin of each structuring element
clearly. The dashed lines show the boundary of the original set and are included only for
reference. Note that in (d) all corners are rounded.
3.
The center of each structuring element is shown as a black dot.
LECTURE 15: IMAGE MORPHOLOGY EXAMPLES
©2017Marwa_Ahmeid Page 5
Solution (a) was obtained by eroding the original set (shown dashed) with the structuring
element shown (note that the origin is at the bottom, right).
Solution (b) was obtained by eroding the original set with the tall rectangular structuring element
shown.
Solution(c) was obtained by first eroding the image shown down to two vertical lines using
the rectangular structuring element. This result was then dilated with the circular structuring
element. NOTE: This solution is not entirely correct, after the initial eroding there is also a
horizontal line connecting the two vertical ones.
Solution (d) was obtained by first dilating the original set with the large disk shown. Then
dilated image was then eroded with a disk of half the diameter of the disk used for dilation.
LECTURE 15: IMAGE MORPHOLOGY EXAMPLES
©2017Marwa_Ahmeid Page 6
---------------------------------------------------------------------------------------------------------------------------------------------
LECTURE 15: IMAGE MORPHOLOGY EXAMPLES
©2017Marwa_Ahmeid Page 7
The solution is shown in the next figure. Although the images shown could be sketched by hand,
they were done in MATLAB. The size of the original is 647 x 624 pixels. A disk structuring
element of radius 11 was used. This structuring element was just large enough to encompass all
noise elements, as given in the problem statement.
The images shown in the figure are: (a) erosion of the original, (b) dilation of the result, (c)
another dilation, and finally (d) an erosion.
The first erosion (leftmost image) should take out all noise elements that do not touch the rectangle,
should increase the size of the noise elements completely contained within the rectangle,
and should decrease the size of the rectangle. If worked by hand, the student may or may not realize
that some imperfections are left along the boundary of the object. We do not consider this
an important issue because it is scale-dependent, and nothing is said in the problem statement
about this.
The first dilation (next image) should shrink the noise components that were increased in erosion,
should increase the size of the rectangle, and should round the corners.
The next dilation should eliminate the internal noise components completely and further increase
the size of the rectangle.
The final erosion (last image on the right) should then decrease the size of the rectangle. The
rounded corners in the final answer are an important point that should be recognized by the
student.
LECTURE 15: IMAGE MORPHOLOGY EXAMPLES
©2017Marwa_Ahmeid Page 8
5-
LECTURE 15: IMAGE MORPHOLOGY EXAMPLES
©2017Marwa_Ahmeid Page 9
comparing the differences between them makes no sense. Often, special markings
are manufactured into the product for mechanical or image-based alignment
Controlled illumination (note that “illumination” is not limited to visible light)
obviously is important because changes in illumination can affect dramatically
the values in a difference image. One approach used often in conjunction with
illumination control is intensity scaling based on actual conditions. For example,
the products could have one or more small patches of a tightly controlled
color, and the intensity (and perhaps even color) of each pixels in the entire image
would be modified based on the actual versus expected intensity and/or
color of the patches in the image being processed.
Finally, the noise content of a difference image needs to be low enough so
that it does not materially affect comparisons between the golden and input images.
Good signal strength goes a long way toward reducing the effects of noise.
Another (sometimes complementary) approach is to implement image processing
techniques (e.g., image averaging) to reduce noise.
Obviously there are a number if variations of the basic theme just described.
For example, additional intelligence in the form of tests that are more sophisticated
than pixel-by-pixel threshold comparisons can be implemented. A technique
used often in this regard is to subdivide the golden image into different
regions and perform different (usually more than one) tests in each of the regions,
based on expected region content.
LECTURE 15: IMAGE MORPHOLOGY EXAMPLES
©2017Marwa_Ahmeid Page 10
6-Give an expression for the set shaded in following figure:
A∩B ∪ C’
A∩B∩C′
LECTURE 15: IMAGE MORPHOLOGY EXAMPLES
©2017Marwa_Ahmeid Page 11
A′∪B∪C
A∪(B∩C)
7-Let A denote the set shown shaded below. Refer to the structuring elements shown (the
black dot denote the origin) sketch the result of the morphological operation
LECTURE 15: IMAGE MORPHOLOGY EXAMPLES
©2017Marwa_Ahmeid Page 12

More Related Content

PDF
PPSX
Edge Detection and Segmentation
DOCX
EDGE DETECTION
PPTX
Chapter 9 morphological image processing
PPT
Morphological Image Processing
PPT
Spatial filtering
PDF
Image Segmentation
PPTX
Edge detection
Edge Detection and Segmentation
EDGE DETECTION
Chapter 9 morphological image processing
Morphological Image Processing
Spatial filtering
Image Segmentation
Edge detection

What's hot (20)

PPTX
Edge Detection using Hough Transform
PPTX
Application of edge detection
PPTX
Morphological image processing
PPTX
Lect 03 - first portion
PPTX
Noise
PPSX
Image Enhancement in Spatial Domain
PPTX
Image segmentation techniques
PPTX
A completed modeling of local binary pattern operator
PPT
ImageProcessing10-Segmentation(Thresholding) (1).ppt
PPT
08 frequency domain filtering DIP
PPSX
Exploring Methods to Improve Edge Detection with Canny Algorithm
PPT
Chapter10 image segmentation
PPTX
Smoothing Filters in Spatial Domain
PPTX
Canny edge detection
PDF
Lecture 5 point operations and histogram examples
PDF
Lec7: Medical Image Segmentation (I) (Radiology Applications of Segmentation,...
PPTX
Image Interpolation Techniques with Optical and Digital Zoom Concepts
PPTX
Morphological image processing
PPTX
Bit plane coding
Edge Detection using Hough Transform
Application of edge detection
Morphological image processing
Lect 03 - first portion
Noise
Image Enhancement in Spatial Domain
Image segmentation techniques
A completed modeling of local binary pattern operator
ImageProcessing10-Segmentation(Thresholding) (1).ppt
08 frequency domain filtering DIP
Exploring Methods to Improve Edge Detection with Canny Algorithm
Chapter10 image segmentation
Smoothing Filters in Spatial Domain
Canny edge detection
Lecture 5 point operations and histogram examples
Lec7: Medical Image Segmentation (I) (Radiology Applications of Segmentation,...
Image Interpolation Techniques with Optical and Digital Zoom Concepts
Morphological image processing
Bit plane coding
Ad

Similar to Lecture 15 image morphology examples (20)

PDF
JonathanWestlake_ComputerVision_Project2
PDF
Study of Image Inpainting Technique Based on TV Model
PDF
Hierarchical Approach for Total Variation Digital Image Inpainting
PDF
Comparative Study and Analysis of Image Inpainting Techniques
PDF
A03501001006
PDF
E4040.2016 fall.cjmd.report.ce2330.jb3852.jdr2162
PDF
REMOVING OCCLUSION IN IMAGES USING SPARSE PROCESSING AND TEXTURE SYNTHESIS
PDF
EXTENDED WAVELET TRANSFORM BASED IMAGE INPAINTING ALGORITHM FOR NATURAL SCENE...
PDF
An efficient image segmentation approach through enhanced watershed algorithm
PDF
N42018588
PDF
G04654247
PDF
A PROJECT REPORT ON REMOVAL OF UNNECESSARY OBJECTS FROM PHOTOS USING MASKING
PDF
Object based image enhancement
PDF
F43053237
PDF
Comparative analysis and implementation of structured edge active contour
PPT
Image inpainting
PDF
[IJET-V1I6P16] Authors : Indraja Mali , Saumya Saxena ,Padmaja Desai , Ajay G...
PDF
I017265357
PDF
A Combined Model for Image Inpainting
PDF
I07015261
JonathanWestlake_ComputerVision_Project2
Study of Image Inpainting Technique Based on TV Model
Hierarchical Approach for Total Variation Digital Image Inpainting
Comparative Study and Analysis of Image Inpainting Techniques
A03501001006
E4040.2016 fall.cjmd.report.ce2330.jb3852.jdr2162
REMOVING OCCLUSION IN IMAGES USING SPARSE PROCESSING AND TEXTURE SYNTHESIS
EXTENDED WAVELET TRANSFORM BASED IMAGE INPAINTING ALGORITHM FOR NATURAL SCENE...
An efficient image segmentation approach through enhanced watershed algorithm
N42018588
G04654247
A PROJECT REPORT ON REMOVAL OF UNNECESSARY OBJECTS FROM PHOTOS USING MASKING
Object based image enhancement
F43053237
Comparative analysis and implementation of structured edge active contour
Image inpainting
[IJET-V1I6P16] Authors : Indraja Mali , Saumya Saxena ,Padmaja Desai , Ajay G...
I017265357
A Combined Model for Image Inpainting
I07015261
Ad

Recently uploaded (20)

PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PDF
Well-logging-methods_new................
PPTX
Construction Project Organization Group 2.pptx
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PPTX
Geodesy 1.pptx...............................................
DOCX
573137875-Attendance-Management-System-original
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
UNIT 4 Total Quality Management .pptx
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PPTX
OOP with Java - Java Introduction (Basics)
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
Operating System & Kernel Study Guide-1 - converted.pdf
Well-logging-methods_new................
Construction Project Organization Group 2.pptx
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
Geodesy 1.pptx...............................................
573137875-Attendance-Management-System-original
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
Automation-in-Manufacturing-Chapter-Introduction.pdf
R24 SURVEYING LAB MANUAL for civil enggi
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
UNIT 4 Total Quality Management .pptx
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Model Code of Practice - Construction Work - 21102022 .pdf
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
OOP with Java - Java Introduction (Basics)
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...

Lecture 15 image morphology examples

  • 1. LECTURE 15: IMAGE MORPHOLOGY EXAMPLES ©2017Marwa_Ahmeid Page 1 1. (a) Give a morphological algorithm for converting an 8-connected binary boundary to an m-connected boundary (see Section 2.5.2). You may assume that the boundary is fully connected and that it is one pixel thick (b) Does the operation of your algorithm require more than one iteration with each structuring element? Explain your reasoning. (c) Is the performance of your algorithm independent of the order in which the structuring elements are applied? If your answer is yes, prove it; otherwise give an example that illustrates the dependence of your procedure on the order of application of the structuring elements. a) With reference to the discussion in Section 2.5.2, m-connectivity is used to avoid multiple paths that are inherent in 8-connectivity. In one-pixel-thick, fully connected boundaries, these multiple paths manifest themselves in the four basic patterns shown here: The solution to the problem is to use the hit-or-miss transform to detect the patterns and then to change the center pixel to 0, thus eliminating the multiple paths. A basic sequence of morphological steps to accomplish this is as follows:
  • 2. LECTURE 15: IMAGE MORPHOLOGY EXAMPLES ©2017Marwa_Ahmeid Page 2 where A is the input image containing the boundary. b) Only one pass is required. Application of the hit-or-miss transform using a given Bi finds all instances of occurrence of the pattern described by that structuring element. c) The order does matter. For example, consider the sequence of points shown in next figure and assume that we are traveling from left to right. If B1 is applied first, point a will be deleted and point b will remain after application of all other structuring elements. If, on the other hand, B3 is applied first, point b will be deleted and point a will remain. Thus, we would end up with different (but of course, acceptable) m-paths. 2. How can the given object be cleaned up by using morphological operations? (The outline of the zero in the image should be closed.) 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 1 0 0 0 0 1 0 1 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0
  • 3. LECTURE 15: IMAGE MORPHOLOGY EXAMPLES ©2017Marwa_Ahmeid Page 3 The morphological operation closing is used to close the outline of the zero in the image A given As 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 1 0 0 0 0 1 0 1 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0
  • 4. LECTURE 15: IMAGE MORPHOLOGY EXAMPLES ©2017Marwa_Ahmeid Page 4 3. Give the structuring element and morphological operation(s) that produced each of the results shown in images (a) through (d). Show the origin of each structuring element clearly. The dashed lines show the boundary of the original set and are included only for reference. Note that in (d) all corners are rounded. 3. The center of each structuring element is shown as a black dot.
  • 5. LECTURE 15: IMAGE MORPHOLOGY EXAMPLES ©2017Marwa_Ahmeid Page 5 Solution (a) was obtained by eroding the original set (shown dashed) with the structuring element shown (note that the origin is at the bottom, right). Solution (b) was obtained by eroding the original set with the tall rectangular structuring element shown. Solution(c) was obtained by first eroding the image shown down to two vertical lines using the rectangular structuring element. This result was then dilated with the circular structuring element. NOTE: This solution is not entirely correct, after the initial eroding there is also a horizontal line connecting the two vertical ones. Solution (d) was obtained by first dilating the original set with the large disk shown. Then dilated image was then eroded with a disk of half the diameter of the disk used for dilation.
  • 6. LECTURE 15: IMAGE MORPHOLOGY EXAMPLES ©2017Marwa_Ahmeid Page 6 ---------------------------------------------------------------------------------------------------------------------------------------------
  • 7. LECTURE 15: IMAGE MORPHOLOGY EXAMPLES ©2017Marwa_Ahmeid Page 7 The solution is shown in the next figure. Although the images shown could be sketched by hand, they were done in MATLAB. The size of the original is 647 x 624 pixels. A disk structuring element of radius 11 was used. This structuring element was just large enough to encompass all noise elements, as given in the problem statement. The images shown in the figure are: (a) erosion of the original, (b) dilation of the result, (c) another dilation, and finally (d) an erosion. The first erosion (leftmost image) should take out all noise elements that do not touch the rectangle, should increase the size of the noise elements completely contained within the rectangle, and should decrease the size of the rectangle. If worked by hand, the student may or may not realize that some imperfections are left along the boundary of the object. We do not consider this an important issue because it is scale-dependent, and nothing is said in the problem statement about this. The first dilation (next image) should shrink the noise components that were increased in erosion, should increase the size of the rectangle, and should round the corners. The next dilation should eliminate the internal noise components completely and further increase the size of the rectangle. The final erosion (last image on the right) should then decrease the size of the rectangle. The rounded corners in the final answer are an important point that should be recognized by the student.
  • 8. LECTURE 15: IMAGE MORPHOLOGY EXAMPLES ©2017Marwa_Ahmeid Page 8 5-
  • 9. LECTURE 15: IMAGE MORPHOLOGY EXAMPLES ©2017Marwa_Ahmeid Page 9 comparing the differences between them makes no sense. Often, special markings are manufactured into the product for mechanical or image-based alignment Controlled illumination (note that “illumination” is not limited to visible light) obviously is important because changes in illumination can affect dramatically the values in a difference image. One approach used often in conjunction with illumination control is intensity scaling based on actual conditions. For example, the products could have one or more small patches of a tightly controlled color, and the intensity (and perhaps even color) of each pixels in the entire image would be modified based on the actual versus expected intensity and/or color of the patches in the image being processed. Finally, the noise content of a difference image needs to be low enough so that it does not materially affect comparisons between the golden and input images. Good signal strength goes a long way toward reducing the effects of noise. Another (sometimes complementary) approach is to implement image processing techniques (e.g., image averaging) to reduce noise. Obviously there are a number if variations of the basic theme just described. For example, additional intelligence in the form of tests that are more sophisticated than pixel-by-pixel threshold comparisons can be implemented. A technique used often in this regard is to subdivide the golden image into different regions and perform different (usually more than one) tests in each of the regions, based on expected region content.
  • 10. LECTURE 15: IMAGE MORPHOLOGY EXAMPLES ©2017Marwa_Ahmeid Page 10 6-Give an expression for the set shaded in following figure: A∩B ∪ C’ A∩B∩C′
  • 11. LECTURE 15: IMAGE MORPHOLOGY EXAMPLES ©2017Marwa_Ahmeid Page 11 A′∪B∪C A∪(B∩C) 7-Let A denote the set shown shaded below. Refer to the structuring elements shown (the black dot denote the origin) sketch the result of the morphological operation
  • 12. LECTURE 15: IMAGE MORPHOLOGY EXAMPLES ©2017Marwa_Ahmeid Page 12