Borrar filtros
Borrar filtros

how to rectify this error

1 visualización (últimos 30 días)
kalpana
kalpana el 23 de En. de 2014
Respondida: Walter Roberson el 23 de En. de 2014
Error using imhist Expected input number 1, I or X, to be two-dimensional.
Error in imhist>parse_inputs (line 277) validateattributes(a, {'double','uint8','int8','logical','uint16','int16','single','uint32', 'int32'}, ...
Error in imhist (line 59) [a, n, isScaled, top, map] = parse_inputs(varargin{:});
Error in mainnnn (line 7) [p,x]=imhist(J,256);

Respuestas (1)

Walter Roberson
Walter Roberson el 23 de En. de 2014
You probably used imread() to read in an image, and the image is stored as a 3 dimensional matrix because it is an RGB (truecolor) image. imhist() can only be applied to 2D images such as grayscale images.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by