資源簡介
有注釋,有助于初學者理解。注意,64位的可執行文件在32位機上執行不了

代碼片段和文件信息
%%?This?function?extract?hog?features?of?all?face?images?under?the?path?‘path‘?with?extension?‘ext‘.
%?Return:?A?1-by-N?cell?with?containing?the?features?of?face?images?where?N
%?is?the?number?of?face?images.
function?feat?=?extract_hog_feat(pathext)
tic
fls?=?dir([path?‘/‘?‘*.‘?ext]);
feat?=?cell(1length(fls));
if?isempty(fls)
????warning(‘No?image?file?was?found.‘);
????toc
????return;
end
%?parameters.
szPatch?=?16;
sift_fac?=?0.5;
szImage?=?size(imread([path?‘/‘?fls(1).name?]));
for?indImg?=?1:length(fls)
????I?=?imread([path?‘/‘?fls(indImg).name?]);
????feat{indImg}?=?HOG(I4*szPatchsift_fac/4szImage);
end
toc
end
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????10240??2014-07-18?17:38??hog\HOG.mexw64
?????文件?????????659??2014-07-18?17:38??hog\extract_hog_feat.m
?????目錄???????????0??2014-07-18?17:38??hog\
評論
共有 條評論