From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 3176/CH6/EX6.7/Ex6_7.sce | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 3176/CH6/EX6.7/Ex6_7.sce (limited to '3176/CH6/EX6.7') diff --git a/3176/CH6/EX6.7/Ex6_7.sce b/3176/CH6/EX6.7/Ex6_7.sce new file mode 100644 index 000000000..3ddf5f862 --- /dev/null +++ b/3176/CH6/EX6.7/Ex6_7.sce @@ -0,0 +1,34 @@ +//Ex6_7 : +//Computing Color Image Components. + +// 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("Ex6_7.tif"); +Color=imresize(Color,0.5); +[nr nc]=size(Color); + +figure,ShowColorImage(Color,'Gray Image'); +title('Original Image'); + + +Slice_Image=[]; + +for i=1:nr + for j=1:nc + Slice_Image(i,j,1)=255-Color(i,j,1); + Slice_Image(i,j,2)=255-Color(i,j,2); + Slice_Image(i,j,3)=255-Color(i,j,3); + end +end + +ShowColorImage(Slice_Image,'RGB Image');; +title('RGB Mapped image'); -- cgit