MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   [求助]我是初学,谁帮我看看一个非常简单的程序 (https://www.labfans.com/bbs/showthread.php?t=4422)

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:


所有时间均为北京时间。现在的时间是 11:25

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.