From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: divide 1280-by-960 image into 9-by-9
Date: Thu, 26 May 2011 19:12:05 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 32
Message-ID: <irm8m5$58n$>
References: <irm4h1$jke$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1306437125 5399 (26 May 2011 19:12:05 GMT)
NNTP-Posting-Date: Thu, 26 May 2011 19:12:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2799711
Xref: comp.soft-sys.matlab:728908

"areeba khan" wrote in message <irm4h1$jke$>...
> i am working on a project detection of skin cancer using image processing..i have found a reference matrix of 9-by-9 of tumourous cell now through looping i want 2 compare this reference matrix with the image...   bt my program is giving this error                                                        
> ??? Error using ==> mat2cell
> Number of input vector arguments, 9, does not match the input matrix's number of dimensions, 2. 
> this is my code
> i=imread('E:\cancer images\case 091610\20X1.jpg');
> a=rgb2gray(i);
> b=imadjust(a);
> v=MAT2CELL(b,1,2,3,4,5,6,7,8,9);
> mat1=b(725:733,231:239);
> c=mat1;
> for t=1:size(c,2)
>     for u=1:size(c,1)
>         y=xcorr(c(:),b(:));
>        if y>=0.7
>            disp('Tumor detected')
>            else
>            disp('tumor not found')
>        end
>     end
> end
> please tell me if i am doing right?
> tell me some way how i can divide the real image 1280-by-960 into 9-by-9?


May I suggest something ? Please reformulate your question. Looking at your words and then at your code is very confusing !

Are you trying to analyze a 9x9 chunk of the big matrix ? What are you going to do at the borders? Where are you using "v" in your code , after that attempt of allocation? Why are you doing 81 times the same operation ? ...