Error : while finding histogram for gray scale image (uint8)

Can anyone tell me how to rrecvtify this error?? I have
Undefined function or variable 'originalImage'.
Error in blobs (line 15) [pixelCount grayLevels] = imhist(originalImage);

 Respuesta aceptada

Your image variable is not named originalImage. What is it named? Looks like you took some demo code of mine and modified it but forgot to change the name everywhere. Where does the result of your imread() function go to? Chances are that is what you need to send into imhist(). For example
grayImage = imread(fullFileName);
[pixelCount grayLevels] = imhist(grayImage);

4 comentarios

BV
BV el 14 de Abr. de 2013
oh yeah I fixed it.
BV
BV el 14 de Abr. de 2013
does 'imfill' function must be selected manually? Or if I give 'holes' It filles the region by itself?
It seems, according to the documentation, that if you don't specify the 'holes' option, it puts you into an interactive mode where you must click on the image to edit/remove things or finish. I never want that interactive mode so I always specify the 'holes' option.
BV
BV el 14 de Abr. de 2013
ok thanks.

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Preguntada:

BV
el 14 de Abr. de 2013

Community Treasure Hunt

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

Start Hunting!

Translated by