• 大小: 6KB
    文件类型: .zip
    金币: 2
    下载: 0 次
    发布日期: 2021-05-09
  • 语言: Matlab
  • 标签: hog  matlab  

资源简介

有注释,有助于初学者理解。注意,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\

评论

共有 条评论