Getting values of the histogram without actually plotting it
59 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/194857/image.png)
Hello, I am working on automatically adjusting the threshold for an image. How do I select a particular percentage of the peak of the histogram for thresholding without actually plotting the values. The image below was plotted using histogram(Image).
0 commentaires
Réponses (1)
the cyclist
le 30 Août 2018
3 commentaires
the cyclist
le 31 Août 2018
The histcounts command
N = histcounts(X);
outputs the bin counts, without plotting them.
You could find the maximum value of this
maxN = max(N);
and then set your threshold as some percentage of this maximum value.
Voir également
Catégories
En savoir plus sur Image Filtering and Enhancement dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!