Skip to content

Instantly share code, notes, and snippets.

@juniorhero
Created September 7, 2016 20:32
Show Gist options
  • Save juniorhero/112aa8a5725a1d82ba51457c335a726a to your computer and use it in GitHub Desktop.
Save juniorhero/112aa8a5725a1d82ba51457c335a726a to your computer and use it in GitHub Desktop.
Rgb2gray error solution for MAP must be a m x 3 array.
if size(I, 3) > 1
output = rgb2gray(I);
else
output = I;
end
@aster-tadesse
Copy link

when i try to convert RGB2GRAY it show the following error
Error using rgb2gray>parse_inputs (line 81)
MAP must be a m x 3 array.

Error in rgb2gray (line 35)
X = parse_inputs(varargin{:});

Error in segment (line 13)
Im = rgb2gray(Im);
please give me correction how can i do it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment