详见 https://www.cnblogs.com/klitech/p/5747895.html
测试函数
#include <opencv2/opencv.hpp>
#include <iostream>
using namespace cv;
using namespace std;
int main(int argc, char** argv) {
Mat src = imread("timg.jpg");//D:/vcprojects/images/HOGV.png
if (src.empty()) {
printf("could not load image...\n");
return -1;
}
namedWindow("input image", CV_WINDOW_AUTOSIZE);
imshow("input image", src);
//Mat dst, dst_gray;
//resize(src, dst, Size(64, 128));//大小缩放
//cvtColor(dst, dst_gray, COLOR_BGR2GRAY);
//HOGDescriptor detector(Size(64, 128), Size(16, 16), Size(8, 8), Size(8, 8), 9);
//vector<float> descriptors;
//vector<Point> locations;
//detec