声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 1047|回复: 0

[图像处理] 帮忙啊。看看这个东西有必要这么写么?

[复制链接]
发表于 2010-3-19 11:35 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

x
————————————————————————————————————————
function [G,gabout] = gaborfilter(I,Sx,Sy,f,theta);
if isa(I,'double')~=1
    I = double(I);
end
for x = -fix(Sx):fix(Sx)
    for y = -fix(Sy):fix(Sy)
        xPrime = x * cos(theta) + y * sin(theta);
        yPrime = y * cos(theta) - x * sin(theta);
        h(fix(Sx)+x+1,fix(Sy)+y+1) = exp(-.5*((xPrime/Sx)^2+(yPrime/Sy)^2))*cos(2*pi*f*xPrime);
    end
end
Imgabout = conv2(I,double(imag(h)),'same');
Regabout = conv2(I,double(real(h)),'same');
gabout = sqrt(Imgabout.*Imgabout + Regabout.*Regabout);
————————————————————————————————————

大家帮忙喽一眼,根据公式写的这个东东有问题么???——

Imgabout = conv2(I,double(imag(h)),'same');
这一句是有必要的吗???好像h中不会有虚部出现???
1111.jpg
回复
分享到:

使用道具 举报

您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-5-16 21:08 , Processed in 0.060222 second(s), 21 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表