the below code changes rgb image to grey ,can the same partision done without changing the image to grey??

 Réponse acceptée

I'm not sure of the question. You cannot do the same thing by doing something different, obviously. So you can't change the image to gray without changing the image to gray. If you don't want to call rgb2gray(), then don't.

9 commentaires

what i meant in the question is i need to divide a rgb image of 1024*720 to 1024*240 1204*240 1024*240 but by using above command it changes image to grey,i want to segmant my image without changing it into grey.
And what happens if, like I said, you simply don't call rgb2gray()?
if i don't call that the image doesn't get divided,right??but i need to divide the image,how can i do??
In that case the poster needed a grayscale image, but you don't. So just try this:
dataTop = data(1:240, :,:);
dataMiddle = data(241:480, :, :);
dataBottom = data(481:end, :, :);
one more doubt,where do i need to copy the above code actually in the program??and how do i control the 3 data section at one time?
Copy it into the place in the program where you want to split the image into 3 images.
You can't control anything "at one time" unless you have the Parallel Processing Toolbox.
sir,its like after diving into three,i need to check if any red object is present in all 3 sections,if yes in section then that section 1 motor should work,can this be done??

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by