The basic understanding of hog is the reference to Dalal's histograms of oriented gradients for Human detection This paper, and reference to the on-line still image hog pedestrian detection code changed to the basic video of pedestrian detection.
The basic idea of hog feature extraction:
The appearance and shape of the local target can be well described by the distribution of the local gradient or edge direction, even if we do not know the corresponding gradient and the position of the edge.
Data set: Inria
I also downloaded the Inria data set and then do a simple training, the number of samples less than the correct rate is simply terrible, and later added to difficult cases after the correct rate slightly better, but later in the video of pedestrian detection or decisive download of the online others have trained XML files for testing, The correct rate is quite considerable in the case of no occlusion.
The Hog process:
(1) Individuals think that the first step of grayscale is not necessary, but the grayscale will reduce the performance of detection, I use the results of my own training is quite obvious.
(2) The simplest ( -1,0,1) operator is chosen when calculating the gradient, and no smoothing is necessary.
(3) The operation of cell units and OPENCV has been performed by functions.
(4) Then use the classifier to classify, draw a rectangle, if the rectangle appears coincident, take the outside rectangle and then draw the appropriate reduction
I added the pedestrian detection in the video is the simplest to divide the video into video frames for each frame of the pedestrian detection, and the current number of pedestrians to the frame display, then the number of pedestrian location and pedestrian count, then the frame sequence into a new video, you can achieve the simplest video pedestrian detection. Personally, it can be combined with moving target detection and hog to achieve better pedestrian detection results.
The following is a list of my test results in Figure two:
Pedestrian detection in occlusion situations can be clearly seen, but it is acceptable if no occlusion is present.
A simple pedestrian detection count based on hog