CN104200485B - Video-monitoring-oriented human body tracking method - Google Patents
Video-monitoring-oriented human body tracking method Download PDFInfo
- Publication number
- CN104200485B CN104200485B CN201410328405.8A CN201410328405A CN104200485B CN 104200485 B CN104200485 B CN 104200485B CN 201410328405 A CN201410328405 A CN 201410328405A CN 104200485 B CN104200485 B CN 104200485B
- Authority
- CN
- China
- Prior art keywords
- target
- human body
- value
- frame
- kalman
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 45
- 238000012544 monitoring process Methods 0.000 claims abstract description 28
- 238000001914 filtration Methods 0.000 claims abstract description 27
- 230000033001 locomotion Effects 0.000 claims abstract description 15
- 230000008859 change Effects 0.000 claims abstract description 11
- 238000012937 correction Methods 0.000 claims abstract description 10
- 230000003044 adaptive effect Effects 0.000 claims abstract description 9
- 230000006870 function Effects 0.000 claims description 42
- 239000011159 matrix material Substances 0.000 claims description 22
- 238000001514 detection method Methods 0.000 claims description 19
- 230000014509 gene expression Effects 0.000 claims description 16
- 238000004364 calculation method Methods 0.000 claims description 13
- 238000010606 normalization Methods 0.000 claims description 6
- 238000012546 transfer Methods 0.000 claims description 6
- 230000007306 turnover Effects 0.000 claims description 4
- 210000000746 body region Anatomy 0.000 claims description 3
- 238000000205 computational method Methods 0.000 claims description 3
- 238000006073 displacement reaction Methods 0.000 claims description 3
- 230000007717 exclusion Effects 0.000 claims description 3
- 238000005259 measurement Methods 0.000 claims description 3
- 230000003068 static effect Effects 0.000 claims description 3
- 239000004744 fabric Substances 0.000 claims 1
- 230000000877 morphologic effect Effects 0.000 claims 1
- 230000037237 body shape Effects 0.000 abstract description 2
- 230000008569 process Effects 0.000 description 4
- 238000010586 diagram Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000001788 irregular Effects 0.000 description 2
- 238000011160 research Methods 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 244000025254 Cannabis sativa Species 0.000 description 1
- 241000270295 Serpentes Species 0.000 description 1
- 239000012141 concentrate Substances 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 239000002245 particle Substances 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Landscapes
- Image Analysis (AREA)
Abstract
The invention provides a video-monitoring-oriented human body tracking method. Specific to the high instantaneity and scene complexity in video monitoring, a kernel-function-based adaptive human body shape change tracking method which combines mean shift and Kalman filtering is adopted. The method comprises the following steps: acquiring a tracking target through a background difference method; establishing a human body tracking template and a color histogram, and initializing the state of a Kalman filter; acquiring the position of the target by using a kernel-function-based mean shift method in a predicted range in a next frame video image of a video according to the range of a motion target predicted according to the Kalman filter; calculating the size of a target region through a projection drawing of the histogram of a target color; performing Kalman filtering correction to obtain a final position.
Description
Technical field
The present invention relates to the method for technical field of image processing, specifically a kind of human body tracking side of facing video monitoring
Method.
Background technology
With social constantly development with it is progressive, the big common people for the more and more higher of the security requirement of personal property, by
Have in video monitoring it is directly perceived, it is convenient and not by the green grass or young crops for the supremacy clause such as being limited away from discrete time and being increasingly subject to people
Look at.And for the detection of moving object, identification and tracking are then always current intelligent video monitoring research field in video monitoring
Popular research direction, there be common tracking in video sequence:Based on the snake algorithms of the tracking of profile, based on fortune
The particle filter algorithm of movable model, and the meanshift algorithms based on color probability.Due to the meter of meanshift algorithms
Calculate simple, real-time is good, can be applicable to real-time video monitoring.
Meanshift has been applied to first Cheng the direction of image procossing.What Comaniciu et al. was proposed
Meanshift tracks overall framework and realizes step, it is proposed that the weighting entered on row distance to target using kernel function can be more
The color characteristic of good expression target.Bradski proposes what is be tracked using the hue components of hsv color spaces
Camshift methods.
Meanshift algorithm Kernel Function window widths are changeless, when target has certain dimensional variation, can be led
Cause target following is inaccurate, and especially target becomes apparent from this phenomenon away from or closer to during.
Camshift algorithms are based on meanshift algorithms, it is proposed that a kind of adaptive method of target sizes.The party
Method improves the robustness of meanshift, and the tracking effect under solid background is preferable, but for the tracking under complex background
Yet suffer from track less than problem.
It with average drifting is basic following principle that two kinds of algorithms are all, it is meant that the speed of moving object can not be excessive,
If mobile object speed, mean algorithm cannot accurately search out target in the drift number of times of regulation.
Human body in video monitoring is nonrigid moving object, and major part deformation is had in motion process, and
It is in irregular shape due to human body, the interference of background is easily entrained when extracting to target, background in tracking afterwards
The interference of color can progressively expanding.Therefore it is not ideal that two kinds of algorithm effects are used alone.
The content of the invention
The present invention will overcome the disadvantages mentioned above of prior art, there is provided a kind of searching target accurately, high robust towards regarding
The human body tracing method of frequency monitoring.
The present invention combines the advantage of two kinds of algorithms after it have studied meanshift the and camshift algorithms based on color,
Using the position that human body is determined based on the average drifting function of core, using the perspective view of the H components in HSV space human body is calculated
Size, and further increase the robustness of track algorithm with reference to Kalman filtering.
Due to irregular, the histogram for bringing easily impact human body color into of edge background, with tracking of body shape
Constantly carry out, background error can be increasing, therefore selects kernel function, for apart from tracking center position difference where enter
The different weighted value of row, the template that can cause target more concentrates on center, reduces what edge background was set up to body templates
Interference.So that target following is more concentrated.
With reference to kernel function meanshift methods due to the bandwidth that it tracks the kernel function of target it is constant, therefore to target
The size of tracking will not change with target deformation, for the human body that just camera is being moved forward and backward can not with it is fine
Adaptive change tracking box size.Therefore the perspective view of the H components of the HSV space of image is used, tracking thing is calculated
The length and width of body.So that the generation with human body deformation also can the adaptive size for tracking object.And establish template more
New Policy so that kernel function can change tracking bandwidth with the change of the size of target.
Due to calculate human body position and size not in a kind of color space, for amount of calculation has certain increase, because
This employs the method for Kalman Prediction, and human body target is scanned in the environs of Kalman prediction position,
Reduce for the calculating without human space, while increased for the robustness of Similar color interference.
It is of the invention main including herein below
1. a kind of human body tracing method of facing video monitoring, comprises the following steps:
1) background modeling and target detection are extracted, and first the scene to being applied carries out background modeling, from video monitoring figure
As extracting scene background picture, pFimage is modeled as static scene carries out gray scale, starts to carry out video after the completion of modeling
The detection of moving object, current detection frame is pFrame, carries out gaussian filtering to pFrame first with smoothed image, reduces noise
Interference, present frame and background subtraction be worth to the target to be tracked moved, and the target target to be tracked to detecting carries out form
Learning filtering can remove noise, and fill hole so that the profile of object is more nearly real human body, for the change of indoor light
Change and the entrance of some non-human objects, using the context update strategy of turnover rate β, wherein the formula for updating is
PFimage=pFimage+ β pFrame
For detected object to be tracked, using the size exclusion of area non-human moving target is fallen, obtained
Need the human body target of tracking;
2) Kalman filter initialization and prediction
If target occurs in first FkFrame, it is occurred in, and image is upper to be set to pk(xk,yk), then basis detects mesh
Preliminary examination of the target position to Kalman filter, and the state equation using Kalman filtering predicts next frame target
Position (xp,yp), for FkFrame is by predicted position (xp,yp) it is set to the actual position of human body, and the region near future position
It is set as estimation range;
3) initialization of human body target tracking
By FkFrame is transformed into the target body H component that hsv color space and statistics are obtained according to target detection from rgb space
Distribution of color histogram hist, according to hist the back projection figure bp (x of estimation range are calculatedij);
4) foundation of template and renewal
The feature templates model of human body is set up in RGB color if target is occur first, and is counted
The frame number of tracking, if the frame number of statistics is the multiple for updating coefficient, then it is assumed that template is varied, with the target of current tracking
Body templates model is recalculated in region, using new template as the template of search;
5) search of estimation range
In order to reduce amount of calculation and improve robustness, in the next frame of the frame that target occurs, search near estimation range
Position after target movement, searching method is in former frame target location (xk,yk) candidate mesh of place's selection as target sizes
Mark region, centered on the position of former frame target candidate target region model1 is set up, and obtains the color of candidate target region
Probability distribution maximum position pn;
6) searching position of final goal is judged
The method for determining whether optimal estimation is with the color probability distribution maximum position p of target twicen+1(xn+1,
yn+1) and pn(xn,yn) displacement | pn+1-pn| whether less than threshold value, if less than the position p of the then new target of threshold valuen+1
(xn+1,yn+1) as the searching position of final goal, if greater than threshold value then with new pn+1(xn+1,yn+1) be core, target mould
Plate size re-establishes new candidate target region, and calculates the model1 of new candidate target region, and 5) return is recalculated
The core position p of fresh targetn+2(xn+2,yn+2), until being less than threshold value or having reached the number of times of circulation, what return finally gave
Target location pn+m(xn+m,yn+m);
7) adaptive polo placement human region
According to the target projection figure bp (x for 3) obtainingij) calculate the zeroth order square of target location, first moment, second moment meter is simultaneously
And calculate image length and width l1And l2And inclined angle;
8) correction and renewal of Kalman filtering
When the position of target that 5) search is obtained with 2) in the residual error of predicted position exceed certain threshold value after, from karr
Used as the final position of target, the position after otherwise being corrected using Kalman filter is used as most for the position of the prediction of graceful filtering
Final position is put, and for the current state value that the renewal that Kalman filter carries out state includes covariance and target, filters Kalman
Ripple device can continue in the next frame the position for predicting human body target.
2. step 2) according to preliminary examination of the position to Kalman filter for detecting target, the state of Kalman filtering
Equation is
X (k)=A X (k-1)+W (k)
Wherein X (k) is current state matrix, and X (k-1) is the state matrix of previous moment, and W (k) is system noise, and it is special
Levy distribution and meet Gaussian Profile, A for system transfer matrix, X (k) is the matrix of one 4 dimension, X (k)=(xk, yk,Vkx, Vky)
X thereink, ykRepresent the initial position abscissa and ordinate of object of which movement, Vkx, VkyRepresent object of which movement speed it is horizontal
Speed and longitudinal velocity, original state xk,ykFor the position of target, speed V of preliminary examinationkx, VkyFor 0;Kalman filtering it is pre-
It is attached in Kalman prediction point when surveying purpose to carry out location finding and calculating estimation range perspective view for human body target
Closely scan for, it is possible to reduce the scope of search, reduce amount of calculation, strengthen the real-time of target following.
3. step 3) in the target body region that obtained according to target detection, count the color of object H components of HSV space
Probability histogram hist, the interval statistics value of each is
Wherein pijRepresent pixel (i, j) place pixel value, u represent histogrammic u-th it is interval, the scope of u isL is the discrimination for arranging, and m, n represents the horizontal number and longitudinal number of target body area pixel point;
The back projection figure bp (x of estimation rangeij) formula it is as follows:
Wherein pijRepresent the value of pixel (i, j) place pixel, b (pij) represent the p on position (i, j)ijIt is corresponding straight
Square figure counts interval for u-th, buThe value in u-th statistics interval, m are represented, n represents the horizontal number of estimation range pixel and longitudinal direction
δ (x) function expressions are as follows in two formulas more than several:
If belonging to color of object in the perspective view for obtaining, its value than larger, and can be not belonging to the value of color of object then
For 0.
4. a kind of facing video monitoring according to claim 1 human body tracing method it is characterized in that:Step 4)
The middle feature templates for setting up human body are the target bodies obtained first using target detection, are p in target locationk(xk,yk) place adopts
The model model of human body is set up with the method for kernel density estimation, it is u-th characteristic value in To Template that model is represented
The Multilayer networks of estimation, set up the triple channel model model of the RGB models of human body, and model is a three-dimensional square
Battle array, for representing the color characteristic of target, color of object is characterized as 16*16*16, and object module can be expressed as:
Wherein b (xi) it is xiThe fiducial value of u-th feature of pixel at place, the value of u is { 1...m }, and δ is Kronecker
Function, h is kernel function bandwidth, and the height of n target areas, C is expressed as normalization coefficient:
K (x) Ye Panieqi Nico husband's kernel function expression formulas are:
Wherein cd for area of space size, the dimension of d representation spaces;
5. a kind of facing video monitoring according to claim 1 human body tracing method it is characterized in that:Step 5)
The core calculations of middle candidate target region are the principles according to average drifting, set up the weight ratio based on the object module of kernel function
Value matrix ωi
Wherein model be right 4 in object module, model1 for candidate target region model, modeling pattern with
Model is identical, and m is the summation of target area point, when target former frame target location is pk(xk,yk) when, because present frame is chosen
Candidate target region with former frame target location as core, the expression formula for setting up candidate region model model1 is as follows
b(xi) it is xiThe fiducial value of u-th feature of pixel at place, the value of u is { 1...m }, and δ is Kronecker function,
H is kernel function bandwidth, and n is the height of candidate target region, and C is normalization coefficient, and expression formula is identical with model models,
Core p of present frame candidate target regionnFor
Wherein g (x) is the derivative of kernel function K (x), and K (x) adopts Ye Panieqi Nico husband's kernel functions, and n is candidate target area
The height in domain, h is the bandwidth of kernel function, i.e. candidate target region width.
6. step 7) according to perspective view bp (xij) target area moment of the orign, first order and second order moments, and calculate mesh
Target size and the following M of its computational methods of angle of inclination00It is M for moment of the orign10,M01, M11For first moment M20,M02For second moment
Wherein l1,l2The length and width in the region of human body target are represented, θ represents the angle of target tilt, wiRepresent perspective view bp
(xij) on point (x, y) place value.
7. step 8) in the renewal of Kalman filter include the current state value of covariance and target, wherein updating karr
Step 5 in observation observation Z (k) right 1 of graceful equation) in the human body for searching position,
Optimized being estimated as follows is made to current state value:
X (k | k)=X (k | k-1)+Kg (k) (Z (k)-HX (k | k-1))
Wherein Kg (k) for current state kalman gain (Kalman Gain), X (k | k) current state optimal estimation, X
(k | k-1) is the optimal estimation at the k-1 moment to the k moment, and H is the given calculation matrix of initialization
Kg (k)=P (k | k-1) HT/(H P(k|k-1)HT+R)
Wherein P (k | k-1) covariance of the expression at the k-1 moment to the optimal estimation at k moment, renewal P (k | k-1),
P (k | k-1)=A P (k-1 | k-1) AT+Q
Wherein A is the transfer matrix of state equation in right 2, finally needs the covariance for updating X (k | k) under k-state
P (k | k)=(I-Kg (k) H) P (k | k-1)
Q and R represent respectively the motion artifacts of system and the covariance of measurement noise in above formula, are set to constant 1e-5 and 1e-
1;
The correction of Kalman filter is the position (x (k), y (k)) of the target that present frame searching algorithm is obtained and former frame
The residual error of Kalman prediction position (x (k-1), y (k-1)) exceed threshold value after, then from Kalman filtering prediction position
The final position as target is put, the definition of wherein residual error is:
Threshold value words are not above using the position after Kalman filter correction as final position.
It is an advantage of the invention that:1. being capable of the adaptive change for calculating tracking size of human body for the human body of tracking;2.
When search needs the target of tracking, trace template can be according to having tracked frame number to trace template self-adaptative adjustment kernel function
Bandwidth;3. the forecasting characters for employing Kalman filtering are predicted to the position that target occurs, and reduce unnecessary region
Calculate, it is to avoid the interference of other objects in monitor area, improve the real-time and robustness of target following.
Description of the drawings
Fig. 1 is the Objective extraction binary map of the present invention
Fig. 2 is the schematic diagram of the kernel function in higher dimensional space of the present invention
Fig. 2 a are the schematic diagrames of the average kernel function of the present invention
Fig. 2 b are the schematic diagrames of the gaussian kernel function of the present invention
Fig. 3 is the adaptive tracking method flow chart of the present invention
Fig. 4 is the overall flow figure of the present invention
Specific embodiment
Below just the specific implementation process of the present invention is described in detail, and parameter setting below is in this experimental ring
The optimal value for obtaining is tested under border.Due to color tracking algorithm for light and surrounding environment have certain degree of association, at other
Environment in can also further optimize and revise, the examples below is only an example of numerous experiments.The present invention is passed through
Various case verifications, it was demonstrated that its validity and practicality.
The test environment of this test is indoor environment, and human body tracking has been selected single body normally to walk in laboratory, taken the photograph
As head is the fixing camera of monocular, human body is advanced for before and after, there is certain human body deformation quantity.
1. a kind of human body tracing method of facing video monitoring, comprises the following steps:
1) background modeling and target detection are extracted, and first the scene to being applied carries out background modeling, from video monitoring figure
As extracting scene background picture, pFimage is modeled as static scene carries out gray scale, starts to carry out video after the completion of modeling
The detection of moving object, current detection frame is pFrame, carries out gaussian filtering to pFrame first with smoothed image, reduces noise
Interference, present frame and background subtraction be worth to the target to be tracked moved, and the target target to be tracked to detecting carries out form
Learning filtering can remove noise, and fill hole so that the profile of object is more nearly real human body, for the change of indoor light
Change and the entrance of some non-human objects, using the context update strategy of turnover rate β, wherein the formula for updating is
PFimage=pFimage+ β pFrame
For detected object to be tracked, using the size exclusion of area non-human moving target is fallen, obtained
The human body target of tracking is needed, turnover rate β is 0.005 in actual implementation process;
2) Kalman filter initialization and prediction
If target occurs in first FkFrame, it is occurred in, and image is upper to be set to pk(xk,yk), then basis detects mesh
Preliminary examination of the target position to Kalman filter, and the state equation using Kalman filtering predicts next frame target
Position (xp,yp), for FkFrame is by predicted position (xp,yp) it is set to the actual position of human body, and the region near future position
It is set as estimation range;
3) initialization of human body target tracking
By FkFrame is transformed into the target body H component that hsv color space and statistics are obtained according to target detection from rgb space
Distribution of color histogram hist, according to hist the back projection figure bp (x of estimation range are calculatedij);
4) foundation of template and renewal
The feature templates model of human body is set up in RGB color if target is occur first, and is counted
The frame number of tracking, if the frame number of statistics is the multiple for updating coefficient, then it is assumed that template is varied, with the target of current tracking
Body templates model is recalculated in region, using new template as the template of search, is updated coefficient and is set in actual implementation process
For 4;
5) search of estimation range
In order to reduce amount of calculation and improve robustness, in the next frame of the frame that target occurs, search near estimation range
Position after target movement, searching method is in former frame target location (xk,yk) candidate mesh of place's selection as target sizes
Mark region, centered on the position of former frame target candidate target region model1 is set up, and obtains the color of candidate target region
Probability distribution maximum position pn;
6) searching position of final goal is judged
The method for determining whether optimal estimation is with the color probability distribution maximum position p of target twicen+1(xn+1,
yn+1) and pn(xn,yn) displacement | pn+1-pn| whether less than threshold value, if less than the position p of the then new target of threshold valuen+1
(xn+1,yn+1) as the searching position of final goal, if greater than threshold value then with new pn+1(xn+1,yn+1) be core, target mould
Plate size re-establishes new candidate target region, and calculates the model1 of new candidate target region, and 5) return is recalculated
The core position p of fresh targetn+2(xn+2,yn+2), until being less than threshold value or having reached the number of times of circulation, what return finally gave
Target location pn+m(xn+m,yn+m), threshold value is set to 3 in actual enforcement, and cycle-index is 20 times;
7) adaptive polo placement human region
According to the target projection figure bp (x for 3) obtainingij) calculate the zeroth order square of target location, first moment, second moment meter is simultaneously
And calculate image length and width l1And l2And inclined angle;
8) correction and renewal of Kalman filtering
When the position of target that 5) search is obtained with 2) in the residual error of predicted position exceed certain threshold value after, from karr
Used as the final position of target, the position after otherwise being corrected using Kalman filter is used as most for the position of the prediction of graceful filtering
Final position is put, and for the current state value that the renewal that Kalman filter carries out state includes covariance and target, filters Kalman
Ripple device can continue in the next frame the position for predicting human body target.
2. a kind of facing video monitoring according to claim 1 human body tracing method it is characterized in that:Step 2)
Middle basis detects the preliminary examination of the position to Kalman filter of target, and the state equation of Kalman filtering is
X (k)=A X (k-1)+W (k)
Wherein X (k) is current state matrix, and X (k-1) is the state matrix of previous moment, and W (k) is system noise, and it is special
Levy distribution and meet Gaussian Profile, A for system transfer matrix, X (k) is the matrix of one 4 dimension, X (k)=(xk, yk,Vkx, Vky) its
In xk, ykRepresent the initial position abscissa and ordinate of object of which movement, Vkx, VkyRepresent the horizontal speed of the speed of object of which movement
Degree and longitudinal velocity, original state xk,ykFor the position of target, speed V of preliminary examinationkx, VkyFor 0;The prediction of Kalman filtering
When purpose for human body target in order to carry out location finding and calculate estimation range perspective view, near Kalman prediction point
Scan for, it is possible to reduce the scope of search, reduce amount of calculation, strengthen the real-time of target following whereinB
For full 0 matrix.
3. step 3) in the target body region that obtained according to target detection, count the color of object H components of HSV space
Probability histogram hist, the interval statistics value of each is
Wherein pijRepresent pixel (i, j) place pixel value, u represent histogrammic u-th it is interval, the scope of u isL is the discrimination for arranging, and m, n represents the horizontal number and longitudinal number of target body area pixel point, is embodied as
During l be set to 50;
The back projection figure bp (x of estimation rangeij) formula it is as follows:
Wherein pijRepresent the value of pixel (i, j) place pixel, b (pij) represent the p on position (i, j)ijIt is corresponding straight
Square figure counts interval for u-th, buThe value in u-th statistics interval, m are represented, n represents the horizontal number of estimation range pixel and longitudinal direction
δ (x) function expressions are as follows in two formulas more than several:
If belonging to color of object in the perspective view for obtaining, its value than larger, and can be not belonging to the value of color of object then
For 0.
4. a kind of facing video monitoring according to claim 1 human body tracing method it is characterized in that:Step 4)
The middle feature templates for setting up human body are the target bodies obtained first using target detection, are p in target locationk(xk,yk) place adopts
The model model of human body is set up with the method for kernel density estimation, it is u-th characteristic value in To Template that model is represented
The Multilayer networks of estimation, set up the triple channel model model of the RGB models of human body, and model is a three-dimensional square
Battle array, for representing the color characteristic of target, color of object is characterized as 16*16*16, and object module can be expressed as:
Wherein b (xi) it is xiThe fiducial value of u-th feature of pixel at place, the value of u is { 1...m }, and δ is Kronecker
Function, h is kernel function bandwidth, and the height of n target areas, C is expressed as normalization coefficient:
K (x) Ye Panieqi Nico husband's kernel function expression formulas are:
Wherein cd for area of space size, the dimension of d representation spaces;
5. a kind of facing video monitoring according to claim 1 human body tracing method it is characterized in that:Step 5)
The core calculations of middle candidate target region are the principles according to average drifting, set up the weight ratio based on the object module of kernel function
Value matrix ωi
Wherein model be right 4 in object module, model1 for candidate target region model, modeling pattern with
Model is identical, and m is the summation of target area point, when target former frame target location is pk(xk,yk) when, because present frame is chosen
Candidate target region with former frame target location as core, the expression formula for setting up candidate region model model1 is as follows
b(xi) it is xiThe fiducial value of u-th feature of pixel at place, the value of u is { 1...m }, and δ is Kronecker function,
H is kernel function bandwidth, and n is the height of candidate target region, and C is normalization coefficient, and expression formula is identical with model models,
Core p of present frame candidate target regionnFor
Wherein g (x) is the derivative of kernel function K (x), and K (x) adopts Ye Panieqi Nico husband's kernel functions, and n is candidate target area
The height in domain, h is the bandwidth of kernel function, i.e. candidate target region width.
6. a kind of facing video monitoring according to claim 1 human body tracing method it is characterized in that:Step 7)
It is middle according to perspective view bp (xij) target area moment of the orign, first order and second order moments, and calculate size and the inclination angle of target
Spend the following M of its computational methods00It is M for moment of the orign10,M01, M11For first moment M20,M02For second moment
Wherein l1,l2The length and width in the region of human body target are represented, θ represents the angle of target tilt, wiRepresent perspective view bp
(xij) on point (x, y) place value.
7. a kind of facing video monitoring according to claim 1 human body tracing method it is characterized in that:Step 8)
The renewal of middle Kalman filter includes the current state value of covariance and target, wherein the observation for updating Karman equation is seen
Step 5 in measured value Z (k) right 1) in the human body for searching position,
Optimized being estimated as follows is made to current state value:
X (k | k)=X (k | k-1)+Kg (k) (Z (k)-H X (k | k-1))
Wherein Kg (k) for current state kalman gain (Kalman Gain), X (k | k) current state optimal estimation, X
(k | k-1) is the optimal estimation at the k-1 moment to the k moment, and H is the given calculation matrix of initialization
Kg (k)=P (k | k-1) HT/(H P(k|k-1)HT+R)
Wherein P (k | k-1) covariance of the expression at the k-1 moment to the optimal estimation at k moment, renewal P (k | k-1),
P (k | k-1)=A P (k-1 | k-1) AT+Q
Wherein A is the transfer matrix of state equation in right 2, finally needs the covariance for updating X (k | k) under k-state
P (k | k)=(I-Kg (k) H) P (k | k-1)
Q and R represent respectively the motion artifacts of system and the covariance of measurement noise in above formula, are set to constant 1e-5 and 1e-
1;
The correction of Kalman filter is the position (x (k), y (k)) of the target that present frame searching algorithm is obtained and former frame
The residual error of Kalman prediction position (x (k-1), y (k-1)) exceed threshold value after, then from Kalman filtering prediction position
The final position as target is put, the definition of wherein residual error is:
Threshold value words are not above using the position after Kalman filter correction as final position.
Content described in this specification embodiment is only enumerating to the way of realization of inventive concept, the protection of the present invention
Scope is not construed as being only limitted to the concrete form that embodiment is stated, protection scope of the present invention also forgives art technology
Personnel according to present inventive concept it is conceivable that equivalent technologies mean.
Claims (7)
1. a kind of human body tracing method of facing video monitoring, comprises the following steps:
1) background modeling and target detection are extracted, and first the scene to being applied carries out background modeling, carries from video monitoring image
Scene background picture is taken, for static scene carries out gray scale pFimage is modeled as, start to move video after the completion of modeling
The detection of object, current detection frame is pFrame, carries out gaussian filtering to pFrame first with smoothed image, reduces the dry of noise
Disturb, present frame is worth to the target to be tracked of motion with background subtraction, and the target to be tracked to detecting carries out morphologic filtering can
To remove noise, and hole is filled so that the profile of object is more nearly real human body, for the change and of indoor light
The entrance of a little non-human objects, using the context update strategy of turnover rate β, wherein the formula for updating is
PFimage=pFimage+ β pFrame
For detected object to be tracked, using the size exclusion of area non-human moving target is fallen, needed
The human body target of tracking;
2) Kalman filter initialization and prediction
If target occurs in first FkFrame, it is occurred in, and image is upper to be set to pk(xk,yk), then according to the position for detecting target
Put the initialization to Kalman filter, and the state equation using Kalman filtering predicts the position of next frame target
(xp,yp), for FkFrame is by predicted position (xp,yp) actual position of human body is set to, and the region near future position is set
It is set to estimation range;
3) initialization of human body target tracking
By FkFrame is transformed into the color of the target body H component that hsv color space and statistics are obtained according to target detection from rgb space
Distribution histogram hist, according to hist the back projection figure bp (x of estimation range are calculatedij);
4) foundation of template and renewal
The feature templates model of human body is set up in RGB color if target is occur first, and statistics has been tracked
Frame number, if the frame number of statistics is the multiple for updating coefficient, then it is assumed that template is varied, with the target area of current tracking
Body templates model is recalculated, using new template as the template of search;
5) search of estimation range
In order to reduce amount of calculation and improve robustness, in the next frame of the frame that target occurs, target is searched near estimation range
Position after movement, searching method is in former frame target location (xk,yk) candidate target area of place's selection as target sizes
Domain, centered on the position of former frame target candidate target region model1 is set up, and obtains the color probability of candidate target region
Distribution maximum position pn;
6) searching position of final goal is judged
The method for determining whether optimal estimation is with the color probability distribution maximum position p of target twicen+1(xn+1,yn+1) and pn
(xn,yn) displacement | pn+1-pn| whether less than threshold value, if less than the position p of the then new target of threshold valuen+1(xn+1,yn+1)
As the searching position of final goal, if greater than threshold value then with new pn+1(xn+1,yn+1) be core, To Template size weight
Newly set up new candidate target region, and calculate the model1 of new candidate target region, 5) return recalculates fresh target
Core position pn+2(xn+2,yn+2), until being less than threshold value or having reached the number of times of circulation, return to the target location for finally giving
pn+m(xn+m,yn+m);
7) adaptive polo placement human region
According to the target projection figure bp (x for 3) obtainingij) calculating the zeroth order square of target location, first moment and is calculated second moment
Go out the long l of image1With wide l2And inclined angle;
8) correction and renewal of Kalman filtering
When the position of target that 5) search is obtained with 2) in the residual error of predicted position exceed certain threshold value after, from Kalman's filter
Used as the final position of target, the position after otherwise being corrected using Kalman filter is used as most final position for the position of the prediction of ripple
Put, for the current state value that the renewal that Kalman filter carries out state includes covariance and target, make Kalman filter
The position for predicting human body target can be continued in the next frame.
2. the human body tracing method of a kind of facing video monitoring according to claim 1, it is characterised in that:Step 2) in root
According to initialization of the position to Kalman filter for detecting target, the state equation of Kalman filtering is
X (k)=AX (k-1)+W (k)
Wherein X (k) is current state matrix, and X (k-1) is the state matrix of previous moment, and W (k) is system noise, and its feature is divided
Cloth meets Gaussian Profile, A for system transfer matrix, X (k) is the matrix of one 4 dimension, X (k)=(xk,yk,Vkx,Vky) wherein
Xk, ykRepresent the initial position abscissa and ordinate of object of which movement, Vkx, VkyRepresent the lateral velocity of the speed of object of which movement
And longitudinal velocity, original state xk,ykFor the position of target, initialized speed Vkx,VkyFor 0;The prediction mesh of Kalman filtering
Be in order to for human body target carry out location finding and calculate estimation range perspective view when, near Kalman prediction point
Scan for, it is possible to reduce the scope of search, reduce amount of calculation, strengthen the real-time of target following.
3. the human body tracing method of a kind of facing video monitoring according to claim 1, it is characterised in that:Step 3) in root
The target body region obtained according to target detection, counts the probability histogram hist of the color of object H components of HSV space, each
Individual interval statistics value is
Wherein pijRepresent the value of pixel (i, j) place pixel, u represent histogrammic u-th it is interval, the scope of u is (1...
), l is the discrimination for arranging, and m, n represents the horizontal number and longitudinal number of target body area pixel point;
The back projection figure bp (x of estimation rangeij) formula it is as follows:
Wherein pijRepresent the value of pixel (i, j) place pixel, b (pij) represent the p on position (i, j)ijCorresponding histogram
U-th statistics is interval, buThe value in u-th statistics interval, m are represented, n represents the horizontal number and longitudinal number of estimation range pixel,
δ (x) function expressions are as follows in the formula of the above two:
If belonging to color of object in the perspective view for obtaining, its value is more than 0, and the value for being not belonging to color of object is then 0.
4. the human body tracing method of a kind of facing video monitoring according to claim 1, it is characterised in that:Step 4) in build
The feature templates of vertical human body are the target bodies obtained first using target detection, are p in target locationk(xk,yk) place adopts core
The method of function density estimation sets up the model model of human body, model represent be u-th characteristic value in To Template estimation
Multilayer networks, set up the triple channel model model of the RGB models of human body, model is a three-dimensional matrix,
For representing the color characteristic of target, color of object is characterized as 16*16*16, and object module can be expressed as:
Wherein b (xi) it is xiThe fiducial value of u-th feature of pixel at place, the value of u is { 1...m }, and δ is Kronecker function,
H is kernel function bandwidth, and the height of n target areas, C is expressed as normalization coefficient:
K (x) Ye Panieqi Nico husband's kernel function expression formulas are:
Wherein cd for area of space size, the dimension of d representation spaces.
5. the human body tracing method of a kind of facing video monitoring according to claim 4, it is characterised in that:Step 5) middle time
The core calculations for selecting target area are the principles according to average drifting, set up the weight ratio square based on the object module of kernel function
Battle array ωi
Wherein model be claim 4 in object module, model1 for candidate target region model, modeling pattern with
Model is identical, and m is the summation of target area point, when target former frame target location is pk(xk,yk) when, because present frame is chosen
Candidate target region with former frame target location as core, the expression formula for setting up candidate region model model1 is as follows
b(xi) it is xiThe fiducial value of u-th feature of pixel at place, the value of u is { 1...m }, and δ is Kronecker function, and h is
Kernel function bandwidth, n is the height of candidate target region, and C is normalization coefficient, and expression formula is identical with model models,
Core p of present frame candidate target regionnFor
Wherein g (x) is the derivative of kernel function K (x), and K (x) adopts Ye Panieqi Nico husband's kernel functions, n to be candidate target region
Highly, h is the bandwidth of kernel function, i.e. candidate target region width.
6. the human body tracing method of a kind of facing video monitoring according to claim 1, it is characterised in that:Step 7) in root
According to perspective view bp (xij) target area moment of the orign, first order and second order moments, and calculate size and the angle of inclination of target, its
Computational methods are as follows:Wherein, M00For moment of the orign, M10,M01For first moment, M11,M20,M02For second moment,
Wherein l1,l2The length and width in the region of human body target are represented, θ represents the angle of target tilt, wiRepresent perspective view bp (xij)
Upper point (x, y) place value.
7. the human body tracing method of a kind of facing video monitoring according to claim 2, it is characterised in that:Step 8) middle card
The renewal of Thalmann filter includes the current state value of covariance and target, wherein updating the observation of Karman equation, i.e. Z
(k) step 5) in the human body for searching position,
Optimized being estimated as follows is made to current state value:
X (k | k)=X (k | k-1)+Kg (k) (Z (k)-HX (k | k-1))
Wherein Kg (k) for current state kalman gain (Kalman Gain), X (k | k) current state optimal estimation, X (k |
K-1) it is optimal estimation at the k-1 moment to the k moment, H is the given calculation matrix of initialization
Kg (k)=P (k | k-1) HT/(HP(k|k-1)HT+R)
Wherein P (k | k-1) covariance of the expression at the k-1 moment to the optimal estimation at k moment, renewal P (k | k-1),
P (k | k-1)=AP (k-1 | k-1) AT+Q
Wherein A is the transfer matrix of state equation, finally needs the covariance for updating X (k | k) under k-state
P (k | k)=(I-Kg (k) H) P (k | k-1)
Q and R represent respectively the motion artifacts of system and the covariance of measurement noise in above formula, are set to constant 1e-5 and 1e-1;
The correction of Kalman filter is the position (x (k), y (k)) of the target that present frame searching algorithm is obtained and former frame karr
The residual error of graceful filter forecasting position (x (k-1), y (k-1)) exceedes after threshold value, then made from the position of the prediction of Kalman filtering
For the final position of target, the definition of wherein residual error is:
If residual error is not above threshold value, using the position after Kalman filter correction as final position.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410328405.8A CN104200485B (en) | 2014-07-10 | 2014-07-10 | Video-monitoring-oriented human body tracking method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410328405.8A CN104200485B (en) | 2014-07-10 | 2014-07-10 | Video-monitoring-oriented human body tracking method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104200485A CN104200485A (en) | 2014-12-10 |
CN104200485B true CN104200485B (en) | 2017-05-17 |
Family
ID=52085771
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410328405.8A Active CN104200485B (en) | 2014-07-10 | 2014-07-10 | Video-monitoring-oriented human body tracking method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104200485B (en) |
Families Citing this family (23)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2016106595A1 (en) * | 2014-12-30 | 2016-07-07 | Nokia Technologies Oy | Moving object detection in videos |
CN104598900A (en) * | 2015-02-26 | 2015-05-06 | 张耀 | Human body recognition method and device |
CN104933542B (en) * | 2015-06-12 | 2018-12-25 | 临沂大学 | A kind of logistic storage monitoring method based on computer vision |
CN104992451A (en) * | 2015-06-25 | 2015-10-21 | 河海大学 | Improved target tracking method |
CN105139424B (en) * | 2015-08-25 | 2019-01-18 | 四川九洲电器集团有限责任公司 | Method for tracking target based on signal filtering |
CN107705321A (en) * | 2016-08-05 | 2018-02-16 | 南京理工大学 | Moving object detection and tracking method based on embedded system |
CN108288281A (en) * | 2017-01-09 | 2018-07-17 | 翔升(上海)电子技术有限公司 | Visual tracking method, vision tracks of device, unmanned plane and terminal device |
CN106920249A (en) * | 2017-02-27 | 2017-07-04 | 西北工业大学 | The fast track method of space maneuver target |
CN106778712B (en) * | 2017-03-01 | 2020-04-14 | 扬州大学 | Multi-target detection and tracking method |
CN107767392A (en) * | 2017-10-20 | 2018-03-06 | 西南交通大学 | A kind of ball game trajectory track method for adapting to block scene |
CN108133491A (en) * | 2017-12-29 | 2018-06-08 | 重庆锐纳达自动化技术有限公司 | A kind of method for realizing dynamic target tracking |
CN108469729B (en) * | 2018-01-24 | 2020-11-27 | 浙江工业大学 | Human body target identification and following method based on RGB-D information |
CN108762309B (en) * | 2018-05-03 | 2021-05-18 | 浙江工业大学 | Human body target following method based on hypothesis Kalman filtering |
CN110020621A (en) * | 2019-04-01 | 2019-07-16 | 浙江工业大学 | A kind of moving Object Detection method |
CN110264498A (en) * | 2019-06-26 | 2019-09-20 | 北京深醒科技有限公司 | A kind of human body tracing method under video monitoring scene |
CN110503665A (en) * | 2019-08-22 | 2019-11-26 | 湖南科技学院 | A kind of target tracking algorism improving Camshift |
CN110543881A (en) * | 2019-09-16 | 2019-12-06 | 湖北公众信息产业有限责任公司 | Video data management method based on cloud platform |
CN110545383A (en) * | 2019-09-16 | 2019-12-06 | 湖北公众信息产业有限责任公司 | Video integrated management platform system |
CN111338275B (en) * | 2020-02-21 | 2022-04-12 | 中科维卡(苏州)自动化科技有限公司 | Method and system for monitoring running state of electrical equipment |
CN111915649A (en) * | 2020-07-27 | 2020-11-10 | 北京科技大学 | Strip steel moving target tracking method under shielding condition |
CN111918034A (en) * | 2020-07-28 | 2020-11-10 | 上海电机学院 | Embedded unattended base station intelligent monitoring system |
CN114674067B (en) * | 2020-12-25 | 2024-06-21 | 宁波奥克斯电气股份有限公司 | Radar-based air conditioner control method, air conditioner and computer readable storage medium |
CN117670940B (en) * | 2024-01-31 | 2024-04-26 | 中国科学院长春光学精密机械与物理研究所 | Single-stream satellite video target tracking method based on correlation peak value distance analysis |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101320477A (en) * | 2008-07-10 | 2008-12-10 | 北京中星微电子有限公司 | Human body tracing method and equipment thereof |
CN102110296A (en) * | 2011-02-24 | 2011-06-29 | 上海大学 | Method for tracking moving target in complex scene |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7580546B2 (en) * | 2004-12-09 | 2009-08-25 | Electronics And Telecommunications Research Institute | Marker-free motion capture apparatus and method for correcting tracking error |
KR101500711B1 (en) * | 2012-01-19 | 2015-03-10 | 한국전자통신연구원 | Method for human tracking using color histograms |
-
2014
- 2014-07-10 CN CN201410328405.8A patent/CN104200485B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101320477A (en) * | 2008-07-10 | 2008-12-10 | 北京中星微电子有限公司 | Human body tracing method and equipment thereof |
CN102110296A (en) * | 2011-02-24 | 2011-06-29 | 上海大学 | Method for tracking moving target in complex scene |
Non-Patent Citations (3)
Title |
---|
Multiple human object tracking using background subtraction and shadow removal techniques;S.Saravanakumar等;《International Conference on Signal and Image Processing》;20101231;第79-84页 * |
基于CamShift和Kalman滤波混合的视频手势跟踪算法;罗元等;《计算机应用研究》;20090331;第26卷(第3期);第1163-1165页 * |
基于梯度特征和颜色特征的运动目标跟踪算法;刘海燕等;《计算机应用》;20120501;第32卷(第5期);第1265-1268页 * |
Also Published As
Publication number | Publication date |
---|---|
CN104200485A (en) | 2014-12-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104200485B (en) | Video-monitoring-oriented human body tracking method | |
CN109949375B (en) | Mobile robot target tracking method based on depth map region of interest | |
EP2858008B1 (en) | Target detecting method and system | |
CN103745203B (en) | View-based access control model notes the object detecting and tracking method with average drifting | |
CN103514441B (en) | Facial feature point locating tracking method based on mobile platform | |
CN110175576A (en) | A kind of driving vehicle visible detection method of combination laser point cloud data | |
CN109785363A (en) | A kind of unmanned plane video motion Small object real-time detection and tracking | |
CN106780620A (en) | A kind of table tennis track identification positioning and tracking system and method | |
CN103310444B (en) | A kind of method of the monitoring people counting based on overhead camera head | |
CN106600625A (en) | Image processing method and device for detecting small-sized living thing | |
CN103279791B (en) | Based on pedestrian's computing method of multiple features | |
CN106709472A (en) | Video target detecting and tracking method based on optical flow features | |
CN103778645B (en) | Circular target real-time tracking method based on images | |
CN101916446A (en) | Gray level target tracking algorithm based on marginal information and mean shift | |
CN104794737B (en) | A kind of depth information Auxiliary Particle Filter tracking | |
KR100651034B1 (en) | System for detecting targets and method thereof | |
CN111369597A (en) | Particle filter target tracking method based on multi-feature fusion | |
CN112488057A (en) | Single-camera multi-target tracking method utilizing human head point positioning and joint point information | |
CN110276785A (en) | One kind is anti-to block infrared object tracking method | |
CN106488122A (en) | A kind of dynamic auto focusing algorithm based on improved sobel method | |
CN110006444B (en) | Anti-interference visual odometer construction method based on optimized Gaussian mixture model | |
CN105279769A (en) | Hierarchical particle filtering tracking method combined with multiple features | |
CN108876820A (en) | A kind of obstruction conditions based on average drifting move down object tracking method | |
CN107230219A (en) | A kind of target person in monocular robot is found and follower method | |
CN101908236B (en) | Public traffice passenger flow statistical method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |