资源简介
包含测试样本和训练样本,matlab程序,用lda实现的人脸识别实例,程序注释很清晰,有助于理解算法过程
代码片段和文件信息
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‘. Each column of ‘T‘ is a training image which has been reshaped into a 1D vector.
% Also P is the total number of MxN training images and C is the number of
% classes.
%
%
% Argument: TrainDatabasePath - Path of the training database
%
% Returns: T - A 2D matrix containing all 1D image vectors.
% 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: aomidvar@ece.ut.ac.ir
%%%%%%%%%%%%%%%%%%%%%%%% File management
TrainFiles = dir(TrainDatabasePath);
Train_Number = 0;
for i = 1:size(TrainFiles1)
if not(strcmp(TrainFiles(i).name‘.‘)|strcmp(TrainFiles(i).name‘..‘)|strcmp(TrainFiles(i).name‘Thumbs.db‘))
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 chosen the name of each image in databases as a corresponding
% number. However it is not mandatory!
str = int2str(i);
str = strcat(‘\‘str‘.jpg‘);
str = strcat(TrainDatabasePathstr);
img = imread(str);
img = rgb2gray(img);
[irow icol] = size(img);
temp = reshape(img‘irow*icol1); % Reshaping 2D images into 1D image vectors
T = [T temp]; % ‘T‘ grows after each turn
end
T = double(T);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1892 2007-10-21 14:14 FLD_ba
文件 1333 2007-10-27 09:51 FLD_ba
文件 4602 2007-10-27 09:47 FLD_ba
文件 1842 2007-10-21 14:01 FLD_ba
文件 2205 2007-10-21 14:09 FLD_ba
目录 0 2007-10-29 08:12 FLD_ba
文件 6264 1994-10-05 14:21 FLD_ba
文件 6852 1994-10-05 13:49 FLD_ba
文件 6007 1994-10-05 15:21 FLD_ba
文件 5680 1994-10-05 15:14 FLD_ba
文件 6525 1994-10-05 14:53 FLD_ba
文件 4341 1994-10-05 15:39 FLD_ba
文件 5876 1994-10-05 14:11 FLD_ba
文件 4352 1994-10-05 15:09 FLD_ba
文件 6725 1994-10-05 15:19 FLD_ba
文件 5570 1994-10-05 14:47 FLD_ba
目录 0 2007-10-29 08:12 FLD_ba
文件 6391 1994-10-05 14:21 FLD_ba
文件 4223 1994-10-05 15:38 FLD_ba
文件 5967 1994-10-05 14:10 FLD_ba
文件 5870 1994-10-05 14:11 FLD_ba
文件 4363 1994-10-05 15:09 FLD_ba
文件 4360 1994-10-05 15:08 FLD_ba
文件 6681 1994-10-05 15:19 FLD_ba
文件 6693 1994-10-05 15:19 FLD_ba
文件 5417 1994-10-05 14:47 FLD_ba
文件 5448 1994-10-05 14:47 FLD_ba
文件 6827 1994-10-05 13:49 FLD_ba
文件 6219 1994-10-05 14:20 FLD_ba
文件 6746 1994-10-05 13:48 FLD_ba
文件 6046 1994-10-05 15:20 FLD_ba
............此处省略9个文件信息
相关资源
- matlab人脸识别217995
- PCA人脸识别Eigenface特征脸Matlab
- 基于KL变换的人脸识别 matlab
- 基于Matlab行人检测系统
- Face Recognition with KNN in MATLAB(12017108
- 人脸识别yale数据.mat格式
- 基于PCA和SVM的人脸识别.zip
- 基于SVD分解和最近邻算法的高维人脸
- MATLAB人脸识别考勤系统摄像头,记录
- PCA算法实现人脸识别基于matlab GUI界面
- 基于matlab的人脸识别271850
- 2D2DPCA人脸识别matlab代码/ORL库
- PCA人脸识别MATLAB代码/ORL库
- matlab结课大作业人脸识别是否戴口罩
- PCA人脸识别论文附MATLAB程序
- 应用matlab计算人脸识别率
- 个人收集的人脸识别经典算法源码
- 基于K-L变换的人脸识别系统
- 基于matlab的人脸识别源代码235297
- 基于PCA使用Yale人脸数据库的人脸识别
- 降维技术matlab工具箱
- 人脸识别系统
- 模式识别课程作业 基于svm的人脸识别
- SRC人脸识别程序MATLAB
- 1维的简单LDA和2维LDA人脸识别的matla
- 基于MATLAB的人脸识别
- 人脸识别及匹配的matlab实现
- matlab基于BP神经网络的人脸识别13953
- LDA代码实现Matlab版
- 基于BP神经网络的人脸识别源码matla
评论
共有 条评论