%% 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(path,ext)
tic
fls = dir([path '/' '*.' ext]);
feat = cell(1,length(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(I,4*szPatch,sift_fac/4,szImage);
end
toc
end
HOG特征提取 matlab代码
5星 · 超过95%的资源 需积分: 50 123 浏览量
2014-07-25
10:58:23
上传
评论 7
收藏 6KB ZIP 举报
liaoniandong
- 粉丝: 3
- 资源: 19
最新资源
- 实验项目一:线性表(模板 ).docx
- 基于LM317A设计交流220V输入可调5V-12V直流输出稳压电源电路multisim10仿真源文件.zip
- Screenshot_2024-04-25-17-04-18-55_2332cb9b27b851b548ba47a91682926c.jpg
- -基于AVR单片机的LNG加液机控制器设计.pdf
- ThePowerOfNow-EckhartTolle.mobi
- BLOCK_TYPE_HEARTBEAT_D70A3465D4EE4E9_046141_dump_1st.dmp
- 项目方法测试调用接口工具
- studyupdate
- 基于西瓜数据集的决策树实现.zip
- 60套HTML网站源码-响应式-涵盖(简历&作品展示&商业&科技&培训&商城&课设等)-适配移动设备-解压即用.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
评论3