SlideShare a Scribd company logo
12
Most read
13
Most read
16
Most read
MORPHOLOGICAL OPERATIONS 
Dilation AND Erosion 
Brainbitz
Morphological operation 
• It is a collection of non-linear operations 
related to the shape or morphology of 
features in an image. 
• ie , we process images according to its shape 
• 2 fundamental operations 
Dilation 
Erosion 
Brainbitz
DILATION AND EROSION 
• Dilation adds pixels to the boundaries of 
objects in an image 
• Erosion removes pixels on object boundaries 
Brainbitz
DILATION 
• It grows or thicken objects in a binary image 
• Thickening is controlled by a shape referred to 
as structuring element 
• Structuring element is a matrix of 1’s and 0’s 
Brainbitz
Brainbitz
Brainbitz
Opening and Closing operations 
• Opening  An Erosion followed by a dilation 
• Closing  A dilation followed by an erosion 
Brainbitz
Brainbitz
Brainbitz
Structuring element 
• The number of pixels added or removed from 
the objects in an image depends on the size 
and shape of the structuring element 
• It’s a matrix of 1’s and 0’s 
• The center pixel of the structuring element, 
called the origin 
Brainbitz
Origin of a Diamond-Shaped Structuring 
Element 
Brainbitz
Dilation and erosion operation 
• It use hit or miss transformation 
• In the hit and miss transformation, an object 
represented by a set X is examined through a 
structural element represented by a set B. 
• The structuring element is a shaped matrix 
Brainbitz
Cont. 
• Miss  No changes 
• Hit  at least one pixel matches =>The 
origin is replaced by 1 
0 0 0 0 0 0 
0 0 0 0 0 0 
0 0 1 1 1 0 
0 0 1 1 1 0 
0 0 0 0 0 0 
0 0 0 0 0 0 
0 0 0 0 0 0 
0 0 0 0 0 0 
0 1 1 1 1 1 
0 1 1 1 1 1 
0 0 0 0 0 0 
0 0 0 0 0 0 
1 1 1 
Input matrix Structuring 
element Dilated matrix 
Brainbitz
Dilation in MATLAB 
• Syntax 
Y = imdilate(A,B) 
• A  input image 
• B  Structuring element 
• Y Dilated image 
Brainbitz
Structuring element in MATLAB 
• They can be easily created using ‘strel’ 
function 
se = strel ( shape , parameters ) 
• Shape can be ‘ diamond ’ , ’ square ’ , ’ disk ’ , 
’ line ’ etc. 
Brainbitz
Erosion in MATLAB 
• It shrinks or thin objects in a binary image 
• Syntax se =imerode(A,B) 
• Output is 1 when element completely fits 
0 0 0 0 0 0 
0 0 0 0 0 0 
0 0 1 1 1 0 
0 0 1 1 1 0 
0 0 0 0 0 0 
0 0 0 0 0 0 
0 0 0 0 0 0 
0 0 0 0 0 0 
0 0 0 1 0 0 
0 0 0 1 0 0 
0 0 0 0 0 0 
0 0 0 0 0 0 
1 1 1 
Input matrix Structuring 
element Dilated matrix 
Brainbitz
Dilation program 
BW = zeros(9,10); 
BW(4:6,4:7) = 1 
SE = strel('square',3) 
BW2 = imdilate(BW,SE) 
Brainbitz
Brainbitz
Brainbitz
Questions 
Brainbitz 
• Perform dilation and erosion

More Related Content

PPTX
e-commerce web site project
PDF
Single Image Super Resolution Overview
PPTX
Embedded system design process
PPTX
Chapter 9 morphological image processing
PPTX
Chapter 9 morphological image processing
PDF
Generative AI
PDF
1 - Unit 1 - Hardware.pdf
PPTX
Region based segmentation
e-commerce web site project
Single Image Super Resolution Overview
Embedded system design process
Chapter 9 morphological image processing
Chapter 9 morphological image processing
Generative AI
1 - Unit 1 - Hardware.pdf
Region based segmentation

What's hot (20)

