0% found this document useful (0 votes)
33 views18 pages

Boundary Extraction 0002 05 0035 05

Uploaded by

mebrat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views18 pages

Boundary Extraction 0002 05 0035 05

Uploaded by

mebrat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 18

Boundary Extraction using

Morphological Image
Processing
Presented By:
Abrham Yifter
Fiseha Abay

Dept.: Computer Science Engineering


 Mathematical morphology is one of the data processing
methods that is extremely useful for image processing and
has many applications, such as, boundary extraction ,noise
elimination, shape description, texture analysis, and so on.
The mathematical base of morphological processing is
dilation and erosion which are described by set analysis and
can be expressed in logical AND, OR notation .
 Dilation: Dilation causes objects to dilate or grow in size.
Dilation makes an object larger by adding pixels around its
edges. The amount and the way that they grow depend upon
the choice of the structuring element.

 Dilation is an operation that ‘grows’ or ‘thickens’ objects in a


binary image. Mathematically, dilation is defined in terms of
set operations. The dilation of A and B is defined as

 ^

A  B   z | ( B) z  A   
 
 Erosion: Shrink image regions.

Erosion causes objects in a binary image to shrink.


The amount of the way that they shrink depends
upon the choice of the structuring element. Erosion
makes an object smaller by removing or eroding
away the pixels on its edges.

 The mathematical definition of erosion of A


by B is as AB  z | ( B ) z  A C   
 A structuring element is a rectangular array of pixels
containing the values either 1 or 0 (akin to a small binary
image). Structuring elements have a designated centre pixel.
An example of Structuring element

Fig 1: The local neighborhood defined by a structuring element. This is given by


those shaded pixels in the image which lie beneath the pixels of value 1 in the
structuring element
 In Matlab, to construct the structuring element array by
using ‘strel’ function. The example below illustrates how
Matlab displays when a strel object is created:
>> se= strel (’disk’, 3); % A disk of radius 3

Which displays the matrix as follows:


 Opening operation is obtained by doing Dilation on
Eroded Image. It is to smooth the curves of the
image. Opening spaces objects that are too close
together, detaches objects that are touching and
should not be, and enlarges holes inside objects.

 The Opening of an image ‘A’ by a structuring


element ‘B’ is denoted as A ○ B and is defined as
an Erosion followed by a Dilation, and is written as,
A ○ B = (A Θ B) B
 Closing is obtained by doing Erosion on
Dilated image. Closing joins broken objects
and fills in unwanted holes in objects.

 The Closing of an image ‘A’ by a structuring


element ‘B’ is denoted as A● B and defined as
a Dilation followed by an Erosion; and is
written as,
 A● B = (A  B) Θ B
Fig 3: (a) Original Image (B) After opening Operation (C) After
closing operation
 Erosion Algorithm: The boundary of a set A, denoted by β(A),
can be obtained by first eroding A by B and then performing
the set differences between A and its erosion. That is,
β(A)=A – (AΘB)

Dilation Algorithm: The boundary of a set A, denoted by β(A),


can be obtained by first dilating A by B and then performing
the set differences between A and its dilation. That is,
β(A)= (A B) – A
 Dilation Operation
When the structuring element overlaps 1-valued pixels, the
pixel at the origin is marked 1. In Matlab, we can carry out image
dilation using the Image Processing Toolbox functions
“imdilate”.

>>imdilate_image = imdilate(Orginal_binary_image,structuring_element_array);
Fig 3: (a) Original Image (B) After Dilation Operation (C)
Boundary Extraction with the help of Dilation.
 Erosion Operation:

In Matlab, we can carry out image erosion using the


Image Processing Toolbox functions “imerode”.

>>imerode_image = imerode(Orginal_binary_image , structuring_element_array);


Fig 3: (a) Original Image (B) After erosion operation (C)
Boundary Extraction with the help of Erosion.
 Boundary Extraction with the help of Dilation:
 b = imread('lenaTest4.tiff');
 c = graythresh(b);
 a = im2bw(b, c)
 figure, imshow(a), title('Orginal Image');
 se = strel('disk', 3) %STRUCTURING element
 a_dilate = imdilate(a,se);%dilate the image by structuring element
 figure, imshow(a_dilate), title('diluted image');
 q = xor(a,a_dilate);
 figure, imshow(q), title('Boundary extracted Image with using dilating');
Boundary Extraction with the help of Erosion:
 b = imread('lenaTest4.tiff');
 c = graythresh(b);
 a = im2bw(b, c)
 figure, imshow(a), title('Orginal Image');
 se = strel('disk', 3) %STRUCTURING element
 a_erode = imerode(a,se);%erode the image by structuring element
 Figure, imshow(a_erode), title('erosed image');
 p = xor(a,a_erode);
 figure, imshow(p), title('Boundary extracted Image with using eroding');
1. "Fundamentals of Digital Image Processing", Chris Solomon and
Toby Breckon, Wiley Publications. 1st edition.
2. “Digital Image Processing Using Matlab”, Rafael C. Gonzalez,
Richard E. Woods and Steven L. Eddins, 2nd edition.
Any QUESTIONS ?

You might also like