hog detectmultiscale 参数解释

来源:互联网 发布:es6 对象转成数组 编辑:程序博客网 时间:2024/04/27 18:42

The size of the default people detector is 64x128, that mean that the people you would want to detect have to be atleast 64x128. For your camera resolution that would mean that a person would have to take up quite some space before getting properly detected.

Depending on your specific situation, you could try your hand at training your own HOG Descriptor, with a smaller size. You could take a look at this answer and the referenced library if you want to train your own HOG Descriptor.

For the Parameters:

win_stride: Given your input image has a size of 640 x 480, and the defaultpeopleDetector has a window size of 64x128, you can fit the HOG Detection window ( the 64x128 window) multiple times in the input image. The winstride tells HOG to move the detection window a certain amount each time. How does this work: Hog places the detection window on the top left of your input image. and moves the detection window each time by the win_stride.

Like this (small win_stride): enter image description here

or like this (large win_stride) enter image description here

A smaller winstride should improve accuracy, but decreases preformance, and the other way around

padding Padding adds a certain amount of extra pixels on each side of the input image. That way the detection window is placed a bit outside the input image. It's because of that padding that HOG can detect people who are very close to the edge of the input image.

group_threshold The group_treshold determines a value by when detected parts should be placed in a group. Low value provides no result grouping, a higher value provides result grouping if the amount of treshold has been found inside the detection windows. (in my own experience, I have never needed to change the default value)

0 0