CN104680558A - Struck target tracking method using GPU hardware for acceleration - Google Patents

Struck target tracking method using GPU hardware for acceleration Download PDF

Info

Publication number
CN104680558A
CN104680558A CN201510112791.1A CN201510112791A CN104680558A CN 104680558 A CN104680558 A CN 104680558A CN 201510112791 A CN201510112791 A CN 201510112791A CN 104680558 A CN104680558 A CN 104680558A
Authority
CN
China
Prior art keywords
sample
gray level
level image
support
gradient
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.)
Granted
Application number
CN201510112791.1A
Other languages
Chinese (zh)
Other versions
CN104680558B (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 a Struck target tracking method using GPU hardware for acceleration, and solves the problem that the tracking performance is poor and the real-time processing capability is inacceptable in the prior art. The method comprises the following steps: 1, acquiring gray images; 2, judging whether the loaded image is a first frame image or not; 3, initializing the position rectangular frame of a tracking target; 4, extracting the features of all test samples of the gray images; 5, determining the position rectangular frame of the tracking target; 6, extracting the features of all training samples of the gray images; 7, initiating the weights and gradients of the training samples; 8, obtaining and updating the weights and gradients of supporting samples; 9, judging whether all the images are loaded or not; 10, ending target tracking. The method can be applied to the real-time tracking of the target in a video on a universal computer.

Description

Use the Struck method for tracking target that GPU hardware is accelerated
Technical field
The invention belongs to field of computer technology, further relate to a kind of structure output Struck method for tracking target based on kernel method using computer graphics processor GPU hardware to accelerate in computer video target following technical field.The present invention can realize accelerating the structure output Struck method for tracking target based on kernel method, and available realization on a general-purpose computer carries out real-time follow-up to the target in video.
Background technology
Have at a high speed, high performance method for tracking target is the core technology of computer vision field.Current method for tracking target is divided into two classes: a class is the tracking of feature based coupling, and the method mainly builds and can represent clarification of objective, is then judged the position of target by the matching degree between feature; Another kind of is the tracking of based target and background separation, and the method uses the method for machine learning to learn one can the sorter of separate targets and background, and learning process is generally on-line training process, judges target location by the sorter learnt.By contrast, the former have calculate simple, but to having illumination, block, the situation of the factors vary such as yardstick can not process well.The latter can solve the problem that the former runs into a certain extent, and has higher robustness, but its computation complexity is higher.
Patented claim " a kind of real-time distribution field method for tracking target based on the global search " (applying date: on June 26th, 2014 that Xibei Univ. of Agricultural & Forest Science & Technology proposes, application number: 201410298728.7, publication number: CN 104036528A) in disclose the tracking of a kind of feature based coupling.The method using the distribution field of target as object module, when calculated candidate areal distribution field and object module correlation matrix, by the good nature of two-dimensional Fourier transform, the search of subrange is expanded to the search of global scope, and ensure that very high processing speed, there is the ability of process in real time.But the deficiency that the method still exists is, have employed a kind of simple linear update method to upgrade target image distribution field model, for target by the situation of temporarily shielding, this update method can lose target information, thus occurs the problem of template drift.
Patented claim " a kind of high-speed target track algorithm of multi-feature extraction the Stepwise Refinement " (applying date: on September 2nd, 2014 that Wuhan University proposes, application number: 201410442527.X, publication number: CN104200216A) in disclose the tracking of a kind of feature based coupling.The various features of target carries out merging as object module by the method, the target location after adopting Mean Shift method to calculate multiple features fusion.Although the method has higher tracking accuracy, avoid the problem of template drift to a certain extent.But the deficiency that the method still exists is, only upgrade object module by initial target model and current candidate object module, therefore, the initialization of the method to target is very sensitive, and the method has the low shortcoming of robustness.
Paper " Struck:Structured Output Tracking with Kernels " (the IEEE International Conference on Computer Vision that Sam Hare, Amir Saffari and Philip H.S.Torr deliver, ICCV 2011, Barcelona, Spain, November 6-13,2011, pages 263 – 270) in openly propose the tracking of a kind of based target and background separation, the method is referred to as Struck method for tracking target.The method adopts structure based supporting vector machine model Structured SVM, learns the sorter that can be distinguished object and background, is judged the position of target by the sorter learnt.Although the method has the high advantage of performance, overcome classic method to a certain extent and can not solve by the problem of blocking the robustness reduction caused with illumination variation.But, the deficiency that the method still exists is, the method adopt the method for serial computing to carry out extracting discriminant value that the weights of sample, gradient and calculating test sample book are supported in the feature of training sample and test sample book, acquisition and renewal, because above each process relates to very intensive, therefore this realization has the slow shortcoming of processing speed.Experiment shows, for a long video sequence, the average treatment speed of the method is approximately 5fps, and obvious the method does not have real-time, thus limits its practical application.
Summary of the invention
The object of the invention is to overcome above-mentioned the deficiencies in the prior art, provide a kind of Struck method for tracking target using GPU hardware to accelerate, can realize carrying out real-time follow-up to the target in video.
Step of the present invention is as follows:
(1) gray level image is obtained:
(1a) two field picture in image sequence to be tracked is loaded in main frame internal memory;
(1b) image being loaded into main frame internal memory is converted into gray level image;
(1c) call the integrogram computing function cvIntegral increased income in the OpenCV of computer vision storehouse, calculate the integrogram of gray level image;
(1d) gray level image is copied in gray level image set;
(2) judge that whether the image loaded is the 1st two field picture in image sequence to be tracked, if so, then perform step (3), otherwise, perform step (4);
(3) the position rectangle frame of initialization tracking target:
In gray level image, choose rectangle frame tracking target be included, using the position rectangle frame of selected rectangle frame as tracking target, perform step (6);
(4) feature of all test sample books of gray level image is extracted:
(4a) to all test sample books of gray level image, full sampling method is adopted respectively, the position rectangle frame of collecting test sample;
(4b) according to the integrogram of gray level image and the position rectangle frame of all test sample books, utilize computer graphics processor GPU, the parallel Lis Hartel extracting all test sample books of gray level image is levied;
(5) the position rectangle frame of tracking target is determined:
Utilize computer graphics processor GPU, the discriminant value of all test sample books of parallel computation gray level image, finds out the test sample book corresponding to maximum discriminant value, using the position rectangle frame of the position rectangle frame of this test sample book as tracking target;
(6) feature of all training samples of gray level image is extracted:
(6a) the position rectangle frame of first of gray level image training sample is set as the position rectangle frame of tracking target;
(6b) to all the other all training samples of gray level image, adopt unique step sampling method respectively, gather the position rectangle frame of training sample;
(6c) by the position rectangle frame of all training samples of gray level image, copy in the rectangle frame set of training sample position;
(6d) according to the integrogram of gray level image and the position rectangle frame of all training samples, utilize computer graphics processor GPU, the parallel Lis Hartel extracting all training samples of gray level image is levied;
(6e) by the feature of all training samples of gray level image, copy in training sample characteristic set;
(7) weights of initialization training sample and gradient:
The weights of the training sample of gray level image and gradient are initialized as 0; The weights of the training sample of gray level image, gradient are joined respectively the set of training sample weights, the set of training sample gradient;
(8) obtain and upgrade weights, the gradient of supporting sample:
(8a) employing minimizes gradient method, from the training sample of gray level image, select two training samples, using two training samples selected as supporting sample A, B; Adopt and maximize gradient difference method, upgrade the weights and gradient of supporting sample A, B; When supporting the sum of sample more than 100, adopting and minimizing disturbance degree method, upgrading weights and the gradient of all support samples;
(8b) adopt maximum-minimize gradient method, from gray level image set, select a gray level image, from the training sample of the gray level image selected, select two training samples, using two training samples selected as supporting sample A, B; Adopt and maximize gradient difference method, upgrade the weights and gradient of supporting sample A, B; If support, the sum of sample is more than 100, then adopt and minimize disturbance degree method, upgrade weights and the gradient of all support samples;
(8c) adopt maximum-minimize gradient method, from gray level image set, select a gray level image, from the training sample of the gray level image selected, select two training samples, using two training samples selected as supporting sample A, B; Adopt and maximize gradient difference method, upgrade the weights and gradient of supporting sample A, B; By this step continued operation 9 times;
(8d) circulation performs step (8b), step (8c) 9 times;
(9) judge whether all two field pictures having loaded image sequence to be tracked, if so, then perform step (10), otherwise, perform step (1);
(10) target end is followed the tracks of.
The present invention compared with prior art, has the following advantages:
The first, the present invention adopts computer image processor GPU, achieves Struck method for tracking target, to overcome in prior art by the problem of blocking the robustness that causes with illumination variation and reducing, makes the present invention have very high robustness.
Second, the present invention adopts computer graphics processor GPU, and the parallel feature extracting training sample and test sample book, overcomes in prior art and extract the slow problem of sample characteristics, make the present invention while the extraction rate improving sample characteristics, substantially increase the speed of tracking target.
3rd, the present invention adopts computer graphics processor GPU, the discriminant value of parallel computation test sample book, overcomes in prior art the problem differentiating that tracking target is slow, make the present invention substantially increase the speed differentiating tracking target, which thereby enhance the speed of tracking target.
4th, the present invention adopts computer graphics processor GPU, parallel weights and the gradient upgrading support sample, overcome in prior art and upgrade the slow problem of tracking target model, the present invention is made to substantially increase the speed upgrading tracking target model, which thereby enhance the speed of tracking target, make the present invention have real-time.
Accompanying drawing explanation
Fig. 1 is process flow diagram of the present invention.
Embodiment
Below in conjunction with accompanying drawing, the invention will be further described.
The present invention adopts CUDA language, can realize on the GPU equipment of any a support CUDA framework of NVIDIA.Before enforcement method of the present invention, first should call cudaMalloc function and distribute eight region of memorys on GPU equipment.After use method of the present invention, also should call cudaFree function and discharge this eight sections of region of memorys.
With reference to Fig. 1, the present invention realizes by following steps:
Step 1, obtains gray level image.
Call the image loading function cvLoadImage increased income in the OpenCV of computer vision storehouse, the 1st two field picture in image sequence to be tracked is loaded in main frame internal memory.
Call the Color Channel transfer function cvCvtColor increased income in the OpenCV of computer vision storehouse, the image being loaded into main frame internal memory is converted into gray level image.
Call the integrogram computing function cvIntegral increased income in the OpenCV of computer vision storehouse, calculate the integrogram of gray level image.Call the memory copying function cudaMemcpy of computer graphics processor GPU, by the integrogram of gained from main frame memory copying to computer graphics processor GPU device memory region 1.
Gray level image is copied in gray level image set.
Step 2, judges that whether the image loaded is the 1st two field picture in image sequence to be tracked, if so, then performs step 3, otherwise, perform step 4.
Step 3, the position rectangle frame of initialization tracking target.
In gray level image, choose rectangle frame tracking target be included, using the position rectangle frame of selected rectangle frame as tracking target, perform step 6.
Step 4, extracts the feature of all test sample books of gray level image.
To all test sample books of gray level image, according to the position rectangle frame of the 1st following step and the 2nd step collecting test sample.
1st step, with the rectangle frame center, position of tracking target be the center of circle, 30 pixel wide construct a circle for radius.
2nd step, in circle centered by any point, the wide of the position rectangle frame of tracking target be that the Gao Weigao of the position rectangle frame of wide, tracking target constructs a rectangle frame, using the position rectangle frame of this rectangle frame as a test sample book.
The position rectangle frame data of the test sample book of gained are saved in, calculate in graphic process unit GPU device memory region 7.According to the integrogram data in the position rectangle frame data of test sample book in computer graphics processor GPU device memory region 7 and region of memory 1, utilize computer graphics processor GPU, the Lis Hartel of all test sample books of parallel computation gray level image is levied, and the feature of gained is saved in computer graphics processor GPU device memory region 8.
Step 5, determines the position rectangle frame of tracking target.
According to the data calculated in graphic process unit GPU device memory region 3,4,8, according to the following formula, utilize computer graphics processor GPU, the discriminant value of each test sample book of parallel computation gray level image:
f = Σ i = 1 n β i · exp ( - 0.02 | | x i - z | | 2 )
Wherein, f represents the discriminant value of each test sample book of gray level image; N expresses support for the sum of sample; β irepresent i-th weights supporting sample; The index operation that it is the end with natural constant e that exp () represents; x irepresent i-th feature supporting sample; Z represents the feature of each test sample book of gray level image; || || 2represent the square operation asking vector field homoemorphism.
The test sample book with maximum discriminant value is found out, using the position rectangle frame of the position rectangle frame of the test sample book of gained as tracking target from all test sample books of gray level image.
Step 6, extracts the feature of all training samples of gray level image.
The position rectangle frame of first of gray level image training sample is set as the position rectangle frame of tracking target.
To all the other all training samples of gray level image, adopt unique step sampling method respectively, gather the position rectangle frame of training sample.
To all the other all training samples of gray level image, gather the position rectangle frame of training sample according to following 1st step and the 2nd step.
1st step, with the center of the position rectangle frame of tracking target for starting point, the surrounding to this central point disperses 8 line segments equably, and the length of every bar line segment is 60 pixel wide.
2nd step, any line segment is chosen a bit, this point to tracking target rectangle frame center, position between distance be m pixel wide, m ∈ { 12,24,36,48,60}; Centered by selected point, the Gao Weigao of the wide position rectangle frame for wide, tracking target of the position rectangle frame of tracking target constructs a rectangle frame, using the position rectangle frame of this rectangle frame as a training sample.
The position rectangle frame data of all training samples of gray level image are saved in, in computer graphics processor GPU device memory region 2.
According to the integrogram data in the position rectangle frame data of training sample in computer graphics processor GPU device memory region 2 and region of memory 1, utilize computer graphics processor GPU, the Lis Hartel of all training samples of parallel computation gray level image is levied.
The characteristic of all training samples of gray level image is saved in, in computer graphics processor GPU device memory region 3.
Step 7, the weights of initialization training sample and gradient.
The weights of all training samples of gray level image and gradient are initialized as 0, the weights after initialization, gradient are saved in respectively in computer graphics processor GPU device memory region 4,5.
Step 8, obtains and upgrades weights, the gradient of supporting sample.
(8a) according to the following formula, computer graphics processor GPU is utilized, the gradient of each training sample of parallel computation gray level image:
g = a b - 1 - Σ i = 1 n β i exp ( - 0.02 | | x i - x | | 2 )
Wherein, g represents the gradient of each training sample of gray level image; A represents the rectangle frame region, position of each training sample of gray level image, with the area of rectangle frame region, the position intersecting area of first training sample of gray level image; B represents the rectangle frame region, position of each training sample of gray level image, with the rectangle frame region, position of first training sample of gray level image mutually and the area in region; N expresses support for the sum of sample; β irepresent i-th weights supporting sample; The index operation that it is the end with natural constant e that exp () represents; x irepresent i-th feature supporting sample; X represents the feature of each training sample of gray level image; || || 2represent the square operation asking vector field homoemorphism.
The gradient data of all training samples of gained is saved in, in computer graphics processor GPU device memory region 5.
Being copied to by first of gray level image training sample just supports in sample set, using this sample as support sample A.
From the training sample of gray level image, find out the training sample with minimal gradient, the training sample with minimal gradient is copied in negative support sample set, the training sample of minimal gradient will be had as support sample B.
According to the following formula, utilize computer graphics processor GPU, the kernel function value between sample A, B and each support sample is supported in parallel computation respectively:
K(x 1,x 2)=exp(-0.02||x 1-x 2|| 2)
Wherein, K (x 1, x 2) express support for kernel function value between sample A, B and each support sample; The index operation that it is the end with natural constant e that exp () represents; x 1express support for the feature of sample A, B; x 2represent the feature of each support sample; || || 2represent the square operation asking vector field homoemorphism.
The kernel function Value Data of gained is saved in, in computer graphics processor GPU device memory region 6.
According to the following formula, the right value update amount supporting sample is calculated:
λ = max ( 0 , min ( g A - g B 2 - 2 K ( x A , x B ) , 100 - β A ) ) , y A = y max ( 0 , min ( g A - g B 2 - 2 K ( x A , x B ) , - β A ) ) , y A ≠ y
Wherein, λ expresses support for the right value update amount of sample; Maxima operation is got in max () expression; Min () represents that getting minimum value operates; g aexpress support for the gradient of sample A; g bexpress support for the gradient of sample B; K (x a, x b) express support for sample A and support the kernel function value between sample B; β aexpress support for the weights of sample A; y aexpress support for the position rectangle frame of sample A; Y expresses support for the position rectangle frame of first training sample of the gray level image belonging to sample A.
To support that the weights of sample A add right value update amount λ, will support that the weights of sample B deduct right value update amount λ.
The weights of support sample A, B after renewal are saved in, in computer graphics processor GPU device memory region 4.
According to the following formula, utilize computer graphics processor GPU, the parallel gradient upgrading each support sample:
g=g′-λ(K(x,x A)-K(x,x B))
Wherein, g represents the gradient upgrading rear each support sample; The gradient of each support sample before g ' expression upgrades; λ represents right value update amount; K (x, x a) represent each support sample and support the kernel function value between sample A; K (x, x b) 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, in computer graphics processor GPU device memory region 5.
Judge to support that whether the sum of sample is more than 100, if so, then performs the 1st step below, the 2nd step, the 3rd step, the 4th step and the 5th step, otherwise, perform step (8b).
1st step, according to the following formula, utilizes computer graphics processor GPU, the disturbance degree of each negative support sample of parallel computation:
e = β 2 2 ( 2 - 2 K ( x 1 , x 2 ) )
Wherein, e represents the disturbance degree of each negative support sample; β 2represent the weights of each negative support sample; K (x 1, x 2) represent the just support sample of the gray level image belonging to each negative support sample and the kernel function value between each negative support sample.
2nd step, finds out the negative support sample with minimum influence degree from negative support sample, using having the negative support sample of minimum influence degree as sample to be deleted, is deleted by the negative support sample with minimum influence degree from negative support sample set.
3rd step, according to the following formula, utilizes computer graphics processor GPU, the parallel gradient upgrading each support sample:
g=g′-β 2(K(x,x 1)-K(x,x 2))
Wherein, g represents the gradient upgrading rear each support sample; β 2represent the weights of sample to be deleted; K (x, x 1) represent the kernel function value just supported between sample of each support sample and the gray level image belonging to sample to be deleted; K (x, x 2) represent kernel function value between each support sample and sample to be deleted.
The gradient data of all support samples after renewal is saved in, in computer graphics processor GPU device memory region 5.
4th step, according to the following formula, upgrades the weights just supporting sample of the gray level image belonging to sample to be deleted:
β 1=β 1′+β 2
Wherein, β 1represent the weights just supporting sample of the gray level image after upgrading belonging to sample to be deleted; β 1' represent the weights just supporting sample upgrading front gray level image belonging to sample to be deleted; β 2' represent the weights upgrading front sample to be deleted.
5th step, if what upgrade rear gray level image belonging to sample to be deleted just supports whether the weights of sample equal 0, if, this is just being supported sample is from just supporting to delete sample set, gray level image belonging to sample to be deleted is deleted from gray level image set, otherwise, this is just being supported the weights of sample are saved in computer graphics processor GPU device memory region 4.
(8b) Stochastic choice gray level image from gray level image set, using the gray level image of selection as pending gray level image.
According to the following formula, utilize computer graphics processor GPU, the gradient of each training sample of the pending gray level image of parallel computation:
g = a b - 1 - Σ i = 1 n β i exp ( - 0.02 | | x i - x | | 2 )
Wherein, g represents the gradient of each training sample of pending gray level image; A represents the area of rectangle frame region, the position intersecting area of the rectangle frame region, position of each training sample of pending gray level image and first training sample of pending gray level image; The rectangle frame region, position that b represents the rectangle frame region, position of each training sample of pending gray level image and first training sample of pending gray level image mutually and the area in region; N expresses support for the sum of sample; β irepresent i-th weights supporting sample; The index operation that it is the end with natural constant e that exp () represents; x irepresent i-th feature supporting sample; X represents the feature of each training sample of pending gray level image; || || 2represent the square operation asking vector field homoemorphism.
The gradient data of all training samples of gained is saved in, in computer graphics processor GPU device memory region 5.
Be subordinated to the support sample found out in the support sample of pending gray level image and there is greatest gradient, using the support sample obtained as supporting sample A.
Be subordinated to the training sample found out in the training sample of pending gray level image and there is minimal gradient, using the training sample obtained as supporting sample B.
If support, sample B is not labeled, then support sample B is copied to negative support and, in sample set, according to the following formula, utilize computer graphics processor GPU, the kernel function value between sample B and each support sample is supported in parallel computation:
K(x 1,x B)=exp(-0.02||x 1-x B|| 2)
Wherein, K (x 1, x b) represent each support sample and support the kernel function value between sample B; The index operation that it is the end with natural constant e that exp () represents; x 1represent the feature of each support sample; x bexpress support for the feature of sample B; || || 2represent the square operation asking vector field homoemorphism.
The kernel function Value Data of gained is saved in, in computer graphics processor GPU device memory region 7.
According to the following formula, the right value update amount supporting sample is calculated:
λ = max ( 0 , min ( g A - g B 2 - 2 K ( x A , x B ) , 100 - β A ) ) , y A = y max ( 0 , min ( g A - g B 2 - 2 K ( x A , x B ) , - β A ) ) , y A ≠ y
Wherein, λ expresses support for the right value update amount of sample; Maxima operation is got in max () expression; Min () represents that getting minimum value operates; g aexpress support for the gradient of sample A; g bexpress support for the gradient of sample B; K (x a, x b) express support for sample A and support the kernel function value between sample B; β aexpress support for the weights of sample A; y aexpress support for the position rectangle frame of sample A; Y expresses support for the position rectangle frame of first training sample of the gray level image belonging to sample A.
To support that the weights of sample A add right value update amount λ, will support that the weights of sample B deduct right value update amount λ.
The weights of support sample A, B after renewal are saved in, in computer graphics processor GPU device memory region 4.
According to the following formula, utilize computer graphics processor GPU, the parallel gradient upgrading each support sample:
g=g′-λ(K(x,x A)-K(x,x B))
Wherein, g represents the gradient upgrading rear each support sample; The gradient of each support sample before g ' expression upgrades; λ represents right value update amount; K (x, x a) represent each support sample and support the kernel function value between sample A; K (x, x b) 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, in computer graphics processor GPU device memory region 5.
Judge to support that whether the sum of sample is more than 100, if so, then performs the 1st step below, the 2nd step, the 3rd step, the 4th step and the 5th step, otherwise, perform step (8c).
1st step, according to the following formula, utilizes computer graphics processor GPU, the disturbance degree of each negative support sample of parallel computation:
e = β 2 2 ( 2 - 2 K ( x 1 , x 2 ) )
Wherein, e represents the disturbance degree of each negative support sample; β 2represent the weights of each negative support sample; K (x 1, x 2) represent the just support sample of the gray level image belonging to each negative support sample and the kernel function value between each negative support sample.
2nd step, finds out the negative support sample with minimum influence degree from negative support sample, using having the negative support sample of minimum influence degree as sample to be deleted, is deleted by the negative support sample with minimum influence degree from negative support sample set.
3rd step, according to the following formula, utilizes computer graphics processor GPU, the parallel gradient upgrading each support sample:
g=g′-β 2(K(x,x 1)-K(x,x 2))
Wherein, g represents the gradient upgrading rear each support sample; β 2represent the weights of sample to be deleted; K (x, x 1) represent the kernel function value just supported between sample of each support sample and the gray level image belonging to sample to be deleted; K (x, x 2) represent kernel function value between each support sample and sample to be deleted.
The gradient data of all support samples after renewal is saved in, in computer graphics processor GPU device memory region 5.
4th step, according to the following formula, upgrades the weights just supporting sample of the gray level image belonging to sample to be deleted:
β 1=β 1′+β 2
Wherein, β 1represent the weights just supporting sample of the gray level image after upgrading belonging to sample to be deleted; β 1' represent the weights just supporting sample upgrading front gray level image belonging to sample to be deleted; β 2' represent the weights upgrading front sample to be deleted.
5th step, if what upgrade rear gray level image belonging to sample to be deleted just supports whether the weights of sample equal 0, if, this is just being supported sample is from just supporting to delete sample set, gray level image belonging to sample to be deleted is deleted from gray level image set, otherwise, this is just being supported the weights of sample are saved in computer graphics processor GPU device memory region 4.
(8c) Stochastic choice gray level image from gray level image set, using the gray level image of selection as pending gray level image.
Be subordinated to the support sample found out in the support sample of pending gray level image and there is greatest gradient, using the support sample obtained as supporting sample A.
Be subordinated to the support sample found out in the support sample of pending gray level image and there is minimal gradient, using the support sample obtained as supporting sample B.
According to the following formula, the right value update amount supporting sample is calculated:
λ = max ( 0 , min ( g A - g B 2 - 2 K ( x A , x B ) , 100 - β A ) ) , y A = y max ( 0 , min ( g A - g B 2 - 2 K ( x A , x B ) , - β A ) ) , y A ≠ y
Wherein, λ expresses support for the right value update amount of sample; Maxima operation is got in max () expression; Min () represents that getting minimum value operates; g aexpress support for the gradient of sample A; g bexpress support for the gradient of sample B; K (x a, x b) express support for sample A and support the kernel function value between sample B; β aexpress support for the weights of sample A; y aexpress support for the position rectangle frame of sample A; Y expresses support for the position rectangle frame of first training sample of the gray level image belonging to sample A.
To support that the weights of sample A add right value update amount λ, will support that the weights of sample B deduct right value update amount λ.
The weights of support sample A, B after renewal are saved in, in computer graphics processor GPU device memory region 4.
According to the following formula, utilize computer graphics processor GPU, the parallel gradient upgrading each support sample:
g=g′-λ(K(x,x A)-K(x,x B))
Wherein, g represents the gradient upgrading rear each support sample; The gradient of each support sample before g ' expression upgrades; λ represents right value update amount; K (x, x a) represent each support sample and support the kernel function value between sample A; K (x, x b) 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, in computer graphics processor GPU device memory region 5.By step (8c) continued operation 9 times.
(8d) circulation performs step (8b), step (8c) 9 times.
Step 9, judges whether all two field pictures having loaded image sequence to be tracked, if so, then performs step 10, otherwise, perform step 1.
Step 10, target end is followed the tracks of.

Claims (9)

1. the Struck method for tracking target using GPU hardware to accelerate, comprises the steps:
(1) gray level image is obtained:
(1a) two field picture in image sequence to be tracked is loaded in main frame internal memory;
(1b) image being loaded into main frame internal memory is converted into gray level image;
(1c) call the integrogram computing function cvIntegral increased income in the OpenCV of computer vision storehouse, calculate the integrogram of gray level image;
(1d) gray level image is copied in gray level image set;
(2) judge that whether the image loaded is the 1st two field picture in image sequence to be tracked, if so, then perform step (3), otherwise, perform step (4);
(3) the position rectangle frame of initialization tracking target:
In gray level image, choose rectangle frame tracking target be included, using the position rectangle frame of selected rectangle frame as tracking target, perform step (6);
(4) feature of all test sample books of gray level image is extracted:
(4a) to all test sample books of gray level image, full sampling method is adopted respectively, the position rectangle frame of collecting test sample;
(4b) according to the integrogram of gray level image and the position rectangle frame of all test sample books, utilize computer graphics processor GPU, the parallel Lis Hartel extracting all test sample books of gray level image is levied;
(5) the position rectangle frame of tracking target is determined:
Utilize computer graphics processor GPU, the discriminant value of all test sample books of parallel computation gray level image, finds out the test sample book corresponding to maximum discriminant value, using the position rectangle frame of the position rectangle frame of this test sample book as tracking target;
(6) feature of all training samples of gray level image is extracted:
(6a) the position rectangle frame of first of gray level image training sample is set as the position rectangle frame of tracking target;
(6b) to all the other all training samples of gray level image, adopt unique step sampling method respectively, gather the position rectangle frame of training sample;
(6c) by the position rectangle frame of all training samples of gray level image, copy in the rectangle frame set of training sample position;
(6d) according to the integrogram of gray level image and the position rectangle frame of all training samples, utilize computer graphics processor GPU, the parallel Lis Hartel extracting all training samples of gray level image is levied;
(6e) by the feature of all training samples of gray level image, copy in training sample characteristic set;
(7) weights of initialization training sample and gradient:
The weights of the training sample of gray level image and gradient are initialized as 0; The weights of the training sample of gray level image, gradient are joined respectively the set of training sample weights, the set of training sample gradient;
(8) obtain and upgrade weights, the gradient of supporting sample:
(8a) employing minimizes gradient method, from the training sample of gray level image, select two training samples, using two training samples selected as supporting sample A, B; Adopt and maximize gradient difference method, upgrade the weights and gradient of supporting sample A, B; When supporting the sum of sample more than 100, adopting and minimizing disturbance degree method, upgrading weights and the gradient of all support samples;
(8b) adopt maximum-minimize gradient method, from gray level image set, select a gray level image, from the training sample of the gray level image selected, select two training samples, using two training samples selected as supporting sample A, B; Adopt and maximize gradient difference method, upgrade the weights and gradient of supporting sample A, B; If support, the sum of sample is more than 100, then adopt and minimize disturbance degree method, upgrade weights and the gradient of all support samples;
(8c) adopt maximum-minimize gradient method, from gray level image set, select a gray level image, from the training sample of the gray level image selected, select two training samples, using two training samples selected as supporting sample A, B; Adopt and maximize gradient difference method, upgrade the weights and gradient of supporting sample A, B; By this step continued operation 9 times;
(8d) circulation performs step (8b), step (8c) 9 times;
(9) judge whether all two field pictures having loaded image sequence to be tracked, if so, then perform step (10), otherwise, perform step (1);
(10) target end is followed the tracks of.
2. the Struck method for tracking target of use GPU hardware acceleration according to claim 1, it is characterized in that, the concrete steps of the described full sampling method of step (4a) are as follows:
1st step, with the rectangle frame center, position of tracking target be the center of circle, 30 pixel wide construct a circle for radius;
2nd step, in circle centered by any point, the wide of the position rectangle frame of tracking target be that the Gao Weigao of the position rectangle frame of wide, tracking target constructs a rectangle frame, using the position rectangle frame of this rectangle frame as a test sample book.
3. the Struck method for tracking target of use GPU hardware acceleration according to claim 1, is characterized in that, the discriminant value of each test sample book of the gray level image described in step (5), calculates according to the following formula:
f = Σ i = 1 n β i · exp ( - 0.02 | | x i - z | | 2 )
Wherein, f represents the discriminant value of each test sample book of gray level image; N expresses support for the sum of sample; β irepresent i-th weights supporting sample; The exponential function that it is the end that exp () represents with natural constant e operates; x irepresent i-th feature supporting sample; Z represents the feature of each test sample book of gray level image; || || 2represent the square operation asking vector field homoemorphism.
4. the Struck method for tracking target of use GPU hardware acceleration according to claim 1, it is characterized in that, the concrete steps of step (6b) described unique step sampling method are as follows:
1st step, with the center of the position rectangle frame of tracking target for starting point, the surrounding to this central point disperses 8 line segments equably, and the length of every bar line segment is 60 pixel wide;
2nd step, any line segment is chosen a bit, this point to tracking target rectangle frame center, position between distance be m pixel wide, m ∈ { 12,24,36,48,60}; Centered by selected point, the Gao Weigao of the wide position rectangle frame for wide, tracking target of the position rectangle frame of tracking target constructs a rectangle frame, using the position rectangle frame of this rectangle frame as a training sample.
5. the Struck method for tracking target of use GPU hardware acceleration according to claim 1, it is characterized in that, the concrete steps minimizing gradient method described in step (8a) are as follows:
1st step, according to the following formula, utilizes computer graphics processor GPU, the gradient of each training sample of parallel computation gray level image:
g = a b - 1 - Σ i = 1 n β i exp ( - 0.02 | | x i - x | | 2 )
Wherein, g represents the gradient of each training sample of gray level image; A represents the area of rectangle frame region, the position intersecting area of the rectangle frame region, position of each training sample of gray level image and first training sample of gray level image; The rectangle frame region, position that b represents the rectangle frame region, position of each training sample of gray level image and first training sample of gray level image mutually and the area in region; N expresses support for the sum of sample; β irepresent i-th weights supporting sample; The index operation that it is the end with natural constant e that exp () represents; x irepresent i-th feature supporting sample; X represents the feature of each training sample of gray level image; || || 2represent the square operation asking vector field homoemorphism;
2nd step, copies to first of gray level image training sample and just supports in sample set, using this sample as support sample A;
3rd step, finds out the training sample with minimal gradient from the training sample of gray level image, is copied to by the training sample mark with minimal gradient in negative support sample set, using this sample as support sample B;
4th step, according to the following formula, utilizes computer graphics processor GPU, and the kernel function value between sample A, B and each support sample is supported in parallel computation respectively:
K(x 1,x 2)=exp(-0.02||x 1-x 2|| 2)
Wherein, K (x 1, x 2) express support for kernel function value between sample A, B and each support sample; The index operation that it is the end with natural constant e that exp () represents; x 1express support for the feature of sample A, B; x 2represent the feature of each support sample; || || 2represent the square operation asking vector field homoemorphism.
6. the Struck method for tracking target of use GPU hardware acceleration according to claim 1, it is characterized in that, the concrete steps maximizing gradient difference method described in step (8a), step (8b) and step (8c) are as follows:
1st step, according to the following formula, calculates the right value update amount supporting sample:
λ = max ( 0 , min ( g A - g B 2 - 2 K ( x A , x B ) , 100 - β A ) ) , y A = y max ( 0 , min ( g A - g B 2 - 2 K ( x A , x B ) , - β A ) ) , y A ≠ y
Wherein, λ expresses support for the right value update amount of sample; Maxima operation is got in max () expression; Min () represents that getting minimum value operates; g aexpress support for the gradient of sample A; g bexpress support for the gradient of sample B; K (x a, x b) express support for sample A and support the kernel function value between sample B; β aexpress support for the weights of sample A; y aexpress support for the position rectangle frame of sample A; Y expresses support for the position rectangle frame of first training sample of the gray level image belonging to sample A;
2nd step, will support that the weights of sample A add right value update amount λ, will support that the weights of sample B deduct right value update amount λ;
3rd step, according to the following formula, utilizes computer graphics processor GPU, the parallel gradient upgrading each support sample:
g=g′-λ(K(x,x A)-K(x,x B))
Wherein, g represents the gradient upgrading rear each support sample; The gradient of each support sample before g ' expression upgrades; λ represents right value update amount; K (x, x a) represent each support sample and support the kernel function value between sample A; K (x, x b) represent each support sample and support the kernel function value between sample B.
7. the Struck method for tracking target that accelerates of use GPU hardware according to claim 1, is characterized in that, the concrete steps minimizing disturbance degree method described in step (8a) and step (8b) are as follows:
1st step, according to the following formula, utilizes computer graphics processor GPU, the disturbance degree of each negative support sample of parallel computation:
e = β 2 2 ( 2 - 2 K ( x 1 , x 2 ) )
Wherein, e represents the disturbance degree of each negative support sample; β 2represent the weights of each negative support sample; K (x 1, x 2) represent the kernel function value just supported between sample and each negative support sample of the gray level image belonging to each negative support sample;
2nd step, finds out the negative support sample with minimum influence degree from negative support sample, using having the negative support sample of minimum influence degree as sample to be deleted, is deleted by the negative support sample with minimum influence degree from negative support sample set;
3rd step, according to the following formula, utilizes computer graphics processor GPU, the parallel gradient upgrading each support sample:
g=g′-β 2(K(x,x 1)-K(x,x 2))
Wherein, g represents the gradient upgrading rear each support sample; β 2represent the weights of sample to be deleted; K (x, x 1) represent the kernel function value just supported between sample of each support sample and the gray level image belonging to sample to be deleted; K (x, x 2) represent kernel function value between each support sample and sample to be deleted;
4th step, according to the following formula, upgrades the weights just supporting sample of the gray level image belonging to sample to be deleted:
β 1=β 1′+β 2
Wherein, β 1represent the weights just supporting sample of the gray level image after upgrading belonging to sample to be deleted; β 1' represent the weights just supporting sample upgrading front gray level image belonging to sample to be deleted; β 2' represent the weights upgrading front sample to be deleted;
5th step, if after upgrading gray level image belonging to sample to be deleted just support that the weights of sample equal 0, then this is just being supported that sample is from just supporting to delete sample set, deletes the gray level image belonging to sample to be deleted from gray level image set.
8. the Struck method for tracking target of use GPU hardware acceleration according to claim 1, it is characterized in that, the concrete steps of step (8b) described maximum-minimize gradient method are as follows:
1st step, Stochastic choice gray level image from gray level image set, using this gray level image as pending gray level image;
2nd step, according to the following formula, utilizes computer graphics processor GPU, the gradient of each training sample of the pending gray level image of parallel computation:
g = a b - 1 - Σ i = 1 n β i exp ( - 0.02 | | x i - x | | 2 )
Wherein, g represents the gradient of each training sample of pending gray level image; A represents the area of rectangle frame region, the position intersecting area of the rectangle frame region, position of each training sample of pending gray level image and first training sample of pending gray level image; The rectangle frame region, position that b represents the rectangle frame region, position of each training sample of pending gray level image and first training sample of pending gray level image mutually and the area in region; N expresses support for the sum of sample; β irepresent i-th weights supporting sample; The index operation that it is the end with natural constant e that exp () represents; x irepresent i-th feature supporting sample; X represents the feature of each training sample of pending gray level image; || || 2represent the square operation asking vector field homoemorphism;
3rd step, is subordinated in the support sample of pending gray level image, finds out the support sample with greatest gradient, using the support sample obtained as supporting sample A;
4th step, is subordinated in the training sample of pending gray level image, finds out the training sample with minimal gradient, using the training sample obtained as supporting sample B;
5th step, if support, sample B is not labeled, then support sample B is copied to negative support and, in sample set, according to the following formula, utilize computer graphics processor GPU, the kernel function value between sample B and each support sample is supported in parallel computation:
K(x 1,x B)=exp(-0.02||x 1-x B|| 2)
Wherein, K (x 1, x b) represent each support sample and support the kernel function value between sample B; The index operation that it is the end with natural constant e that exp () represents; x 1represent the feature of each support sample; x bexpress support for the feature of sample B; || || 2represent the square operation asking vector field homoemorphism.
9. the Struck method for tracking target of use GPU hardware acceleration according to claim 1, it is characterized in that, the concrete steps of step (8c) described maximum-minimize gradient method are as follows:
1st step, Stochastic choice gray level image from gray level image set, using this gray level image as pending gray level image;
2nd step, is subordinated in the support sample of pending gray level image, finds out the support sample with greatest gradient, using the support sample obtained as supporting sample A;
3rd step, is subordinated in the support sample of pending gray level image, finds out the support sample with minimal gradient, using the support sample obtained as supporting sample B.
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 true CN104680558A (en) 2015-06-03
CN104680558B 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)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105160350A (en) * 2015-08-03 2015-12-16 深圳市哈工大交通电子技术有限公司 Haar detection method based on GPU acceleration
CN106250878A (en) * 2016-08-19 2016-12-21 中山大学 A kind of combination visible ray and the multi-modal method for tracking target of infrared image
CN106991689A (en) * 2017-04-05 2017-07-28 西安电子科技大学 Method for tracking target and GPU based on FHOG and color characteristic accelerate
WO2017210822A1 (en) * 2016-06-06 2017-12-14 Sz Dji Osmo Technology Co., Ltd. Image processing for tracking
CN107563392A (en) * 2017-09-07 2018-01-09 西安电子科技大学 The YOLO object detection methods accelerated using OpenCL
CN107944381A (en) * 2017-11-20 2018-04-20 深圳云天励飞技术有限公司 Face tracking method, device, terminal and storage medium
CN107977980A (en) * 2017-12-06 2018-05-01 北京飞搜科技有限公司 A kind of method for tracking target, equipment and computer-readable recording medium
US11106928B2 (en) 2016-06-06 2021-08-31 Sz Dji Osmo Technology Co., Ltd. Carrier-assisted tracking

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130244782A1 (en) * 2011-01-31 2013-09-19 Microsoft Corporation Real-time camera tracking using depth maps
CN103927745A (en) * 2014-03-28 2014-07-16 北京中海新图科技有限公司 Tracking and matching parallel computing method for wearable device
KR20140095333A (en) * 2013-01-24 2014-08-01 한남대학교 산학협력단 Method and apparratus of tracing object on image
CN104021519A (en) * 2014-06-17 2014-09-03 电子科技大学 Maneuvering multi-target tracking algorithm under dense clutter condition based on GPU architecture

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130244782A1 (en) * 2011-01-31 2013-09-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
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
SAM HARE等: "Struck: Structured Output Tracking with Kernels", 《IEEE INTERNATIONAL CONFERENCE ON COMPUTER VISION》 *
刘金硕等: "《快速鲁棒特征算法的CUDA加速优化》", 《计算机科学》 *

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105160350A (en) * 2015-08-03 2015-12-16 深圳市哈工大交通电子技术有限公司 Haar detection method based on GPU acceleration
CN105160350B (en) * 2015-08-03 2018-08-28 深圳市哈工大交通电子技术有限公司 A kind of Haar detection methods accelerated based on GPU
US11568626B2 (en) 2016-06-06 2023-01-31 Sz Dji Osmo Technology Co., Ltd. Carrier-assisted tracking
WO2017210822A1 (en) * 2016-06-06 2017-12-14 Sz Dji Osmo Technology Co., Ltd. Image processing for tracking
US11106928B2 (en) 2016-06-06 2021-08-31 Sz Dji Osmo Technology Co., Ltd. Carrier-assisted tracking
US10902609B2 (en) 2016-06-06 2021-01-26 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
CN106250878A (en) * 2016-08-19 2016-12-21 中山大学 A kind of combination visible ray and the multi-modal method for tracking target of infrared image
CN106991689B (en) * 2017-04-05 2019-12-31 西安电子科技大学 Target tracking method based on FHOG and color characteristics and GPU acceleration
CN106991689A (en) * 2017-04-05 2017-07-28 西安电子科技大学 Method for tracking target and GPU based on FHOG and color characteristic accelerate
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
CN107944381A (en) * 2017-11-20 2018-04-20 深圳云天励飞技术有限公司 Face tracking method, device, terminal and storage medium
CN107977980A (en) * 2017-12-06 2018-05-01 北京飞搜科技有限公司 A kind of method for tracking target, equipment and computer-readable recording medium

