MATLAB进行灰度图像读取时: I=imread('lena.bmp'); IW=rgb2gray(I); 总报错? Error using ==> timesIntegers can only be combined with integers of the same class, or scalar doubles.Error in ==> rgb2gray at 65 I = X*coef;

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/25 13:38:28
MATLAB进行灰度图像读取时: I=imread('lena.bmp'); IW=rgb2gray(I); 总报错? Error using ==> timesIntegers can only be combined with integers of the same class, or scalar doubles.Error in ==> rgb2gray at 65  I = X*coef;
xRJ@NڱIHwV݈X".T3$] N'ԅ+];9;Z_O㋽rǟ ߨŭGo]tʹ)F R M OѢ1V4:,wfdf)u(2Ar6f:pSyD!V y6L fz+`(2x+Bdyd! gհ0SHA+

MATLAB进行灰度图像读取时: I=imread('lena.bmp'); IW=rgb2gray(I); 总报错? Error using ==> timesIntegers can only be combined with integers of the same class, or scalar doubles.Error in ==> rgb2gray at 65 I = X*coef;
MATLAB进行灰度图像读取时: I=imread('lena.bmp'); IW=rgb2gray(I); 总报错
? Error using ==> times
Integers can only be combined with integers of the same class, or scalar doubles.
Error in ==> rgb2gray at 65
I = X*coef;

MATLAB进行灰度图像读取时: I=imread('lena.bmp'); IW=rgb2gray(I); 总报错? Error using ==> timesIntegers can only be combined with integers of the same class, or scalar doubles.Error in ==> rgb2gray at 65 I = X*coef;
rgb2gray的第65行的代码是在不是3维矩阵的情况下才会进入的.
open rgb2gray你看一下那句话,
if threeD
...
else
I = X*coef;
end
你需要看一下你的I的矩阵格式.