Program for Dilation, Erosion, Opening and Closing in Matlab
Program for Dilation, Erosion, Opening and Closing in Matlab. Here you will get complete coding for the above mention topic of Dilation, Erosion, Opening and Closing and their properties.
Below you will get learn how we can use Matlab Program for Dilation, Erosion, Opening and Closing and their properties.
What is Image Processing
Image Processing is a technique to perform some functions on an image, in order to have an improved image or to extract various interesting facts from it.
Image Morphology is an essential tool in image processing. It is actually the learn shapes of object present in the image and extraction of image features.
Image features are essential for object recognition. The basic morphological operations include Erosion and Dilation, Opening and Closing are also morphological operators. These operators are deciding on as basic operations in image processing algorithms.
Dilation is used to binary and grey scale images.
Syntax Y = imdilate(A,B); • A = input image • B = Structuring element • Y = Dilated image
The main purpose of this Dilation is that:
Dilation adds pixels to the boundaries of objects in an image.
It expands the window and shrinksbackground.
It slowly increases the boundaries of the region
Small holes in the image become smaller.
It increases the illumination of the object
Erosion is also very important operator like dilation. It shrinks/thin objects in a binary image.
Syntax SE =imerode(A,B);
The significant purpose of erosion is to:
Erosion removes pixels on object boundaries
It Shrinks the window and growsbackground.
It used to make an object shorter by eliminating is outsideregion of pixels.
The image getsdarker. After implementation of erosion.
Erosion takes image and structuring element as inputs and thins the subject.
Opening operation is mixed of dilation and erosion operations. In Opening operation Erosion is followed by Dilation.
Opening Operation is similar to Erosion
In Opening Operation Spot and noise removal occurs
It is Less destructive
In this operation Erosion is followed by dilation
Closing operation is a dilation operation followed by an erosion operation. Closing is actually the group of points, which the intersection of object B about them with object A is not vacant.
It removes small holes.
It is idempotent.
It is increasing.
It is translation invariant.
Opening is idempotent: repeating application has no additional effects.
Write A Program for Dilation, Erosion, Opening, Closing and their Properties.
clc; clear all; close all; a=imread(‘C:\Users\Allah\Pictures\sample_Images_for_matlab\images(5).jpg’);
% Read an input image
b=strel(‘line’,11,90); % strel represents morphological structuring element figure(1); imshow(a); title(‘Axon Original image’);