Morphological image processing uses set theory and operations like dilation and erosion to extract image components and filter images. Dilation expands objects in an image while erosion shrinks them. Opening eliminates small objects and smooths contours, performed by erosion followed by dilation. Closing fills small holes and connects nearby objects, done by dilation followed by erosion. These operations use a structuring element and its translations to modify pixels in the input image.
Mathematical morphology is a framework for image analysis using set theory operations. It is used for tasks like noise filtering, shape analysis, and segmentation. Basic operations include erosion, dilation, opening, and closing using a structuring element. Erosion shrinks objects while dilation expands them. Opening eliminates small objects and closing fills small holes. Together these operations can filter images while preserving overall shapes. Morphological operations also enable extracting object boundaries, thinning images to skeletons, and finding connected components.
This document discusses morphological image processing techniques. It begins by explaining that morphology uses mathematical morphology operations to extract image components and describe shapes. It then outlines common morphological algorithms like dilation, erosion, opening, closing, and hit-or-miss transformations. Dilation enlarges object boundaries while erosion shrinks them. Opening can smooth contours and closing can fuse breaks or fill gaps. These operations use a structuring element to transform images. The document provides examples of using morphological filters and algorithms for tasks like noise removal, region filling, and connected component extraction.
The document discusses various types of filters that can be used to reduce noise in digital images, including mean filters, median filters, and order statistics filters. Mean filters include arithmetic, geometric, and harmonic filters, which reduce noise by calculating the mean pixel value within a neighborhood. Median filters select the median pixel value within a neighborhood to reduce salt and pepper noise while retaining edges. Adaptive filters modify their behavior based on statistical properties of local regions in order to better reduce noise without excessive blurring.
Digital image processing involves the manipulation of digital images through various algorithms and techniques. The key steps involve image acquisition through sensors, preprocessing such as sampling and quantization, processing such as enhancement and analysis, and output. Digital image processing has applications in fields such as medicine, astronomy, security, and more. It allows analysis and manipulation of images to improve quality or extract useful information.
Morphological image processing uses mathematical morphology tools to extract image components and describe shapes. Some key tools include binary erosion and dilation, which thin and thicken objects. Erosion shrinks objects while dilation grows them. Opening and closing are combinations of erosion and dilation that smooth contours or fill gaps. The hit-or-miss transform detects shapes by requiring matches of foreground and background pixels. Other algorithms include boundary extraction, hole filling, and thinning to find skeletons, which are medial axes of object shapes.
This document discusses morphological image processing using mathematical morphology. It begins with an introduction to morphology in biology and its application to image analysis using set theory. The key concepts of dilation, erosion, opening and closing are explained. Dilation expands object boundaries while erosion shrinks them. Opening performs erosion followed by dilation to smooth contours, and closing performs dilation followed by erosion to fill small holes. Structuring elements determine the shape and size of operations. Morphological operations are useful for tasks like boundary extraction, noise removal, and feature detection.
This document discusses image compression techniques. It begins by explaining the goals of image compression which are to reduce storage requirements and increase transmission rates by reducing the amount of data needed to represent a digital image. It then describes lossless and lossy compression approaches, noting that lossy approaches allow for higher compression ratios but are not information preserving. The document goes on to explain various compression methods including transforms like DCT that reduce interpixel redundancy, quantization, entropy encoding, and standards like JPEG that use these techniques.
Mathematical morphology is a framework for image analysis using set theory operations. It is used for tasks like noise filtering, shape analysis, and segmentation. Basic operations include erosion, dilation, opening, and closing using a structuring element. Erosion shrinks objects while dilation expands them. Opening eliminates small objects and closing fills small holes. Together these operations can filter images while preserving overall shapes. Morphological operations also enable extracting object boundaries, thinning images to skeletons, and finding connected components.
This document discusses morphological image processing techniques. It begins by explaining that morphology uses mathematical morphology operations to extract image components and describe shapes. It then outlines common morphological algorithms like dilation, erosion, opening, closing, and hit-or-miss transformations. Dilation enlarges object boundaries while erosion shrinks them. Opening can smooth contours and closing can fuse breaks or fill gaps. These operations use a structuring element to transform images. The document provides examples of using morphological filters and algorithms for tasks like noise removal, region filling, and connected component extraction.
The document discusses various types of filters that can be used to reduce noise in digital images, including mean filters, median filters, and order statistics filters. Mean filters include arithmetic, geometric, and harmonic filters, which reduce noise by calculating the mean pixel value within a neighborhood. Median filters select the median pixel value within a neighborhood to reduce salt and pepper noise while retaining edges. Adaptive filters modify their behavior based on statistical properties of local regions in order to better reduce noise without excessive blurring.
Digital image processing involves the manipulation of digital images through various algorithms and techniques. The key steps involve image acquisition through sensors, preprocessing such as sampling and quantization, processing such as enhancement and analysis, and output. Digital image processing has applications in fields such as medicine, astronomy, security, and more. It allows analysis and manipulation of images to improve quality or extract useful information.
Morphological image processing uses mathematical morphology tools to extract image components and describe shapes. Some key tools include binary erosion and dilation, which thin and thicken objects. Erosion shrinks objects while dilation grows them. Opening and closing are combinations of erosion and dilation that smooth contours or fill gaps. The hit-or-miss transform detects shapes by requiring matches of foreground and background pixels. Other algorithms include boundary extraction, hole filling, and thinning to find skeletons, which are medial axes of object shapes.
This document discusses morphological image processing using mathematical morphology. It begins with an introduction to morphology in biology and its application to image analysis using set theory. The key concepts of dilation, erosion, opening and closing are explained. Dilation expands object boundaries while erosion shrinks them. Opening performs erosion followed by dilation to smooth contours, and closing performs dilation followed by erosion to fill small holes. Structuring elements determine the shape and size of operations. Morphological operations are useful for tasks like boundary extraction, noise removal, and feature detection.
This document discusses image compression techniques. It begins by explaining the goals of image compression which are to reduce storage requirements and increase transmission rates by reducing the amount of data needed to represent a digital image. It then describes lossless and lossy compression approaches, noting that lossy approaches allow for higher compression ratios but are not information preserving. The document goes on to explain various compression methods including transforms like DCT that reduce interpixel redundancy, quantization, entropy encoding, and standards like JPEG that use these techniques.
The document discusses various techniques for image segmentation. It begins by defining image segmentation as dividing an image into constituent regions or objects. It then describes several segmentation methods including those based on discontinuity, similarity, grey scale, texture, motion, depth, edge detection, region growing, and thresholding. Thresholding techniques include global thresholding of the image histogram as well as adaptive thresholding which divides an image into sub-images for thresholding. The goal of segmentation is to extract objects of interest from an image.
1. Digital image processing focuses on improving images for human interpretation and machine perception. It involves digitizing an image using sensors and processors then displaying the digital image.
2. The key stages of digital image processing are enhancement, restoration, compression, and registration. Registration involves mapping image frames for tasks like object recognition.
3. Common processing techniques include contrast intensification to improve poor contrast, smoothing to reduce noise, and sharpening to enhance blurred details.
Morphological operations like dilation and erosion are non-linear image transformations used to extract shape-related information from images by processing objects based on their morphology or shape properties using a structuring element, with dilation adding pixels to object boundaries and erosion removing pixels from object boundaries. The size and shape of the structuring element controls the number of pixels added or removed during these operations, which are used for tasks like noise removal, feature extraction, and image segmentation.
Morphology fundamentals consist of erosion and dilation, which are basic morphological operations. Erosion removes pixels from object boundaries, shrinking object sizes and enlarging holes. Dilation adds pixels to boundaries, enlarging object sizes and shrinking holes. Both operations use a structuring element to determine how many pixels are added or removed. Erosion compares the structuring element to the image, removing pixels where it is not contained. Dilation compares overlaps, adding pixels where the structuring element and image overlap by at least one element.
This document discusses different morphological image processing techniques including dilation, erosion, opening, closing, and top-hat transformation. It provides examples of applying these techniques to grayscale images with different structuring element radii. The document indicates that the student's implementations of top-hat transformation with radii of 2 and 10 were unsuccessful at enhancing light objects, likely due to errors in the program, as the results had inconsistent features and it is unclear what happened with the larger radius. Figures are included showing the Guide User Interface results for comparison.
Erosion and dilation are morphological operations used in image processing. Erosion is an operation that reduces the size of foreground objects in an image, while dilation is an operation that increases the size of foreground objects. These operations are useful for analyzing shapes and structures in images.
Image enhancement is the process of adjusting digital images so that the results are more suitable for display or further image analysis. For example, you can remove noise, sharpen, or brighten an image, making it easier to identify key features.
Here are some useful examples and methods of image enhancement:
Filtering with morphological operators, Histogram equalization, Noise removal using a Wiener filter, Linear contrast adjustment, Median filtering, Unsharp mask filtering, Contrast-limited adaptive histogram equalization (CLAHE). Decorrelation stretch
Image restoration and degradation modelAnupriyaDurai
This document discusses image restoration and degradation. It provides an overview of image restoration techniques which attempt to reverse degradation processes and restore lost image information. Several types of image degradation are described, including motion blur, noise, and misfocus. Common noise models are explained, such as Gaussian, salt and pepper, Erlang, exponential, and uniform noise. Methods for estimating degradation models from observed images are also summarized, including using image observations, experimental replication of degradation, and mathematical modeling.
This document summarizes a presentation on wavelet based image compression. It begins with an introduction to image compression, describing why it is needed and common techniques like lossy and lossless compression. It then discusses wavelet transforms and how they are applied to image compression. Several research papers on wavelet compression techniques are reviewed and key advantages like higher compression ratios while maintaining image quality are highlighted. Applications of wavelet compression in areas like biomedicine and multimedia are presented before concluding with references.
The document discusses image restoration and reconstruction techniques. It covers topics like image restoration models, noise models, spatial filtering, inverse filtering, Wiener filtering, Fourier slice theorem, computed tomography principles, Radon transform, and filtered backprojection reconstruction. As an example, it derives the analytical expression for the projection of a circular object using the Radon transform, showing that the projection is independent of angle and equals 2Ar√(r2-ρ2) when ρ ≤ r.
EDGE DETECTION USING SOBEL OPERATOR.pptxkolaruboys
This document summarizes edge detection using the Sobel operator. It begins by defining edges as areas of significant intensity change between objects in an image. There are three main steps to edge detection: image smoothing to remove noise; edge point detection to identify areas of intensity change; and edge localization to precisely locate the edges. The document then explains how the Sobel operator uses two 3x3 kernels to detect horizontal and vertical edges by approximating the image gradient. It provides code to demonstrate Sobel edge detection in MATLAB. The advantages of the Sobel operator are its simplicity and ability to detect edges and their orientations.
This document summarizes image compression techniques. It discusses:
1) The goal of image compression is to reduce the amount of data required to represent a digital image while preserving as much information as possible.
2) There are three main types of data redundancy in images - coding, interpixel, and psychovisual - and compression aims to reduce one or more of these.
3) Popular lossless compression techniques, like Run Length Encoding and Huffman coding, exploit coding and interpixel redundancies. Lossy techniques introduce controlled loss for further compression.
Dilation and erosion are two fundamental morphological operations used to modify binary images. Dilation adds pixels to object boundaries in an image, while erosion removes pixels from object boundaries. The number of pixels added or removed depends on the size and shape of the structuring element, which is a matrix of 1's and 0's used to probe the image and determine changes.
The document discusses various morphological image processing techniques including binary morphology, grayscale morphology, dilation, erosion, opening, closing, boundary extraction, region filling, connected components, hit-or-miss, thinning, thickening, and skeletonization. Morphological operations can be used for tasks like edge detection, noise removal, image enhancement, and image segmentation. The key morphological operations of dilation and erosion expand and shrink binary images using a structuring element, while opening and closing combine these operations to remove noise or fill holes.
This document describes a morphological region filling algorithm. It begins with a binary image X containing a single seed point p set to 1, while all other points are 0. The algorithm then repeatedly dilates X, takes the complement, and intersects with the boundary pixels of the object A until convergence. The final filled region is the union of A and the converged X, containing both the filled interior and original boundary. An example implementation fills holes in a binary coin image by applying this algorithm.
The document provides information about digital image processing. It begins with definitions of key terms like image, digital image, and digital image processing. It then discusses different types of images like monochrome, grayscale, and color images. It also covers image file formats, sources of noise in digital images, common types of noise like Gaussian noise and salt and pepper noise, and basic filtering techniques. The document contains detailed explanations with examples to illustrate different concepts in digital image processing.
WEBINAR ON FUNDAMENTALS OF DIGITAL IMAGE PROCESSING DURING COVID LOCK DOWN by by K.Vijay Anand , Associate Professor, Department of Electronics and Instrumentation Engineering , R.M.K Engineering College, Tamil Nadu , India
The document discusses image segmentation techniques. It begins by defining segmentation as partitioning an image into distinct regions that correlate with objects or features of interest. The goal of segmentation is to find meaningful groups of pixels. Several segmentation techniques are described, including region growing/shrinking, clustering methods, and boundary detection. Region growing uses homogeneity tests to merge neighboring regions, while clustering divides space based on similarity within groups. Boundary detection finds boundaries between objects. The document provides examples and details of applying these segmentation methods.
The document discusses mathematical morphology and its applications in image processing. It begins with introductions to morphological image processing and concepts from set theory. It then covers basic morphological operations like dilation, erosion, opening and closing for binary images. It also discusses their extensions to grayscale images. Examples are provided to illustrate concepts like dilation, erosion, hit-or-miss transform, boundary extraction, region filling and skeletonization. The document provides a comprehensive overview of mathematical morphology and its role in tasks like preprocessing, segmentation and feature extraction in digital image analysis.
The document discusses various techniques for image segmentation. It begins by defining image segmentation as dividing an image into constituent regions or objects. It then describes several segmentation methods including those based on discontinuity, similarity, grey scale, texture, motion, depth, edge detection, region growing, and thresholding. Thresholding techniques include global thresholding of the image histogram as well as adaptive thresholding which divides an image into sub-images for thresholding. The goal of segmentation is to extract objects of interest from an image.
1. Digital image processing focuses on improving images for human interpretation and machine perception. It involves digitizing an image using sensors and processors then displaying the digital image.
2. The key stages of digital image processing are enhancement, restoration, compression, and registration. Registration involves mapping image frames for tasks like object recognition.
3. Common processing techniques include contrast intensification to improve poor contrast, smoothing to reduce noise, and sharpening to enhance blurred details.
Morphological operations like dilation and erosion are non-linear image transformations used to extract shape-related information from images by processing objects based on their morphology or shape properties using a structuring element, with dilation adding pixels to object boundaries and erosion removing pixels from object boundaries. The size and shape of the structuring element controls the number of pixels added or removed during these operations, which are used for tasks like noise removal, feature extraction, and image segmentation.
Morphology fundamentals consist of erosion and dilation, which are basic morphological operations. Erosion removes pixels from object boundaries, shrinking object sizes and enlarging holes. Dilation adds pixels to boundaries, enlarging object sizes and shrinking holes. Both operations use a structuring element to determine how many pixels are added or removed. Erosion compares the structuring element to the image, removing pixels where it is not contained. Dilation compares overlaps, adding pixels where the structuring element and image overlap by at least one element.
This document discusses different morphological image processing techniques including dilation, erosion, opening, closing, and top-hat transformation. It provides examples of applying these techniques to grayscale images with different structuring element radii. The document indicates that the student's implementations of top-hat transformation with radii of 2 and 10 were unsuccessful at enhancing light objects, likely due to errors in the program, as the results had inconsistent features and it is unclear what happened with the larger radius. Figures are included showing the Guide User Interface results for comparison.
Erosion and dilation are morphological operations used in image processing. Erosion is an operation that reduces the size of foreground objects in an image, while dilation is an operation that increases the size of foreground objects. These operations are useful for analyzing shapes and structures in images.
Image enhancement is the process of adjusting digital images so that the results are more suitable for display or further image analysis. For example, you can remove noise, sharpen, or brighten an image, making it easier to identify key features.
Here are some useful examples and methods of image enhancement:
Filtering with morphological operators, Histogram equalization, Noise removal using a Wiener filter, Linear contrast adjustment, Median filtering, Unsharp mask filtering, Contrast-limited adaptive histogram equalization (CLAHE). Decorrelation stretch
Image restoration and degradation modelAnupriyaDurai
This document discusses image restoration and degradation. It provides an overview of image restoration techniques which attempt to reverse degradation processes and restore lost image information. Several types of image degradation are described, including motion blur, noise, and misfocus. Common noise models are explained, such as Gaussian, salt and pepper, Erlang, exponential, and uniform noise. Methods for estimating degradation models from observed images are also summarized, including using image observations, experimental replication of degradation, and mathematical modeling.
This document summarizes a presentation on wavelet based image compression. It begins with an introduction to image compression, describing why it is needed and common techniques like lossy and lossless compression. It then discusses wavelet transforms and how they are applied to image compression. Several research papers on wavelet compression techniques are reviewed and key advantages like higher compression ratios while maintaining image quality are highlighted. Applications of wavelet compression in areas like biomedicine and multimedia are presented before concluding with references.
The document discusses image restoration and reconstruction techniques. It covers topics like image restoration models, noise models, spatial filtering, inverse filtering, Wiener filtering, Fourier slice theorem, computed tomography principles, Radon transform, and filtered backprojection reconstruction. As an example, it derives the analytical expression for the projection of a circular object using the Radon transform, showing that the projection is independent of angle and equals 2Ar√(r2-ρ2) when ρ ≤ r.
EDGE DETECTION USING SOBEL OPERATOR.pptxkolaruboys
This document summarizes edge detection using the Sobel operator. It begins by defining edges as areas of significant intensity change between objects in an image. There are three main steps to edge detection: image smoothing to remove noise; edge point detection to identify areas of intensity change; and edge localization to precisely locate the edges. The document then explains how the Sobel operator uses two 3x3 kernels to detect horizontal and vertical edges by approximating the image gradient. It provides code to demonstrate Sobel edge detection in MATLAB. The advantages of the Sobel operator are its simplicity and ability to detect edges and their orientations.
This document summarizes image compression techniques. It discusses:
1) The goal of image compression is to reduce the amount of data required to represent a digital image while preserving as much information as possible.
2) There are three main types of data redundancy in images - coding, interpixel, and psychovisual - and compression aims to reduce one or more of these.
3) Popular lossless compression techniques, like Run Length Encoding and Huffman coding, exploit coding and interpixel redundancies. Lossy techniques introduce controlled loss for further compression.
Dilation and erosion are two fundamental morphological operations used to modify binary images. Dilation adds pixels to object boundaries in an image, while erosion removes pixels from object boundaries. The number of pixels added or removed depends on the size and shape of the structuring element, which is a matrix of 1's and 0's used to probe the image and determine changes.
The document discusses various morphological image processing techniques including binary morphology, grayscale morphology, dilation, erosion, opening, closing, boundary extraction, region filling, connected components, hit-or-miss, thinning, thickening, and skeletonization. Morphological operations can be used for tasks like edge detection, noise removal, image enhancement, and image segmentation. The key morphological operations of dilation and erosion expand and shrink binary images using a structuring element, while opening and closing combine these operations to remove noise or fill holes.
This document describes a morphological region filling algorithm. It begins with a binary image X containing a single seed point p set to 1, while all other points are 0. The algorithm then repeatedly dilates X, takes the complement, and intersects with the boundary pixels of the object A until convergence. The final filled region is the union of A and the converged X, containing both the filled interior and original boundary. An example implementation fills holes in a binary coin image by applying this algorithm.
The document provides information about digital image processing. It begins with definitions of key terms like image, digital image, and digital image processing. It then discusses different types of images like monochrome, grayscale, and color images. It also covers image file formats, sources of noise in digital images, common types of noise like Gaussian noise and salt and pepper noise, and basic filtering techniques. The document contains detailed explanations with examples to illustrate different concepts in digital image processing.
WEBINAR ON FUNDAMENTALS OF DIGITAL IMAGE PROCESSING DURING COVID LOCK DOWN by by K.Vijay Anand , Associate Professor, Department of Electronics and Instrumentation Engineering , R.M.K Engineering College, Tamil Nadu , India
The document discusses image segmentation techniques. It begins by defining segmentation as partitioning an image into distinct regions that correlate with objects or features of interest. The goal of segmentation is to find meaningful groups of pixels. Several segmentation techniques are described, including region growing/shrinking, clustering methods, and boundary detection. Region growing uses homogeneity tests to merge neighboring regions, while clustering divides space based on similarity within groups. Boundary detection finds boundaries between objects. The document provides examples and details of applying these segmentation methods.
The document discusses mathematical morphology and its applications in image processing. It begins with introductions to morphological image processing and concepts from set theory. It then covers basic morphological operations like dilation, erosion, opening and closing for binary images. It also discusses their extensions to grayscale images. Examples are provided to illustrate concepts like dilation, erosion, hit-or-miss transform, boundary extraction, region filling and skeletonization. The document provides a comprehensive overview of mathematical morphology and its role in tasks like preprocessing, segmentation and feature extraction in digital image analysis.
1. EE-583: Digital Image Processing
Morphological Image Processing
• The word morphology refers to the scientific branch that deals the forms and
structures of animals/plants.
•Morphology in image processing is a tool for extracting image components
that are useful in the representation and description of region shape, such as
boundaries and skeletons.
•Furthermore, the morphological operations can be used for filtering, thinning
and pruning.
•The language of the Morphology comes from the set theory, where image
objects can be represented by sets. For example an image object containing
black pixels can be considered a set of black pixels in 2D space of Z2.
Prepared By: Dr. Hasan Demirel, PhD
2. EE-583: Digital Image Processing
Morphological Image Processing
Set Theory Fundamentals
• Given that A is a set in Z2and a=(a1,a2), then
a is an element in A: a A
a is not an element in A: a A
• given sets A and B, A is said to be the subset of B: A B
•The union of A and B is denoted by: CA B
•The intersection of A and B is denoted by: D A B
•Two sets are disjoint/mutually exclusive if A B
•The complement of set A is the set of elements not contained in A, Ac A
•The difference of two sets: A B A, B A Bc
Prepared By: Dr. Hasan Demirel, PhD
3. EE-583: Digital Image Processing
Morphological Image Processing
Set Theory Fundamentals
Given 2 sets A and B
Prepared By: Dr. Hasan Demirel, PhD
4. EE-583: Digital Image Processing
Morphological Image Processing
Set Theory Fundamentals
• The reflection of set B is defined by:
B b, for b B
ˆ
• The translation of set A by point z=(z1,z2) is defined by:
( A) z a z, for a A
Translation of A by z. Reflection of B
Prepared By: Dr. Hasan Demirel, PhD
5. EE-583: Digital Image Processing
Morphological Image Processing
Logic operation involving Binary Images
• Given 1-bit binary images, A and B, the basic logical operations are
illustrated:
• Note that the black indicates
binary 1 and white indicates binary
0 here.
Prepared By: Dr. Hasan Demirel, PhD
6. EE-583: Digital Image Processing
Morphological Image Processing
Dilation and Erosion
• Dilation and erosion are the two fundamental operations used in
morphological image processing. Almost all morphological algorithms depends
on these two operations:
• Dilation: Given A and B sets in Z2, the dilation of A by B, is defined by:
ˆ
A B z ( B) z A
^
•The dilation of A and B is a set of all displacements, z , such that B and A
overlap by at least one element. The definition can also be written as:
ˆ
A B z ( B) z
A A
•Set B is referred to as the structuring element and used in dilation as well as in
other morphological operations. Dilation expands/dilutes a given image.
Prepared By: Dr. Hasan Demirel, PhD
7. EE-583: Digital Image Processing
Morphological Image Processing
Dilation and Erosion
• Dilation: Given the structuring element B and set A.
Shaded area is the dilation
origin of A by B
•The structuring element B
enlarges the size of A at its
boundaries. Dilation simply
expands a given image.
•The structuring element B enlarges the size of
A at its boundaries, in relation to the distance
from the origin of the structuring element .
Prepared By: Dr. Hasan Demirel, PhD
8. EE-583: Digital Image Processing
Morphological Image Processing
Dilation and Erosion
• Dilation: Given the following distorted text image where the maximum length
of the broken characters are 2 pixels. The image can be enhanced by bridging the
gaps by using the structuring element given below:
B
3x3 structuring
element
A A B
•Note that the broken characters are joined.
Prepared By: Dr. Hasan Demirel, PhD
9. EE-583: Digital Image Processing
Morphological Image Processing
Dilation and Erosion
• Erosion: Given A and B sets in Z2, the erosion of A by structuring element B, is
B z ( B) z A
defined by:
A
•The erosion of A by structuring element B is the set of all points z, such that B,
translated by z, is contained in A.
Shaded area is the erosion
of A by B
structuring
element
•Note that in erosion the structuring element B erodes the input image A at its boundaries.
Erosion shrinks a given image.
Prepared By: Dr. Hasan Demirel, PhD
10. EE-583: Digital Image Processing
Morphological Image Processing
Dilation and Erosion
• Erosion: Given the structuring element B and set A.
Shaded line is what is left
from the erosion of A by B
structuring
element
Prepared By: Dr. Hasan Demirel, PhD
11. EE-583: Digital Image Processing
Morphological Image Processing
Dilation and Erosion
• Erosion: Given the following binary image with squares on size 1,3,5,7,9 and
15. You can get rid of all the squares less than size of 15 by erosion followed by
dilation of a structuring element of 13x13.
B
13x13 structuring
element
A A B
Erosion of A by B
Prepared By: Dr. Hasan Demirel, PhD
12. EE-583: Digital Image Processing
Morphological Image Processing
Dilation and Erosion
• Dilation: Cont. from the previous slide. Note that erosion followed by
dilation helps to perform filtering.
B
13x13 structuring
element
A B (A B) B
dilation by B
Prepared By: Dr. Hasan Demirel, PhD
13. EE-583: Digital Image Processing
Morphological Image Processing
Opening and closing
• Opening: The process of erosion followed by dilation is called opening. It has
the effect of eliminating small and thin objects, breaking the objects at thin points
and smoothing the boundaries/contours of the objects.
• Given set A and the structuring element B. Opening of A by structuring element
B is defined by:
A B ( A B) B
• Closing: The process of dilation followed by erosion is called closing. It has the effect of
filling small and thin holes, connecting nearby objects and smoothing the
boundaries/contours of the objects.
•Given set A and the structuring element B. Closing of A by structuring element B is defined
by:
A B ( A B) B
Prepared By: Dr. Hasan Demirel, PhD
14. EE-583: Digital Image Processing
Morphological Image Processing
Opening and closing
• Opening: The opening of A by the structuring element B is obtained by taking
the union of all translates of B that fit into A.
•The opening operation can also be expressed by the following formula:
A B Bz ( Bz ) A
Outer boundary of A
Origin of B
Circular structuring element Shaded area: complete opening
Possible translations of B in A Prepared By: Dr. Hasan Demirel, PhD
15. EE-583: Digital Image Processing
Morphological Image Processing
Opening and closing
• Closing: The closing has a similar geometric interpretation except that we roll
B on the outside of the boundary.
•The opening operation can also be expressed by the following formula:
A B Bz ) ( Bz ) A
(
Outer boundary of A
Outer boundaries of closing
Shaded area: complete closing
Possible translations of B on the outer boundaries of A Prepared By: Dr. Hasan Demirel, PhD
16. EE-583: Digital Image Processing
Morphological Image Processing
Opening and closing
B
circular structuring
element
result of erosion of A by B
result of opening of A by B
result of dilation of A by B
result of closing of A by B
Prepared By: Dr. Hasan Demirel, PhD
17. EE-583: Digital Image Processing
Morphological Image Processing
Opening and closing
• Noise Filtering: The morphological operations can be used to remove the noise
as in the following example:
3x3 square
structuring
element
result of opening followed by closing
after Note that impulsive noise within the
opening background and the fingerprints is removed.
Prepared By: Dr. Hasan Demirel, PhD
18. EE-583: Digital Image Processing
Morphological Image Processing
Hit-or-Miss Transform (Template Matching)
• Hit-or-miss transform can be used for shape detection/ Template matching.
•Given the shape as the structuring element B1 the Hit-or-miss transform is
defined by:
A B ( A B1 ) ( Ac B2 )
*
• Where B2 =W-X and B1=X. W is the window enclosing B1. Windowing is used to
isolate the structuring element/object.
B2=W-X, used as the second
structuring element.
Complement of B1
Shape that we are searching for
Used as the structuring element (B1=X) Prepared By: Dr. Hasan Demirel, PhD
19. EE-583: Digital Image Processing
Morphological Image Processing
Hit-or-Miss Transform
A B ( A B1 ) ( Ac B2 )
*
B2
B1
Complement of A
Erosion of A by B1
Erosion of comp of A by B2
The location of the matched object/shape,
Prepared By: Dr. Hasan Demirel, PhD
20. EE-583: Digital Image Processing
Morphological Image Processing
Basic Morphological Algorithms
• Boundary Extraction: The boundaries/edges of a region/shape can be extracted
by first applying erosion on A by B and subtracting the eroded A from A.
( A) A ( A B)
Ex 1: 3x3 Square structuring element is used Ex 2: The same structuring element in Ex1 is used.
for boundary extraction.
Note that thicker boundaries can be obtained by
increasing the size of structuring element.
Prepared By: Dr. Hasan Demirel, PhD
21. EE-583: Digital Image Processing
Morphological Image Processing
Basic Morphological Algorithms
• Region Filling: Region filling can be performed by using the following
definition. Given a symmetric structuring element B, one of the non-boundary
pixels (Xk) is consecutively diluted and its intersection with the complement of A
is taken as follows:
k 1,2,3,...
X k ( X k 1 B) A c
terminates when X k X k 1
X0 1
•Following consecutive dilations and their intersection with the complement of A,
finally resulting set is the filled inner boundary region and its union with A gives
the filled region F(A).
F ( A) X k A
Prepared By: Dr. Hasan Demirel, PhD
22. EE-583: Digital Image Processing
Morphological Image Processing
Basic Morphological Algorithms
• Region Filling: This region is filled first.
Filling of all the other regions
A non-boundary pixel
Ex 1: X0=1 (Assume that the shaded boundary points are
1 and the inner pixels are 0) Prepared By: Dr. Hasan Demirel, PhD
23. EE-583: Digital Image Processing
Morphological Image Processing
Basic Morphological Algorithms
• Connected Component Extraction: The following iterative expression can be
used to determine all the pixels in component Y which is in A.
k 1,2,3,...
X k ( X k 1 B) A
terminates when X k X k 1
X 0 1(boundary pixel )
• X0=1 corresponds to one of the pixels on the
component Y. Note that one of the pixel
locations on the component must be known.
Result of first iteration
Known pixel, p • Consecutive dilations and their intersection
with A, yields all elements of component Y.
Result of second iteration Result of last iteration Prepared By: Dr. Hasan Demirel, PhD
24. EE-583: Digital Image Processing
Morphological Image Processing
Basic Morphological Algorithms
• Connected Component Extraction:
Input image
(Chicken fillet)
Thresholded image
15 connected
components with
different number of
pixels
After erosion by 5x5
square structuring
element of 1’s
Prepared By: Dr. Hasan Demirel, PhD
25. EE-583: Digital Image Processing
Morphological Image Processing
Basic Morphological Algorithms
• Thinning: Thinning of A by the structuring element B is defined by:
A B A ( A B)
*
hit-or-miss transform/template matching
• Note that we are only interested in pattern matching of B in A so no background operation
is required of the hit-miss-transform.
{B} {B1 , B 2 , B3 ,..., B n }
•The structuring element B consists of a sequence of structuring elements, where Bi is the
rotated version of Bi-1. The different structuring elements helps thinning in one direction. If
there are 4 structuring elements thinning is performed from 4 directions separated by 90o. If
8 structuring elements are used the thinning is performed in 8 directions separated by 45o.
•The process is to thin A by one pass with B1, then the result with one pass of B2, and
continue until A is thinned with one pass of Bn.
A {B} ((...(( A B1 ) B 2 )...) B n )
Prepared By: Dr. Hasan Demirel, PhD
26. EE-583: Digital Image Processing
Morphological Image Processing
Basic Morphological Algorithms
• Thinning: The following set of structuring elements are used for thinning operation.
...
If there is no change any
more. Declared to be the
thinned object
Prepared By: Dr. Hasan Demirel, PhD