已知gabor滤波器的参数,怎么求gabor的卷积模板

jlusuperwind 2008-04-29 10:50:56
如果已经知道了Gabor滤波器的参数(方向角,中心频率,尺度参数),如何才能得到Gabor的卷积模板呢
如下面的这个代码中,参数Sx,Sy是怎么确定的
%%%%%%%VERSION 1

%The Gabor filter is basically a Gaussian (with variances sx and sy along x and y-axes respectively)
%modulated by a complex sinusoid (with centre frequencies U and V along x and y-axes respectively)
%described by the following equation
%%
% 1 -1 x ^ y ^
%%% G(x,y) = ---------- * exp ([----{(----) 2+(----) 2}+2*pi*i*(Ux+Vy)])
% 2*pi*sx*sy 2 sx sy

%% Describtion :

%% I : Input image
%% Sx & Sy : Variances along x and y-axes respectively
%% U & V : Centre frequencies along x and y-axes respectively

%% G : The output filter as described above
%% gabout : The output filtered image

%% Author : Ahmad poursaberi e-mail : a.poursaberi@ece.ut.ac.ir
%% Faulty of Engineering, Electrical&Computer Department,Tehran
%% University,Iran,June 2004

function [G,gabout] = gaborfilter(I,Sx,Sy,U,V);
I=imread('G:\eye.jpg');

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(-.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));

...全文
387 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
CQ小子 2011-12-06
  • 打赏
  • 举报
回复
我最近也在弄这个gabor滤波器 有明白人讲一讲 用matlab 如何实现的 最好有事例
tyc5689123 2010-09-08
  • 打赏
  • 举报
回复
这里的x和y是窗口的范围表示,Sx和Sy是确定窗口范围的
jlusuperwind 2008-05-03
  • 打赏
  • 举报
回复
事先当然baidu google过,以前没接触过图像处理。关于gabor滤波器的算法中都没有提到自变量x和y是怎么取的。
如果这两个自变量的范围确定了,我就能算出模板了
jlusuperwind 2008-05-03
  • 打赏
  • 举报
回复
没有人回答吗
knowledge_Is_Life 2008-05-01
  • 打赏
  • 举报
回复
关注 接分
UltraBejing 2008-05-01
  • 打赏
  • 举报
回复
有问题请先GOOGLE,BAIDU

4,445

社区成员

发帖
与我相关
我的任务
社区描述
图形图像/机器视觉
社区管理员
  • 机器视觉
  • 迪菲赫尔曼
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