From 34de475999a22ac7280411e15339e77a0c8dbc2e Mon Sep 17 00:00:00 2001 From: Joe Zhao Date: Tue, 12 May 2015 13:15:55 +0800 Subject: initial commit --- gaborFilter.m | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 gaborFilter.m (limited to 'gaborFilter.m') diff --git a/gaborFilter.m b/gaborFilter.m new file mode 100644 index 0000000..8cf9260 --- /dev/null +++ b/gaborFilter.m @@ -0,0 +1,13 @@ +function fout = gaborFilter(gamma,theta,lambda,sigma) + sigma_x = sigma; + sigma_y = sigma/gamma; + + sz=fix(4*max(sigma_y,sigma_x)); + + [x y]=meshgrid(-sz:sz,sz:-1:-sz); + + % Rotation + x_theta=x*cos(theta)+y*sin(theta); + y_theta=-x*sin(theta)+y*cos(theta); + + fout=filterNorm(exp(-0.5*(x_theta.^2/sigma_x^2+y_theta.^2/sigma_y^2)).*exp(2*i*pi/lambda*x_theta)); \ No newline at end of file -- cgit v1.2.3-70-g09d2