資源簡介
修改demo文件,載入你的數據,再運行demo文件即可。數據格式參見demo的注釋。

代碼片段和文件信息
clc
clear?all
load(‘ilids_train.mat‘);?%dim?*?ntrain?matrix
load(‘ilids_test.mat‘);??%dim?*?ntest??matrix
PCANet.NumStages?=?2;
PCANet.PatchSize?=?7;
PCANet.NumFilters?=?[8?8];
PCANet.HistBlockSize?=?[32?32];?
PCANet.BlkOverLapRatio?=?0.5;
ImgSize1?=?128;?ImgSize2?=?48;?%your?image?size?height?*?width
ImgFormat?=?‘color‘;?%‘color‘?or?‘gray‘
[ftrain?V]?=?train(ilids_trainImgSize1ImgSize2ImgFormatPCANet);
%?=======INPUT============
%ilids_train?????input?data(each?column?corresponds?to?pixls?of?each?image)
%?=======OUTPUT============
%?ftrain?????????PCANet?features?(each?column?corresponds?to?feature?of?each?image)
%?V??????????????learned?PCA?filter?banks?(cell)
feature?=?test(ilids_testVImgSize1ImgSize2ImgFormatPCANet);
%?=======INPUT============
%ilids_test??????input?data(each?column?corresponds?to?pixls?of?each?image)
%?V??????????????learned?PCA?filter?banks?(cell)
%?=======OUTPUT============
%?feature?????????PCANet?features?(each?column?corresponds?to?feature?of?each?image)
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????1008??2014-07-13?09:58??train.m
?????文件???????3538??2014-07-08?11:02??Utils\im2colstep.cpp
?????文件???????1341??2014-07-13?09:58??Utils\im2colstep.m
?????文件???????9919??2014-07-13?09:58??Utils\im2colstep.mexa64
?????文件???????7168??2014-08-03?21:14??Utils\im2colstep.mexw32
?????文件???????9216??2014-07-13?09:58??Utils\im2colstep.mexw64
?????文件???????1341??2014-05-23?00:20??Utils\im2colstep.txt
?????文件????????398??2014-07-13?09:58??Utils\im2col_general.m
?????文件????????312??2014-07-13?09:58??Utils\mat2imgcell.m
?????文件???????1038??2014-10-08?19:33??demo.m
?????文件???????3043??2014-07-14?14:15??HashingHist.m
?????文件???????1774??2014-07-13?09:58??PCA_FilterBank.m
?????文件???????1730??2014-07-13?09:58??PCA_output.m
?????文件???????1851??2014-07-13?09:58??PCANet_FeaExt.m
?????文件???????3303??2014-10-08?19:27??PCANet_train.m
?????文件???????1110??2014-07-13?09:58??test.m
?????目錄??????????0??2014-10-08?19:23??Utils
-----------?---------??----------?-----??----
????????????????48090????????????????????17
評論
共有 條評論