image processing - imhist return error with bmp data in matlab -


i have image , want calculate historgram of it,but code return error ,

 i=imread('image number one.bmp');  imhist(i); 

and error

??? error using ==> iptcheckinput function imhist expected first input, or x, two-dimensional.  error in ==> imhist>parse_inputs @ 281 iptcheckinput(a, {'double','uint8','int8','logical','uint16','int16','single','uint32', 'int32'}, ...  error in ==> imhist @ 59 [a, n, isscaled, top, map] = parse_inputs(varargin{:}); 

appreciate

i found solution, picture rgb , imhist work in 2-d input, need convert grascale with

 i=rgb2gray(i); 

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -