DSPRelated.com
Forums

Re: segmentation

Started by Tarang Dadia April 6, 2005

I think this code should work
It basically segments the image and stores it in a 3 dimensional array
which can be accessed by varying the 3rd dimension of the array 'a' in
code below

Hope this helps
Tarang im = imread('image.jpg'); % I assume that image size is 144 x 144

xLength = 12;
yLength = 12;

numOfImages = (144*144)/(xLength * yLength); % you can change the size
later on if you want to
a = zeros( xLength , yLength ,numOfImages);

for i = 0 : numOfImages - 1

xStart = mod(i , xLength) * xLength +1;
yStart = floor(i / 12) + 1 ;
a(:,:,i + 1)= im( xStart: xStart + xLength -1 , yStart : yStart +
yLength-1);
end

On Apr 4, 2005 8:33 PM, zeinab rezaii <rezaii57@reza...> wrote:
>
>
> i work on image detection with recurrent neural network and first i must
> segment my image to its region .
> i want code on matlab that segment my image and return this segmented region
>
> azadeh
> Tarang Dadia <tarangdadia@tara...> wrote:
> What kind of code do you want? I did help someone on Image
> segmentation earlier on Matlab yahoogroups.
>
> Tarang
>
> On Apr 3, 2005 10:38 PM, rezaii57 wrote:
> >
> > hello
> > are you find code on image segmentation ?
> > i need simple code on image segmentation . are you help me ?
> >
> > ________________________________
> Yahoo! Messenger
> Show us what our next emoticon should look like. Join the fun.