资源简介
本程序是根据经典的人脸PCA识别程序改进的,用于掌纹识别。该代码是用matlab编写的,解释详细,是学习PCA特征提取的很好的源代码。
代码片段和文件信息
function T = CreateDatabase(TrainDatabasePath)
% Align a set of palm print 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‘.bmp‘);
str = strcat(TrainDatabasePathstr);
[imgmap]=imread(str);
img = ind2gray(imgmap);
[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
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1879 2011-09-01 21:00 palmprint PCA\CreateDataba
文件 2936 2011-09-01 12:47 palmprint PCA\EigenpalmCore.m
文件 1304 2011-09-01 20:53 palmprint PCA\example.m
文件 2541 2011-09-01 21:15 palmprint PCA\Recognition.m
文件 3240 2011-09-01 18:31 palmprint PCA\TestDataba
文件 3240 2011-09-01 20:21 palmprint PCA\TestDataba
文件 3240 2011-09-01 20:22 palmprint PCA\TestDataba
文件 3240 2011-09-01 20:22 palmprint PCA\TestDataba
文件 3240 2011-09-01 20:22 palmprint PCA\TestDataba
文件 3240 2011-09-01 20:23 palmprint PCA\TestDataba
文件 3240 2011-09-01 18:31 palmprint PCA\TrainDataba
文件 3240 2011-09-01 20:21 palmprint PCA\TrainDataba
文件 3240 2011-09-01 20:22 palmprint PCA\TrainDataba
文件 3240 2011-09-01 20:22 palmprint PCA\TrainDataba
文件 3240 2011-09-01 20:22 palmprint PCA\TrainDataba
文件 3240 2011-09-01 20:23 palmprint PCA\TrainDataba
文件 202752 2011-09-01 23:23 palmprint PCA\新建 Microsoft Excel 工作表.xls
目录 0 2011-10-23 11:42 palmprint PCA\TestDataba
目录 0 2011-10-23 11:42 palmprint PCA\TrainDataba
目录 0 2011-10-23 11:42 palmprint PCA
----------- --------- ---------- ----- ----
250292 20
相关资源
- lbp特征提取算法
- 简单图像显著性特征提取matlab代码
- 基于Matlab实现的指纹图像细节特征提
- DPCA 程序编写
- 六种常用纹理特征提取方法MATLAB.rar
- 基于MATLAB的LBP图片特征提取算法,人
- 图像的RGB特征提取代码
- 提取语音特征短时能量,平均幅度、
- MATLAB实现HOG特征提取
- 颜色特征提取程序
- 图像显著性特征提取算法
- 基于harris角点特征提取的matlab图像拼
- PCA-SIFT 源代码 matlab
- Gabor滤波特征提取方法 matlab程序
- 颜色特征提取matlab
- MATLAB人脸识别PCALDAKPCABP,可视化界面
- HOG特征的MATLAB代码
- 脉搏信号特征提取
- 利用Gabor滤波器实现的MATLAB掌纹识别系
- TwoDPCA用matlab实现的2dpca人脸识别程序
- 用于图像识别的2DPCA算法程序matlab
- Matlab GUI实现的指纹特征提取与编辑
- l利用matlab进行图像纹理特征提取
- matlab特征点提取
- KPCA MATLAB程序,提供4种核函数,根据
- PCA Matlab源码
- 手写数字的特征提取
- KPCA的MATLAB代码
- 基于matlab的人脸识别算法(PCA
- 用于特征提取的matlab程序
评论
共有 条评论