someOperations
Contents
a = imread('aa.jpg');
b = imread('bb.jpg');
a1 = rgb2gray(a);
b1 = rgb2gray(b);
a2 = im2bw(a1);
b2 = im2bw(b1);
a3 = imcomplement(a2);
b3 = imcomplement(b2);
images for operation
figure; imshow(a2); title('image T blackand white image');
figure; imshow(b2); title('image T blackand white image');
monusImage = a2 - b2;
addImage = a2+b2;
orImge = a2 | b2;
andImge = a2 & b2;
Warning: Image is too big to fit on screen; displaying at 67%
Warning: Image is too big to fit on screen; displaying at 67%

Testing with irosion and dialation
seDisk = strel('disk', 10);
seDiamond = strel('diamond', 10);
erodeImageDisk = imerode(a2, seDisk);
figure; imshow(erodeImageDisk); title('Erode Image with Disk');
erodeImageDiamond = imerode(a2, seDiamond);
figure; imshow(erodeImageDiamond); title('Erode Image with Diamad');
dilalateImage1 = imdilate(a2, seDisk);
figure; imshow(dilalateImage1); title('Dialate Image with disk');
dilalateImage2 = imdilate(a2, seDiamond);
figure; imshow(dilalateImage2); title('Dialate Image with Diamend');




About
Mahinda Jayasundara
This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
0 comments :
Post a Comment