2013-02-13 216 views
1

当我创建statndart探测器...如何创建我自己的setSVMDetector?

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

...一切工作正常。

但是!

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

谢谢!

+0

你可能做了一个糟糕的训练。你试图识别什么类型的对象?你使用哪个数据库进行培训?你使用的参数是什么(窗口大小等)? – sfotiadis 2013-02-13 17:05:35

回答

1

这个工具是有用的:“分类工具适用的OpenCV”(classifieropencv.codeplex.com)

参数在该工具(当你创建分类器)必须与你的OpenCV的代码参数相等(当你使用分类)。

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