Extract data from a histogram
Mostra commenti meno recenti
I have a 256 x 256 pixel gray image. I drew the histogram of this image in matlab. I need to find the total number of pixels in each of the 0-64,64-128,128-192 and 192-255 gray levels. I've plotted the histogram but I can't get the pixel values. Is anyone you help?
Risposta accettata
Più risposte (1)
dpb
il 7 Apr 2023
Spostato: Image Analyst
il 7 Apr 2023
0 voti
Use histcounts as direct solution instead. The data are inside the histogram but you've got to go "handle diving" to retrieve them if you didn't save the object handle when called it; if you did then see the 'Properties' section of the doc for it (link to in the 'See Also') section. All in all, it's easier to just use histcounts
Categorie
Scopri di più su Contrast Adjustment 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!
