How to count the number of extrema of image's histogram
1 view (last 30 days)
Show older comments
Hi everyone, Please give me some suggest the ways to count the number of extrema of image's histogram. Thank a lot! Nice weekend for all! HongTu
0 Comments
Accepted Answer
More Answers (1)
HongTu Nguyen
on 19 Sep 2011
3 Comments
Image Analyst
on 21 Sep 2011
You can't estimate the number of foreground objects in your image from the image's histogram unless you know the areas of the objects in your image. For example if your foreground (objects) are brighter than thresholdValue and the size of the objects is objectArea, then you can estimate the number of objects like this:
numberOfObjects = round(sum(pixelCounts(thresholdValue:end)) / objectArea);
See Also
Categories
Find more on Histograms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!