PPTX
Morphological image processing
PPSX
Edge Detection and Segmentation
PPT
Image segmentation
PPTX
Chain code in dip
PPTX
Image restoration and degradation model
PPT
Chapter10 image segmentation
PPTX
Image Enhancement in Spatial Domain
PDF
Digital Image Processing: Image Segmentation
PPTX
Image enhancement
PPTX
Digital image processing
PPTX
Image Enhancement using Frequency Domain Filters
PPTX
Digital Image restoration
PPT
Enhancement in spatial domain
PPTX
1.arithmetic & logical operations
PDF
Lecture 4 Relationship between pixels
PDF
Image sampling and quantization
PDF
Image segmentation
Morphological image processing
Edge Detection and Segmentation
Image segmentation
Chain code in dip
Image restoration and degradation model
Chapter10 image segmentation
Image Enhancement in Spatial Domain
Digital Image Processing: Image Segmentation
Image enhancement
Digital image processing
Image Enhancement using Frequency Domain Filters
Digital Image restoration
Enhancement in spatial domain
1.arithmetic & logical operations
Lecture 4 Relationship between pixels
Image sampling and quantization
Image segmentation
Ad

Similar to Dilation and erosion (10)

PDF
CV_Chap 3 Features Detection
PPTX
Morphological image processing
PPT
4_14755_CS213_20172018_1__2_1_Lecture_5.ppt
PDF
Lec_9_ Morphological ImageProcessing .pdf
PPTX
chapter 5 morphologiical processing.pptx
PPTX
Morphological image processing basic.pptx
PPTX
Morphological image processing in Digital Image Processing.pptx
PPTX
Morphological image Processing
PPT
morphological image processing
PPT
Boundary Extraction
CV_Chap 3 Features Detection
Morphological image processing
4_14755_CS213_20172018_1__2_1_Lecture_5.ppt
Lec_9_ Morphological ImageProcessing .pdf
chapter 5 morphologiical processing.pptx
Morphological image processing basic.pptx
Morphological image processing in Digital Image Processing.pptx
Morphological image Processing
morphological image processing
Boundary Extraction
Ad

Dilation and erosion

  • 1. MORPHOLOGICAL OPERATIONS Dilation AND Erosion Brainbitz
  • 2. Morphological operation • It is a collection of non-linear operations related to the shape or morphology of features in an image. • ie , we process images according to its shape • 2 fundamental operations Dilation Erosion Brainbitz
  • 3. DILATION AND EROSION • Dilation adds pixels to the boundaries of objects in an image • Erosion removes pixels on object boundaries Brainbitz
  • 4. DILATION • It grows or thicken objects in a binary image • Thickening is controlled by a shape referred to as structuring element • Structuring element is a matrix of 1’s and 0’s Brainbitz
  • 7. Opening and Closing operations • Opening  An Erosion followed by a dilation • Closing  A dilation followed by an erosion Brainbitz
  • 10. Structuring element • The number of pixels added or removed from the objects in an image depends on the size and shape of the structuring element • It’s a matrix of 1’s and 0’s • The center pixel of the structuring element, called the origin Brainbitz
  • 11. Origin of a Diamond-Shaped Structuring Element Brainbitz
  • 12. Dilation and erosion operation • It use hit or miss transformation • In the hit and miss transformation, an object represented by a set X is examined through a structural element represented by a set B. • The structuring element is a shaped matrix Brainbitz
  • 13. Cont. • Miss  No changes • Hit  at least one pixel matches =>The origin is replaced by 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 Input matrix Structuring element Dilated matrix Brainbitz
  • 14. Dilation in MATLAB • Syntax Y = imdilate(A,B) • A  input image • B  Structuring element • Y Dilated image Brainbitz
  • 15. Structuring element in MATLAB • They can be easily created using ‘strel’ function se = strel ( shape , parameters ) • Shape can be ‘ diamond ’ , ’ square ’ , ’ disk ’ , ’ line ’ etc. Brainbitz
  • 16. Erosion in MATLAB • It shrinks or thin objects in a binary image • Syntax se =imerode(A,B) • Output is 1 when element completely fits 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 Input matrix Structuring element Dilated matrix Brainbitz
  • 17. Dilation program BW = zeros(9,10); BW(4:6,4:7) = 1 SE = strel('square',3) BW2 = imdilate(BW,SE) Brainbitz
  • 20. Questions Brainbitz • Perform dilation and erosion