필터 지우기
필터 지우기

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

조회 수: 2 (최근 30일)
aiman anwar
aiman anwar 2016년 4월 28일
편집: aiman anwar 2016년 5월 2일
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');

답변 (1개)

Alex Taylor
Alex Taylor 2016년 4월 28일
Any reason why you aren't using imgaborfilt to apply the Gabor filter?

Community Treasure Hunt

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

Start Hunting!

Translated by