Pedestrian detection method based on video monitoring
Technical field:
The present invention relates to mode identification technology, be specifically related to pedestrian detection method based on video monitoring.
Background technology:
Pedestrian detection is meant, pedestrian positions all in image or the video is positioned, and its position mark is come out.Notion is appreciated that and is target detection or Target Recognition widely.Based on compared with techniques such as infrared or radars, based on the reliability that the pedestrian detection technology of image or video possesses, advantages such as convenience and low cost more and more receive publicity, and are widely used in video monitoring, fields such as Automated Vehicle Operation with traditional.
Existing pedestrian detection method such as haar characteristic and Adaboost sorter (list of references: P.Viola, M.J.Jones, and D.Snow; " based on pedestrian detection technology mobile and skin mode, " international computer visual conference, the 1st volume; The 734-741 page or leaf, 2003), though this method has obtained good effect; But there is the higher shortcoming of false detection rate, can not be applied in the practical video monitoring.
Summary of the invention
Defective to above-mentioned prior art existence; The object of the invention aims to provide a kind of pedestrian detection method based on video monitoring, adopts the verification method of two-fold-classification device, can get rid of non-pedestrian fast; Can further reduce false detection rate through different sorters again, improve Practical Performance.
For realizing the foregoing invention purpose, the technical scheme that the present invention takes is: a kind of pedestrian detection method based on video monitoring comprises the steps:
The pedestrian's sample that has marked is trained modeling through training module, generates Adaboost cascade classifier and support vector machine classifier, constitutes detection module jointly; View data is input to detection module, accomplishes the location to the pedestrian through the different detection sorter successively; The training modeling procedure that wherein carries out at training module is following:
(1) pedestrian's image of having marked of normalization comprises normalization of pedestrian's size of images and gray scale normalization;
(2) describe the pedestrian through expansion histogram of gradients characteristic, adopt the Adaboost algorithm, select expansion histogram of gradients characteristic and generate to have the Adaboost cascade classifier of distinguishing pedestrian and background.
Said Adaboost algorithm steps is:
1) given n training sample (x
1, y
1) ... (x
n, y
n), y
i=0,1 representes x respectively
iBe negative sample or positive sample.
2) the wherein positive number of samples of initializes weights
is l, and the negative sample number is m.
3) t is from 1 to T, and following steps are carried out in circulation:
A) normalization weight
B) to each characteristic f
j, train a Weak Classifier h
j, remember that this sorter error rate does
C) from last all Weak Classifiers of training of step, find out and have lowest error rate ω
tSorter h
t
D) upgrade weight
β wherein
t=ε
t/ (1-ε
t), if x
iCorrect by classification, e
i=0, otherwise e
i=1.
Wherein
(3) utilize traditional histogram of gradients characteristic and SVMs to generate and have the support vector machine classifier of distinguishing pedestrian and background;
The step that said detection module is realized is:
(1) the Adaboost cascade classifier that adopts training module to generate detects pedestrian candidate region, confirms the preliminary position of pedestrian;
(2) be utilized in support vector machine classifier further definite pedestrian's particular location in the preliminary position of pedestrian that above-mentioned steps is confirmed that training module generates.
View data can be video sequence or still image, when said view data is video sequence, before the input detection module, at first through interframe background subtraction method, confirms pedestrian candidate region.
Background function y (t)=f (t+1)-2f (t)+f (t-1) of adopting of interframe background subtraction method wherein, t is the current time, f (t) is the frame of video function.
The selection course of wherein expanding the histogram of gradients characteristic is following: establishing pedestrian's sample size is A=W*H, and wherein W is the wide of sample, and H is the height of sample; Former figure is divided into the N piece, and wherein the size of piece and yardstick have nothing in common with each other, and between piece and the piece overlapping region are arranged; Each piece is done following operation:
1) calculates the gradient magnitude and the direction of each pixel;
2) be divided into 9 histogram directions to gradient direction 0-180 degree;
3) be divided into the three major types characteristic, every category feature all has 9 candidate feature;
The first kind: 0-20 degree, 20-40 degree, 40-60 degree, 60-80 degree, 80-100 degree, 100-120 degree, 120-140 degree, 140-160 degree, 9 histogram directions of 160-180 degree;
Second type: 0-40 degree, 20-60 degree, 40-80 degree, 60-100 degree, 80-120 degree, 100-140 degree, 120-160 degree, 140-180 degree, 9 histogram directions of 160-180-20 degree;
The 3rd type: 0-60 degree, 20-80 degree, 40-100 degree, 60-120 degree, 80-140 degree, 100-160 degree, 120-180 degree, 140-180-20 degree, 9 histogram directions of 160-180-40 degree;
4) calculate expansion histogram of gradients characteristic: the gradient magnitude of above-mentioned each histogram direction and with total gradient magnitude and ratio be expansion histogram of gradients characteristic.
Through being divided into gradient direction 27 sub-directions, then each piece has 27 candidate feature; Then altogether candidate feature is 27*N; Utilize the Adaboost algorithm groups to become cascade classifier to reach the purpose that the pedestrian is detected again.
The principle of work of the pedestrian detection method based on video monitoring according to the invention is: at first that known classification is good pedestrian's sample is realized the training modeling through training module, generates the two-fold-classification device that is made up of Adaboost cascade classifier and support vector machine classifier through extracting different character.Then, video sequence or static images carry out pedestrian's detection through detection module, and video sequence was generally confirmed pedestrian's rough position through simple interframe background subtraction before being input to sorter, verify fast through the two-fold-classification device then.And static images is directly to locate fast through the two-fold-classification device.
In sum; Pedestrian detection method based on video monitoring according to the invention can not be applied to the Adaboost sorter to traditional histogram of gradients characteristic; The histogram of gradients characteristic is improved, the histogram of gradients that is expanded characteristic, and be suitable for the Adaboost sorter.Secondly, because traditional detection method has only been used single sorter, all there is certain limitation on speed or aspect the verification and measurement ratio; This method is through merging Adaboost cascade classifier and svm classifier device, and adaboost cascade classifier detection speed is fast, but pedestrian's false detection rate is high; It is high that the svm classifier device detects accuracy rate; But detection speed is slow, and both combine, and makes reaching a balance preferably aspect pedestrian detection speed and the detection accuracy rate; Can not only significantly reduce the complexity that is used to detect the pedestrian, and reduce false detection rate significantly.
Therefore, the present invention is owing to advantages such as its naturality, high acceptability can be used widely at aspects such as intelligent video monitoring, intelligent transportation and man-machine interactions.
Description of drawings
Fig. 1 is the pedestrian detection method schematic flow sheet based on video monitoring according to the invention;
Fig. 2 is some used among embodiment pedestrian's sample figure;
Fig. 3 is the said method of embodiment and the performance comparison diagram of several kinds of different pedestrian detection methods.
Embodiment
Below in conjunction with accompanying drawing and embodiment the present invention is done further detailed description.
Fig. 1 comprises training module and detection module for the pedestrian detection method schematic flow sheet based on video monitoring that the present invention proposes.At first, pedestrian's sample that known classification is good generates the Adaboost cascade classifier and the support vector machine classifier that can carry out different accuracy of detection to pedestrian's sample of the unknown with expansion histogram of gradients characteristic.At detection module, the video sequence of input is at first confirmed pedestrian's candidate region through the frame-to-frame differences method, utilizes the Adaboost cascade classifier to confirm pedestrian's position fast then.Support vector machine classifier is further verified the result of detection.Concrete training module basic step is following:
The first step: the training pedestrian image that normalization is original.Comprise size normalization of pedestrian's image and gray scale normalization, at first cut out pedestrian's image of standard, utilize histogram equalization (to suppose gray level γ in the piece image then according to pedestrian's ratio
kThe probability that occurs is:
K=0,1,2 ..., L-1.N is the summation of pixel in the image, n
kBe that gray level is γ
kNumber of pixels, L is the gray level sum in the image.Histogram equalization form with this understanding is:
k=0; 1; 2; ..., L-1) eliminate the influence of illumination.Fig. 2 is pedestrian's sample of several standards of adopting in this instance.
Second step: utilize expansion histogram of gradients characteristic and Adaboost training to obtain the Adaboost cascade classifier that to locate the pedestrian fast.The Adaboost cascade classifier can be searched for pedestrian's position fast to pedestrian candidate region.Wherein the basic process of the expansion histogram of gradients characteristic of computed image is following: suppose that pedestrian's sample size is A=W*H, wherein W is the wide of sample, and H is the height of sample.Be divided into the N piece to former figure, to draw block mode different with traditional histogram of gradients characteristic, the size of piece, and yardstick is all different, and between piece and the piece overlapping region is arranged.
Each piece is done following operation:
1. calculate the gradient magnitude and the direction of each pixel;
2. be divided into 9 histogram directions to gradient direction 0-180 degree;
3. be divided into the three major types characteristic, every category feature all has 9 candidate feature;
The first kind: 0-20 degree, 20-40 degree, 40-60 degree, 60-80 degree, 80-100 degree, 100-120 degree, 120-140 degree, 140-160 degree, 9 histogram directions of 160-180 degree.
Second type: 0-40 degree, 20-60 degree, 40-80 degree, 60-100 degree, 80-120 degree, 100-140 degree, 120-160 degree, 140-180 degree, 9 histogram directions of 160-180-20 degree.
The 3rd type: 0-60 degree, 20-80 degree, 40-100 degree, 60-120 degree, 80-140 degree, 100-160 degree, 120-180 degree, 140-180-20 degree, 9 histogram directions of 160-180-40 degree.
4. calculated characteristics: be characterized as each histogram direction gradient magnitude and divided by total gradient magnitude with.
Through dividing 27 sub-directions gradient direction, then each piece has 27 candidate feature; Then altogether candidate feature is 27*N; Utilize the Adaboost algorithm groups to become the strong classifier of cascade to reach the purpose that the pedestrian is detected again.Owing to traditional histogram of gradients characteristic has been carried out discretize, therefore can well combine with the Adaboost algorithm.
The 3rd step: utilize traditional histogram of gradients characteristic on training sample, to train support vector machine classifier.Its basic skills is: at first, still similar step 2, with image all be divided into the M piece; Different is the size of piece; Yardstick is all equally big, and the number of piece is fewer comparatively speaking, on training sample, extracts the histogram of gradients characteristic then each piece is done following operation:
1) calculates the gradient magnitude and the direction of each pixel;
2) be divided into 9 histogram directions to gradient direction 0-360 degree;
Wherein 9 histogram directions are respectively: 0-40 degree, 40-80 degree, 80-120 degree, 120-160 degree, 160-200 degree, 200-240 degree, 240-280 degree, 280-320 degree, 320-360 degree.Per 40 degree are a histogram direction.
3) add up mould value in each histogram direction as proper vector.
Be together in series the proper vector of all pieces and constitute the proper vector of whole sample.
The 4th step: on histogram of gradients training characteristics space, train support vector machine classifier.The corresponding proper vector of each sample is input to the proper vector of all positive negative samples SVMs and generates the support vector machine classifier that can distinguish pedestrian and non-pedestrian.
The detection module basic step is following:
The first step: utilize interframe background subtraction point-score simply to confirm the pedestrian candidate position of input video.The pedestrian detection of static images is then skipped this step.
Second step:, be utilized in Adaboost cascade classifier that training module generates the candidate region is searched for pedestrian's position fast, and represent pedestrian's position with rectangle in the candidate region, pedestrian position that step 1 is confirmed.
The 3rd step: utilize support vector machine classifier further to confirm pedestrian's position.Because candidate pedestrian's number reduces greatly; Therefore support vector machine classifier can be confirmed the pedestrian position fast; In addition owing to utilized and be different from the characteristic of using at the Adaboost cascade classifier, the minimizing erroneous detection pedestrian that support vector machine classifier can be further.
Fig. 3 is the testing result of the present invention on famous Inria pedestrian storehouse.Transverse axis is represented false detection rate, and the longitudinal axis is illustrated in the verification and measurement ratio on the Inria storehouse.Wherein block curve is represented the pedestrian detection method that the inventive method proposes; Dashed curve is represented based on the traditional Adaboost sorter and the pedestrian detection method of haar characteristic; What be worth explanation is; Because Inria is the static map valut, so the step 1 of the detection module of the inventive method is not used in this storehouse.Can find out from figure, be under the millesimal situation in erroneous detection, and the verification and measurement ratio of traditional haar characteristic is 80%; The inventive method is 93.6%, be ten thousand in false detection rate/ situation under, traditional haar feature detection rate is 75%; And the verification and measurement ratio of the inventive method is 90.3%, compares traditional Adaboost detection method, and verification and measurement ratio of the present invention is significantly improved; The present invention is owing to adopted the non-pedestrian of the quick repulsion of adboost cascade zone; Time complexity also reduces greatly, and therefore, the present invention can be applied in the practical video monitoring.