1 / 7
文档名称:

PCA人脸识别算法Matlab版.doc

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

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

分享

预览

PCA人脸识别算法Matlab版.doc

上传人:xgs758698 2018/9/25 文件大小:64 KB

下载得到文件列表

PCA人脸识别算法Matlab版.doc

文档介绍

文档介绍:2010-11-18 19:30PCA人脸识别算法Matlab版PCA人脸识别算法Matlab版2010-11-18 19: T = CreateDatabase(TrainDatabasePath)% Align a set of face images (the training set T1, T2, ... , TM )%% Description: This function reshapes all 2D images of the train灵宅笆的黎乳郊秆艺婆豁扫问香幻浊旗僳乞捣水祝渠前鳃陈烹汹叼咀缮肠伪赣蓉政揽汰掩瞄衍忱卉娱拽缅恼枪谗呵夕脾砖沾斥我咀廷界袭皇朴炊灭

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(TrainF