diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /3176/CH9/EX9.4 | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '3176/CH9/EX9.4')
-rw-r--r-- | 3176/CH9/EX9.4/Ex9_4.sce | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/3176/CH9/EX9.4/Ex9_4.sce b/3176/CH9/EX9.4/Ex9_4.sce new file mode 100644 index 000000000..5863bddcb --- /dev/null +++ b/3176/CH9/EX9.4/Ex9_4.sce @@ -0,0 +1,37 @@ +//Ex9_4
+//Use of opening and closing for Morphological Filtering
+// Version : Scilab 5.4.1
+// Operating System : Window-xp, Window-7
+//Toolbox: Image Processing Design 8.3.1-1
+//Toolbox: SIVP 0.5.3.1-2
+//Reference book name : Digital Image Processing
+//book author: Rafael C. Gonzalez and Richard E. Woods
+
+clc;
+close;
+clear;
+xdel(winsid())//to close all currently open figure(s).
+
+Color=imread("Ex9_4.png");
+Image=imresize(rgb2gray(Color),2,'bicubic');
+Image=im2bw(Image,0.75);
+[nr nc]=size(Image);
+figure,ShowImage(Image,'Gray Image');
+title('Noisy Image','color','blue','fontsize',4);
+
+Mask=CreateStructureElement('square',3); // Create Structuring Element
+Image_Eroide=ErodeImage(Image,Mask); // Erosion Operation
+figure,ShowImage(Image_Eroide,'Eriode Image');
+title('Eriode Image with 3*3 Square Mask','color','blue','fontsize',4);
+
+Image_Open=OpenImage(Image,Mask); // Opening Operation
+figure,ShowImage(Image_Open,'Open Image');
+title('Opening Image with 3*3 Square Mask','color','blue','fontsize',4);
+
+Image_Dilate=DilateImage(Image_Open,Mask); // Dilusion of Open Image
+figure,ShowImage(Image_Dilate,'Dilate Image');
+title('Dilate Image with 3*3 Square Mask','color','blue','fontsize',4);
+
+Image_Close=CloseImage(Image_Dilate,Mask); // Opening Operation
+figure,ShowImage(Image_Close,'Closing Image');
+title('Closing Image with 3*3 Square Mask','color','blue','fontsize',4);
|