clc;
NOP =5;
IPP=4;
total=10;
Feature_Size=4096;
%Path = 'D:\Iris\rangaswamy\DB3_A\';
Path = 'C:\Users\Reddy\Desktop\svm\orl_faces\';
total=NOP*IPP;
tstimg=20;
tic
[out] = load_databasefsobel(NOP,IPP,total,Feature_Size,Path);
disp('Database loaded');
toc
tic
[out1] = loadtestdataface(tstimg,Feature_Size,Path);
disp('testdata loaded');
toc
tic
t=1;
for threshold=0:0.01:0.12
threshold
match=0;
mismatch=0;
FRR=0;
for i=1:NOP
% f = zeros(1,total);
v4=out1(:,i);
for j=1:total
v5=out(:,j);
h=[v4';v5'];
% f(1,j)= pdist(h);
y3(:,j)=pdist(h)/10000;
end
% f = f/1000;
[mindist,location]=min(y3);
person_number=ceil(location/IPP);
if person_number==0
person_number=person_number+1;
end
if(mindist<threshold)
if(person_number==i)
match=match+1;
else
mismatch=mismatch+1;
end
else
FRR=FRR+1;
% fprintf('%d\n',i);
end
end
FAR=0;
mismatch1=0;
for i=NOP+1:tstimg
% f = zeros(1,total);
v4=out1(:,i);
for j=1:total
v5=out(:,j);
h=[v4';v5'];
% f(1,i)= pdist(h);
y3(:,j)=pdist(h)/10000;
end
% f=f/1000;
[mindist,location]=min(y3);
person_number=ceil(location/IPP);
if person_number==0
person_number=person_number+1;
end
if(mindist>threshold)
mismatch1=mismatch1+1;
else
FAR=FAR+1;
end
end
TSR=(match/NOP)*100;
TSR
match
FRR
FAR
TSRarray(:,t)=(match/NOP);
FARarray(:,t)=(FAR/(tstimg-NOP));
FRRarray(:,t)=(FRR/NOP);
thresholdarray(:,t)=threshold;
tsrarray(:,t)=TSR;
t=t+1;
end
plot(thresholdarray,FRRarray,'rs-',thresholdarray,FARarray,'g*-');
plot(thresholdarray,FRRarray,'rs-',thresholdarray,FARarray,'g*-',thresholdarray,TSRarray,'b*-');
grid on;
legend('frr','far');
title('FAR AND FRR');
xlabel('Threshold--->');
ylabel('FAR and FRR and TSR');
figure,plot(FRRarray,FARarray);
grid on;
legend('frr','far');
title('FAR v/s FRR');
xlabel('FAR------>');
ylabel('FRR------>');
toc
sobelmain.zip_The Main
版权申诉
56 浏览量
2022-07-15
18:19:27
上传
评论
收藏 927B ZIP 举报
![avatar](https://profile-avatar.csdnimg.cn/5f02f331e1ea4222a10b21da48ddddbe_weixin_42651748.jpg!1)
JonSco
- 粉丝: 77
- 资源: 1万+
最新资源
- 优先编码器除法电微分运算电路 全加器函数发生电路等电路经典Multisim仿真实验源文件合集(25个).zip
- 2331308JS课堂案例.zip
- STM32H750VBT6单片机最小系统开发板AD设计硬件(原理图+PCB+3D封装库)工程文件.zip
- 基于74LS161+ 74LS192芯片实现倒计时定时器Multisim仿真源文件,Multisim10以上版本可打开运行
- 科大讯飞语音引擎 jar包 demo,科大讯飞语音合成引擎3.0,支持4.0系统以上,文字转语音输出.zip
- Java架构面试笔试专题资料及经验(含答案)SpringBoot面试Linux面试专题及答案 合集.zip
- 头歌c语言实验答案tion-model-for-ne开发笔记
- docker配置使用-model-for-networK开发demo
- docker配置使用vaWeb-mas笔记
- c语言连接两个字符串-mas开发笔记
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback-tip](https://img-home.csdnimg.cn/images/20220527035111.png)