• 大小: 822KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-01-03
  • 语言: Matlab
  • 标签: pca  sift  matlab代码  

资源简介

pca sift matlab代码 另外附带pca代码以及详细介绍

资源截图

代码片段和文件信息

function [meanvec P] = pca(fn numcomps)
patchsize = 41;
patchlen = patchsize*patchsize;

if nargin < 2
   error( ‘Not enough input arguments.‘ );
end

disp(‘Reading patch file.‘);

fid = fopen(fn ‘r‘);
array = fscanf(fid ‘%d‘ [patchlen inf]);

disp(‘Computing covariance matrix‘);
meanvec = mean(array 2);
meanarray = repmat(meanvec 1 size(array2));
A = array-meanarray;
covA = A*A‘;

disp(‘Computing principle components.‘);
[V D] = eig(covA);

P = V(: (size(V 2) - numcomps + 1) : size(V 2));
P = fliplr(P);

figure(3);
plot(flipud(diag(D)));

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      31538  2007-08-29 23:45  PCA-SIFT代码\pca-sift\pcasift-0.91nd\aclocal.m4

     文件         19  2004-01-27 06:24  PCA-SIFT代码\pca-sift\pcasift-0.91nd\AUTHORS

     文件          0  2004-01-27 06:24  PCA-SIFT代码\pca-sift\pcasift-0.91nd\ChangeLog

     文件        557  2007-08-29 23:45  PCA-SIFT代码\pca-sift\pcasift-0.91nd\config.h.in

     文件     144899  2007-08-29 23:45  PCA-SIFT代码\pca-sift\pcasift-0.91nd\configure

     文件        573  2004-03-22 10:31  PCA-SIFT代码\pca-sift\pcasift-0.91nd\configure.ac

     文件       1887  2004-01-27 06:24  PCA-SIFT代码\pca-sift\pcasift-0.91nd\COPYING

     文件      12123  2004-01-27 06:24  PCA-SIFT代码\pca-sift\pcasift-0.91nd\depcomp

     文件         90  2004-01-27 06:24  PCA-SIFT代码\pca-sift\pcasift-0.91nd\docs\README

     文件       7843  2004-01-27 06:24  PCA-SIFT代码\pca-sift\pcasift-0.91nd\Doxyfile

     文件       1473  2004-04-23 10:39  PCA-SIFT代码\pca-sift\pcasift-0.91nd\gathergrads.cc

     文件        921  2004-04-23 10:39  PCA-SIFT代码\pca-sift\pcasift-0.91nd\getpatches.cc

     文件    1806948  2004-01-27 06:24  PCA-SIFT代码\pca-sift\pcasift-0.91nd\gpcavects.txt

     文件      10435  2007-08-29 23:43  PCA-SIFT代码\pca-sift\pcasift-0.91nd\image.cc

     文件       3224  2004-01-27 06:24  PCA-SIFT代码\pca-sift\pcasift-0.91nd\image.h

     文件       9236  2004-01-27 06:24  PCA-SIFT代码\pca-sift\pcasift-0.91nd\INSTALL

     文件       5569  2004-01-27 06:24  PCA-SIFT代码\pca-sift\pcasift-0.91nd\install-sh

     文件      18019  2004-06-06 11:49  PCA-SIFT代码\pca-sift\pcasift-0.91nd\keypoint.cc

     文件       6915  2004-04-23 10:42  PCA-SIFT代码\pca-sift\pcasift-0.91nd\keypoint.h

     文件        716  2007-08-29 23:44  PCA-SIFT代码\pca-sift\pcasift-0.91nd\Makefile.am

     文件      20571  2007-08-29 23:45  PCA-SIFT代码\pca-sift\pcasift-0.91nd\Makefile.in

     文件      10270  2004-01-27 06:24  PCA-SIFT代码\pca-sift\pcasift-0.91nd\missing

     文件       1801  2004-01-27 06:24  PCA-SIFT代码\pca-sift\pcasift-0.91nd\mkinstalldirs

     文件          0  2004-01-27 06:24  PCA-SIFT代码\pca-sift\pcasift-0.91nd\NEWS

     文件        899  2004-01-27 09:30  PCA-SIFT代码\pca-sift\pcasift-0.91nd\README

     文件        795  2004-01-27 06:24  PCA-SIFT代码\pca-sift\pcasift-0.91nd\recalckeys.cc

     文件        559  2004-04-23 10:36  PCA-SIFT代码\pca-sift\training-matlab\training\pca.m

     文件        627  2004-04-23 10:36  PCA-SIFT代码\pca-sift\training-matlab\training\pcag.m

     文件        365  2004-04-23 10:36  PCA-SIFT代码\pca-sift\training-matlab\training\ploteigs.m

     文件        571  2004-04-23 10:36  PCA-SIFT代码\pca-sift\training-matlab\training\ploteigs2.m

............此处省略13个文件信息

评论

共有 条评论