Problem with imhist function ?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have a GUI made with GUIDE and I want to upload an image and then show a histogram to see the distribution of intensities. I have a pushbutton "upload", I store the image (I) and then I make it shown through imshow(I). Until now everything is ok. After that, I have a pushbutton which takes me to another GUI named "histogram". I use rgb2gray at the first GUI, so my image is ready to be shown in a histogram. I pass the variables needed (setappdata,getappdata) to the second GUI and I write imhist(Igray) . I can only see an empty histogram with the gray scale down on it. No histogram has been shown. What is wrong?
0 Kommentare
Antworten (1)
Image Analyst
am 16 Dez. 2012
When you do
[pixelCounts grayLevels] = imhist(Igray);
and then examine pixelCounts in the debugger, what are its values? Are all bins zero? Are they all zero except for 1 bin? What does "whos Igray" report back to you?
1 Kommentar
Siehe auch
Kategorien
Mehr zu Histograms finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!