-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdecision_and.m
More file actions
84 lines (76 loc) · 2.58 KB
/
decision_and.m
File metadata and controls
84 lines (76 loc) · 2.58 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
function decision_and
diary Status_decision_and.txt
pathname1= 'F:\combined\Testing';
%fid= fopen('output.txt','wt');
for e=1:20
for f=4:5
pathname=strcat(pathname1,'\Group',num2str(e),'_',num2str(f),'\')
filename=dir(pathname);
filename_size=size(filename,1);
for i=3:filename_size
[path name ext]=fileparts(filename(i).name);
if strcmp(ext,'.txt')==1
if strcmp(name(1),'t')==1
p_test=dlmread(strcat(pathname,'\',name,ext)) ;
elseif strcmp(name(1),'f')==1
f_test=dlmread(strcat(pathname,'\',name,ext));
elseif strcmp(name(1),'s')==1
match_mat=dlmread(strcat(pathname,'\',name,ext));
end
else
continue ;
end
end
train_pathname='F:\combined\Training';
p=0;
for l=1:20
for k=1:3
p=p+1;
t_path=strcat(train_pathname,'\Group',int2str(l),'_',int2str(k));
filename=dir(t_path);
filename_size=size(filename,1);
for i=3:filename_size
[path name ext]=fileparts(filename(i).name);
if strcmp(ext,'.txt')==1
if strcmp(name(1),'t')==1
p_train=dlmread(strcat(t_path,'\',name,ext));
elseif strcmp(name(1),'f')==1
f_train=dlmread(strcat(t_path,'\',name,ext));
end
else
continue ;
end
end
finger_score(p)=match_mat(p);
palmprint_score(p)=p_mat(p_train,p_test);
end
end
j=1;
for i=1:20
p_score(i)=(palmprint_score(j)+palmprint_score(j+1)+palmprint_score(j+2))/3 ;
f_score(i)=(finger_score(j)+finger_score(j+1)+finger_score(j+2))/3 ;
j=j+3;
end
[p_1 p_user]=max(p_score)
if p_user==e
s0=1;
else
s0=0;
end
[f_1 f_user]=max(f_score)
if f_user==e
s1=1;
else
s1=0;
end
rule_and=s0&&s1;
if (rule_and)
display('Genuine')
else
display('Imposter')
end
%rule_or=s0||s1;
end
end
diary off
end