-
Notifications
You must be signed in to change notification settings - Fork 1
/
score.m
33 lines (31 loc) · 999 Bytes
/
score.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
% TRANSFORMED MINUTIAE MATCHING SCORE
%
% Usage: [ si ] = score( T1, T2 );
%
% Argument: T1 - First Transformed Minutiae
% T2 - Second Transformed Minutiae
%
% Returns: sm - Similarity Measure
function [ sm ] = score( T1, T2 )
Count1=size(T1,1); Count2=size(T2,1); n=0;
T=15; %Threshold for distance
TT=14; %Threshold for theta
for i=1:Count1
Found=0; j=1;
while (Found==0) && (j<=Count2)
dx=(T1(i,1)-T2(j,1));
dy=(T1(i,2)-T2(j,2));
d=sqrt(dx^2+dy^2); %Euclidean Distance between T1(i) & T2(i)
if d<T
DTheta=abs(T1(i,3)-T2(j,3))*180/pi;
DTheta=min(DTheta,360-DTheta);
if DTheta<TT
n=n+1; %Increase Score
Found=1;
end
end
j=j+1;
end
end
sm=sqrt(n^2/(Count1*Count2)); %Similarity Index
end