2013-02-13 169 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,但它有很多圖片和視頻,並且很清楚。