作者starmoon0918 (恐怖の孤独)
看板MATLAB
标题[问题]重灌了matlab还是不能跑imshow指令
时间Tue Sep 18 11:58:32 2012
如标题
我灌的是 Matlab R2011b
在安装的时候有确定勾选toolbox 5.7
灌好之後
我要跑RGB转灰阶
以下是我的程式码 :
X=double(imread('Tulips.jpg'));
figure,imshow(X);
R=X(:,:,1);
G=X(:,:,2);
B=X(:,:,3);
Y=0.299*R+0.587*G+0.114*B;
U=0.436*(B-Y)/(1-0.114);
V=0.615*(R-Y)/(1-0.299);
figure,imshow(uint8(Y));
但是最後显示是
Undefined function 'imshow' for input arguments of type 'double'.
Error in hw1 (line 4)
figure,imshow(X);
以下是我的版本
-------------------------------------------------------------------------------------
MATLAB Version 7.13.0.564 (R2011b)
MATLAB License Number: 654120
Operating System: Microsoft Windows 7 Version 6.1 (Build 7601: Service Pack 1)
Java VM Version: Java 1.6.0_17-b04 with Sun Microsystems Inc. Java
HotSpot(TM) 64-Bit Server VM mixed mode
-------------------------------------------------------------------------------------
MATLAB Version 7.13 (R2011b)
Symbolic Math Toolbox Version 5.7 (R2011b)
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.117.168.159
1F:→ winse:请问您.m档的档名为何? 09/18 20:58
2F:→ doom8199:line 4 改成 figure,imshow(uint8(X)); 09/19 11:11
3F:推 perceval:需要 Image Processing Toolbox 09/19 12:17
4F:→ james1022jk:应该要改成2楼那样... 09/19 17:42
5F:→ starmoon0918:我的档名都英文hw1.m这样 09/20 10:27
6F:→ starmoon0918:我改了figure,imshow(uint8(X)); 还是不行所以应该是 09/20 10:29
7F:→ starmoon0918:要像3楼说的要灌toolbox了 09/20 10:30