CN104680558B - The Struck method for tracking target accelerated using GPU hardware - Google Patents

The Struck method for tracking target accelerated using GPU hardware Download PDF

Info

Publication number
CN104680558B
CN104680558B CN201510112791.1A CN201510112791A CN104680558B CN 104680558 B CN104680558 B CN 104680558B CN 201510112791 A CN201510112791 A CN 201510112791A CN 104680558 B CN104680558 B CN 104680558B
Authority
CN
China
Prior art keywords
sample
gray level
level image
support
rectangle frame
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
Application number
CN201510112791.1A
Other languages
Chinese (zh)
Other versions
CN104680558A (en
Inventor
李云松
尹万春
宋长贺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xidian University
Original Assignee
Xidian University
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Xidian University filed Critical Xidian University
Priority to CN201510112791.1A priority Critical patent/CN104680558B/en
Publication of CN104680558A publication Critical patent/CN104680558A/en
Application granted granted Critical
Publication of CN104680558B publication Critical patent/CN104680558B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses the Struck method for tracking target that a kind of use GPU hardware accelerates, prior art tracking performance is solved not high and the problem of without processing capability in real time.The step of present invention is realized:(1) gray level image is obtained;(2) whether the image for judging loading is the 1st two field picture;(3) the position rectangle frame of initialization tracking target;(4) feature of all test samples of gray level image is extracted;(5) the position rectangle frame of tracking target is determined;(6) feature of all training samples of gray level image is extracted;(7) weights and gradient of initialization training sample;(8) obtain and update the weights for supporting sample, gradient;(9) judge whether to have loaded all images;(10) target end is tracked.Available realize on a general-purpose computer of the present invention carries out real-time tracking to the target in video.

Description

The Struck method for tracking target accelerated using GPU hardware
Technical field
The invention belongs to field of computer technology, one in computer video target following technical field is further related to Plant the structure output Struck method for tracking target based on kernel method accelerated using computer graphics processor GPU hardware.This Invention can be realized to be accelerated to the structure output Struck method for tracking target based on kernel method, can use real on a general-purpose computer Real-time tracking now is carried out to the target in video.
Background technology
It is the core technology of computer vision field with high speed, high performance method for tracking target.Current target with Track method is divided into two classes:One class is the tracking of feature based matching, and this method, which is mainly structure, can represent the spy of target Levy, the position of target is then judged by the matching degree between feature;Another kind of is the track side based on target and background separation Method, this method learns one with the method for machine learning can separate the grader of target and background, and learning process is generally On-line training process, target location is judged by the grader learnt.By contrast, the former, which has, calculates simple but right Have a case that illumination, block, the change of the factor such as yardstick can not be handled well.The latter can solve the problem that the former to a certain extent The problem of running into, and with higher robustness, but its computation complexity is higher.
Patent application " a kind of real-time distribution based on global search target following side that Xibei Univ. of Agricultural & Forest Science & Technology proposes The method " (applying date:On June 26th, 2014, application number:201410298728.7, publication number:CN 104036528A) in disclose A kind of tracking of feature based matching.The distribution field of target as object module, is being calculated candidate region point by this method When cloth is with object module correlation matrix, by the good nature of two-dimensional Fourier transform, the search of subrange is expanded It is big to arrive the search of global scope, and very high processing speed is ensure that, with the ability handled in real time.But, this method is still The deficiency so existed is to employ a kind of simple linear update method to update target image distribution field model, for target Situation about temporarily being blocked, this update method can lose target information, so that the problem of template drift occur.
Patent application " a kind of high-speed target track algorithm of multi-feature extraction the Stepwise Refinement " (application that Wuhan University proposes Day:On September 2nd, 2014, application number:201410442527.X, publication number:CN104200216A disclose a kind of based on spy in) Levy the tracking of matching.This method is merged the various features of target as object module, using Mean Shift sides Method calculates the target location after multiple features fusion.Although this method is avoided to a certain extent with higher tracking accuracy The problem of template drift.But, the deficiency that this method still has is only to pass through initial target model and current candidate target mould Type updates object module, and therefore, initialization of this method to target is very sensitive, this method has the shortcomings that robustness is low.
Paper " the Struck that Sam Hare, Amir Saffari and Philip H.S.Torr are delivered:Structured Output Tracking with Kernels”(IEEE International Conference on Computer Vision, ICCV 2011, Barcelona, Spain, November 6-13,2011, pages 263-270) disclosed in propose A kind of tracking based on target and background separation, this method is referred to as Struck method for tracking target.This method is used Based on structuring supporting vector machine model Structured SVM, study one can distinguish the grader of target and background, pass through The grader learnt judges the position of target.Although this method has the advantages that performance is high, overcome to a certain extent Conventional method can not be solved by blocking the problem of robustness caused with illumination variation is reduced.But, what this method still had Deficiency is that this method using the method for serial computing extract feature, acquisition and the renewal branch of training sample and test sample Weights, gradient and the discriminant value for calculating test sample of sample are held, because each of the above process is directed to very intensive, therefore The realization has the shortcomings that processing speed is slow.Experiment shows, for a prolonged video sequence, the average treatment of this method Speed is about 5fps, it is clear that this method does not have real-time, so as to limit its practical application.
The content of the invention
Accelerate it is an object of the invention to overcome above-mentioned the deficiencies in the prior art there is provided a kind of use GPU hardware Struck method for tracking target, can be achieved to carry out real-time tracking to the target in video.
The step of the present invention is as follows:
(1) gray level image is obtained:
A two field picture in image sequence to be tracked is loaded into main frame internal memory by (1a);
The image for being loaded into main frame internal memory is converted into gray level image by (1b);
(1c) calls the integrogram in the computer vision storehouse OpenCV that increases income to calculate function cvIntegral, calculates gray-scale map The integrogram of picture;
(1d) copies to gray level image in gray level image set;
(2) whether the image for judging loading is the 1st two field picture in image sequence to be tracked, if so, then performing step (3) step (4), otherwise, is performed;
(3) the position rectangle frame of initialization tracking target:
One is chosen in gray level image will track the rectangle frame that target is included, and regard selected rectangle frame as tracking The position rectangle frame of target, performs step (6);
(4) feature of all test samples of gray level image is extracted:
Fully sampled method, the position rectangle of collecting test sample is respectively adopted to all test samples of gray level image in (4a) Frame;
(4b) utilizes computer graphical processing according to the integrogram of gray level image and the position rectangle frame of all test samples Device GPU, the Lis Hartel of the parallel all test samples for extracting gray level image is levied;
(5) the position rectangle frame of tracking target is determined:
Using computer graphics processor GPU, the discriminant value of all test samples of parallel computation gray level image is found out most Test sample corresponding to big discriminant value, regard the position rectangle frame of the test sample as the position rectangle frame for tracking target;
(6) feature of all training samples of gray level image is extracted:
The position rectangle frame of first training sample of gray level image is set as tracking the position rectangle frame of target by (6a);
Unique step sampling method is respectively adopted to remaining all training sample of gray level image in (6b), collection training sample Position rectangle frame;
The position rectangle frame of all training samples of gray level image is copied to the rectangle frame set of training sample position by (6c) In;
(6d) utilizes computer graphical processing according to the integrogram of gray level image and the position rectangle frame of all training samples Device GPU, the Lis Hartel of the parallel all training samples for extracting gray level image is levied;
(6e) copies to the feature of all training samples of gray level image in training sample characteristic set;
(7) weights and gradient of initialization training sample:
The weights and gradient of the training sample of gray level image are initialized as 0;By the weights of the training sample of gray level image, Gradient is added separately to the set of training sample weights, training sample gradient set;
(8) obtain and update the weights for supporting sample, gradient:
(8a) selects two training samples from the training sample of gray level image, will selected using gradient method is minimized Two training samples be used as support sample A, B;Using gradient difference method is maximized, the weights and ladder for supporting sample A, B are updated Degree;When supporting the sum of sample more than 100, using disturbance degree method is minimized, the weights and ladder of all support samples are updated Degree;
(8b) uses maximum-minimize gradient method, a gray level image is selected from gray level image set, from selection Two training samples are selected in the training sample of gray level image, two training samples of selection are regard as support sample A, B;Using Gradient difference method is maximized, the weights and gradient for supporting sample A, B are updated;If the sum of sample is supported more than 100, using most Smallization disturbance degree method, updates the weights and gradient of all support samples;
(8c) uses maximum-minimize gradient method, a gray level image is selected from gray level image set, from selection Two training samples are selected in the training sample of gray level image, two training samples of selection are regard as support sample A, B;Using Gradient difference method is maximized, the weights and gradient for supporting sample A, B are updated;This step is operated continuously 9 times;
(8d) circulation performs step (8b), step (8c) 9 times;
(9) judge whether to have loaded all two field pictures of image sequence to be tracked, if so, step (10) is then performed, otherwise, Perform step (1);
(10) target end is tracked.
The present invention compared with prior art, with advantages below:
First, the present invention uses computer image processor GPU, realizes Struck method for tracking target, overcomes existing Have in technology by blocking the problem of robustness caused with illumination variation is reduced so that the present invention has very high robustness.
Second, the present invention uses computer graphics processor GPU, parallel extraction training sample and test sample feature, Overcome and extract the problem of sample characteristics are slow in the prior art so that the present invention is improving the same of the extraction rate of sample characteristics When, substantially increase the speed of tracking target.
3rd, the present invention uses computer graphics processor GPU, and the discriminant value of parallel computation test sample overcomes existing Have and the problem of tracking target is slow is differentiated in technology so that the present invention substantially increases the speed for differentiating tracking target, thus improves The speed of tracking target.
4th, the present invention uses computer graphics processor GPU, parallel to update the weights and gradient for supporting sample, overcomes The problem of tracking object module is slow is updated in the prior art so that the present invention substantially increases the speed for updating tracking object module Degree, which thereby enhances the speed of tracking target so that the present invention has real-time.
Brief description of the drawings
Fig. 1 is the flow chart of the present invention.
Embodiment
The invention will be further described below in conjunction with the accompanying drawings.
The present invention uses CUDA language, can be realized in the GPU equipment of NVIDIA any a support CUDA frameworks. Before method of the present invention is implemented, cudaMalloc functions should be first called to distribute eight region of memorys in GPU equipment. After method of the present invention, cudaFree functions should be also called to discharge this eight sections of region of memorys.
Reference picture 1, the present invention can be realized by following steps:
Step 1, gray level image is obtained.
The image loading function cvLoadImage in the computer vision storehouse OpenCV that increases income is called, by image sequence to be tracked The 1st two field picture in row is loaded into main frame internal memory.
The Color Channel transfer function cvCvtColor in the computer vision storehouse OpenCV that increases income is called, calculating will be loaded into The image of machine host internal memory is converted into gray level image.
Call the integrogram in the computer vision storehouse OpenCV that increases income to calculate function cvIntegral, calculate gray level image Integrogram.Computer graphics processor GPU memory copying function cudaMemcpy is called, by the integrogram of gained from computer Host memory is copied in computer graphics processor GPU device memories region 1.
Gray level image is copied in gray level image set.
Step 2, whether the image for judging loading is the 1st two field picture in image sequence to be tracked, if so, then performing step 3, otherwise, perform step 4.
Step 3, the position rectangle frame of initialization tracking target.
One is chosen in gray level image will track the rectangle frame that target is included, and regard selected rectangle frame as tracking The position rectangle frame of target, performs step 6.
Step 4, the feature of all test samples of gray level image is extracted.
To all test samples of gray level image, according to the position rectangle of following the 1st step and the 2nd step collecting test sample Frame.
1st step, is that radius constructs a circle to track the position rectangle frame center of target as the center of circle, 30 pixel wides.
2nd step, centered on any point in circle, a width of wide, tracking target position of the position rectangle frame of tracking target Put rectangle frame it is a height of it is high construction one rectangle frame, using the rectangle frame as a test sample position rectangle frame.
The position rectangle frame data of the test sample of gained is saved in, calculated into graphics processor GPU device memories area In domain 7.According to the position rectangle frame data and memory field of test sample in computer graphics processor GPU device memories region 7 Integration diagram data in domain 1, utilizes computer graphics processor GPU, the Kazakhstan of all test samples of parallel computation gray level image That feature, the feature of gained is saved in computer graphics processor GPU device memories region 8.
Step 5, it is determined that the position rectangle frame of tracking target.
According to the data calculated in graphics processor GPU device memories region 3,4,8, according to the following formula, computer graphic is utilized Shape processor GPU, the discriminant value of each test sample of parallel computation gray level image:
Wherein, f represents the discriminant value of each test sample of gray level image;N represents to support the sum of sample;βiRepresent the The weights of i support sample;Exp () represents the index operation using natural constant e the bottom of as;xiRepresent to support sample i-th Feature;Z represents the feature of each test sample of gray level image;||·||2The square operation of vector field homoemorphism is sought in expression.
The test sample with maximum discriminant value is found out from all test samples of gray level image, by the test specimens of gained This position rectangle frame is used as the position rectangle frame for tracking target.
Step 6, the feature of all training samples of gray level image is extracted.
The position rectangle frame of first training sample of gray level image is set as tracking to the position rectangle frame of target.
To remaining all training sample of gray level image, unique step sampling method is respectively adopted, the position of training sample is gathered Rectangle frame.
To remaining all training sample of gray level image, the position square of training sample is gathered according to following 1st step and the 2nd step Shape frame.
1st step, using track target position rectangle frame center as starting point, to the central point around equably dissipate 8 Bar line segment, the length of every line segment is 60 pixel wides.
2nd step, chooses a bit on any one line segment, the point to tracking target position rectangle frame center between away from From for m pixel wide, m ∈ { 12,24,36,48,60 };Centered on the selected point, the position rectangle frame of tracking target A width of wide, tracking target position rectangle frame one rectangle frame of a height of high construction, regard the rectangle frame as a training sample Position rectangle frame.
The position rectangle frame data of all training samples of gray level image is saved in, computer graphics processor GPU is set In standby region of memory 2.
According to the position rectangle frame data and internal memory of training sample in computer graphics processor GPU device memories region 2 Integration diagram data in region 1, using computer graphics processor GPU, all training samples of parallel computation gray level image Lis Hartel is levied.
The characteristic of all training samples of gray level image is saved in, computer graphics processor GPU device memories In region 3.
Step 7, the weights and gradient of initialization training sample.
The weights and gradient of all training samples of gray level image are initialized as 0, by the weights after initialization, gradient point It is not saved in computer graphics processor GPU device memories region 4,5.
Step 8, obtain and update the weights for supporting sample, gradient.
(8a) according to the following formula, using computer graphics processor GPU, each training sample of parallel computation gray level image Gradient:
Wherein, g represents the gradient of each training sample of gray level image;A represents each training sample of gray level image Position rectangle frame region, the area with the position rectangle frame region intersecting area of first training sample of gray level image;B is represented The position rectangle frame region of each training sample of gray level image, the position rectangle frame with first training sample of gray level image Region phase and the area in region;N represents to support the sum of sample;βiRepresent the weights of i-th of support sample;Exp () is represented Using natural constant e as the index operation at bottom;xiRepresent the feature of i-th of support sample;X represents each training sample of gray level image This feature;||·||2The square operation of vector field homoemorphism is sought in expression.
The gradient data of all training samples of gained is saved in, computer graphics processor GPU device memories region 5 In.
First training sample of gray level image is copied in positive support sample set, the sample is used as and supports sample A。
The training sample with minimal gradient is found out from the training sample of gray level image, by the training with minimal gradient Sample is copied in negative support sample set, and the training sample with minimal gradient is used as and supports sample B.
According to the following formula, using computer graphics processor GPU, parallel computation respectively supports sample A, B to support sample with each Kernel function value between this:
K(x1,x2)=exp (- 0.02 | | x1-x2||2)
Wherein, K (x1,x2) represent to support sample A, B and each kernel function value supported between sample;Exp () represent with Natural constant e is the index operation at bottom;x1Represent support sample A, B feature;x2Represent the feature of each support sample;||·| |2The square operation of vector field homoemorphism is sought in expression.
The kernel function Value Data of gained is saved in, in computer graphics processor GPU device memories region 6.
According to the following formula, the right value update amount for supporting sample is calculated:
Wherein, λ represents to support the right value update amount of sample;Max () represents to take maxima operation;Min () represents to take Minimum Value Operations;gARepresent support sample A gradient;gBRepresent the gradient of support sample B;K(xA,xB) represent support sample A with Support the kernel function value between sample B;βARepresent support sample A weights;yARepresent support sample A position rectangle frame;Y tables Show the position rectangle frame for first training sample for supporting the gray level image belonging to sample A.
The weights for supporting sample A are added into right value update amount λ, the weights for supporting sample B are subtracted into right value update amount λ.
The weights of support sample A, B after renewal are saved in, in computer graphics processor GPU device memories region 4.
According to the following formula, using computer graphics processor GPU, the parallel gradient for updating each support sample:
G=g '-λ (K (x, xA)-K(x,xB))
Wherein, g represents the gradient of each support sample after updating;The gradient of g ' expressions each support sample before updating;λ tables Show right value update amount;K(x,xA) represent each kernel function value supported between sample and support sample A;K(x,xB) represent each Support sample and support the kernel function value between sample B.
The gradient data of all support samples after renewal is saved in, computer graphics processor GPU device memories area In domain 5.
Whether the sum for supporting sample is judged more than 100, if so, then performing the 1st following step, the 2nd step, the 3rd step, the 4th Step and the 5th step, otherwise, perform step (8b).
1st step, according to the following formula, using computer graphics processor GPU, the influence for supporting sample is each born in parallel computation Degree:
Wherein, e represents the disturbance degree of each negative support sample;β2Represent the weights of each negative support sample;K(x1,x2) table Show the positive support sample of the gray level image belonging to each negative support sample, with each negative kernel function value supported between sample.
2nd step, finds out the negative support sample with minimum influence degree, by with minimum influence degree from negative support sample It is negative to support sample that as sample to be deleted, the negative support sample with minimum influence degree is deleted from negative support sample set.
3rd step, according to the following formula, using computer graphics processor GPU, the parallel gradient for updating each support sample:
G=g '-β2(K(x,x1)-K(x,x2))
Wherein, g represents the gradient of each support sample after updating;β2Represent the weights of sample to be deleted;K(x,x1) represent Kernel function value between the positive support sample of gray level image belonging to each support sample and sample to be deleted;K(x,x2) represent Each kernel function value supported between sample and sample to be deleted.
The gradient data of all support samples after renewal is saved in, computer graphics processor GPU device memories area In domain 5.
4th step, according to the following formula, the weights of the positive support sample of the gray level image belonging to renewal sample to be deleted:
β11′+β2
Wherein, β1The weights of the positive support sample of gray level image after expression updates belonging to sample to be deleted;β1' represent more The weights of the positive support sample of gray level image before new belonging to sample to be deleted;β2' represent to update the weights of preceding sample to be deleted.
5th step, if whether the weights of the positive support sample of gray level image after updating belonging to sample to be deleted are equal to 0, if Be, by the positive support sample from it is positive support sample set in delete, by the gray level image belonging to sample to be deleted from gray level image Delete, otherwise, the positive weights for supporting sample are saved in computer graphics processor GPU device memories region 4 in set.
(8b) randomly chooses a gray level image from gray level image set, regard the gray level image of selection as pending ash Spend image.
According to the following formula, using computer graphics processor GPU, each training sample of the pending gray level image of parallel computation Gradient:
Wherein, g represents the gradient of each training sample of pending gray level image;A represents the every of pending gray level image The position rectangle frame region of individual training sample and the position rectangle frame region phase of first training sample of pending gray level image Hand over the area in region;B represents the position rectangle frame region of each training sample of pending gray level image and pending gray-scale map The position rectangle frame region phase and the area in region of first training sample of picture;N represents to support the sum of sample;βiRepresent the The weights of i support sample;Exp () represents the index operation using natural constant e the bottom of as;xiRepresent to support sample i-th Feature;X represents the feature of each training sample of pending gray level image;||·||2The square operation of vector field homoemorphism is sought in expression.
The gradient data of all training samples of gained is saved in, computer graphics processor GPU device memories region 5 In.
The support sample with greatest gradient is found out in the support sample for being subordinated to pending gray level image, by obtained branch Sample is held as support sample A.
The training sample with minimal gradient is found out in the training sample for being subordinated to pending gray level image, by obtained instruction Practice sample as support sample B.
If supporting sample B not to be labeled, sample B will be supported to copy in negative support sample set, according to the following formula, utilized Sample B and each kernel function value supported between sample are supported in computer graphics processor GPU, parallel computation:
K(x1,xB)=exp (- 0.02 | | x1-xB||2)
Wherein, K (x1,xB) represent each kernel function value supported between sample and support sample B;Exp () is represented with certainly Right constant e is the index operation at bottom;x1Represent the feature of each support sample;xBRepresent the feature of support sample B;||·||2Table Show the square operation for seeking vector field homoemorphism.
The kernel function Value Data of gained is saved in, in computer graphics processor GPU device memories region 7.
According to the following formula, the right value update amount for supporting sample is calculated:
Wherein, λ represents to support the right value update amount of sample;Max () represents to take maxima operation;Min () represents to take Minimum Value Operations;gARepresent support sample A gradient;gBRepresent the gradient of support sample B;K(xA,xB) represent support sample A with Support the kernel function value between sample B;βARepresent support sample A weights;yARepresent support sample A position rectangle frame;Y tables Show the position rectangle frame for first training sample for supporting the gray level image belonging to sample A.
The weights for supporting sample A are added into right value update amount λ, the weights for supporting sample B are subtracted into right value update amount λ.
The weights of support sample A, B after renewal are saved in, in computer graphics processor GPU device memories region 4.
According to the following formula, using computer graphics processor GPU, the parallel gradient for updating each support sample:
G=g '-λ (K (x, xA)-K(x,xB))
Wherein, g represents the gradient of each support sample after updating;The gradient of g ' expressions each support sample before updating;λ tables Show right value update amount;K(x,xA) represent each kernel function value supported between sample and support sample A;K(x,xB) represent each Support sample and support the kernel function value between sample B.
The gradient data of all support samples after renewal is saved in, computer graphics processor GPU device memories area In domain 5.
Whether the sum for supporting sample is judged more than 100, if so, then performing the 1st following step, the 2nd step, the 3rd step, the 4th Step and the 5th step, otherwise, perform step (8c).
1st step, according to the following formula, using computer graphics processor GPU, the influence for supporting sample is each born in parallel computation Degree:
Wherein, e represents the disturbance degree of each negative support sample;β2Represent the weights of each negative support sample;K(x1,x2) table Show the positive support sample of the gray level image belonging to each negative support sample, with each negative kernel function value supported between sample.
2nd step, finds out the negative support sample with minimum influence degree, by with minimum influence degree from negative support sample It is negative to support sample that as sample to be deleted, the negative support sample with minimum influence degree is deleted from negative support sample set.
3rd step, according to the following formula, using computer graphics processor GPU, the parallel gradient for updating each support sample:
G=g '-β2(K(x,x1)-K(x,x2))
Wherein, g represents the gradient of each support sample after updating;β2Represent the weights of sample to be deleted;K(x,x1) represent Kernel function value between the positive support sample of gray level image belonging to each support sample and sample to be deleted;K(x,x2) represent Each kernel function value supported between sample and sample to be deleted.
The gradient data of all support samples after renewal is saved in, computer graphics processor GPU device memories area In domain 5.
4th step, according to the following formula, the weights of the positive support sample of the gray level image belonging to renewal sample to be deleted:
β11′+β2
Wherein, β1The weights of the positive support sample of gray level image after expression updates belonging to sample to be deleted;β1' represent more The weights of the positive support sample of gray level image before new belonging to sample to be deleted;β2' represent to update the weights of preceding sample to be deleted.
5th step, if whether the weights of the positive support sample of gray level image after updating belonging to sample to be deleted are equal to 0, if Be, by the positive support sample from it is positive support sample set in delete, by the gray level image belonging to sample to be deleted from gray level image Delete, otherwise, the positive weights for supporting sample are saved in computer graphics processor GPU device memories region 4 in set.
(8c) randomly chooses a gray level image from gray level image set, regard the gray level image of selection as pending ash Spend image.
The support sample with greatest gradient is found out in the support sample for being subordinated to pending gray level image, by obtained branch Sample is held as support sample A.
The support sample with minimal gradient is found out in the support sample for being subordinated to pending gray level image, by obtained branch Sample is held as support sample B.
According to the following formula, the right value update amount for supporting sample is calculated:
Wherein, λ represents to support the right value update amount of sample;Max () represents to take maxima operation;Min () represents to take Minimum Value Operations;gARepresent support sample A gradient;gBRepresent the gradient of support sample B;K(xA,xB) represent support sample A with Support the kernel function value between sample B;βARepresent support sample A weights;yARepresent support sample A position rectangle frame;Y tables Show the position rectangle frame for first training sample for supporting the gray level image belonging to sample A.
The weights for supporting sample A are added into right value update amount λ, the weights for supporting sample B are subtracted into right value update amount λ.
The weights of support sample A, B after renewal are saved in, in computer graphics processor GPU device memories region 4.
According to the following formula, using computer graphics processor GPU, the parallel gradient for updating each support sample:
G=g '-λ (K (x, xA)-K(x,xB))
Wherein, g represents the gradient of each support sample after updating;The gradient of g ' expressions each support sample before updating;λ tables Show right value update amount;K(x,xA) represent each kernel function value supported between sample and support sample A;K(x,xB) represent each Support sample and support the kernel function value between sample B.
The gradient data of all support samples after renewal is saved in, computer graphics processor GPU device memories area In domain 5.Step (8c) is operated continuously 9 times.
(8d) circulation performs step (8b), step (8c) 9 times.
Step 9, judge whether to have loaded all two field pictures of image sequence to be tracked, if so, step 10 is then performed, it is no Then, step 1 is performed.
Step 10, target end is tracked.

Claims (8)

1. the Struck method for tracking target accelerated using GPU hardware, is comprised the following steps:
(1) gray level image is obtained:
A two field picture in image sequence to be tracked is loaded into main frame internal memory by (1a);
The image for being loaded into main frame internal memory is converted into gray level image by (1b);
(1c) calls the integrogram in the computer vision storehouse OpenCV that increases income to calculate function cvIntegral, calculates gray level image Integrogram;
(1d) copies to gray level image in gray level image set;
(2) whether the image for judging loading is the 1st two field picture in image sequence to be tracked, if so, step (3) is then performed, it is no Then, step (4) is performed;
(3) the position rectangle frame of initialization tracking target:
One is chosen in gray level image will track the rectangle frame that target is included, and regard selected rectangle frame as tracking target Position rectangle frame, perform step (6);
(4) feature of all test samples of gray level image is extracted:
Fully sampled method, the position rectangle frame of collecting test sample is respectively adopted to all test samples of gray level image in (4a);
(4b) utilizes computer graphics processor according to the integrogram of gray level image and the position rectangle frame of all test samples GPU, the Lis Hartel of the parallel all test samples for extracting gray level image is levied;
(5) the position rectangle frame of tracking target is determined:
Using computer graphics processor GPU, the discriminant value of all test samples of parallel computation gray level image is found out maximum and sentenced It is not worth corresponding test sample, regard the position rectangle frame of the test sample as the position rectangle frame for tracking target;
(6) feature of all training samples of gray level image is extracted:
The position rectangle frame of first training sample of gray level image is set as tracking the position rectangle frame of target by (6a);
Unique step sampling method is respectively adopted to remaining all training sample of gray level image in (6b), gathers the position of training sample Rectangle frame;
(6c) copies to the position rectangle frame of all training samples of gray level image in the rectangle frame set of training sample position;
(6d) utilizes computer graphics processor according to the integrogram of gray level image and the position rectangle frame of all training samples GPU, the Lis Hartel of the parallel all training samples for extracting gray level image is levied;
(6e) copies to the feature of all training samples of gray level image in training sample characteristic set;
(7) weights and gradient of initialization training sample:
The weights and gradient of the training sample of gray level image are initialized as 0;By the weights of the training sample of gray level image, gradient It is added separately to the set of training sample weights, training sample gradient set;
(8) obtain and update the weights for supporting sample, gradient:
(8a) selects two training samples, by the two of selection using gradient method is minimized from the training sample of gray level image Individual training sample is used as support sample A, B;Using gradient difference method is maximized, the weights and gradient for supporting sample A, B are updated;When When supporting the sum of sample more than 100, using disturbance degree method is minimized, the weights and gradient of all support samples are updated;
(8b) uses maximum-minimize gradient method, a gray level image is selected from gray level image set, from the gray scale of selection Two training samples are selected in the training sample of image, two training samples of selection are regard as support sample A, B;Using maximum Change gradient difference method, update the weights and gradient for supporting sample A, B;If the sum for supporting sample is used and minimized more than 100 Disturbance degree method, updates the weights and gradient of all support samples;
(8c) uses maximum-minimize gradient method, a gray level image is selected from gray level image set, from the gray scale of selection Two training samples are selected in the training sample of image, two training samples of selection are regard as support sample A, B;Using maximum Change gradient difference method, update the weights and gradient for supporting sample A, B;This step is operated continuously 9 times;
(8d) circulation performs step (8b), step (8c) 9 times;
(9) judge whether to have loaded all two field pictures of image sequence to be tracked, if so, then performing step (10), otherwise, perform Step (1);
(10) target end is tracked.
2. the Struck method for tracking target that use GPU hardware according to claim 1 accelerates, it is characterised in that step (4a) the fully sampled method is comprised the following steps that:
1st step, is that radius constructs a circle to track the position rectangle frame center of target as the center of circle, 30 pixel wides;
2nd step, centered on any point in circle, a width of wide, tracking target position square of the position rectangle frame of tracking target Shape frame it is a height of it is high construction one rectangle frame, using the rectangle frame as a test sample position rectangle frame.
3. the Struck method for tracking target that use GPU hardware according to claim 1 accelerates, it is characterised in that step (5) discriminant value of each test sample of the gray level image described in, is calculated according to the following formula:
Wherein, f represents the discriminant value of each test sample of gray level image;N represents to support the sum of sample;βiRepresent i-th Hold the weights of sample;Exp () represents the exponential function operation using natural constant e the bottom of as;xiRepresent the spy of i-th of support sample Levy;Z represents the feature of each test sample of gray level image;||·||2The square operation of vector field homoemorphism is sought in expression.
4. the Struck method for tracking target that use GPU hardware according to claim 1 accelerates, it is characterised in that step (6b) the unique step sampling method is comprised the following steps that:
1st step, using track target position rectangle frame center as starting point, to the central point around equably dissipate 8 lines Section, the length of every line segment is 60 pixel wides;
2nd step, chooses a bit on any one line segment, and the distance between point to the position rectangle frame center of tracking target is M pixel wide, m ∈ { 12,24,36,48,60 };Centered on selected point, tracking target position rectangle frame it is a width of One rectangle frame of a height of high construction of wide, tracking target position rectangle frame, regard the rectangle frame as the position of a training sample Put rectangle frame.
5. the Struck method for tracking target that use GPU hardware according to claim 1 accelerates, it is characterised in that step (8a) the minimum gradient method is comprised the following steps that:
1st step, according to the following formula, utilizes computer graphics processor GPU, the ladder of each training sample of parallel computation gray level image Degree:
Wherein, g represents the gradient of each training sample of gray level image;A represents the position of each training sample of gray level image The area of the position rectangle frame region intersecting area of first training sample of rectangle frame region and gray level image;B represents gray scale The position rectangle frame region of each training sample of image and the position rectangle frame region of first training sample of gray level image Phase and the area in region;N represents to support the sum of sample;βiRepresent the weights of i-th of support sample;Exp () is represented with certainly Right constant e is the index operation at bottom;xiRepresent the feature of i-th of support sample;X represents each training sample of gray level image Feature;||·||2The square operation of vector field homoemorphism is sought in expression;
2nd step, first training sample of gray level image is copied in positive support sample set, the sample is used as and supports sample This A;
3rd step, finds out the training sample with minimal gradient from the training sample of gray level image, by the instruction with minimal gradient Practice sample mark to copy in negative support sample set, the sample is used as and supports sample B;
4th step, according to the following formula, using computer graphics processor GPU, sample A, B and each support are supported in parallel computation respectively Kernel function value between sample:
K(x1,x2)=exp (- 0.02 | | x1-x2||2)
Wherein, K (x1,x2) represent to support sample A, B and each kernel function value supported between sample;Exp () is represented with nature Constant e is the index operation at bottom;x1Represent support sample A, B feature;x2Represent the feature of each support sample;||·||2Table Show the square operation for seeking vector field homoemorphism.
6. the Struck method for tracking target that use GPU hardware according to claim 1 accelerates, it is characterised in that step Comprising the following steps that for gradient difference method is maximized described in (8a), step (8b) and step (8c):
1st step, according to the following formula, calculates the right value update amount for supporting sample:
Wherein, λ represents to support the right value update amount of sample;Max () represents to take maxima operation;Min () represents to take minimum Value Operations;gARepresent support sample A gradient;gBRepresent the gradient of support sample B;K(xA,xB) represent to support sample A with supporting Kernel function value between sample B;βARepresent support sample A weights;yARepresent support sample A position rectangle frame;Y represents branch Hold the position rectangle frame of first training sample of gray level image belonging to sample A;
The weights for supporting sample A are added right value update amount λ, the weights for supporting sample B are subtracted into right value update amount λ by the 2nd step;
3rd step, according to the following formula, using computer graphics processor GPU, the parallel gradient for updating each support sample:
G=g '-λ (K (x, xA)-K(x,xB))
Wherein, g represents the gradient of each support sample after updating;The gradient of g ' expressions each support sample before updating;λ represents power It is worth renewal amount;K(x,xA) represent each kernel function value supported between sample and support sample A;K(x,xB) represent each support Kernel function value between sample and support sample B.
7. the Struck method for tracking target that use GPU hardware according to claim 1 accelerates, it is characterised in that step Comprising the following steps that for disturbance degree method is minimized described in (8a) and step (8b):
1st step, according to the following formula, using computer graphics processor GPU, the disturbance degree for supporting sample is each born in parallel computation:
Wherein, e represents the disturbance degree of each negative support sample;β2Represent the weights of each negative support sample;K(x1,x2) represent every The individual negative kernel function value supported between the positive support sample of the gray level image belonging to sample and each negative support sample;
2nd step, finds out the negative support sample with minimum influence degree, by the negative branch with minimum influence degree from negative support sample Sample is held as sample to be deleted, the negative support sample with minimum influence degree is deleted from negative support sample set;
3rd step, according to the following formula, using computer graphics processor GPU, the parallel gradient for updating each support sample:
G=g '-β2(K(x,x1)-K(x,x2))
Wherein, g represents the gradient of each support sample after updating;β2Represent the weights of sample to be deleted;K(x,x1) represent each Kernel function value between the positive support sample of gray level image belonging to support sample and sample to be deleted;K(x,x2) represent each Support the kernel function value between sample and sample to be deleted;
4th step, according to the following formula, the weights of the positive support sample of the gray level image belonging to renewal sample to be deleted:
β1=β '1+β′2
Wherein, β1The weights of the positive support sample of gray level image after expression updates belonging to sample to be deleted;β′1Represent before updating The weights of the positive support sample of gray level image belonging to sample to be deleted;β′2Represent the weights of sample to be deleted before updating;
5th step, if the weights of the positive support sample of gray level image after updating belonging to sample to be deleted are equal to 0, by the positive branch Hold sample to delete from positive support sample set, the gray level image belonging to sample to be deleted is deleted from gray level image set.
8. the Struck method for tracking target that use GPU hardware according to claim 1 accelerates, it is characterised in that step (8b) the maximum-minimize gradient method is comprised the following steps that:
1st step, a gray level image is randomly choosed from gray level image set, the gray level image is regard as pending gray-scale map Picture;
2nd step, according to the following formula, using computer graphics processor GPU, each training sample of the pending gray level image of parallel computation This gradient:
Wherein, g represents the gradient of each training sample of pending gray level image;A represents each instruction of pending gray level image Practice the position rectangle frame region intersection of the position rectangle frame region of sample and first training sample of pending gray level image The area in domain;B represents the position rectangle frame region of each training sample of pending gray level image and pending gray level image The position rectangle frame region phase of first training sample and the area in region;N represents to support the sum of sample;βiRepresent i-th Support the weights of sample;Exp () represents the index operation using natural constant e the bottom of as;xiRepresent the spy of i-th of support sample Levy;X represents the feature of each training sample of pending gray level image;||·||2The square operation of vector field homoemorphism is sought in expression;
3rd step, is subordinated in the support sample of pending gray level image, finds out the support sample with greatest gradient, will obtain Support sample be used as support sample A;
In 4th step, the training sample for being subordinated to pending gray level image, the training sample with minimal gradient is found out, will be obtained Training sample be used as support sample B;
5th step, if supporting sample B not to be labeled, will support sample B to copy in negative support sample set, according to the following formula, profit Computer graphics processor GPU is used, sample B and each kernel function value supported between sample are supported in parallel computation:
K(x1,xB)=exp (- 0.02 | | x1-xB||2)
Wherein, K (x1,xB) represent each kernel function value supported between sample and support sample B;Exp () is represented with naturally normal Number e is the index operation at bottom;x1Represent the feature of each support sample;xBRepresent the feature of support sample B;||·||2Expression is asked The square operation of vector field homoemorphism.
CN201510112791.1A 2015-03-14 2015-03-14 The Struck method for tracking target accelerated using GPU hardware Active CN104680558B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510112791.1A CN104680558B (en) 2015-03-14 2015-03-14 The Struck method for tracking target accelerated using GPU hardware

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510112791.1A CN104680558B (en) 2015-03-14 2015-03-14 The Struck method for tracking target accelerated using GPU hardware

Publications (2)

Publication Number Publication Date
CN104680558A CN104680558A (en) 2015-06-03
CN104680558B true CN104680558B (en) 2017-07-28

Family

ID=53315551

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510112791.1A Active CN104680558B (en) 2015-03-14 2015-03-14 The Struck method for tracking target accelerated using GPU hardware

Country Status (1)

Country Link
CN (1) CN104680558B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105160350B (en) * 2015-08-03 2018-08-28 深圳市哈工大交通电子技术有限公司 A kind of Haar detection methods accelerated based on GPU
DK3465085T3 (en) 2016-06-06 2022-03-07 Sz Dji Osmo Technology Co Ltd CARRIER SUPPORTED TRACKING
WO2017210822A1 (en) * 2016-06-06 2017-12-14 Sz Dji Osmo Technology Co., Ltd. Image processing for tracking
CN106250878B (en) * 2016-08-19 2019-12-31 中山大学 Multi-modal target tracking method combining visible light and infrared images
CN106991689B (en) * 2017-04-05 2019-12-31 西安电子科技大学 Target tracking method based on FHOG and color characteristics and GPU acceleration
CN107563392A (en) * 2017-09-07 2018-01-09 西安电子科技大学 The YOLO object detection methods accelerated using OpenCL
CN107944381B (en) * 2017-11-20 2020-06-16 深圳云天励飞技术有限公司 Face tracking method, face tracking device, terminal and storage medium
CN107977980B (en) * 2017-12-06 2021-01-05 北京飞搜科技有限公司 Target tracking method, device and readable medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103927745A (en) * 2014-03-28 2014-07-16 北京中海新图科技有限公司 Tracking and matching parallel computing method for wearable device
CN104021519A (en) * 2014-06-17 2014-09-03 电子科技大学 Maneuvering multi-target tracking algorithm under dense clutter condition based on GPU architecture

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8401242B2 (en) * 2011-01-31 2013-03-19 Microsoft Corporation Real-time camera tracking using depth maps
KR20140095333A (en) * 2013-01-24 2014-08-01 한남대학교 산학협력단 Method and apparratus of tracing object on image

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103927745A (en) * 2014-03-28 2014-07-16 北京中海新图科技有限公司 Tracking and matching parallel computing method for wearable device
CN104021519A (en) * 2014-06-17 2014-09-03 电子科技大学 Maneuvering multi-target tracking algorithm under dense clutter condition based on GPU architecture

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
《快速鲁棒特征算法的CUDA加速优化》;刘金硕等;《计算机科学》;20140430;第41卷(第4期);参见第24-27页 *
Struck: Structured Output Tracking with Kernels;Sam Hare等;《IEEE International Conference on Computer Vision》;20111113;参见第263-270页 *

Also Published As

Publication number Publication date
CN104680558A (en) 2015-06-03

Similar Documents

Publication Publication Date Title
CN104680558B (en) The Struck method for tracking target accelerated using GPU hardware
Zhu et al. Method of plant leaf recognition based on improved deep convolutional neural network
Sebai et al. MaskMitosis: a deep learning framework for fully supervised, weakly supervised, and unsupervised mitosis detection in histopathology images
Ding et al. Multi-scale fully convolutional network for gland segmentation using three-class classification
CN104573731B (en) Fast target detection method based on convolutional neural networks
Zamberletti et al. Text localization based on fast feature pyramids and multi-resolution maximally stable extremal regions
CN110276745B (en) Pathological image detection algorithm based on generation countermeasure network
Triki et al. Deep leaf: Mask R-CNN based leaf detection and segmentation from digitized herbarium specimen images
CN106991689A (en) Method for tracking target and GPU based on FHOG and color characteristic accelerate
JP2020187736A (en) Learning data generation method for classifier learning having regional features, and system thereof
CN110827312A (en) Learning method based on cooperative visual attention neural network
CN108664986A (en) Based on lpThe multi-task learning image classification method and system of norm regularization
Xie et al. Robust segmentation of nucleus in histopathology images via mask R-CNN
Zhang et al. Real-time 6D pose estimation from a single RGB image
CN107862680A (en) A kind of target following optimization method based on correlation filter
Zhu et al. ACE-Net: biomedical image segmentation with augmented contracting and expansive paths
Wilms et al. AttentionMask: Attentive, efficient object proposal generation focusing on small objects
Li et al. Instance aware document image segmentation using label pyramid networks and deep watershed transformation
Kuai et al. Learning adaptively windowed correlation filters for robust tracking
Tong et al. Improving classification of breast cancer by utilizing the image pyramids of whole-slide imaging and multi-scale convolutional neural networks
Szemenyei et al. Fully neural object detection solutions for robot soccer
Dong et al. LSI: Latent semantic inference for natural image segmentation
CN108876776B (en) Classification model generation method, fundus image classification method and device
CN111177811A (en) Automatic fire point location layout method applied to cloud platform
CN112991281B (en) Visual detection method, system, electronic equipment and medium

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