You are on page 1of 12

SYSTEM SPECIFICATION

Hardware Specification
Processor Hard disk RAM MONITOR KEY BOARD MOUSE CD DRIVE : : : : : : : Intel Pentium IV 3.0 GHZ 100 GB 512 MB 15 LG Studio works Samsung Keyboard Logitech 52 X Creative

Software Specification
Language Operating System : : MATLAB 7.0 Windows XP

SOFTWARE DESCRIPTION
INTRODUCTION
This research is implemented in the software of MATLAB simulation Language. The following section will describe about MATLAB 7.0 and its features.

MATLAB
It is a high-performance language for technical computing. It integrates computation, visualization, and programming in an easy-to-use environment where problems and solutions are expressed in familiar mathematical notation. Typical uses include Math and computation Algorithm development Data acquisition Modeling, simulation, and prototyping Data analysis, exploration, and visualization Scientific and engineering graphics Application development, including graphical user interface building MATLAB is an interactive system whose basic data element is an array that does not require dimensioning. This allows you to solve many technical computing problems, especially those with matrix and vector formulations, in a fraction of the time it would take to write a program in a scalar non-interactive language such as C or FORTRAN. The name MATLAB stands for matrix laboratory. MATLAB was originally written to provide easy access to matrix software developed by the LINPACK and EISPACK projects. Today, MATLAB engines incorporate the LAPACK and BLAS libraries, embedding the state of the art in software for matrix computation. MATLAB has evolved over a period of years with input from many users. In university environments, it is the standard instructional tool for introductory and advanced courses in mathematics, engineering, and science. In industry, MATLAB is the tool of choice for high-productivity research, development, and analysis. 2

FEATURES
A family of add-on application-specific solutions called toolboxes. Very important to most users of MATLAB, toolboxes allow you to learn and apply specialized technology. Toolboxes are comprehensive collections of MATLAB functions (M-files) that extend the MATLAB environment to solve particular classes of problems. Areas in which toolboxes are available include signal processing, control systems, neural networks, fuzzy logic, wavelets, simulation, and many others.

MAIN PARTS OF MATLAB


Development Environment This is the set of tools and facilities that help you use MATLAB functions and files. Many of these tools are graphical user interfaces. It includes the MATLAB desktop and Command Window, a command history, an editor and debugger, and browsers for viewing help, the workspace, files, and the search path. The MATLAB Mathematical Function Library This is a vast collection of computational algorithms ranging from elementary functions like sum, sine, cosine, and complex arithmetic, to more sophisticated functions like matrix inverse, matrix eigen values, Bessel functions, and fast Fourier transforms. The MATLAB Language This is a high-level matrix/array language with control flow statements, functions, data structures, input/output, and object-oriented programming features. It allows both "programming in the small" to rapidly create quick and dirty throw-away programs, and "programming in the large" to create complete large and complex application programs.

Graphics MATLAB has extensive facilities for displaying vectors and matrices as graphs, as well as annotating and printing these graphs. It includes high-level functions for two-dimensional and three-dimensional data visualization, image processing, animation, and presentation graphics. It also includes low-level functions that allow you to fully customize the appearance of graphics as well as to build complete graphical user interfaces on your MATLAB applications. The MATLAB application program interface (API): This is a library that allows you to write C and FORTRAN programs that interact with MATLAB. It includes facilities for calling routines from MATLAB (dynamic linking), calling MATLAB as a computational engine, and for reading and writing MAT-files.

FUNCTIONS
Displaying images with IMSHOW In MATLAB, the primary way to display images is by using the image function. This function creates a Handle Graphics image object, and it includes syntax for setting the various properties of the object. MATLAB also includes the imagesc function, which is similar to image but which automatically scales the input data. The Image Processing Toolbox includes an additional display routine called imshow. Like image and imagesc, this function creates a Handle Graphics image object. However, imshow also automatically sets various Handle Graphics properties and attributes of the image to optimize the display.

In general, using imshow for image processing applications is preferable to using image and imagesc. It is easier to use and in most cases, displays an image using one image pixel per screen pixel. SUBPLOT Create and control multiple axes. Syntax Subplot(m,n,p) Subplot (m,n,p,replace) Subplot (m,n,p,align) Subplot(h) Subplot (Position, [left bottom width height]) h=subplot() Description Subplot divides the current figure into rectangular panes that are numbered row wise. Each pane contains an axes. Subsequent plots are output to the current pane. Subplot (m,n,p) creates an axes in the pth pane of a figure divided into an m-by-n matrix of rectangular panes. The new axes becomes the current axes. If p is a vector, it specifies and axes having a position that covers all the subplot positions listed in p. FIGURE Create figure window. FIGURE, by itself, creates a new figure window, and returns its handle. Figure creates figure graphics objects. Figure objects are the individual windows on the screen in which MATLAB displays graphical output. Figure creates a new figure object using default property values. IMREAD Read image from graphics file. A = IMREAD (FILENAME, FMT) reads a grayscale or color image from the file specified by the string FILENAME, where the string FMT 5

