资源简介
一个用Matlab写成的pca程序,条理清晰,很容易掌握。对大家一定会有用。
代码片段和文件信息
function distMat = createDistMat (proj metric)
%
% PROTOTYPE
% function distMat = createDistMat (proj metric)
%
% USAGE EXAMPLE(S)
% pcaDistMatCos = createDistMat(pcaProj ‘COS‘);
%
% GENERAL DEscriptION
% Calculates distance matrix. Creates a matrix of distances between any
% pair of images (vectors) given the metric. L1 (City Block) L2
% (Euclidean) and COS (Cosine Angle) are supported. Once the distance
% matrix for a given metric is calculated feret tests (with specific
% gallery and probe test sets) or some other tests (e.g. various permutation
% tests) are easily implemented.
%
% REFERENCES
% -
%
% INPUTS:
% proj - projection matrix (all images projected onto a subspace)
% if using pca.m give pcaProj as the input
% metric - metric (L1 L2 MAH and COS supported)
%
% OUTPUTS:
% distMat - distance matrix where (ij) element is the distance between
% i-th and j-th image projection given the metric class
% double size (number of images)^2
%
% NOTES / COMMENTS
% * Developed using Matlab 7
%
% REVISION HISTORY
% -
%
% RELATED FUNCTIONS (SEE ALSO)
% pdist (Matlab) squareform (Matlab) feret pca
%
% ABOUT
% Created: 03 Sep 2005
% Last Update: -
% Revision: 1.0
%
% AUTHOR: Kresimir Delac
% mailto: kdelac@ieee.org
% URL: http://www.vcl.fer.hr/kdelac
%
% WHEN PUBLISHING A PAPER AS A RESULT OF RESEARCH CONDUCTED BY USING THIS CODE
% OR ANY PART OF IT MAKE A REFERENCE TO THE FOLLOWING PAPER:
% Delac K. Grgic M. Grgic S. Independent Comparative Study of PCA ICA and LDA
% on the FERET Data Set International Journal of Imaging Systems and Technology
% Vol. 15 Issue 5 2006 pp. 252-260
%
% Memory allocation
distMat = zeros(max(size(proj)));
switch (metric)
case ‘L1‘
distMat = pdist(proj‘ ‘cityblock‘);
case ‘L2‘
distMat = pdist(proj‘ ‘euclidean‘);
case ‘COS‘
distMat = pdist(proj‘ ‘cosine‘);
otherwise
error(‘%s metric not supported.‘ metric);
end; % switch (metric) ends here
distMat = squareform(distMat);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 33870 2009-08-20 10:38 pca-matlab\19854793pca-matlab-code.zip
文件 854 2009-08-21 17:09 pca-matlab\21840268pca.rar
文件 475136 2009-08-13 13:17 pca-matlab\3.5.ppt
文件 492 2000-05-17 20:47 pca-matlab\31767680pca_matlab\pca_matlab\classif.m
文件 487 2000-05-17 21:45 pca-matlab\31767680pca_matlab\pca_matlab\loadpop.m
文件 1239 2000-05-17 21:46 pca-matlab\31767680pca_matlab\pca_matlab\makebasis.m
文件 3391 2000-05-17 21:52 pca-matlab\31767680pca_matlab\pca_matlab\pca.m
文件 1989 2000-05-18 12:55 pca-matlab\31767680pca_matlab\pca_matlab\readme.1st
文件 788 2000-05-17 21:54 pca-matlab\31767680pca_matlab\pca_matlab\resize.m
文件 487 2000-05-17 15:36 pca-matlab\31767680pca_matlab\pca_matlab\showimg.m
文件 619 2000-05-17 21:56 pca-matlab\31767680pca_matlab\pca_matlab\success.m
文件 2162 2007-01-06 23:46 pca-matlab\createDistMat.m
文件 2979 2007-01-06 23:42 pca-matlab\dup1.mat
文件 1101 2007-01-06 23:42 pca-matlab\dup2.mat
文件 4177 2007-01-06 23:42 pca-matlab\fb.mat
文件 784 2007-01-06 23:42 pca-matlab\fc.mat
文件 5590 2007-01-06 23:46 pca-matlab\feret.m
文件 4169 2007-01-06 23:42 pca-matlab\feretGallery.mat
文件 14686 2007-01-06 23:43 pca-matlab\listAll.mat
文件 5476 2007-01-06 23:46 pca-matlab\pca.m
文件 2955 2008-03-14 08:45 pca-matlab\PCA.txt
文件 96768 2009-08-21 15:44 pca-matlab\pca算法总结.doc
文件 2510 2007-01-06 23:51 pca-matlab\Readme.txt
文件 2980 2007-01-06 23:47 pca-matlab\trainList.mat
文件 119963 2009-08-13 10:44 pca-matlab\tutorial on PCA.pdf
..A..H. 162 2009-08-13 10:41 pca-matlab\~$ca算法总结.doc
目录 0 2009-08-21 15:42 pca-matlab\31767680pca_matlab\pca_matlab
目录 0 2009-08-21 15:42 pca-matlab\31767680pca_matlab
目录 0 2009-08-21 17:12 pca-matlab
----------- --------- ---------- ----- ----
............此处省略3个文件信息
- 上一篇:MATLAB误码率与信噪比关系图
- 下一篇:利用聚类技术实现纹理图像分割
相关资源
- CroppedYale人脸数据降维 MATLAB
- KPCA+SVM源代码
- PCA人脸识别定位matlab代码
- 基于matlab,gui的人脸识别(PCA)
- 2dpca的matlab源代码 rar
- 基于PCA及SVM的人脸识别
- exact_alm_rpca
- matlab实现基于PCA的人脸识别算法
- KPCA(经典的MATLAB程序)
- pca与KL变换的综合matlab实现代码
- RPCA 源码 matlab yi Ma
- 基于PCA法的故障检测含matlab代码
- 图像融合算法
- PCA和IHS图像融合
- 国外资源 基于PCA的人脸识别matlab代码
- 利用PCA降维方法处理高光谱图像matl
- KPCA故障诊断matlab实现182088
- 基于PCA的图像压缩Matlab代码
- MATLAB人脸识别PCALDAKPCABP,可视化界面
- 一个非常经典的KPCA程序
- PCA和LDA人脸识别matlab代码最紧邻分类
- 基于pca实现人脸识别matlab代码
- 掌纹识别PCA
- DPCA 程序编写
- PCA-SIFT 源代码 matlab
- MATLAB人脸识别PCALDAKPCABP,可视化界面
- TwoDPCA用matlab实现的2dpca人脸识别程序
- 用于图像识别的2DPCA算法程序matlab
- KPCA MATLAB程序,提供4种核函数,根据
- PCA Matlab源码
评论
共有 条评论