Ask Your Question
3

HogDescriptor DaimlerPeopleDetector does not work

asked 2012-10-17 08:22:45 -0600

JuKauf gravatar image

updated 2012-10-19 01:06:48 -0600

Kirill Kornyakov gravatar image

Hi,

We are currently working on an implementation using the HOGDetector to detect people in a given video stream. We are using the Default People Detector which works for us, but it very often detects only parts of the person.

So we wanted to test how the DaimlerPeopleDetector works. Unfortunately using this detector we never get any detected Person. The output is simply empty.

Code:

cv::HOGDescriptor hog(cv::Size(48, 96), cv::Size(16, 16), cv::Size(8, 8), cv::Size(8, 8), 9, 1,-1, cv::HOGDescriptor::L2Hys, 0.2, true, cv::HOGDescriptor::DEFAULT_NLEVELS);
    hog.setSVMDetector(cv::HOGDescriptor::getDaimlerPeopleDetector());

hog.detectMultiScale(tempFrame, found);

Does anyone have suggestions or knows the problem? Your help will be highly appreciated!

Regards, Julian

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
4

answered 2012-11-27 17:08:22 -0600

hoangnguyen79 gravatar image

Have you set the window size of the HOG detector: hog.winSize = Size(48, 96);

The reason is that the Daimler classifier was trained using training images of that size. Only with that image size will the HOG feature vector has the correct dimensions of 1981, which can be fed into the Daimler SVM classifier.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-10-17 08:22:45 -0600

Seen: 4,290 times

Last updated: Nov 27 '12