How to detect Hue from HSV image for individual objects
1 view (last 30 days)
Show older comments
Hi everyone, I was wondering how to detect the average hue value for a series of different objects. I've detected the bounding box for each object, from region props, and now wish to determine the hue value for the bounding box square.
Any help is greatly appreciated
for i=1:CC.NumObjects;
r=(groupdata(i).BoundingBox(2):groupdata(i).BoundingBox(2)+groupdata(i).BoundingBox(3));
c=(groupdata(i).BoundingBox(1):groupdata(i).BoundingBox(1)+groupdata(i).BoundingBox(3));
P{i} = HSVimage(:,:,1);
end
0 Comments
Accepted Answer
Walter Roberson
on 27 Mar 2014
mean2(P{i}(r,c))
3 Comments
Image Analyst
on 27 Mar 2014
Why are you messing with cell arrays? Why make it complicated? Just use regular numerical arrays.
More Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!