Problem with imhist function ?

조회 수: 2 (최근 30일)
Jenny
Jenny 2012년 12월 16일
댓글: Zahra Saman 2018년 4월 12일
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?

답변 (1개)

Image Analyst
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
Zahra Saman
Zahra Saman 2018년 4월 12일
any one tell me about this problem please??

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Histograms에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by