Aim: To perform dilation & erosion of an image
Equipments:
Operating System: - Windows XP
Software: - Matlab 7.5, Image Processing Toolbox.
Program:
close all;
clear all;
clc;
f=imread('cameraman.tif');
level=graythresh(f);
f1=im2bw(f,level);
s=[0 1 0; 1 1 1 ; 0 1 0];
f2=imdilate(f1,s);
subplot(1,3,1);imshow(f);title('original image');
subplot(1,3,2);imshow(f1);title('binary image');
subplot(1,3,3);imshow(f2);title('dilated image');
Results:
Dilation
1 comments:
thank uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu
Post a Comment