Problem with imhist function ?
조회 수: 2 (최근 30일)
이전 댓글 표시
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
답변 (1개)
Image Analyst
2012년 12월 16일
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
참고 항목
카테고리
Help Center 및 File Exchange에서 Histograms에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!