查看单个帖子
旧 2008-09-11, 08:58   #1
xin_shou
初级会员
 
注册日期: 2008-09-06
年龄: 45
帖子: 7
声望力: 0
xin_shou 正向着好的方向发展
默认 [求助]我是初学,谁帮我看看一个非常简单的程序

%索引图像转换为灰度图像
[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文件实现程序,怎么改。
谢谢!这玩意儿困扰好几天了
xin_shou 当前离线   回复时引用此帖