Hi,
Please help me to download following file for fingerprint image enhancement using gabor filter.
en*pudn*com/downloads115/doc/fileformat/detail486871_en*html
Or any other resource for matlab code if available.
I have written following code but not getting desired result.
clc; clear all; %close all;
[filename,pathname] = uigetfile('*.*','Pick an input image');
im=imread(strcat(pathname,filename));
[a,b]=ridgefreq_g(im,32,5,5,15);% compute frequency image
% [fb,ang1]=gabor_bank(8,4,4,b);
orient=thetaij(im); % orientation image 0 to pi.
mask=seg_fp_image_fun(im);
% [rows,cols]=size(im);
blksze=25;
orient1=padarray(orient,[12 12],0,'both');
im1=double(padarray(im,[12 12],0,'both'));
[rows,cols]=size(orient1);
out=zeros(rows,cols);
for r=13:rows-blksze
for c=13:cols-blksze
total=0;
gb=gabor_fn(4,4,orient1(r,c),b);% b is the median frequency of image
for i=-12:12
for j=-12:12
total=total+gb(i+13,j+13).*im1(r-i,c-j);
end
end
out(r,c)=total;%total
[r ,c]
end
end
***************************
function gb=gabor_fn(sigma_x,sigma_y,theta,freq)
% Sigma_x and Sigma_y must be integers
% For fingerprint enhancement, sigma_x and sigma_y should be the half of the wave length
% (1/(2*Freq)
sz_x=6*sigma_x+1;
sz_y=6*sigma_y+1;
[x y]=meshgrid(-fix(sz_x/2):fix(sz_x/2),fix(-sz_y/2):fix(sz_y/2));
% Rotation
x_theta=x*cos(theta)+y*sin(theta);
y_theta=-x*sin(theta)+y*cos(theta);
gb=exp(-.5*(x_theta.^2/sigma_x^2+y_theta.^2/sigma_y^2)).*cos(2*pi*freq*x_theta);
end