This article aims to improve the HOG SVM pedestrian detection method proposed by previous researchers. The speed of HOG SVM to detect pedestrians is relatively slow, and the detection accuracy is not very good. This paper proposes a PCA (principal component analysis) dimension reduction for HOG and also interpolates it. The article combines the dimensions of individual HOG features and improves th eir accuracy, and fuses them with improved LBP features. The features of the fusion of HOG features and LBP features can both express pedestrian profile information and obtain pedestrian texture information. This can improve the speed of pedestrian detection and improve the accuracy of detection, which is beneficial to reduce false detection and missed detection. Although some researchers have combined the two features of HOG and LBP, after simple fusion of these two features, the experimental results show that the detection effect is not much improved. This article is aimed at different formats of video detection material, an application program written on the MFC platform, making pedestrian detection of the material quickly verified, which is conducive to pedestrian detection results data analysis and recording.
As a future trend of smart driving, its complex structure and what can be explored is very much. The article mainly focuses on the pedestrian detection part. The whole smart car pedestrian detection can be divided into the following several parts: information acquisition part, comprehensive feature extraction, classification training, implementation detection as shown in
L B P P , R = ∑ p = 0 p − 1 S ( g p − g c ) 2 p (2-1)
In the formula, S ( x ) = { 1 , i f x ≥ T 0 , otherwise , g c is the gray value of the center pixel,
g p ( p = 0 , 1 ⋯ , p − 1 ) is the grayscale value of p surrounding pixels, and T is the threshold value. For example, for the center in the range of 3*3 in
Its code implementation in open cv and test results are shown in
The basic LBP has good robustness to illumination (i.e., grayscale invariance), but it does not have rotation invariance. Therefore, researchers have extended the above basis and proposed LBP features with rotation invariance. The idea is to make the LBP feature in the circular neighborhood continue to rotate, and then get different LBP eigenvalues, find the smallest LBP value from the rotated LBP eigenvalues, and use this value as the characteristic value of the last center pixel. The specific process is shown in
Its definition is as follows (2-2).
L B P Q , R r i = min { R O R ( L B P P , R , i ) | i = 0 , 1 , ⋯ , Q − 1 (2-2)
Among them, ROR(x,i) means to cycle x to the right by moving the i bit. Here, there is no provision for which point to start from. It can be seen from
The support vector machine (svm) was proposed by Vapnik and Core [
1) Linear separable SVM
The initial development of SVM begins with a linearly separable optimal classification surface. Divide the positive and negative samples in the sample into two parts accurately, and also maximize the separation interval. The SVM strives to obtain a hyperplane that keeps the points in the sample as far away from the face as possible, that is, the area where the largest margin formed by the faces where the positive and negative samples are far apart from each other. Points H1, H2 on the separation plane parallel to the hyperplane and passing the positive and negative samples, such a point (training sample). We call him the support vector.
2) Linear Inseparable SVM
For linearly inseparable problems we analyze and deal with the following examples. As shown in
between points A and B on the number axis as positive samples, and the points in the yellow parts of both sides as negative samples. A linear function (straight line) in two-dimensional space cannot find a straight line to separate positive and negative samples.
But we can find a curve g ( x ) = a 0 + a 1 x + a 2 x 2 to separate positive and negative samples, as shown in
Obviously this curve can separate positive and negative samples, but he is not a linear function and is a general quadratic function. In order to make it a linear function, it is rebuilt to define a variable y and b equivalence as (2-3):
y = [ y 1 y 2 y 3 ] = [ 1 x x 2 ] b = [ c 1 c 2 c 3 ] = [ a 0 a 1 a 2 ] (2-3)
Then g(x) can be equivalent to f(y) = a, i.e., g(x) = f(y) = c_1 y_1 + c_2 y_2 + c_3 y_3, it can be seen that g(x) becomes The linear function, its difference with the quadratic function is that the dimension becomes higher, and here we get a method that encounters a linearly inseparable sample, trying to increase the dimension of the function, so that it becomes linearly separable. The above is the principle knowledge used in this article.
The previous section mainly studied the improved method of HOG algorithm. Through the simplified three-line interpolation and PCA dimension reduction [
LBP detection operator. Pedestrian detection of the main line of thought is the middle of the framework of the order, the left and right sides of the middle of the process.
In the specific algorithm, the detection scheme for the fusion IHOGP-LBP feature multiple training is shown in
Pedestrian detection of the main line of thought is the middle of the framework of the order, the left and right sides of the middle of the process. It can be seen from the above figure that after the picture is input, the IHOGP feature is extracted first, and then input into the SVM classifier to train to obtain a suspicious pedestrian area, but it is not sure whether it is a pedestrian. The LBP descriptors are then extracted and classified to obtain suspicious positive samples. Finally, the two characteristics are combined to train, and a more reliable pedestrian detector is obtained. Through the last pedestrian detector, the pedestrian in the image is detected, which can accurately detect the location of a person.
The above figure is the process of feature fusion and can be expressed by Equation (3-1).
F _ ( I H O G P − L B P ) ( I ) = F _ I H O G P ( I ) + F _ L B P ( I ) (3-1)
Where I is represented as a sample, F _ I H O G P ( I ) is represented as the IHOGP feature of the sample, and F _ L B P ( I ) is the lbp feature of the sample. The samples are first extracted from the IHOGP features, then the LBP features are extracted, and finally they are combined in parallel to form a fusion feature. From the above figure, we can see that the feature histogram of fusion has become more prominent, which shows that the features of the pedestrian after fusion are more obvious, making the probability of detecting pedestrians even higher.
In the above method for pedestrian detection in video, the source code and video file format need to be modified for each scene detection. In practice, it seems to be tedious. This article will develop a simple application program that will make video in various formats quickly available and detect pedestrians.
The application development environment for this article is windows 7, 64-bit operating system, memory 4G, and the processor is Intel(R) core(TM) i5. The
developed software is MFC in visual studio 2010. MFC is a packaged windows API library provided by Microsoft Corporation [
The main class used in this article is CIVSDlg, which contains the video playback dialog [
In the “open” control, in addition to opening the video in the file, a message processing program needs to be inserted. The message processing is to enable it to run an image processing program, namely the above-mentioned detector in
the text, so that it can detect edestrians in the video. This article inserts a pedestrian detection handler and runs the test. Get the results shown in
The experiment in this paper compares the detection effectiveness of the two detection methods, hog + svm and ihogp-pca + svm, in different scenarios. This article selects various scenarios, and detects the effects of two detection methods in different scenarios. As shown in
From the figure above, we can see that in the feature extraction time, with the increase of resolution, the hog extraction time becomes longer and longer, and the improved feature extraction performs better in this aspect without much time extension.
Zhou, W. and Luo, S.Y. (2018) Pedestrian Detection with Improved LBP and Hog Algorithm. Open Access Library Journal, 5: e4573. https://doi.org/10.4236/oalib.1104573