Problem with imhist function ?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Image Analyst
el 16 de Dic. de 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 comentario
Ver también
Categorías
Más información sobre Histograms en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!