Hello, I have confusing with generation gabor filter bank,

14 views (last 30 days)
since I found in many codes on the internet they use different formula and I do not know how can determine the value of x,y in the filter bank of Gabor, please help. I have used the code below from wikibdia site for image feature detection,I do not know is it correct? his co can any body explain generation of x and y values in this code, is it fixed formula in gabor bank filter or what? function gb=gabor_fn(sigma,theta,lambda,psi,gamma)
sigma_x = sigma; sigma_y = sigma/gamma;
% Bounding box nstds = 3; xmax = max(abs(nstds*sigma_x*cos(theta)),abs(nstds*sigma_y*sin(theta))); xmax = ceil(max(1,xmax)); ymax = max(abs(nstds*sigma_x*sin(theta)),abs(nstds*sigma_y*cos(theta))); ymax = ceil(max(1,ymax)); xmin = -xmax; ymin = -ymax; [x,y] = meshgrid(xmin:xmax,ymin:ymax);
% Rotation x_theta=x*cos(theta)+y*sin(theta); y_theta=-x*sin(theta)+y*cos(theta);
gb= exp(-0.5*(x_theta.^2/sigma_x^2+y_theta.^2/sigma_y^2)).*cos(2*pi/lambda*x_theta+psi);
what does 'nstds = 3;' here mean??? please help thank you all.

Answers (0)

Categories

Find more on Filter Banks in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!