資源簡介
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個文件信息
評論
共有 條評論