Ask Your Question

Revision history [back]

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

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; hog.load(…/hog.xml); hog.detectMultiScale(img, features, 0, cv::Size(8, 8), cv::Size(32, 32), 1.05, 2);

2);

But that does not seem to work like HAAR and LBP.

Then I tested the DefaultPeopleDetector:

HOGDescriptor hog

hog hog.setSVMDetector( HOGDescriptor::getDefaultPeopleDetector() )

) hog.detectMultiScale(img, features, 0, cv::Size(8, 8), cv::Size(32, 32), 1.05, 2)

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)? detector)? and what is "const const vector<float>& detector" detector exactly.

Can sb. give me an example Code how to use my own hog.xml-file instead of getDefaultPeopleDetector??getDefaultPeopleDetector??

Thank u very much, i can´t find a solution for days.

greetz Optimus

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