i am working on image processing using gabor filter. if anyone can help
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!