0% found this document useful (0 votes)
145 views

DIP Lecture8 PDF

This document discusses morphological image processing techniques. It defines morphological operations like erosion, dilation, opening and closing. Erosion shrinks object boundaries and holes get larger, while dilation expands object boundaries and holes get smaller. Structuring elements are used to specify shape and size of these operations. The document provides examples of erosion and dilation on binary images and discusses how changing the structuring element affects the results. It also demonstrates morphological operations like opening using MATLAB code.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
145 views

DIP Lecture8 PDF

This document discusses morphological image processing techniques. It defines morphological operations like erosion, dilation, opening and closing. Erosion shrinks object boundaries and holes get larger, while dilation expands object boundaries and holes get smaller. Structuring elements are used to specify shape and size of these operations. The document provides examples of erosion and dilation on binary images and discusses how changing the structuring element affects the results. It also demonstrates morphological operations like opening using MATLAB code.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

Morphological Image Processing

Digital Image Processing (DIP)

Lecture # 07

Chapter # 9 from Book


Topics from Image Morophology
• Image Morphology
• Hit/Miss/Fit Rule
• Erosion
• Dilation
• Opening
• Closing
Image Morphological
• The word morphology represents the branch of
biology that deals with the forms and structure of
animals and plants.
• Morphological image processing is a collection of
non-linear operations related to the shape or
morphology of features in an image. According
to Wikipedia, morphological operations rely only on
the relative ordering of pixel values, not on their
numerical values, and therefore are especially suited
to the processing of binary images. Morphological
operations can also be applied to grayscale images.
Image Morphology
Main Components for
Morphological operations

Structuring element

Input Image
Definition of Hit, Miss and Fit
Definition of erosion
• The basic effect of the operator on a binary
image is to erode away the boundaries of
regions of foreground pixels . Thus areas of
foreground pixels shrink in size, and holes
within those areas become larger.
Example of Erosion
Example of Erosion
Concept of Erosion
Concept of Erosion
Points selected for Erosion
Result After Erosion

Role of structuring element?


What happen when we change
structuring element
Example of Erosion
Image Erosion (Shrink the object)
Definition of Image Dilation
• The basic effect of the operator on a binary
image is to gradually enlarge the boundaries
of regions of foreground pixels. Thus areas of
foreground pixels grow in size while holes
within those regions become smaller.
Example of Dilation
Example of Dilation
Dilation
How we will apply dilation
Final result of Dilation
Example of Dilation
Application of Image Morphology
(Dilation)
MATLAB Demos
• Erosion (Circuit Diagram, Blobs)
• Dilation ( Blobs, Broken text, finger prints)
MATLAB Code for Erosion and
Dilation
• clear all
• close all
• im=imread('blobs.png'); % this is build in image for matlab
• imshow(im);
• SE=strel('square',4);
• imgOutE=imerode(im,SE);
• imgOutD=imdilate(im,SE);
• figure,imshow(im);
• figure,imshow(imgOutE);
• figure,imshow(imgOutD);
Matlab code to demonstrate the need of
opening (Erosion then dilation)
• Image to run this code
Matlab code for Erosion

• close all
• clear all
• im=imread('circuit_thresh.jpg');
• imshow(im);
• erodeVar=strel('disk',1);
• outImage=imerode(im,erodeVar);
• imshow(outImage);
• erodeVar=strel('disk',3)
• outImage2=imerode(im,erodeVar);
• figure,imshow(im);
• figure,imshow(outImage2);
Summary
• Dilation expand the area of the object region
along the boundary region.
• Erosion shrinks the objects by removing the
boundary pixels.

The size of the object region must be retained.

You might also like