How to use my hog.xml file?
Hello!
Because i can´t find any solutions to my problem in german forums, I'll try it here in english. I used the cascade-trainer-gui of OpenCV to train my own HOG/HAAR/LBP cascades to find a biro on a video file. HAAR and LBP works very good, but i don´t know how to use my hog.xml file.
I tried this:
HOGDescriptor hog;
hog.load(…/hog.xml);
hog.detectMultiScale(img, features, 0, cv::Size(8, 8), cv::Size(32, 32), 1.05, 2);
But that does not seem to work like HAAR and LBP.
Then I tested the DefaultPeopleDetector:
HOGDescriptor hog
hog.setSVMDetector( HOGDescriptor::getDefaultPeopleDetector() )
hog.detectMultiScale(img, features, 0, cv::Size(8, 8), cv::Size(32, 32), 1.05, 2)
and it worked...but not with my own XML-File... my program can detect People now.
So my Question is how to use .setSVMDetector(const vector<float>& detector)
? and what is const vector<float>& detector
exactly.
Can sb. give me an example Code how to use my own hog.xml-file instead of getDefaultPeopleDetector
??
Thank u very much, i can´t find a solution for days.
greetz Optimus
What do you mean by But that does not seem to work like HAAR and LBP? Are errors getting thrown? If yes, what are they? What results are you expecting?
The error is, that my program can´t read my hog.xml-file correctly i think. It works with my Haar.xml and my LBP.xml.
I expected (like with Haar and LBP) that there ist a circle on my biro, when i hold it in front of my camera. My programm works very good with Haar and LBP and quite fast. But i want to compare it with HOG and use the same training dataset.
to train my my xml files i used this program: link text