How to segment out r,g,b values of different objects of an single image
Show older comments
I have an rgb image with multiple objects in the image. I want to classify the objects based on color properties. So I need the rgb color values of the objects differently for different objects. please tell me how to segment out the rgb values of the objects and store them with different label under a structure.
Answers (2)
Walter Roberson
on 6 Apr 2013
0 votes
Convert to grayscale, figure out where the object boundaries are, regionprops() asking for the pixel list for each object, index the RGB image at the pixel list.
Image Analyst
on 7 Apr 2013
0 votes
You can use color classification, like my demos show: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862
Of you could try to convert to grayscale with rgb2gray() or rgb2ind() and then use imquantize() and then call regionprops().
Or you could try to classify with the color frequency image: http://www.mathworks.com/matlabcentral/fileexchange/28164-color-frequency-image
Where did you upload your image? You forgot to tell us the URL. http://www.mathworks.com/matlabcentral/answers/7924-where-can-i-upload-images-and-files-for-use-on-matlab-answers
Categories
Find more on Image Segmentation in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!