I have calculated mean rgb value of all objects .now i want to calculate area and lenght of those objects only whose means rgb value comes in a particular range only.

1 次查看(过去 30 天)
I am working on a rice sample image which have impurities like dust,grass also. to identifying impurities I have calculated mean rgb value of all objects and get a range of mean rgb value if rice grains .now I want to do grading of rice .for that I want to calculate the area and lenght of rice grains only.

回答(1 个)

Image Analyst
Image Analyst 2014-10-29
If you have their mean RGB values, then you must have segmented the image and have a binary image. If so, then just call regionprops() to get the area and major axis length. See my Image Segmentation Tutorial for a demo: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862

Community Treasure Hunt

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

Start Hunting!

Translated by