• 大小: 14.85MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-06-18
  • 语言: Matlab
  • 标签: PCA  SVM  人脸识别  

资源简介

基于PCA与SVM的人脸识别系统,用matlab编写,我测试过了!

资源截图

代码片段和文件信息

function nClass = classify(newFacePath)
% 整个分类(识别)过程

display(‘ ‘);
display(‘ ‘);
display(‘识别开始...‘);

% 读入相关训练结果
display(‘载入训练参数...‘);
load(‘Mat/PCA.mat‘);
load(‘Mat/scaling.mat‘);
load(‘Mat/trainData.mat‘);
load(‘Mat/multiSVMTrain.mat‘);
display(‘..............................‘);

xNewFace = ReadAFace(newFacePath); % 读入一个测试样本
xNewFace = double(xNewFace);
xNewFace = xNewFace*W; % 经过pca变换降维
xNewFace = scaling(xNewFace1A0B0);


display(‘身份识别中...‘);
nClass = multiSVMClassify(xNewFace);
display(‘..............................‘);
display([‘身份识别结束,类别为:‘ num2str(nClass) ‘。‘]);


 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2011-10-12 15:22  chapter13\
     目录           0  2011-10-12 15:22  chapter13\FaceRec\
     目录           0  2011-10-12 15:22  chapter13\FaceRec\Data\
     目录           0  2011-10-12 15:22  chapter13\FaceRec\Data\ORL\
     文件        1579  2007-10-30 06:16  chapter13\FaceRec\Data\ORL\README
     目录           0  2011-10-12 15:22  chapter13\FaceRec\Data\ORL\s1\
     文件       10318  2007-10-30 06:16  chapter13\FaceRec\Data\ORL\s1\1.pgm
     文件       10318  2007-10-30 06:16  chapter13\FaceRec\Data\ORL\s1\10.pgm
     文件       10318  2007-10-30 06:16  chapter13\FaceRec\Data\ORL\s1\2.pgm
     文件       10318  2007-10-30 06:16  chapter13\FaceRec\Data\ORL\s1\3.pgm
     文件       10318  2007-10-30 06:16  chapter13\FaceRec\Data\ORL\s1\4.pgm
     文件       10318  2007-10-30 06:16  chapter13\FaceRec\Data\ORL\s1\5.pgm
     文件       10318  2007-10-30 06:16  chapter13\FaceRec\Data\ORL\s1\6.pgm
     文件       10318  2007-10-30 06:16  chapter13\FaceRec\Data\ORL\s1\7.pgm
     文件       10318  2007-10-30 06:16  chapter13\FaceRec\Data\ORL\s1\8.pgm
     文件       10318  2007-10-30 06:16  chapter13\FaceRec\Data\ORL\s1\9.pgm
     目录           0  2011-10-12 15:22  chapter13\FaceRec\Data\ORL\s10\
     文件       10318  2007-10-30 06:16  chapter13\FaceRec\Data\ORL\s10\1.pgm
     文件       10318  2007-10-30 06:16  chapter13\FaceRec\Data\ORL\s10\10.pgm
     文件       10318  2007-10-30 06:16  chapter13\FaceRec\Data\ORL\s10\2.pgm
     文件       10318  2007-10-30 06:16  chapter13\FaceRec\Data\ORL\s10\3.pgm
     文件       10318  2007-10-30 06:16  chapter13\FaceRec\Data\ORL\s10\4.pgm
     文件       10318  2007-10-30 06:16  chapter13\FaceRec\Data\ORL\s10\5.pgm
     文件       10318  2007-10-30 06:16  chapter13\FaceRec\Data\ORL\s10\6.pgm
     文件       10318  2007-10-30 06:16  chapter13\FaceRec\Data\ORL\s10\7.pgm
     文件       10318  2007-10-30 06:16  chapter13\FaceRec\Data\ORL\s10\8.pgm
     文件       10318  2007-10-30 06:16  chapter13\FaceRec\Data\ORL\s10\9.pgm
     目录           0  2011-10-12 15:22  chapter13\FaceRec\Data\ORL\s11\
     文件       10318  2007-10-30 06:16  chapter13\FaceRec\Data\ORL\s11\1.pgm
     文件       10318  2007-10-30 06:16  chapter13\FaceRec\Data\ORL\s11\10.pgm
     文件       10318  2007-10-30 06:16  chapter13\FaceRec\Data\ORL\s11\2.pgm
............此处省略459个文件信息

评论

共有 条评论