Orientation Estimation
Short Description
Download Orientation Estimation...
Description
There is many methods to Detect the singularities in a fingerprint image the one I use is the following: 1)Compute the orinetation Fields Estimation(Directional Image). 2)Calculate the poincare Index method to detect singular points. 3)and finally, based on the poinacre Index result we classify the finger print image. The problem is the entry of the poincare Index algorithm is the DIRECTIONNAL IMAGE. The orientation field of a fingerprint image defines the local orientation of the ridges contained in the fingerprint. The steps of the algorithm that I used to compute the directional field is based on the Raymon thai Document.2.2.3 Orientation estimation. Thank You a Lot. ---------- Post added at 22:03 ---------- Previous post was at 21:56 ----------
This is the Matlab code for the Orientation Estimation; imwrite(img,'image.bmp','bmp'); %img is the squelittized Image. image=imread('image.bmp'); [w,h] = size(image); direct = zeros(w,h); W = 16; sum_value = 1; bg_certainty = 0; blockIndex = zeros(ceil(w/W),ceil(h/W)); %directionIndex = zeros(ceil(w/W),ceil(h/W)); times_value = 0; minus_value = 0; center = []; %Note that the image coordinate system is %x axis towards bottom and y axis towards right filter_gradient = fspecial('sobel'); %to get x gradient Gx = filter2(filter_gradient,o);
%to get y gradient filter_gradient = transpose(filter_gradient); Gy = filter2(filter_gradient,o); g1=Gx.*Gy; g2=(Gy-Gx).*(Gy+Gx); %gy²-gx² g3 = (Gx.*Gx) + (Gy.*Gy); for i=1:W:w for j=1:W:h if j+W-1 < h && i+W-1 < w times_value = sum(sum(g1(i:i+W-1, j:j+W-1))); minus_value = sum(sum(g2(i:i+W-1, j:j+W-1))); sum_value = sum(sum(g3(i:i+W-1, j:j+W-1))); if sum_value ~= 0 && times_value ~=0 bg_certainty = (times_value*times_value + minus_value*minus_value)/ (W*W*sum_value); if bg_certainty > 0.05 blockIndex(ceil(i/W),ceil(j/W)) = 1; %tan_value = atan2(minus_value,2*times_value); theta1 = pi/2+ atan2(2*times_value,minus_value)/2; %now the theta is within [0,pi] theta2=2*theta1; Oy = sin(theta2); Ox=cos(theta2); f = fspecial('gaussian'); cos2theta = filter2(f,Ox); % Smoothed sine and cosine of sin2theta = filter2(f,Oy); theta = atan2(sin2theta,cos2theta)/2;
%center = [center;[round(i + (W-1)/2),round(j + (W-1)/2),theta,bg_certainty]]; center = [center;[round(i + (W-1)/2),round(j + (W-1)/2),theta]]; end; end; end; end; end;
figure;imagesc(direct);title('Orientation Field'); hold on [u,v] = pol2cart(center(:,3),8); quiver(center(:,2),center(:,1),u,v,0.3,'r'); % quiver(x,y,px,py)trace les vecteurs gradient(px,py) en chaque pt (x,y) colormap Gray; hold off;
View more...
Comments