i am working on image processing using gabor filter. if anyone can help
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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');
0 Kommentare
Antworten (1)
Alex Taylor
am 28 Apr. 2016
Any reason why you aren't using imgaborfilt to apply the Gabor filter?
0 Kommentare
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!