[英]Matlab - Why am I getting this error
I have typed the following in matlab
: 我在matlab
输入了以下内容:
>> I=imread('23X41.jpg');
>> fun = @(x) sum(x(:).^2)/sum(x(:)).^2;
>> en= nlfilter(I,[4 4],fun);
And, got the following error? 并且,出现以下错误?
??? Error using ==> plus
Matrix dimensions must agree.
Error in ==> nlfilter at 52
aa = mkconstarray(class(a), padval, size(a)+nhood-1);
Why am I getting this error especially that I'm sliding a 4x4
window on a 23x41
image? 为什么我会收到此错误,特别是我在23x41
图像上滑动4x4
窗口? Why are the matrix dimensions mentioned here? 为什么这里提到的矩阵尺寸?
Thanks. 谢谢。
确保您的图像是2D而不是3D阵列的彩色图像。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.