回 帖 发 新 帖 刷新版面

主题:急待解决

function [G,gabout] = gaborfilter1(I,Sx,Sy,U,V)
if isa(I,'double')~=1 
    I = double(I);
end

for x = -fix(Sx):fix(Sx)
    for y = -fix(Sy):fix(Sy)
        G(fix(Sx)+x+1,fix(Sy)+y+1) = (1/(2*pi*Sx*Sy))*exp(-0.5*((x/Sx)^2+(y/Sy)^2)+2*pi*i*(U*x+V*y));
    end
end

Imgabout = conv2(I,double(imag(G)),'same');
Regabout = conv2(I,double(real(G)),'same');

gabout = uint8(sqrt(Imgabout.*Imgabout + Regabout.*Regabout));
运行时出现第七行出现Matrix dimensions must agree.错误,请问应怎末改正

回复列表 (共1个回复)

沙发

兄才莫非也研究Gabor滤波器,可否交流?

程序没错!

我来回复

您尚未登录,请登录后再回复。点此登录或注册