specifies the format of the file. See the reference page, or the output of the function IMFORMATS, for a list of supported formats. If the file is not in the current directory or in a directory in the MATLAB path, specify the full pathname of the location on your system. If IMREAD cannot find a file name FILENAME, it looks for a file named FILENAME.FMT. IMREAD returns the image data in the array A. If the file contains array scale image, A is a two-dimensional (M-by-N) array. If the file contains a color image, A is a three-dimensional (M-by-N-by-e) array. The class of the returned array depends on the data type used by the file format. For most file formats, the color image data returned uses the RGB color space. For TIFF files, however, IMREAD can return color data that uses the RGB, CIELAB, ICCLAB, or CYMK color spaces. image uses the CYMK color space, A is an M-by-N-by-4 array. [X,MAP] = IMREAD (FILENAME,FMT) reads the indexed image in FILENAME into X and its associated colormap into MAP. Colormap values in the image file are automatically rescaled into the range [0,1]. If the color

SAMPLE SOURCE CODE


MorphologicalBasedEstimation.m %Image Read And Display [TempInputFileName TempInputFilePath]=uigetfile('*.bmp'); InputFilePath=char(TempInputFilePath); InputImagePath=[InputFilePath TempInputFileName]; [DataArray MapData]=imread(InputImagePath); figure,imshow(DataArray,MapData); title('Input Texture Image'); StartTime_FractalAnalysisTimeTaken=cputime; DataArray=ind2gray(DataArray,MapData); figure,imshow(DataArray); title('Gray converted Image'); DataArray=double(DataArray); [ImageHeight,ImageWidth]=size(DataArray); BackupDataArray=DataArray; t0 = clock; DilatedImage6=imdilate(DataArray,StucturalElementArray6); figure,imshow(uint8(DilatedImage6)); title('DilatedImage6'); DilatedImage6=double(DilatedImage6); MewBlockDataArray=zeros(11,11,11); MewBlockDataArray=double(MewBlockDataArray); DistanceArray=zeros(1,11); DistanceArray=double(DistanceArray); BlockHighMewDataArray=zeros(11,11); BlockHighMewDataArray=double(BlockHighMewDataArray); SumDataArray=zeros(1,11); SumDataArray=double(SumDataArray); ImageContentArray=zeros(11,256,256); ImageContentArray=double(ImageContentArray); 7

for i=0+fix(11/2):255-fix(11/2) for j=0+fix(11/2):255-fix(11/2) SumDataArray(:,:)=0; for k=-5:5 for L=-5:5 for m=2:11 if(m==2) DistanceArray(1,2)=abs(DataArray(i+k+Adj,j+L+Adj)DilatedImage2(i+k+Adj,j+L+Adj )); else if( m==3) DistanceArray(1,3)=abs(DilatedImage2(i+k+Adj,j+L+Ad j)-DilatedImage3(i+k+Adj,j+L+Adj )); else if(m==4) DistanceArray(1,4)=abs(DilatedImage3(i+k+Adj,j+L+ Adj)-DilatedImage4(i+k+Adj,j+L+Adj )); end end end end%m BlockHighMewDataArray(k+5+Adj,L+5+Adj)=(max(DistanceArra y)); for m=2:11 if(m==2) MewBlockDataArray(2,k+5+Adj,L+5+Adj)=abs(BlockHighMewDataArray(k+ 5+Adj,L+5+Adj)-DistanceArray(1,2)); SumDataArray(1,2)=SumDataArray(1,2)+abs(BlockHighMewDataArray(k+ 5+Adj,L+5+Adj)-DistanceArray(1,2)); else if(m==5) MewBlockDataArray(5,k+5+Adj,L+5+Adj)=abs(BlockHighMewDataArray(k+ 5+Adj,L+5+Adj)-DistanceArray(1,5)); 8

