想提取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)
成功