How to count the number of extrema of image's histogram
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuesta aceptada
bym
el 18 de Sept. de 2011
im = imread('pout.tif');
[counts ,x]=imhist(im);
counts(x > 200)
0 comentarios
Más respuestas (1)
HongTu Nguyen
el 19 de Sept. de 2011
3 comentarios
Image Analyst
el 21 de Sept. de 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);
Ver también
Categorías
Más información sobre Histograms en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!