CN108875668A - A kind of pedestrian detection method based on multiple features and cascade classifier - Google Patents
A kind of pedestrian detection method based on multiple features and cascade classifier Download PDFInfo
- Publication number
- CN108875668A CN108875668A CN201810684624.8A CN201810684624A CN108875668A CN 108875668 A CN108875668 A CN 108875668A CN 201810684624 A CN201810684624 A CN 201810684624A CN 108875668 A CN108875668 A CN 108875668A
- Authority
- CN
- China
- Prior art keywords
- feature
- value
- emso
- pixel
- region
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
- G06F18/2411—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on the proximity to a decision surface, e.g. support vector machines
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/245—Classification techniques relating to the decision surface
- G06F18/2451—Classification techniques relating to the decision surface linear, e.g. hyperplane
Abstract
The invention discloses a kind of pedestrian detection method based on multiple features and cascade classifier, including:Input the realtime graphic T of acquisition;Gamma correction, then handled by gray processing, the EMSO feature extraction being extended;Filter out the candidate region S of the detection block there are human body;The candidate region S ' of removal overlay region is obtained by the candidate region that non-maxima suppression method gets rid of overlapping;Removal redundancy accurately judges that getting rid of detection, there is no the candidate regions of the detection block of human body, and there are the candidate region S ' ' of the detection block of human body for reservation, and output is described, and there are the candidate region S ' ' of the detection block of human body, that is, obtain the result of pedestrian detection.The present invention is effectively extracted human body edge contour feature by the MSO feature of extension, greatly reduces calculation amount;A large amount of redundancy is eliminated by carrying out WTA hash coding to MHOG feature, decreases calculation amount;Two kinds of classifier cascades of Gentle Adaboost and IKSVM, are gradually judged, further improve detection speed and precision.
Description
Technical field
The present invention relates to a kind of pedestrian detection method based on multiple features and cascade classifier, belongs in computer vision
Pedestrian detection field.
Background technique
Pedestrian detection seeks to the pedestrian occurred in video or image to split and be accurately positioned from background, it
It has a wide range of applications in fields such as video monitoring, intelligent drivings.But due to different pedestrian images either stature,
Clothing, posture, or suffer from great variation in terms of visual angle, illumination, in addition complicated background scene and camera from
The movement or shaking of body, while pedestrian detection requires have very high precision and real-time, both are required so that pedestrian examines
Survey one of the difficult project for becoming field of machine vision.Pedestrian detection technology includes mainly two large divisions, feature extraction and point
Class device is realized.
The extraction of the feature of early stage human body generallys use Haar wavelet character, but wavelet character is illuminated by the light, posture and visual angle
Be affected.Later propose gradient orientation histogram HOG characterization method extract objective contour feature, HOG feature to illumination,
The variation and human body attitude deformation of color have certain robustness, but this method existing characteristics dimension is big, and computation complexity is high, people
There is the features such as verification and measurement ratio is low when blocking in body.
In recent years in order to solve the problems, such as multiple target scale and partial occlusion, related scholar proposes Multi-scale HOG
Feature, HOG are obtained with the local binary patterns LBP method combined and more dimensional directions MSO feature combination cascade classifiers
Preferable achievement.But the disadvantages of equal existing characteristics dimension of these methods is big, computation complexity is high.
Support vector machines and self-adaptive enhancement algorithm Adaboost classifier are the sorting algorithms of two kinds of mainstreams, linearly
SVM classifier is trained and classification speed is fast, and non-linear SVM classifier detection accuracy is high, but computational complexity is higher, real-time
It is low;Adaboost classifier classification speed is fast, but the training time is long, and training complexity increases to present and refer to the quantity of supporting vector
Number type increases.
Summary of the invention
The it is proposed of the present invention in view of the above problems, the present invention include a kind of based on the pedestrian of multiple features and cascade classifier inspection
Survey method, includes the following steps:S1:Input the realtime graphic T of acquisition;S2:The image T that step S1 is inputted is first passed through into Gamma
Correction carries out the standardization of color space, then is handled by gray processing, and rgb color image is converted to gray level image, is obtained
Pretreated image T ';S3:The multiple dimensioned direction EMSO (extended that the described image T ' that step S2 is obtained is extended
Multi-scale orientation, abbreviation EMSO) feature extraction;By sliding window with step-length s from left to right from top to bottom
It is n EMSO cell block that sliding, which divides described image T ', and it is highly h that the width of the sliding window, which is w, then by each EMSO
Cell block is divided into horizontal gradient, vertical gradient, 45 ° of gradients of dextrorotation and left-handed 45 ° of gradients, four sub-blocks, calculates each sub-block
Pixel integration value, then calculate EMSO cell block direction HeAnd discrete quantized unit Block direction Fi, finally to described discrete
The small EMSO cell block direction value of each of quantization is connected in series, and the EMSO feature is constituted;S4:Step S3 is extracted
In Gentle Adaboost after the EMSO feature input training, the candidate region S of the detection block there are human body is filtered out;
S5:Removal overlapping is obtained by the candidate region that non-maxima suppression method gets rid of overlapping to candidate region described in step S4
The candidate region S ' in area;S6:Extraction to the candidate region S ' carry out WMHOG feature of the removal overlay region;The WMHOG is special
The extraction of sign is first by the extraction of the multiple dimensioned HOG feature of candidate region S ' carry out of the removal overlay region, then passes through WTA hash
Coding removal redundancy;S7:By the intersection kernel support vectors machine IKSVM essence after the WMHOG feature input training of extraction
Really judgement, getting rid of detection, there is no the candidate regions of the detection block of human body, and there are the candidate regions of the detection block of human body for reservation
Domain S ";S8:It exports described there are the candidate region S " of the detection block of human body, that is, obtains the result of pedestrian detection.
Further, the Gamma bearing calibration is to the gamma correction formula of pixel (x, y):
I (x, y)=I (x, y)γ;
Wherein, x indicates that the abscissa of pixel, y indicate that the abscissa of pixel, γ indicate the parameter of correction, γ=1/
2。
Further, the step S3 calculates the pixel integration value:
Horizontal gradient pixel integration value DlCalculation formula be:
Vertical gradient pixel integration value DdCalculation formula be:
45 ° of gradient pixel integrated value D of dextrorotationdrCalculation formula be:
Left-handed 45 ° of gradient pixel integrated values DdlCalculation formula be:
Wherein, I (X) is X point pixel value, and Left subunit indicates left-half region in EMSO cell block, Right
Subunit indicates right half part region in EMSO cell block, and Up subunit indicates top half region in EMSO cell block,
Down subunit indicates lower half portion region in EMSO cell block, and Downright subunit indicates right in EMSO cell block
Lower partial region, Upleft subunit indicate upper left region in EMSO cell block, and Downleft subunit is indicated
Bottom left section region in EMSO cell block, Upright subunit indicate upper right portion region in EMSO cell block.
Further, the direction H of the EMSO cell blockeFor:
The discrete quantized unit Block direction FiFor:
Fi=Q (H);
Wherein, 0 °~180 ° of continuous direction is worth by function Q (H) according to every 20 ° one, by 0 °~180 ° discretization 9
The rendezvous value bin of angular discretization, set element value are bin={ 0,1 ..., 8 }.
Further, the Gentle Adaboost classifier passes through composition one strong classification of training Weak Classifier cascade
Device.
Further, S41:The maximum false detection rate of strong classifier is set as fmax, minimum detection rate is dminAnd to training
Sample set carries out initialization weight distribution:Wherein wiIndicate the power of i-th of sample in training
Weight, N indicate the number of training sample;S42:The wheel number t and specified exercise wheel number M of more currently training, if t < M, is jumped
Go to step S49;If t >=M thens follow the steps S43;S43:The weighted mean square calculated under the rectangular characteristic is poor;Equipped with N number of instruction
Practice sample, training rectangular characteristic number used is m;
For i=1:M enables value []=feature [i] [], the feature of all samples under i-th of rectangular characteristic
Value is copied to one-dimension array value, and one-dimension array value is ranked up by being minimal to maximum;
For j=1:N
Wherein, N indicates number of samples;wkIndicate the weight of k-th of sample, ykIndicate the label y of k-th of samplek=1 ,-
1};Feature [i] [] indicates the characteristic value of all samples under ith feature;
Weighted mean square then under rectangular characteristic is poor:
S44:As lefterror+righterror < fault, then current mean square error fault=is updated
Lefterror+righterror records threshold θ=value [j] of Weak Classifier;When lefterror+righterror >=
Fault does not change the threshold value of mean square error fault and Weak Classifier then, continues to execute in next step;
S45:It saves the coordinate of the smallest rectangular characteristic of mean square error and saves the parameter of optimal rectangle feature, obtain weak point
Class device ht(x):
ht(x)=lefterror+righterror;
Pick out the optimal Weak Classifier h learnt in t wheelt(x), so that under the training sample weight distribution,
The mean square error of sample is minimum, and the number for modifying Weak Classifier is t=t+1
S46:Determine the threshold value of current strong classifierMake current verification and measurement ratio dcur≥dmin
Wherein, numPos is the length of posvalute array;
S47:The false detection rate fcur for calculating current strong classifier, if fcur≤fmax, then strong classifier is trained finishes,
Step S49 is jumped to, if fcur> fmax, execute step S48.
S48:Training set weight is updated, step S42 is executed;
Wherein, z indicates the adduction of current training sample weight, yiIndicate the label value of i-th of sample, xiIndicate sample
Characteristic value;
S49:It completes strong classifier training and saves the strong classifier after training.
Further, S51:The output valve of the candidate region S of the detection block of the human body of the step 4 acquisition is carried out
Sequence, chooses best result and its corresponding candidate region;S52:When the Duplication of the corresponding candidate region of the current best result
Sab >=Sth then deletes the candidate frame;When the Duplication of the corresponding candidate region of the current best result, Sab < Sth then retains
The candidate region;Wherein, SabThe candidate region for indicating traversal and the subregional overlapping area of current highest are divided by two area surfaces
Long-pending union area;SthIndicate threshold value;S53:Step S51 is repeated until the candidate region S of the detection block of the human body is all passed through
Until crossing judgement.
Further, S61:First image T ' building is made of K degree, the image gold that the transformation factor of each degree is σ
Word tower is, wherein
σ=(1/4)k, k=1,2 ..., K;
S62:Calculate the gradient of each pixel of the every first order image of described image pyramid;
Wherein horizontal edge operator:[- 1,0,1];Vertical edge operator:[- 1,0,1];Pixel (x, y) in T image
Gradient is:
Gx(x, y)=H (x+1, y)-H (x-1, y)
Gy(x, y)=H (x, y+1)-H (x, y-1)
Wherein, Gx(x, y) indicates the horizontal direction gradient in input picture at pixel (x, y), Gy(x, y) indicates input
Vertical gradient in image at pixel (x, y), H (x, y) indicate the pixel value in input picture at pixel (x, y);
Then the gradient magnitude G (x, y) at pixel (x, y) and gradient direction α (x, y) is respectively:
S63:It is cell by the every level-one image segmentation of described image pyramid, and establishes gradient direction for each cell
Histogram;
S64:The adjacent cell is formed into block, normalized gradient histogram vectors in block;By the normalization
Histogram of gradients vector is together in series to obtain the MHOG feature of any level-one of image pyramid, by the every level-one of described image pyramid
The cascade of MHOG feature form multiple dimensioned MHOG feature;
S65:WTA hash is carried out to MHOG feature to encode to obtain WMHOG feature;The every level-one of described image pyramid
The cascade of MHOG feature forms multiple dimensioned MHOG feature;
S66:Export WMHOG feature.
Further, S651:It firstly generates 1xN and ties up random array θ, window size W is set, input N-dimensional vector X, root
X ' [i] is arranged according to the value of element in θ, obtains X ' [i]:
X ' [i]=X [θ [i]] i=1,2 ..., N;
S652:Initialize N-dimensional Sparse Code C={ 0 } for
WhenWhereinFor vector X ' element
Position;WhenThen
S653:Generate WMHOG feature.
Further, S71:Using extraction WMHOG feature training histogram intersection kernel support vectors machine specifically by
Linearly inseparable sample is mapped to the higher dimensional space of linear separability by kernel function, and obtains Optimal Separating Hyperplane f (x, a*, b*) be:
Kernel function k (H1, H2) be:
Wherein, H1, H2 respectively indicate the histogram of the training sample;h1i、h2iIt is each to respectively indicate histogram H1, H2
The value of class, i=1,2 ..., m;a*Indicate the optimal solution of Lagrange multiplier;b*It indicates;K is indicated;T is indicated;yiIndicate classification mark
It signs { 1, -1 };I indicates the index value of supporting vector, shares m supporting vector;;xiIt is expressed as any supporting vector;w*It indicates;x
Indicate sample to be entered;N indicates sampling feature vectors dimension;
S72:WhenThen input picture T is+1 class;
WhenThen the input picture T is -1 class.
The advantage of the invention is that:The present invention is by being effectively extracted human body edge contour using the MSO feature of extension
Feature, dimension is smaller compared with Haar-like feature, advantageously reduces calculation amount;The further present invention passes through to MHOG spy
Sign carries out WTA hash coding and eliminates a large amount of redundancy, further reduces calculation amount;The present invention passes through simultaneously
Two kinds of classifier cascades of Gentle Adaboost and IKSVM, and by slightly to essence, gradually being judged, further improving inspection
Survey speed and precision.
Detailed description of the invention
For the clearer technical solution for illustrating the embodiment of the present invention or the prior art, to embodiment or will show below
There is attached drawing needed in technical description to do one simply to introduce, it should be apparent that, the accompanying drawings in the following description is only
Some embodiments of the present invention without creative efforts, may be used also for those of ordinary skill in the art
To obtain other drawings based on these drawings.
Fig. 1 is whole overall flow schematic diagram of the invention;
Fig. 2 is 4 direction gradient schematic diagrames of EMSO feature extraction of the invention;
Fig. 3 is step S4 flow diagram of the invention
Fig. 4 is step S5 flow diagram of the invention
Fig. 5 is step S6 flow diagram of the invention.
Specific embodiment
To keep the purposes, technical schemes and advantages of the embodiment of the present invention clearer, below with reference to the embodiment of the present invention
In attached drawing, technical solution in the embodiment of the present invention carries out clear and complete description:
Show as shown in Figure 1 for a kind of overall flow of the pedestrian detection method based on multiple features and cascade classifier of the present invention
It is intended to comprising following steps:
S1:Input the realtime graphic T of acquisition;
In the present embodiment, S2:The image T that step S1 is inputted is first passed through into Gamma correction, carries out the mark of color space
Standardization, then handled by gray processing, rgb color image is converted to gray level image, obtains pretreated image T ';
In the present embodiment, Gamma bearing calibration is to the gamma correction formula of pixel (x, y):
I (x, y)=I (x, y)γ;
Wherein, x indicates that the abscissa of pixel, y indicate that the abscissa of pixel, γ indicate the parameter of correction, γ=1/
2.It can be understood as by other means being corrected pixel in other embodiments.
In the present embodiment, S3:The multiple dimensioned direction EMSO that the described image T ' that step S2 is obtained is extended
(extended multi-scale orientation, abbreviation EMSO) feature extraction;By sliding window with step-length s from a left side to
It is n EMSO cell block that right sliding from top to bottom, which divides described image T ', and it is highly h, such as that the width of the sliding window, which is w,
Shown in Fig. 2, then each EMSO cell block is divided into horizontal gradient, vertical gradient, 45 ° of gradients of dextrorotation and left-handed 45 ° of gradients
Four sub-blocks calculate the pixel integration value of each sub-block, then calculate the direction H of EMSO cell blockeAnd discrete quantized unit
Block direction Fi, EMSO cell block direction value finally small to each of the discrete quantized is connected in series, described in composition
EMSO feature.
As preferred embodiment, step S3 calculates the pixel integration value:
Horizontal gradient pixel integration value DlCalculation formula be:
Vertical gradient pixel integration value DdCalculation formula be:
45 ° of gradient pixel integrated value D of dextrorotationdrCalculation formula be:
Left-handed 45 ° of gradient pixel integrated values DdlCalculation formula be:
Wherein, I (X) is X point pixel value, and Left subunit indicates left-half region in EMSO cell block, Right
Subunit indicates right half part region in EMSO cell block, and Up subunit indicates top half region in EMSO cell block,
Down subunit indicates lower half portion region in EMSO cell block, and Downright subunit indicates right in EMSO cell block
Lower partial region, Upleft subunit indicate upper left region in EMSO cell block, and Downleft subunit is indicated
Bottom left section region in EMSO cell block, Upright subunit indicate upper right portion region in EMSO cell block.
As preferred embodiment, the direction H of the EMSO cell blockeFor:
The discrete quantized unit Block direction FiFor:
Fi=Q (H);
Wherein, 0 °~180 ° of continuous direction is worth by function Q (H) according to every 20 ° one, by 0 °~180 ° discretization 9
The rendezvous value bin of angular discretization, set element value are bin={ 0,1 ..., 8 }.
As one embodiment of present embodiment, for a sub-picture using sliding window method to having a size of 64 ×
128 extraction EMSO feature, window size are 8 × 8,12 × 12,16 × 16, step-length 4.The feature of each size after extraction
Dimension is 465 dimensions, 420 peacekeepings 377 dimension, and being cascaded in series for rear dimension is 1262 dimensions, it can be seen that dimension is lower, special much smaller than HOG
Levy dimension.
In the present embodiment, S4:Gentle after the EMSO feature input training that step S3 is extracted
In Adaboost, the candidate region S of the detection block there are human body is filtered out;The Gentle Adaboost classifier passes through instruction
Practice Weak Classifier cascade and constitutes a strong classifier.
As preferred embodiment, as shown in figure 3, step S4 is also specifically included:S41:Set the maximum of strong classifier
False detection rate is fmax, minimum detection rate is dminAnd initialization weight distribution is carried out to training sample set:
Wherein wiIndicate the weight of i-th of sample in training, N indicates the number of training sample;
S42:The wheel number t and specified exercise wheel number M of more currently training, if t < M, jumps to step S49;Such as
Fruit t >=M, thens follow the steps S43;
S43:The weighted mean square calculated under the rectangular characteristic is poor;Equipped with N number of training sample, training rectangular characteristic used
Number is m;
For i=1:M enables value []=feature [i] [], the feature of all samples under i-th of rectangular characteristic
Value is copied to one-dimension array value, and one-dimension array value is ranked up by being minimal to maximum;
For j=1:N
Wherein, N indicates number of samples;wkIndicate the weight of k-th of sample, ykIndicate the label y of k-th of samplek=1 ,-
1};Feature [i] [] indicates the characteristic value of all samples under ith feature;
Weighted mean square then under rectangular characteristic is poor:
S44:As lefterror+righterror < fault, then current mean square error fault=is updated
Lefterror+righterror records threshold θ=value [j] of Weak Classifier;When lefterror+righterror >=
Fault does not change the threshold value of mean square error fault and Weak Classifier then, continues to execute in next step;
S45:It saves the coordinate of the smallest rectangular characteristic of mean square error and saves the parameter of optimal rectangle feature, obtain weak point
Class device ht(x):
ht(x)=lefterror+righterror;
Pick out the optimal Weak Classifier h learnt in t wheelt(x), so that under the training sample weight distribution,
The mean square error of sample is minimum, and the number for modifying Weak Classifier is t=t+1
S46:Determine the threshold value of current strong classifierMake current verification and measurement ratio dcur≥dmin
Wherein, numPos is the length of posvalute array;
S47:The false detection rate fcur for calculating current strong classifier, if fcur≤fmax, then strong classifier is trained finishes,
Step S49 is jumped to, if fcur> fmax, execute step S48.
S48:Training set weight is updated, step S42 is executed;
Wherein, z is indicated, yiIt indicates, xiIt indicates;
S49:It completes strong classifier training and saves the strong classifier after training.
In the present embodiment, S5:As shown in figure 4, passing through non-maxima suppression side to candidate region described in step S4
The candidate region that method gets rid of overlapping obtains the candidate region S ' of removal overlay region;
S51:The output valve of the candidate region S of the detection block of the human body of the step 4 acquisition is ranked up, is chosen
Best result and its corresponding candidate region;
S52:As the Duplication S of the corresponding candidate region of the current best resultab≥Sth, then the candidate frame is deleted;Work as institute
State the Duplication of the corresponding candidate region of current best result, Sab< SthThen retain the candidate region;Wherein, SabIndicate traversal
Candidate region is with the subregional overlapping area of current highest divided by the union area of two region areas;SthIndicate threshold value;
S53:Step S51 is repeated until the candidate region S of the detection block of the human body all by until judging.
In the present embodiment, S6:Extraction to the candidate region S ' carry out WMHOG feature of the removal overlay region;Institute
The extraction of WMHOG feature is stated first by the extraction of the multiple dimensioned HOG feature of candidate region S ' carry out of the removal overlay region, then is passed through
WTA hash coding removal redundancy;
In the present embodiment, as shown in figure 5, S61:First image T ' building is made of K degree, the transformation of each degree because
The image pyramid that son is σ is, wherein
σ=(1/4)k, k=1,2 ..., K;
As one embodiment of present embodiment, work as K=3, inputs the image of 64x128 size, the K of image pyramid
The size of a level is respectively 64x128,32x64,16x32.
S62:Calculate the gradient of each pixel of the every first order image of described image pyramid;
Wherein horizontal edge operator:[- 1,0,1];Vertical edge operator:[- 1,0,1];Pixel (x, y) in T image
Gradient is:
Gx(x, y)=H (x+1, y)-H (x-1, y)
Gy(x, y)=H (x, y+1)-H (x, y-1)
Wherein, Gx(x, y) indicates the horizontal direction gradient in input picture at pixel (x, y), Gy(x, y) indicates input
Vertical gradient in image at pixel (x, y), H (x, y) indicate the pixel value in input picture at pixel (x, y);
Then the gradient magnitude G (x, y) at pixel (x, y) and gradient direction α (x, y) is respectively:
S63:It is cell by the every level-one image segmentation of described image pyramid, and establishes gradient direction for each cell
Histogram;
S64:The adjacent cell is formed into block, normalized gradient histogram vectors in block;By the normalization
Histogram of gradients vector is together in series to obtain the MHOG feature of any level-one of image pyramid, by the every level-one of described image pyramid
The cascade of MHOG feature form multiple dimensioned MHOG feature;
S65:WTA hash is carried out to MHOG feature to encode to obtain WMHOG feature;The every level-one of described image pyramid
The cascade of MHOG feature forms multiple dimensioned MHOG feature;
S66:Export WMHOG feature.
As preferred embodiment, S651:It firstly generates 1xN and ties up random array θ, window size W is set, input N-dimensional
Vector X arranges X ' [i] according to the value of element in θ, obtains X ' [i]:
X ' [i]=X [θ [i]] i=1,2 ..., N;
S652:Initialize N-dimensional Sparse Code C={ 0 } for
WhenWhereinFor vector X ' element
Position;WhenThen
S653:Generate WMHOG feature.
As preferred embodiment, S7:By the intersection kernel support vectors after the WMHOG feature input training of extraction
Machine IKSVM accurately judges that getting rid of detection, there is no the candidate regions of the detection block of human body, and there are the detection blocks of human body for reservation
Candidate region S ";S8:It exports described there are the candidate region S " of the detection block of human body, that is, obtains the result of pedestrian detection.
In the present embodiment, S71:It is specific using the WMHOG feature training histogram intersection kernel support vectors machine of extraction
For linearly inseparable sample to be mapped to the higher dimensional space of linear separability by kernel function, and obtain Optimal Separating Hyperplane f (x, a*,
b*) be:
Kernel function k (H1, H2) be:
Wherein, H1, H2 respectively indicate the histogram of the training sample;h1i、h2iIt is each to respectively indicate histogram H1, H2
The value of class, i=1,2 ..., m;a*Indicate the optimal solution of Lagrange multiplier;b*It indicates;K is indicated;T is indicated;yiIndicate classification mark
It signs { 1, -1 };I indicates the index value of supporting vector, shares m supporting vector;;xiIt is expressed as any supporting vector;w*It indicates;x
Indicate sample to be entered;N indicates sampling feature vectors dimension;S72:WhenThen input
Image T is+1 class;WhenThen the input picture T is -1 class.
The foregoing is only a preferred embodiment of the present invention, but scope of protection of the present invention is not limited thereto,
Anyone skilled in the art in the technical scope disclosed by the present invention, according to the technique and scheme of the present invention and its
Inventive concept is subject to equivalent substitution or change, should be covered by the protection scope of the present invention.
Claims (10)
1. a kind of pedestrian detection method based on multiple features and cascade classifier, which is characterized in that include the following steps:
S1:Input the realtime graphic T of acquisition;
S2:The image T that step S1 is inputted is first passed through into Gamma correction, carries out the standardization of color space, then by gray processing
Rgb color image, is converted to gray level image, obtains pretreated image T ' by reason;
S3:The EMSO feature extraction that the pretreated image T ' that step S2 is obtained is extended;Pass through sliding window
With step-length s, from left to right sliding divides described image T ' as n EMSO cell block from top to bottom, and the width of the sliding window is
W is highly h, then each EMSO cell block is divided into horizontal gradient, vertical gradient, 45 ° of gradients of dextrorotation and left-handed 45 ° of ladders
Four sub-blocks are spent, the pixel integration value of each sub-block is calculated, then calculate the direction H of EMSO cell blockeAnd discrete quantized list
First Block direction Fi, EMSO cell block direction value finally small to each of the discrete quantized is connected in series, described in composition
EMSO feature;
S4:In Gentle Adaboost after the EMSO feature input training that step S3 is extracted, filter out that there are human bodies
Detection block candidate region S;
S5:Candidate region described in step S4 is removed by the candidate region that non-maxima suppression method gets rid of overlapping
The candidate region S ' of overlay region;
S6:The extraction of WMHOG feature is carried out to the candidate region S ' of the removal overlay region;The extraction of the WMHOG feature is first
The candidate region S ' of the removal overlay region is carried out to the extraction of multiple dimensioned HOG feature, then superfluous by WTA hash coding removal
Remaining information;
S7:Intersection kernel support vectors machine IKSVM after the WMHOG feature input training of extraction is accurately judged, is got rid of
There is no the candidate regions of the detection block of human body for detection, and there are the candidate region S ' ' of the detection block of human body for reservation;
S8:It exports described there are the candidate region S ' ' of the detection block of human body, that is, obtains the result of pedestrian detection.
2. a kind of pedestrian detection method based on multiple features and cascade classifier according to claim 1, feature also exist
In:
The Gamma bearing calibration is to the gamma correction formula of pixel (x, y):
I (x, y)=I (x, y)γ;
Wherein, x indicates that the abscissa of pixel, y indicate that the abscissa of pixel, γ indicate the parameter of correction, γ=1/2.
3. a kind of pedestrian detection method based on multiple features and cascade classifier according to claim 1, feature also exist
In:
The step S3 calculates the pixel integration value:
Horizontal gradient pixel integration value DlCalculation formula be:
Vertical gradient pixel integration value DdCalculation formula be:
45 ° of gradient pixel integrated value D of dextrorotationdrCalculation formula be:
Left-handed 45 ° of gradient pixel integrated values DdlCalculation formula be:
Wherein, I (X) is X point pixel value, and Left subunit indicates left-half region in EMSO cell block, Right
Subunit indicates right half part region in EMSO cell block, and Up subunit indicates top half region in EMSO cell block,
Down subunit indicates lower half portion region in EMSO cell block, and Downright subunit indicates right in EMSO cell block
Lower partial region, Upleft subunit indicate upper left region in EMSO cell block, and Downleft subunit is indicated
Bottom left section region in EMSO cell block, Upright subunit indicate upper right portion region in EMSO cell block.
4. a kind of pedestrian detection method based on multiple features and cascade classifier according to claim 1, feature also exist
In:
The direction H of the EMSO cell blockeFor:
The discrete quantized unit Block direction FiFor:
Fi=Q (H);
Wherein, 0 °~180 ° of continuous direction is worth by function Q (H) according to every 20 ° one, by 0 °~180 ° discretizations, 9 angles
The rendezvous value bin of discretization, set element value are bin={ 0,1 ..., 8 }.
5. a kind of pedestrian detection method based on multiple features and cascade classifier according to claim 1, feature also exist
In:The Gentle Adaboost classifier passes through training Weak Classifier cascade and constitutes a strong classifier.
6. a kind of pedestrian detection method based on multiple features and cascade classifier according to claim 5, feature also exist
In:
S41:The maximum false detection rate of strong classifier is set as fmax, minimum detection rate is dminAnd training sample set is initialized
Weight distribution:Wherein wiIndicate the weight of i-th of sample in training, N indicates training sample
Number;
S42:More currently the wheel number t of training and specified exercise wheel number M jump to step S49 if t >=M;If t<
M thens follow the steps S43;
S43:The weighted mean square calculated under the rectangular characteristic is poor;Equipped with N number of training sample, training rectangular characteristic number used is
m;
For i=1:M enables value []=feature [i] [], and the characteristic value of all samples under i-th of rectangular characteristic is copied
Shellfish gives one-dimension array value, and one-dimension array value is ranked up by being minimal to maximum;
For j=1:N
Wherein, N indicates number of samples;wkIndicate the weight of k-th of sample, ykIndicate the label y of k-th of samplek={ 1, -1 };
Feature [i] [] indicates the characteristic value of all samples under ith feature;
Weighted mean square then under rectangular characteristic is poor:
S44:Work as lefterror+righterror<Fault then updates current mean square error fault=lefterror+
Righterror records threshold θ=value [j] of Weak Classifier;As lefterror+righterror >=fault, then do not change
The threshold value for becoming mean square error fault and Weak Classifier continues to execute in next step;
S45:It saves the coordinate of the smallest rectangular characteristic of mean square error and saves the parameter of optimal rectangle feature, obtain Weak Classifier
ht(x):
ht(x)=lefterror+righterror;
Pick out the optimal Weak Classifier h learnt in t wheelt(x), so that under the training sample weight distribution, sample
Mean square error is minimum, and the number for modifying Weak Classifier is t=t+1
S46:Determine the threshold value of current strong classifierMake current verification and measurement ratio dcur≥dmin
Wherein, numPos is the length of posvalute array;
S47:The false detection rate fcur for calculating current strong classifier, if fcur≤fmax, then strong classifier is trained finishes, and jumps
To step S49, if fcur>fmax, execute step S48.
S48:Training set weight is updated, step S42 is executed;
Wherein, z indicates the adduction of current training sample weight, yiIndicate the label value of i-th of sample, xiIndicate the feature of sample
Value;
S49:It completes strong classifier training and saves the strong classifier after training.
7. a kind of pedestrian detection method based on multiple features and cascade classifier according to claim 1, feature also exist
In:
S51:The output valve of the candidate region S of the detection block of the human body of the step 4 acquisition is ranked up, highest is chosen
Point and its corresponding candidate region;
S52:As Duplication Sab >=Sth of the corresponding candidate region of the current best result, then the candidate frame is deleted;When described
The Duplication of the current corresponding candidate region of best result, Sab<Sth then retains the candidate region;Wherein, SabIndicate the time of traversal
Favored area is with the subregional overlapping area of current highest divided by the union area of two region areas;SthIndicate threshold value;
S53:Step S51 is repeated until the candidate region S of the detection block of the human body all by until judging.
8. a kind of pedestrian detection method based on multiple features and cascade classifier according to claim 1, feature also exist
In:
S61:Image T ' building is spent by K and is constituted and image pyramid that the transformation factor of each degree is σ is, wherein
σ=(1/4)k, k=1,2 ..., K;
S62:Calculate the gradient of each pixel of the every first order image of described image pyramid;
Horizontal edge operator:[-1,0,1];Vertical edge operator:[-1,0,1];The gradient of pixel (x, y) is in T image:
Gx(x, y)=H (x+1, y)-H (x-1, y)
Gy(x, y)=H (x, y+1)-H (x, y-1)
Wherein, Gx(x, y) indicates the horizontal direction gradient in input picture at pixel (x, y), Gy(x, y) indicates input picture
Vertical gradient at middle pixel (x, y), H (x, y) indicate the pixel value in input picture at pixel (x, y);
Then the gradient magnitude G (x, y) at pixel (x, y) and gradient direction α (x, y) is respectively:
S63:It is cell by the every level-one image segmentation of described image pyramid, and establishes gradient direction histogram for each cell
Figure;
S64:The adjacent cell is formed into block, normalized gradient histogram vectors in block;By the normalized gradient
Histogram vectors are together in series to obtain the MHOG feature of any level-one of image pyramid, by the every level-one of described image pyramid
The cascade of MHOG feature forms multiple dimensioned MHOG feature;
S65:WTA hash is carried out to MHOG feature to encode to obtain WMHOG feature;The MHOG of the every level-one of described image pyramid is special
Sign cascade forms multiple dimensioned MHOG feature;
S66:Export WMHOG feature.
9. a kind of pedestrian detection method based on multiple features and cascade classifier according to claim 8, feature also exist
In:
S651:It firstly generates 1xN and ties up random array θ, window size W is set, input N-dimensional vector X, arranged according to the value of element in θ
It arranges X ' [i], obtains X ' [i]:
X ' [i]=X [θ [i]] i=1,2 ..., N;
S652:Initialize N-dimensional Sparse Code C={ 0 } for
WhenWhereinFor vector X ' element
Position;WhenThen
S653:Generate WMHOG feature.
10. a kind of pedestrian detection method based on multiple features and cascade classifier according to claim 1, feature also exist
In:
S71:It will linearly not specifically by kernel function using the WMHOG feature training histogram intersection kernel support vectors machine of extraction
The higher dimensional space that sample can be divided to be mapped to linear separability, and obtain Optimal Separating Hyperplane f (x, a*,b*) be:
Kernel function k (H1,H2) be:
Wherein, H1, H2 respectively indicate the histogram of the training sample;h1i、h2iRespectively indicate each class of histogram H1, H2
Value, i=1,2 ..., m;a*Indicate the optimal solution of Lagrange multiplier;b*It indicates;K is indicated;T is indicated;yiIndicate class label
{1,-1};xiIt is expressed as any supporting vector;w*It indicates;X indicates sample to be entered;N indicates sampling feature vectors dimension;I is indicated
The index value of supporting vector shares m supporting vector;
S72:WhenThen input picture T is+1 class;
WhenThen the input picture T is -1 class.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810684624.8A CN108875668A (en) | 2018-06-28 | 2018-06-28 | A kind of pedestrian detection method based on multiple features and cascade classifier |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810684624.8A CN108875668A (en) | 2018-06-28 | 2018-06-28 | A kind of pedestrian detection method based on multiple features and cascade classifier |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108875668A true CN108875668A (en) | 2018-11-23 |
Family
ID=64295418
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810684624.8A Pending CN108875668A (en) | 2018-06-28 | 2018-06-28 | A kind of pedestrian detection method based on multiple features and cascade classifier |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108875668A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109827568A (en) * | 2019-01-29 | 2019-05-31 | 东北大学秦皇岛分校 | Pedestrian level location estimation method in tier building based on MEMS sensor |
CN110211182A (en) * | 2019-05-31 | 2019-09-06 | 东北大学 | A kind of LCD backlight vision positioning method based on Gray-scale Matching and objective contour |
CN110751023A (en) * | 2019-09-05 | 2020-02-04 | 杭州视鑫科技有限公司 | Tandem pedestrian detection method for video stream |
CN111523613A (en) * | 2020-05-09 | 2020-08-11 | 黄河勘测规划设计研究院有限公司 | Image analysis anti-interference method under complex environment of hydraulic engineering |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102496001A (en) * | 2011-11-15 | 2012-06-13 | 无锡港湾网络科技有限公司 | Method of video monitor object automatic detection and system thereof |
CN106022231A (en) * | 2016-05-11 | 2016-10-12 | 浙江理工大学 | Multi-feature-fusion-based technical method for rapid detection of pedestrian |
CN107066968A (en) * | 2017-04-12 | 2017-08-18 | 湖南源信光电科技股份有限公司 | The vehicle-mounted pedestrian detection method of convergence strategy based on target recognition and tracking |
-
2018
- 2018-06-28 CN CN201810684624.8A patent/CN108875668A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102496001A (en) * | 2011-11-15 | 2012-06-13 | 无锡港湾网络科技有限公司 | Method of video monitor object automatic detection and system thereof |
CN106022231A (en) * | 2016-05-11 | 2016-10-12 | 浙江理工大学 | Multi-feature-fusion-based technical method for rapid detection of pedestrian |
CN107066968A (en) * | 2017-04-12 | 2017-08-18 | 湖南源信光电科技股份有限公司 | The vehicle-mounted pedestrian detection method of convergence strategy based on target recognition and tracking |
Non-Patent Citations (3)
Title |
---|
常峰,杨彬,窦建华: "基于多特征和级联分类器的行人检测算法", 《合肥工业大学学报(自然科学版)》 * |
常峰: "基于多特征和级联分类器的人体检测算法", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
陈慧岩,熊光明,龚建伟,姜岩: "《无人驾驶汽车概论》", 31 July 2014 * |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109827568A (en) * | 2019-01-29 | 2019-05-31 | 东北大学秦皇岛分校 | Pedestrian level location estimation method in tier building based on MEMS sensor |
CN110211182A (en) * | 2019-05-31 | 2019-09-06 | 东北大学 | A kind of LCD backlight vision positioning method based on Gray-scale Matching and objective contour |
CN110211182B (en) * | 2019-05-31 | 2023-03-31 | 东北大学 | Liquid crystal backlight visual positioning method based on gray scale matching and target contour |
CN110751023A (en) * | 2019-09-05 | 2020-02-04 | 杭州视鑫科技有限公司 | Tandem pedestrian detection method for video stream |
CN110751023B (en) * | 2019-09-05 | 2023-04-28 | 杭州视鑫科技有限公司 | Series pedestrian detection method for video stream |
CN111523613A (en) * | 2020-05-09 | 2020-08-11 | 黄河勘测规划设计研究院有限公司 | Image analysis anti-interference method under complex environment of hydraulic engineering |
CN111523613B (en) * | 2020-05-09 | 2023-03-24 | 黄河勘测规划设计研究院有限公司 | Image analysis anti-interference method under complex environment of hydraulic engineering |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Tao et al. | Smoke detection based on deep convolutional neural networks | |
Chen et al. | Vehicle detection in satellite images by hybrid deep convolutional neural networks | |
CN104392463B (en) | Image salient region detection method based on joint sparse multi-scale fusion | |
CN108875668A (en) | A kind of pedestrian detection method based on multiple features and cascade classifier | |
Haloi | Traffic sign classification using deep inception based convolutional networks | |
CN110276269A (en) | A kind of Remote Sensing Target detection method based on attention mechanism | |
CN104809731B (en) | A kind of rotation Scale invariant scene matching method based on gradient binaryzation | |
CN110334762B (en) | Feature matching method based on quad tree combined with ORB and SIFT | |
CN107945153A (en) | A kind of road surface crack detection method based on deep learning | |
CN109446922B (en) | Real-time robust face detection method | |
CN109714526B (en) | Intelligent camera and control system | |
WO2023082784A1 (en) | Person re-identification method and apparatus based on local feature attention | |
CN106778768A (en) | Image scene classification method based on multi-feature fusion | |
Zhu et al. | Diverse sample generation with multi-branch conditional generative adversarial network for remote sensing objects detection | |
CN109785298A (en) | A kind of multi-angle object detecting method and system | |
CN104298974A (en) | Human body behavior recognition method based on depth video sequence | |
CN109325507A (en) | A kind of image classification algorithms and system of combination super-pixel significant characteristics and HOG feature | |
CN107767416A (en) | The recognition methods of pedestrian's direction in a kind of low-resolution image | |
CN108256462A (en) | A kind of demographic method in market monitor video | |
CN107315990A (en) | A kind of pedestrian detection algorithm based on XCS LBP features and cascade AKSVM | |
CN102024149B (en) | Method of object detection and training method of classifier in hierarchical object detector | |
CN105574545B (en) | The semantic cutting method of street environment image various visual angles and device | |
Prasad et al. | HOG, LBP and SVM based traffic density estimation at intersection | |
Liu et al. | CAFFNet: channel attention and feature fusion network for multi-target traffic sign detection | |
CN110188646A (en) | The human ear identification method merged based on gradient orientation histogram with local binary patterns |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181123 |