1 / 4
文档名称:

pca人脸识别.docx

格式:docx   大小:18KB   页数:4页
下载后只包含 1 个 DOCX 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

pca人脸识别.docx

上传人:xunlai783 2018/1/13 文件大小:18 KB

下载得到文件列表

pca人脸识别.docx

相关文档

文档介绍

文档介绍:function T = CreateDatabase(TrainDatabasePath)
% Align a set of face images (the training set T1, T2, ... , TM )一系列人脸图像
%
% Description: This function reshapes all 2D images of the training database
% into 1D column vectors. Then, it puts these 1D column vectors in a row to 变成一维行向量
% construct 2D matrix 'T'.
% Argument:     TrainDatabasePath      - Path of the training database
% Returns:      T                      - A 2D matrix, containing all 1D image vectors.
%                                        Suppose all P images in the training database 
%                                        have the same size of MxN. So the length of 1D 
%                                        column vectors is MN and 'T' will be a MNxP 2D matrix.
%
% See also: STRCMP, STRCAT, RESHAPE
% Original version by Amir Hossein Omidvarnia, October 2007
%                     Email: ******@                  
%%%%%%%%%%%%%%%%%%%%%%%% File management
TrainFiles = dir(TrainDatabasePath);
Train_Number = 0;
for i = 1:size(TrainFiles,1)
    if not(strcmp(TrainFiles(i).name,'.')|strcmp(TrainFiles(i).name,'..')|strcmp(TrainFiles(i).name,''))
        Train_Number = Train_Number + 1; % Number of all images in the training database
    end
end
%%%%%%%%%%%%%%%%%%%%%%%% Construction of 2D matrix from 1D image vectors
T = [];
for i = 1 : Train_Number
    
    % I have c

最近更新