Search code examples
opencvobject-detection

How to create my own setSVMDetector?


When i create statndart detector...

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);

...all works fine.

But!

When i create my own classifier using "Classifier Tool For OpenCV" (classifieropencv.codeplex.com) i can't to find object. I use all default parameters: winSize, blockSize, blockStride, cellSize and others. Why? Any one used this tool to create classifiers fot HOG-detection? Any one used HOGDescriptor to detect his own object (without getDefaultPeopleDetector )?

Thanks!


Solution

  • This tool is useful: "Classifier Tool For OpenCV" (classifieropencv.codeplex.com)

    Parameters in this tool (when you create classifier) must be equal with parameters in your OpenCv code(when you use classifier).

    Here is manual in russian, but it have many pictures and video, and is clear.