A kind of method for tracking target of video sequence
Technical field
The invention belongs to computer visions, digital image processing field, in particular to a kind of target of video sequence with
Track method.
Background technique
Target following is one of hot research topic of field of machine vision, be widely used in human-computer interaction, video with
The fields such as track, navigation, while being also the basis of the follow-up works such as target identification, Activity recognition in video, therefore target following has
Wide application prospect and practical value, receive the highest attention of researcher all over the world.
Currently, since the external factor such as complex background, illumination and target such as rotate, block at the influence of internal factors, make
It obtains tracking process to be typically located under a uncontrolled environment, therefore target following is still a challenging problem.
Summary of the invention
In order to solve above-mentioned background technique propose the technical issues of, the present invention is intended to provide a kind of target of video sequence with
Track method, is set out using space time information, is tracked, can be effectively mentioned to target in conjunction with treatment mechanism and time and space significance is blocked
High target following robustness and real-time.
In order to achieve the above technical purposes, the technical solution of the present invention is as follows:
A kind of method for tracking target of video sequence, comprising the following steps:
(1) target image is normalized, reduces illumination interference;
(2) according to the target position of initial frame, the spatio-temporal context information of target is extracted, constructs space-time context model,
The relationship of space-time context model Yu target position confidence map is established, to carry out target following;
(3) determine whether to update the learning rate of space-time context model using the mechanism of blocking, using update learning rate more
New space-time context model;
(4) scale renewal process is established according to the time and space significance in object tracking process between before and after frames.
Further, detailed process is as follows for step (2):
(a) relationship of spatial context model Yu target position confidence map is established:
In formula (1), and P (x | m (z), o) it is spatial context model, indicate that the space of target and surrounding context feature is closed
System, x are certain point position coordinates in target, and z indicates that the contextual location coordinate of target, o are tracking target, XcFor context spy
Sign defines Xc=m (z)=(I (z), z) | ∈ Ωc(x*), I (z) is the gray value in image at z, Ωc(x*) it is around target
Context area, P (m (z) | o) indicates target local context prior probability;
(b) P (x | m (z), o)=h is enabledsc(x-z) (2)
P (m (z) | o)=I (z) ωσ(z-x*) (3)
In formula (2), (3), hsc(x-z) be relative distance and direction about target and local contextual location z function,
x*For target's center position, ωσ(z-x*) it is Weighted Gauss function, is defined as:
In formula (4), a represents normaliztion constant, and σ represents scale parameter;
Formula (2)-(4) are substituted into formula (1), are obtained
In formula (5), subscript t indicates t frame;
(c) space-time context model is obtained according to spatial context model:
In formula (6),It is spatial context modelFourier transformation,It is space-time context modelFourier transformation, ρtRepresent learning rate;
(d) space-time context model is established according to formula (5)With the relationship of target position confidence map:
In formula (7), F indicates Fourier transformation;
(e) target's centerBy seeking target position confidence map mt+1(x) extreme value obtains:
Further, detailed process is as follows for step (3):
Define the peak sidelobe ratio of t frame:
In formula (9), μsl-tAnd σsl-tIt is confidence map m respectivelyt(x) mean value and standard deviation around peak value in 12 × 12 neighborhoods;
It enables
Δ m=mt-mt-1 (11)
WhenAnd ppsr-t≥pth, Δ m < Mtol, indicate that target is in gradually to walk out and block, model should be carried out more at this time
Newly;WhenAnd ppsr-t≥pth, Δ m > Mtol, indicate that target following is in good condition, cope with model at this time and be updated;WhenOr ppsr-t< pthWhen, indicate that target is in serious shielding or full occlusion state, at this time without model modification;Wherein, pth
For the given threshold of peak sidelobe ratio, MtolFor the given threshold of the variable quantity of target confidence map;
Update the learning rate ρ of space-time context modelt:
Space-time context model is updated according to the learning rate of update:
Further, pthValue be 2.5 × 10-3。
Further, detailed process is as follows for step (4):
In formula (14), η represents fading factor, and n indicates to calculate target scale, s in every n frametIndicate t frame target scale, σt
Indicate t frame scale parameter.
Further, η=0.51, n=5.
By adopting the above technical scheme bring the utility model has the advantages that
(1) present invention using Bayesian frame to the time-space relationship of the target to be tracked and its local context region into
Row modeling, obtains the statistic correlation of target He its peripheral region low-level features, robustness with higher;
(2) present invention copes with complex scene, has judgement to circumstance of occlusion using treatment mechanism is blocked, can
Judged according to object variations process, therefore application blocks treatment mechanism to a certain extent and reduces the accumulation of error, and
There can be certain inhibiting effect to the drift of target, improve the robustness for target following under complex situations;
(3) present invention carries out real-time update to learning rate in object tracking process, can effectively reduce the accumulation of error,
Object module updates and target scale renewal process all refers to learning rate, and it is selectable that the update of learning rate can be such that model carries out
Update it is more accurate, scale it is correct update also have significant impact to the extraction of target signature, the extraction of error characteristic will affect
The tracking of target is caused to drift about or be lost;
(4) present invention is to utilize the connection of target before and after frames to the application of space-time significance measure, is updated to target scale
With great influence, the real-time of object tracking process mesoscale update is improved, the influence of interference information is reduced.
Detailed description of the invention
Fig. 1 is flow chart of the invention.
Specific embodiment
Below with reference to attached drawing, technical solution of the present invention is described in detail.
As shown in Figure 1, a kind of method for tracking target of video sequence, comprising the following steps:
Step 1: target image being normalized, illumination interference is reduced, improves operational efficiency.
Step 2: according to the target position of initial frame, extracting the spatio-temporal context information of target, construct space-time context mould
Type establishes the relationship of space-time context model Yu target position confidence map, to carry out target following.Detailed process is as follows:
A, the relationship of spatial context model Yu target position confidence map is established:
In formula (1), and P (x | m (z), o) it is spatial context model, indicate that the space of target and surrounding context feature is closed
System, x are certain point position coordinates in target, and z indicates that the contextual location coordinate of target, o are tracking target, XcFor context spy
Sign defines Xc=m (z)=(I (z), z) | ∈ Ωc(x*), I (z) is the gray value in image at z, Ωc(x*) it is around target
Context area, P (m (z) | o) indicates target local context prior probability.
B, P (x | m (z), o)=h is enabledsc(x-z) (2)
P (m (z) | o)=I (z) ωσ(z-x*) (3)
In formula (2), (3), hsc(x-z) be relative distance and direction about target and local contextual location z function,
x*For target's center position, ωσ(z-x*) it is Weighted Gauss function, is defined as:
In formula (4), a represents normaliztion constant, and σ represents scale parameter.
Formula (2)-(4) are substituted into formula (1), are obtained
In formula (5), subscript t indicates t frame.
C, space-time context model is obtained according to spatial context model:
In formula (6),It is spatial context modelFourier transformation,It is space-time context modelFourier transformation, ρtRepresent learning rate.
D, space-time context model is established according to formula (5)With the relationship of target position confidence map:
In formula (7), F indicates Fourier transformation.
E, target's centerBy seeking target position confidence map mt+1(x) extreme value obtains:
Step 3: determining whether to update the learning rate of space-time context model using the mechanism of blocking, utilize the learning rate of update
Update space-time context model.Detailed process is as follows:
Define the peak sidelobe ratio of t frame:
In formula (9), μsl-tAnd σsl-tIt is confidence map m respectivelyt(x) mean value and standard deviation around peak value in 12 × 12 neighborhoods;
It enables
Δ m=mt-mt-1 (11)
As shown in table 1, whenAnd ppsr-t≥pth, Δ m < Mtol, indicate that target is in gradually to walk out and block, cope at this time
Model is updated;WhenAnd ppsr-t≥pth, Δ m > Mtol, indicate that target following is in good condition, model should be carried out at this time
It updates;WhenOr ppsr-t< pthWhen, indicate that target is in serious shielding or full occlusion state, at this time without model modification;
Wherein, pthFor the given threshold of peak sidelobe ratio, MtolFor the given threshold of the variable quantity of target confidence map.
Update the learning rate ρ of space-time context modelt:
Space-time context model is updated according to the learning rate of update:
Table 1
Step 4: scale renewal process, purpose are established according to the time and space significance in object tracking process between before and after frames
It is to improve the real-time that object tracking process mesoscale updates, reduces the influence of interference information.Detailed process is as follows:
In formula (14), η represents fading factor, ηiIt is reduced with the increase of i, indicates influence of the historical frames to present frame at any time
Between change, in the present embodiment, η=0.51;N indicates calculating target scale in every n frame, in the present embodiment, n=5, because
In 5 frames, target scale variation will not be larger, can reduce calculation amount and improve the real-time of the patent;, stIndicate t frame target
Scale, σtIndicate t frame scale parameter.
The above examples only illustrate the technical idea of the present invention, and this does not limit the scope of protection of the present invention, all
According to the technical idea provided by the invention, any changes made on the basis of the technical scheme each falls within the scope of the present invention
Within.