Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

how to segment the color image and how to extract the RGB value of the whole segmented image

Asked by pradeep on 7 Nov 2012

i am working on project that classification based on color, now i have an image how to extract only that image by removing all other stuff in that and please show me how to extract the RGB value of the whole fruit.

thank you in advance

0 Comments

pradeep

1 Answer

Answer by Image Analyst on 7 Nov 2012

I have three color segmentation demos in my File Exchange. One does it in RGB space, one does it in HSV space, and one does it in LAB space using the color difference metric called Delta E.

2 Comments

pradeep on 8 Jan 2013

Sorry sir I think I need to explain my problem more specifically, example:- I had image with 7 different fruits in that I have to segment any one fruit alone among this group, based on its color. Can you please help me on this problem.

Image Analyst on 8 Jan 2013

Assuming that you have any number from zero up to 7 fruits in the image and you have to figure out which types are present, and you can tell this based solely on their color, then you can run any of those demos. I'd suggest the Delta E method. You have to know in advance what the center color of the 7 fruits is and program that into the program instead of using the color taken from the mean of the region the user drew, but that's really easy. Just draw over the 7 fruits and get the mean hsv from the program and then hard code those in and comment out the part where you draw a reference region. Try it.

Image Analyst

Contact us