资源简介
资源给出程序的训练集、测试集以及matlab程序,给出说明文档和程序运行视频。

代码片段和文件信息
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: 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 (200*28020)
end
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2015-02-17 09:36 0PCA_ba
文件 1877 2008-04-30 16:36 0PCA_ba
文件 3319 2013-10-08 09:26 0PCA_ba
文件 504464 2014-10-12 14:08 0PCA_ba
文件 539921 2014-10-12 14:02 0PCA_ba
文件 2511 2013-10-08 09:36 0PCA_ba
文件 2784 2013-10-08 12:16 0PCA_ba
目录 0 2015-02-17 10:42 0PCA_ba
文件 6264 1994-10-05 14:21 0PCA_ba
文件 6852 1994-10-05 13:49 0PCA_ba
文件 6007 1994-10-05 15:21 0PCA_ba
文件 5680 2008-07-01 23:48 0PCA_ba
文件 6525 1994-10-05 14:53 0PCA_ba
文件 4341 1994-10-05 15:39 0PCA_ba
文件 5876 1994-10-05 14:11 0PCA_ba
文件 4352 1994-10-05 15:09 0PCA_ba
文件 6725 1994-10-05 15:19 0PCA_ba
文件 5570 1994-10-05 14:47 0PCA_ba
文件 43520 2009-07-22 19:04 0PCA_ba
目录 0 2015-02-17 10:42 0PCA_ba
文件 6391 1994-10-05 14:21 0PCA_ba
文件 4223 1994-10-05 15:38 0PCA_ba
文件 5967 1994-10-05 14:10 0PCA_ba
文件 5870 1994-10-05 14:11 0PCA_ba
文件 4363 1994-10-05 15:09 0PCA_ba
文件 4360 1994-10-05 15:08 0PCA_ba
文件 6681 1994-10-05 15:19 0PCA_ba
文件 6693 1994-10-05 15:19 0PCA_ba
文件 5417 1994-10-05 14:47 0PCA_ba
文件 5448 1994-10-05 14:47 0PCA_ba
文件 6827 1994-10-05 13:49 0PCA_ba
............此处省略13个文件信息
- 上一篇:SOPC简单跑马灯 LCD液晶显示器
- 下一篇:matlab中文手册
相关资源
- matlab_OFDM调制解调(来自剑桥大学)
- Matlab路面裂缝识别69319
- 高灵敏度GPS接收机MATLAB仿真,附捕获
- 基于MATLAB的质点弹道计算与外弹道优
- 阵列天线的matlab仿真
- MATLAB 经典程序源代码大全
- MATLAB小波软阈值去噪代码33473
- 天线阵的波束形成在MATLAB仿真程序及
- 非线性SVM算法-matlab实现
- 《MATLAB 智能算法超级学习手册》-程序
- 组合导航matlab程序
- 读取txt文件内容matlab代码实现
- Matlab实现基于相关的模板匹配程序
- matlab优化工具箱讲解
- 基于MATLAB的快速傅里叶变换
- 光纤传输中的分布傅立叶算法matlab实
- 基于matlab的图像处理源程序
- matlab 椭圆拟合程序
- 算术编码解码matlab源代码
- optical_flow 光流法 matlab 实现程序
- 引导图像滤波器 Matlab实现
- 分形几何中一些经典图形的Matlab画法
- OFDM系统MATLAB仿真代码
- SVM工具箱(matlab中运行)
- 图像小波变换MatLab源代码
- LU分解的MATLAB实现
- 冈萨雷斯数字图像处理matlab版(第三
- 替代数据法的matlab程序
- 用matlab实现的多站定位系统性能仿真
- 通过不同方法进行粗糙集属性约简m
评论
共有 条评论