xin_shou
2008-09-11, 08:58
%索引图像转换为灰度图像
[x,map]=imread('guan.tif');
I=ind2gray(x,map);
figure(1);
imshow(x,map);
pic1=figure(2);
imshow(I);
运行提示错误:
??? Error using ==> images\private\checkinput>check_attributes
Function IND2GRAY expected its second input argument, MAP,
to be nonempty.
我把文件改为.gif的格式就没错。
能不能就用tif文件实现程序,怎么改。
谢谢!这玩意儿困扰好几天了:confused:
[x,map]=imread('guan.tif');
I=ind2gray(x,map);
figure(1);
imshow(x,map);
pic1=figure(2);
imshow(I);
运行提示错误:
??? Error using ==> images\private\checkinput>check_attributes
Function IND2GRAY expected its second input argument, MAP,
to be nonempty.
我把文件改为.gif的格式就没错。
能不能就用tif文件实现程序,怎么改。
谢谢!这玩意儿困扰好几天了:confused: