The following code will reproduce this problem:
rgb = imread('flowers.tif');imhist(rgb)
??? Error using ==> checkinput (check_attributes) Function imhist expected its first input argument, I or X, to be two-dimensional. Error in ==> D:\Applications\MATLAB6p5\toolbox\images\images\checkinput.m On line 37 ==> check_attributes(A, attributes, function_name, variable_name, ... Error in ==> D:\Applications\MATLAB6p5\toolbox\images\images\imhist.m (parse_inputs) On line 173 ==> checkinput(a, 'double uint8 logical uint16', '2d', mfilename, 'I or X', 1); Error in ==> D:\Applications\MATLAB6p5\toolbox\images\images\imhist.m On line 49 ==> [a, n, isScaled, top, map] = parse_inputs(varargin{:});
Best Answer