1 / 7
文档名称:

PCA人脸识别算法Matlab版.doc

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

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

分享

预览

PCA人脸识别算法Matlab版.doc

上传人:amilus 2022/2/7 文件大小:262 KB

下载得到文件列表

PCA人脸识别算法Matlab版.doc

相关文档

文档介绍

文档介绍:PCA 人脸识别算法 Matlab 版
2010-11-18 19:30
数据准备
function T = CreateDatabase(TrainDatabasePath)
Align a set ofaces.
%
% Description:
This function
gets a 2D
matrix,
containing
all
training
image
vectors
% and
returns 3 outputs
which
are
extracted
from
training
database.
%
% Argument:
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
M*N
and 'T' will
be
a MNx P
2D matrix.
%
% Returns:
m
- (M*Nx1)
Mean
of
the
training
database
%
Eigenfaces
- (M*Nx(P-1))
Eigen
vectors
of
the
covariance
matrix
of the training
database
%
A
- (M*NxP)
Matrix
of centered
image
vectors
%
% See
also:
EIG
% Original
version
by
Amir
Hossein
Omidvarnia,
October
2007
%
Email:
******@
%%%%%%%%%%%%%%%%%%%%%%%% Calculating the mean image
m = mean(T,2); % Computing the average face image m = (1/P)*s