• 大小: 3.32MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-10-26
  • 语言: Matlab
  • 标签: SRC  

资源简介

SRC在人脸识别中的MATLAB程序实现,可直接运行

资源截图

代码片段和文件信息

function [accuracyxpr]=computaccuracy(trainsampleclassnumtrain_labeltestsampletest_label)
test_tol=size(testsample2);
train_tol=size(trainsample2);
pre_label=zeros(1test_tol);
h = waitbar(0‘Please wait...‘);
for i=1:test_tol
    xp = SolveHomotopy_CBM_std(trainsample testsample(:i)‘lambda‘ 0.01);
    for j=1:classnum
        mmu=zeros(train_tol1);
        ind=(j==train_label);
        mmu(ind)=xp(ind);
        r(j)=norm(testsample(:i)-trainsample*mmu);
    end
    [tempindex]=min(r);
    pre_label(i)=index;
    % computations take place here
    per = i / test_tol;
    waitbar(per h sprintf(‘%2.0f%%‘per*100))
end
close(h)
accuracy=sum(pre_label==test_label)/test_tol;

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       1103  2014-08-31 09:59  main.m

     文件       1031  2014-08-03 10:02  my_pca.m

     文件        961  2014-05-27 20:30  pca.m

     文件        661  2014-08-31 09:50  readsample.m

     文件      14162  2014-05-26 13:25  SolveHomotopy_CBM_std.m

     文件      11382  2011-12-26 18:43  ORL\s10_1.bmp

     文件      11382  2011-12-26 18:43  ORL\s10_10.bmp

     文件      11382  2011-12-26 18:43  ORL\s10_2.bmp

     文件      11382  2011-12-26 18:43  ORL\s10_3.bmp

     文件      11382  2011-12-26 18:43  ORL\s10_4.bmp

     文件      11382  2011-12-26 18:43  ORL\s10_5.bmp

     文件      11382  2011-12-26 18:43  ORL\s10_6.bmp

     文件      11382  2011-12-26 18:43  ORL\s10_7.bmp

     文件      11382  2011-12-26 18:43  ORL\s10_8.bmp

     文件      11382  2011-12-26 18:43  ORL\s10_9.bmp

     文件      11382  2011-12-26 18:43  ORL\s11_1.bmp

     文件      11382  2011-12-26 18:43  ORL\s11_10.bmp

     文件      11382  2011-12-26 18:43  ORL\s11_2.bmp

     文件      11382  2011-12-26 18:43  ORL\s11_3.bmp

     文件      11382  2011-12-26 18:43  ORL\s11_4.bmp

     文件      11382  2011-12-26 18:43  ORL\s11_5.bmp

     文件      11382  2011-12-26 18:43  ORL\s11_6.bmp

     文件      11382  2011-12-26 18:43  ORL\s11_7.bmp

     文件      11382  2011-12-26 18:43  ORL\s11_8.bmp

     文件      11382  2011-12-26 18:43  ORL\s11_9.bmp

     文件      11382  2011-12-26 18:43  ORL\s12_1.bmp

     文件      11382  2011-12-26 18:43  ORL\s12_10.bmp

     文件      11382  2011-12-26 18:43  ORL\s12_2.bmp

     文件      11382  2011-12-26 18:43  ORL\s12_3.bmp

     文件      11382  2011-12-26 18:43  ORL\s12_4.bmp

............此处省略381个文件信息

评论

共有 条评论