Function IND2GRAY expected input number 2, MAP, to be a valid colormap.
显示 更早的评论
Iam trying to read and convert color images to gray,
The code is :
[X,MAP]=imread(im);
x=ind2gray(X,MAP);
the images are BMP and they were jpg images and i convert them to BMP using online converter.
any help please ?
2 个评论
Walter Roberson
2018-11-16
what shows up with imfinfo(im)
I suspect that it is not an indexed image , that the colormap is empty .
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Color and Styling 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!