How to count the number of extrema of image's histogram
Mostra commenti meno recenti
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
Risposta accettata
Più risposte (1)
HongTu Nguyen
il 19 Set 2011
0 voti
3 Commenti
bym
il 19 Set 2011
I don't think the histogram is the way to go. Think of it this way: if I have two BW images with 2 objects in them. In one image, the objects are 5 pixels in area; in the other image they are 100 pixels in area. The histogram for the 2 images would be different, yet they each have 2 objects in them. I think you want to look at segmentation. Here is a good place to start:
http://www.mathworks.com/matlabcentral/fileexchange/25157-blobsdemo
HongTu Nguyen
il 21 Set 2011
Image Analyst
il 21 Set 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);
Categorie
Scopri di più su Neighborhood and Block Processing in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!