• 大小: 5.9MB
    文件类型: .zip
    金币: 2
    下载: 1 次
    发布日期: 2021-04-10
  • 语言: Matlab
  • 标签: LDA  人脸识别  

资源简介

原创,测试识别率0.99,重构图像完全比不上PCA,但能满足分类要求。可下载后直接运行,并保存特征向量数据

资源截图

代码片段和文件信息

%输入图像为image0
%输入主元向量为primary_vector
%分别显示前primary_vector_num个主元分量图像的和
%图像尺寸image_rowsimage_cols
function display_pca_face(image0primary_vectorprimary_vector_numimage_rowsimage_cols)
primary_face_component=primary_vector‘*image0;%在前n个基向量上的分量
%显示各个主分量
figure
for i=1:50
    temp_face=uint8(reshape(primary_face_component(i)*primary_vector(:i)[image_rows image_cols]));
    subplot(69i)
    imshow(temp_face);
end
%显示原图像
figure
temp_face=uint8(reshape(image0(:1)[image_rows image_cols]));
subplot(691)
imshow(temp_face);
%显示各主元重构图像
j=0;
for i=primary_vector_num  
    temp_face1=primary_vector(:1:i)*primary_face_component(1:i);%显示主元和
    temp_face=uint8(reshape(temp_face1[image_rows image_cols]));
    j=j+1;
    subplot(45j)
    imshow(temp_face);
end
end

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-05-11 14:00  LDA-facerecognition-hcf\
     文件        1733  2018-05-10 18:17  LDA-facerecognition-hcf\LDA.m
     目录           0  2018-05-08 14:06  LDA-facerecognition-hcf\ORL\
     文件     1440768  2018-04-10 14:58  LDA-facerecognition-hcf\ORL\Thumbs.db
     文件       11382  2011-12-26 18:43  LDA-facerecognition-hcf\ORL\s10_1.bmp
     文件       11382  2011-12-26 18:43  LDA-facerecognition-hcf\ORL\s10_10.bmp
     文件       11382  2011-12-26 18:43  LDA-facerecognition-hcf\ORL\s10_2.bmp
     文件       11382  2011-12-26 18:43  LDA-facerecognition-hcf\ORL\s10_3.bmp
     文件       11382  2011-12-26 18:43  LDA-facerecognition-hcf\ORL\s10_4.bmp
     文件       11382  2011-12-26 18:43  LDA-facerecognition-hcf\ORL\s10_5.bmp
     文件       11382  2011-12-26 18:43  LDA-facerecognition-hcf\ORL\s10_6.bmp
     文件       11382  2011-12-26 18:43  LDA-facerecognition-hcf\ORL\s10_7.bmp
     文件       11382  2011-12-26 18:43  LDA-facerecognition-hcf\ORL\s10_8.bmp
     文件       11382  2011-12-26 18:43  LDA-facerecognition-hcf\ORL\s10_9.bmp
     文件       11382  2011-12-26 18:43  LDA-facerecognition-hcf\ORL\s11_1.bmp
     文件       11382  2011-12-26 18:43  LDA-facerecognition-hcf\ORL\s11_10.bmp
     文件       11382  2011-12-26 18:43  LDA-facerecognition-hcf\ORL\s11_2.bmp
     文件       11382  2011-12-26 18:43  LDA-facerecognition-hcf\ORL\s11_3.bmp
     文件       11382  2011-12-26 18:43  LDA-facerecognition-hcf\ORL\s11_4.bmp
     文件       11382  2011-12-26 18:43  LDA-facerecognition-hcf\ORL\s11_5.bmp
     文件       11382  2011-12-26 18:43  LDA-facerecognition-hcf\ORL\s11_6.bmp
     文件       11382  2011-12-26 18:43  LDA-facerecognition-hcf\ORL\s11_7.bmp
     文件       11382  2011-12-26 18:43  LDA-facerecognition-hcf\ORL\s11_8.bmp
     文件       11382  2011-12-26 18:43  LDA-facerecognition-hcf\ORL\s11_9.bmp
     文件       11382  2011-12-26 18:43  LDA-facerecognition-hcf\ORL\s12_1.bmp
     文件       11382  2011-12-26 18:43  LDA-facerecognition-hcf\ORL\s12_10.bmp
     文件       11382  2011-12-26 18:43  LDA-facerecognition-hcf\ORL\s12_2.bmp
     文件       11382  2011-12-26 18:43  LDA-facerecognition-hcf\ORL\s12_3.bmp
     文件       11382  2011-12-26 18:43  LDA-facerecognition-hcf\ORL\s12_4.bmp
     文件       11382  2011-12-26 18:43  LDA-facerecognition-hcf\ORL\s12_5.bmp
     文件       11382  2011-12-26 18:43  LDA-facerecognition-hcf\ORL\s12_6.bmp
............此处省略376个文件信息

评论

共有 条评论