資源簡介
一個(gè)簡單的基于HOG的行人檢測(cè)程序,MATLAB編寫,其中read me文檔解釋的較為詳細(xì)。
代碼片段和文件信息
%Matlab版HOG代碼
function?F?=?hogcalculator(img?cellpw?cellph?nblockw?nblockh...
????nthet?overlapissigned?normmethod);
%?HOG特征由Dalal在2005?cvpr?的一篇論文中提出
%?NORMMETHOD:重疊塊中的特征標(biāo)準(zhǔn)化函數(shù)的方法
%???????e為一個(gè)設(shè)定的很小的數(shù)使分母不為0
%???????v為標(biāo)準(zhǔn)化前的特征向量
%???????‘none‘?which?means?non-normalization;
%???????‘l1‘?which?means?L1-norm?normalization;?V=V/(V+e)
%???????‘l2‘?which?means?L2-norm?normalization;?V=V/根號(hào)(V平方+e平方)
%???????‘l1sqrt‘V=根號(hào)(V/(V+e))
%???????‘l2hys‘l2的省略形式。將V最大值限制為0.2
if?nargin?2
????%?在DALAL論文中指出的在rows:128*columns:64情況下的最佳值,設(shè)定為DEFAULT
????cellpw?=?8;
????cellph?=?8;
????nblockw?=?2;
????nblockh?=?2;
????nthet?=?9;
????overlap?=?0.5;
????issigned?=?‘unsigned‘;
????normmethod?=?‘l2hys‘;
else
????if?nargin?9
????????error(‘輸入?yún)?shù)不足.‘);
????end
end
[M?N?K]
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件??????42770??2011-10-30?21:59??行人檢測(cè)\alpha.mat
?????文件????????173??2011-10-30?21:59??行人檢測(cè)\bias.mat
?????文件???????9572??2011-05-11?18:32??行人檢測(cè)\HOG.m
?????文件???????3811??2011-10-21?15:40??行人檢測(cè)\main.m
?????文件????????290??2011-05-14?15:28??行人檢測(cè)\myplot.m
?????文件????????211??2011-11-04?16:42??行人檢測(cè)\narrowarray.mat
?????文件???????1072??2011-10-30?22:46??行人檢測(cè)\newSVM.m
?????文件????????176??2011-10-30?21:59??行人檢測(cè)\nsv.mat
?????文件?????234689??2011-05-12?14:43??行人檢測(cè)\people1.png
?????文件???????1556??2011-05-15?15:42??行人檢測(cè)\readimg2.m
?????文件????????965??2011-10-28?21:50??行人檢測(cè)\readneg.m
?????文件????????984??2011-10-28?20:37??行人檢測(cè)\readpos.m
?????目錄??????????0??2011-11-16?15:23??行人檢測(cè)
-----------?---------??----------?-----??----
???????????????296269????????????????????13
評(píng)論
共有 條評(píng)論