Also Published As

Publication number Publication date
CN104680558B (en) 2017-07-28

Similar Documents

Publication Publication Date Title
CN104680558A (en) Struck target tracking method using GPU hardware for acceleration
Yi et al. An improved tiny-yolov3 pedestrian detection algorithm
Bosquet et al. STDnet: Exploiting high resolution feature maps for small object detection
CN108154102B (en) Road traffic sign identification method
Zhang et al. CDNet: A real-time and robust crosswalk detection network on Jetson nano based on YOLOv5
CN105354568A (en) Convolutional neural network based vehicle logo identification method
CN105931253A (en) Image segmentation method combined with semi-supervised learning
CN103295032B (en) Based on the image classification method of spatial Fisher vector
Cheng et al. LOCO: local context based faster R-CNN for small traffic sign detection
CN103745233B (en) The hyperspectral image classification method migrated based on spatial information
CN110245587B (en) Optical remote sensing image target detection method based on Bayesian transfer learning
CN109886271A (en) It merges deep learning network and improves the image Accurate Segmentation method of edge detection
CN105868767A (en) Human face feature point positioning method and device
Du et al. Real-time tracking based on weighted compressive tracking and a cognitive memory model
Kuai et al. Learning adaptively windowed correlation filters for robust tracking
CN109886984B (en) Image accurate segmentation method using foreground and background gray difference and deep learning network
CN109087333A (en) Target scale estimation method and its device based on correlation filter tracking algorithm
CN105913425A (en) Self-adaptive oval blocking and wavelet transformation-based multi-pig contour extraction method
Lu et al. Boundarymix: Generating pseudo-training images for improving segmentation with scribble annotations
Vaidya et al. Hardware efficient modified cnn architecture for traffic sign detection and recognition
CN103295026A (en) Spatial local clustering description vector based image classification method
US20230281974A1 (en) Method and system for adaptation of a trained object detection model to account for domain shift
Nguyen et al. You always look again: Learning to detect the unseen objects
CN105528791B (en) A kind of quality evaluation device and its evaluation method towards touch screen hand-drawing image
Wu et al. Exploiting superpixel and hybrid hash for kernel-based visual tracking

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