img = imread('cameraman.tif');
[featureVector,hogVisualization] = extractHOGFeatures(img);
figure;
imshow(img);
hold on;
plot(hogVisualization);
放大:
http://cn.mathworks.com/help/vision/ref/extracthogfeatures.html?s_tid=gn_loc_drop
还有用HOG来做数字识别:
只要在matlab命令行里输入 edit HOGDigitClassificationExample,回车
然后run
http://cn.mathworks.com/help/vision/examples/digit-classification-using-hog-features.html
要查看matlab命令的帮助文档,可以不用 help xxx了, 用doc xxx 更详细!