SumDataArray(1,5)=SumDataArray(1,5)+abs(BlockHighMewDataArray(k+ 5+Adj,L+5+Adj)-DistanceArray(1,5)); else if(m==6) SumDataArray(1,6)=SumDataArray(1,6)+abs(BlockHighMewDataArray(k+ 5+Adj,L+5+Adj)-DistanceArray(1,6)); end end end end end end%m end%K end%L MewBlockDataArray(2,:,:)=TempArray; AlphaValue=SumDataArray(1,2)/2; TempArray1(:,:)=MewBlockDataArray(2,:,:); ImageContentArray(2,i+Adj,j+Adj)=AlphaValue*sum(sum(TempArray1(:,:)^( 0))); if(SumDataArray(1,3)>0) TempArray=MewBlockDataArray(3,:,:)/SumDataArray(1,3); else TempArray=MewBlockDataArray(3,:,:)/1; end if(SumDataArray(1,6)>0) TempArray=MewBlockDataArray(6,:,:)/SumDataArray(1,6); else TempArray=MewBlockDataArray(6,:,:)/1; end MewBlockDataArray(6,:,:)=TempArray; AlphaValue=SumDataArray(1,6)/6; TempArray1(:,:)=MewBlockDataArray(6,:,:); ImageContentArray(6,i+Adj,j+Adj)=AlphaValue*sum 9

end L_Array=zeros(256,256,11); L_Array=double(L_Array); TempArray=zeros(256,256); TempArray(:,:)=(ImageContentArray(3,:,:)); for i=0:256-1 for j=0:256-1 if(TempArray(i+Adj,j+Adj)~=0 ) L_Array(i+Adj,j+Adj,3-1)=log(TempArray(i+Adj,j+Adj)) / (log(1/3.0))*(1/1); else L_Array(i+Adj,j+Adj,3-1)=log(1) / (log(1/3.0))*(1/1); end end end TempArray(:,:)=(ImageContentArray(5,:,:)); for i=0:256-1 for j=0:256-1 if(TempArray(i+Adj,j+Adj)~=0 ) L_Array(i+Adj,j+Adj,5-1)=log(TempArray(i+Adj,j+Adj)) / (log(1/5.0))*(1/3); else L_Array(i+Adj,j+Adj,5-1)=log(1) / (log(1/5.0))*(1/3); end end end EndTime_FractalAnalysisTimeTaken=cputime; FractalAnalysisTimeTaken =EndTime_FractalAnalysisTimeTaken StartTime_FractalAnalysisTimeTaken; StartTime_SegmentationTimeTaken=cputime; Segmentedarrray1=zeros(256,256,30); Segmentedarrray1=double(Segmentedarrray1); Segmentedarrray1(9:248,9:248,1:25)=abs(filterimage(9:248,9:248,1:25)); 10

Segmentedarrray1(9:248,9:248,26:27)=abs(L_Array(9:248,9:248,2:3)); patt = reshape(Segmentedarrray1(9:248,9:248,1:27),240*240,27); [c u o] = fcm(patt,4); for i=0:30 SegmentedImage2=medfilt2(SegmentedImage,[3,3]); end ct=[0 0 0; .5 .5 .5; 1 1 1; .75 .75 .75; ]; MaxVal = max(count); Quadrant1SegementationPercentage=double((MaxVal/ (double(SegementedImageHeight)*SegementedImageWidth))*100); disp('Quadrant1SegementationPercentage'); disp(Quadrant1SegementationPercentage); Quadrant2SegementationPercentage=0.0; count = ones(1,4); for i=1:120 for j=1:120 t = QArray2(i,j); count(1,t) = count(1,t) + 1; end end MaxVal = max(count); Quadrant2SegementationPercentage=double((MaxVal/ (double(SegementedImageHeight)*SegementedImageWidth))*100); disp('Quadrant2SegementationPercentage'); disp(Quadrant2SegementationPercentage); Quadrant3SegementationPercentage=0.0; count = ones(1,4); for i=1:120 for j=1:120 t = QArray3(i,j); 11

count(1,t) = count(1,t) + 1; end end MaxVal = max(count); Quadrant3SegementationPercentage=double((MaxVal/ (double(SegementedImageHeight)*SegementedImageWidth))*100); disp('Quadrant3SegementationPercentage'); disp(Quadrant3SegementationPercentage); Quadrant4SegementationPercentage=0.0; count = ones(1,4); for i=1:120 for j=1:120 t = QArray4(i,j); count(1,t) = count(1,t) + 1; end end MaxVal = max(count); Quadrant4SegementationPercentage=double((MaxVal/ (double(SegementedImageHeight)*SegementedImageWidth))*100); disp('Quadrant4SegementationPercentage'); disp(Quadrant4SegementationPercentage); disp('Texture Segmentation successfull');

12

You might also like