i am working on image processing using gabor filter. if anyone can help

3 views (last 30 days)
aiman anwar
aiman anwar on 28 Apr 2016
Edited: aiman anwar on 2 May 2016
image=imread('3.jpg');
image_gray=rgb2gray(image);
image_resize=imresize(image_gray, [160 160]);
image_resize=im2double(image_resize);
figure(1);
imshow(image_resize);
title('Input Image');
gamma=0.3;
psi=0; %phase
theta=0; %orientation
bw=2.8; %bandwidth or effective width
lambda=5; % wavelength
pi=180;
for x=1:160
for y=1:160
x_theta=image_resize(x,y)*cos(theta)+image_resize(x,y)*sin(theta);
y_theta=-image_resize(x,y)*sin(theta)+image_resize(x,y)*cos(theta);
gb(x,y)= exp(-(x_theta.^2/2*bw^2+ gamma^2*y_theta.^2/2*bw^2))*cos(2*pi/lambda*x_theta+psi);
end
end
figure(2);
imshow(gb);
title('filtered image');

Community Treasure Hunt

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

Start Hunting!

Translated by