MATLAB: How do i change the image

3d

From 3D(JPEG) to 2D
Do i change it to grayscale? how do i do so .
??? Error using ==> iptcheckinput Function IMHIST expected its first input, I or X, to be two-dimensional.

Best Answer

Have a look at rgb2gray. Alternatively, consider applying imhist to the separate colour planes.