想提取hog特征,大牛向我推荐Piotr's Image & Video Matlab Toolbox,http://vision.ucsd.edu/~pdollar/toolbox/doc/index.html网站上下载,下载之后 addpath(genpath('c:\toolbox')); savepath; toolboxCompile;
运行
I=double(imread('cameraman.tif'));
figure(1); im(I)
tic, H=hog(I,8,9); toc, V=hogDraw(H,25); figure(2); im(V)
还是有错误。
Error using gradientMex
I has incorrect type.
Error in gradientMag (line 51)
else [M,O]=gradientMex('gradientMag',I,channel,full); end
Error in hog (line 72)
[M,O] = gradientMag( I );
resample下就好了
I=imResample(single(imread('cameraman.tif')),[250 250])/255;
figure(1); im(I)
tic, H=hog(I,8,9); toc, V=hogDraw(H,25); figure(2); im(V)
成功了
I=imResample(single(imread('cameraman.tif')),[250 250])/255;
figure(1); im(I)
tic, H=hog(I,8,9); toc, V=hogDraw(H,25); figure(2); im(V)
成功