我在 matlab 中使用
input = imread ('sample.jpeg');
然后我做
imhist(input);
它给出了这个错误:
??? Error using ==> iptcheckinput
Function IMHIST expected its first input, I or X, to be two-dimensional.
Error in ==> imhist>parse_inputs at 275
iptcheckinput(a, {'double','uint8','logical','uint16','int16','single'}, ...
Error in ==> imhist at 57
[a, n, isScaled, top, map] = parse_inputs(varargin{:});
运行后size(input)
,我看到我的输入图像大小300x200x3
。我知道第三维是用于颜色通道的,但是有什么方法可以显示直方图吗?谢谢。