-
Notifications
You must be signed in to change notification settings - Fork 1
/
match.m
45 lines (43 loc) · 1.26 KB
/
match.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
34
35
36
37
38
39
40
41
42
43
44
45
% FINGERPRINT MATCHING SCORE
%
% Usage: [ S ] = match( M1, M2, display_flag );
%
% Argument: M1 - First Minutiae
% M2 - Second Minutiae
% display_flag
%
% Returns: S - Similarity Measure
function [ S ] = match( M1, M2, display_flag )
if nargin==2;
end %display_flag=0; end
M1=M1(M1(:,3)<1.2,:);
M2=M2(M2(:,3)<1.2,:);
count1=size(M1,1);
count2=size(M2,1);
bi=0; bj=0; ba=0; % Best i,j,alpha
S=0; % Best Similarity Score
for i=1:count1
T1=transform(M1,i);
for j=1:count2
if M1(i,3)==M2(j,3)
T2=transform(M2,j);
for a=0:1 %Alpha
T3=transform2(T2,a*pi/180);
sm=score(T1,T3);
if S<sm
S=sm;
bi=i; bj=j; ba=a;
end
end
end
end
end
% if display_flag==1
% figure, title(['Similarity Measure : ' num2str(S)]);
% T1=transform(M1,bi);
% T2=transform(M2,bj);
% T3=transform2(T2,ba*pi/180);
% plot_data(T1,1);
% plot_data(T3,2);
%end
end