如何创建自己的setSVMDetector?

时间:2013-02-13 12:18:36

标签: opencv object-detection

当我创建statndart探测器时......

static vector<float> detector = HOGDescriptor::getDefaultPeopleDetector();
if (!detector.size()) {
    fprintf(stderr, "ERROR: getDefaultPeopleDetector returned NULL\n");
    return -1;      
}
hog.setSVMDetector(detector);
hog.detectMultiScale(img, rects);

......一切正常。

但是!

当我使用“OpenCV的分类器工具”(classifieropencv.codeplex.com)创建自己的分类器时,我无法找到对象。我使用所有默认参数:winSize,blockSize,blockStride,cellSize等。为什么?任何人都使用这个工具来创建HOG检测的分类器?任何人都使用HOGDescriptor来检测自己的对象(没有getDefaultPeopleDetector)?

谢谢!

1 个答案:

答案 0 :(得分:1)

此工具非常有用:“OpenCV的分类器工具”(classifieropencv.codeplex.com)

此工具中的参数(创建分类器时)必须与OpenCv代码中的参数相同(使用分类器时)。

Here is manual in russian,但它有很多图片和视频,很清楚。