CN111223123B - Target tracking method, device, computer equipment and storage medium - Google Patents

Target tracking method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN111223123B
CN111223123B CN201911299409.7A CN201911299409A CN111223123B CN 111223123 B CN111223123 B CN 111223123B CN 201911299409 A CN201911299409 A CN 201911299409A CN 111223123 B CN111223123 B CN 111223123B
Authority
CN
China
Prior art keywords
scale
target
template
current
frame image
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
CN201911299409.7A
Other languages
Chinese (zh)
Other versions
CN111223123A (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.)
Xi'an Tianhe Defense Technology Co ltd
Original Assignee
Xi'an Tianhe Defense Technology Co ltd
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 Xi'an Tianhe Defense Technology Co ltd filed Critical Xi'an Tianhe Defense Technology Co ltd
Priority to CN201911299409.7A priority Critical patent/CN111223123B/en
Publication of CN111223123A publication Critical patent/CN111223123A/en
Application granted granted Critical
Publication of CN111223123B publication Critical patent/CN111223123B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/246Analysis of motion using feature-based methods, e.g. the tracking of corners or segments
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/213Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
    • G06F18/2135Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods based on approximation criteria, e.g. principal component analysis

Abstract

The application relates to a target tracking method, a target tracking device, computer equipment and a storage medium. The method is applied to an ARM embedded platform and comprises the following steps: and acquiring target templates of the original scale, the large scale and the small scale corresponding areas in the current frame image in parallel to simplify the operation process, improve the operation efficiency, avoid huge calculation amount caused by the acquisition of one scale and one scale, and select and process the peak response data corresponding to the target templates under different scales to obtain the current target position of the tracking target in the current frame image so as to realize the tracking of the tracking target. The target templates under different scales are obtained in parallel, the operation process is simplified, a large amount of redundant calculation in the original tracking process is removed, and the overall tracking efficiency is greatly improved.

Description

Target tracking method, device, computer equipment and storage medium
Technical Field
The present disclosure relates to the field of image processing technologies, and in particular, to a target tracking method, apparatus, computer device, and storage medium.
Background
In anti-unmanned aerial vehicle and coastal defense applications, an intelligent processing algorithm needs to be realized on an embedded platform to realize real-time tracking of targets.
In the prior art, the target tracking method is mostly applied to a server, and the algorithm principle involved in the tracking process is complex, so that the calculation complexity is high, the calculation power and the storage of an application end are high in requirements, and the tracking efficiency is reduced.
Disclosure of Invention
Based on this, it is necessary to provide a target tracking method, apparatus, computer device and storage medium in view of the above technical problems.
In one aspect, a target tracking method is provided, the method comprising:
taking the previous center point as the current center point; the current center point is a position center point of a tracking target in a current frame image, and the previous center point is a position center point of the tracking target in a previous frame image;
according to the current center point, an original scale target template, a large scale target template and a small scale target template corresponding to the region in the current frame image under different scales are obtained in parallel according to the original scale, the large scale and the small scale respectively;
obtaining original scale peak response data, large scale peak response data and small scale peak response data according to the original scale target template, the large scale target template and the small scale target template and the regression coefficients of the previous target template and the previous classifier of the previous frame image respectively;
And obtaining peak maximum values in the original-scale peak response data, the large-scale peak response data and the small-scale peak response data, and obtaining the current target position of the tracking target in the current frame image according to the peak maximum values.
In one embodiment, the method further comprises:
extracting features from the current target position, and multiplying the features by a Hanning window to obtain a current target template;
obtaining a regression coefficient of a next classifier corresponding to the next frame of image according to the current autocorrelation Gaussian kernel and the Gaussian matrix of the current target template; the Gaussian matrix is obtained according to the scale of the initialization template.
In one embodiment, when the current frame image is the second frame image, the previous frame image is the first frame image, and before taking the previous center point as the current center point, the method includes:
obtaining an initialization area according to the scale of the initialization template and the area of interest in the first frame image;
obtaining a first frame target template of the first frame image according to the initialization characteristics and a hanning window corresponding to the initialization template; the initialization features are obtained by extracting features from the initialization region;
Obtaining a regression coefficient of the first classifier according to the first autocorrelation Gaussian kernel and the Gaussian matrix; the first autocorrelation Gaussian kernel is obtained according to the first target template, and the Gaussian matrix is obtained according to the scale of the initialization template.
In one embodiment, the obtaining, according to the current center point, the original scale target template, the large scale target template, and the small scale target template corresponding to the region in the current frame image under different scales in parallel according to the original scale, the large scale, and the small scale, respectively, includes:
taking the current center point as the center point of the candidate region of the tracking target in the current image, and acquiring an original scale candidate region with the same scale as the initializing template;
extracting features from the original scale candidate region to obtain the original scale target template;
taking the current center point as the center point of the candidate region of the tracking target in the current image, and acquiring a large-scale candidate region which is larger than the scale of the initialization template;
extracting features from the large-scale candidate region to obtain the large-scale target template;
taking the current center point as the center point of the candidate region of the tracking target in the current image, and acquiring a small-scale candidate region smaller than the scale of the initialization template;
And extracting features from the small-scale candidate region to obtain the small-scale target template.
In one embodiment, the obtaining the original scale peak response data, the large scale peak response data and the small scale peak response data according to regression coefficients of the original scale target template, the large scale target template and the small scale target template, and a previous target template and a previous classifier of the previous frame image respectively includes:
acquiring an original scale cross-correlation Gaussian kernel of the original scale target template and the previous target template;
obtaining the original scale peak response data according to the original scale cross-correlation Gaussian kernel and the regression coefficient of the previous classifier;
acquiring a large-scale cross-correlation Gaussian kernel of the large-scale target template and the previous target template;
obtaining the large-scale peak response data according to the large-scale cross-correlation Gaussian kernel and the regression coefficient of the previous classifier;
acquiring a small-scale cross-correlation Gaussian kernel of the small-scale target template and the previous target template;
and obtaining the small-scale peak response data according to the small-scale cross-correlation Gaussian kernel and the regression coefficient of the previous classifier.
In one embodiment, the obtaining the peak maximum value of the original-scale peak response data, the large-scale peak response data and the small-scale peak response data, and obtaining the current target position of the tracking target in the current frame image according to the peak maximum value includes:
obtaining the peak maximum value in the original scale peak response data as an original scale peak value;
obtaining the peak maximum value in the large-scale peak response data as a large-scale peak value;
obtaining the peak maximum value in the small-scale peak response data as a small-scale peak value;
obtaining peak coordinates of the maximum peak value in the original scale peak value, the large scale peak value and the small scale peak value as target peak value coordinates;
and acquiring the current target position according to the target peak value coordinates.
In one embodiment, the method further comprises: and adopting C language to write the function used in the target tracking method.
In another aspect, there is also provided a target tracking apparatus, the apparatus including:
the center point module is used for taking the previous center point as the current center point; the current center point is a position center point of a tracking target in a current frame image, and the previous center point is a position center point of the tracking target in a previous frame image;
The multi-scale target template module is used for acquiring an original scale target template, a large scale target template and a small scale target template corresponding to the region in the current frame image under different scales in parallel according to the current center point and the original scale, the large scale and the small scale respectively;
the peak response module is used for obtaining original-scale peak response data, large-scale peak response data and small-scale peak response data according to the original-scale target template, the large-scale target template and the small-scale target template and regression coefficients of a previous target template and a previous classifier of the previous frame image respectively;
the target position module is used for acquiring peak values and maximum values in the original-scale peak response data, the large-scale peak response data and the small-scale peak response data, and obtaining the current target position of the tracking target in the current frame image according to the peak values and maximum values.
In another aspect, there is also provided a computer device comprising a memory storing a computer program and a processor implementing the following steps when executing the computer program:
taking the previous center point as the current center point; the current center point is a position center point of a tracking target in a current frame image, and the previous center point is a position center point of the tracking target in a previous frame image;
According to the current center point, an original scale target template, a large scale target template and a small scale target template corresponding to the region in the current frame image under different scales are obtained in parallel according to the original scale, the large scale and the small scale respectively;
obtaining original scale peak response data, large scale peak response data and small scale peak response data according to the original scale target template, the large scale target template and the small scale target template and the regression coefficients of the previous target template and the previous classifier of the previous frame image respectively;
and obtaining peak maximum values in the original-scale peak response data, the large-scale peak response data and the small-scale peak response data, and obtaining the current target position of the tracking target in the current frame image according to the peak maximum values.
A computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
taking the previous center point as the current center point; the current center point is a position center point of a tracking target in a current frame image, and the previous center point is a position center point of the tracking target in a previous frame image;
According to the current center point, an original scale target template, a large scale target template and a small scale target template corresponding to the region in the current frame image under different scales are obtained in parallel according to the original scale, the large scale and the small scale respectively;
obtaining original scale peak response data, large scale peak response data and small scale peak response data according to the original scale target template, the large scale target template and the small scale target template and the regression coefficients of the previous target template and the previous classifier of the previous frame image respectively;
and obtaining peak maximum values in the original-scale peak response data, the large-scale peak response data and the small-scale peak response data, and obtaining the current target position of the tracking target in the current frame image according to the peak maximum values.
According to the target tracking method, the device, the computer equipment and the storage medium, the target templates of the original scale, the large scale and the small scale corresponding areas in the current frame image are obtained in parallel, so that the operation process is simplified, the operation efficiency is improved, huge calculation amount caused by one-scale obtaining is avoided, the peak response data corresponding to the target templates under different scales are selected and processed, and the current target position of the tracking target in the current frame image is obtained, so that the tracking of the tracking target is realized. The target templates under different scales are obtained in parallel, the operation process is simplified, a large amount of redundant calculation in the original tracking process is removed, the overall tracking efficiency is greatly improved, the high requirements on calculation power and storage of an application end are reduced, the application of the target tracking method on an ARM embedded platform is realized, and the application range of the target tracking method is enlarged.
Drawings
FIG. 1 is a flow chart of a method of target tracking in one embodiment;
FIG. 2 is a flow chart of a target tracking method according to another embodiment;
FIG. 3 is a flow chart of a target tracking method according to another embodiment;
FIG. 4 is a flow chart of S120 in one embodiment;
FIG. 5 is a flow chart of S130 in one embodiment;
FIG. 6 is a flowchart of S140 in one embodiment;
FIG. 7 is a block diagram of the structure of a target tracking apparatus in one embodiment;
fig. 8 is an internal structural diagram of a computer device in one embodiment. .
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The method and the device are applied to ARM embedded platforms, and tracking targets in unmanned aerial vehicle tracking motion are achieved. In the following embodiments, the unmanned aerial vehicle is used as an execution subject, and in other embodiments, the unmanned aerial vehicle may also be other electronic devices with functions of acquiring images and moving.
In one embodiment, as shown in fig. 1, there is provided a target tracking method, including the steps of:
S110, taking the previous central point as the current central point.
The current center point is a position center point of the tracking target in the current frame image, and the previous center point is a position center point of the tracking target in the previous frame image.
Specifically, the unmanned aerial vehicle takes the position center point of the tracking target in the previous frame image as the position center point of the tracking target in the current frame image. The current frame image is an image acquired by the unmanned aerial vehicle at the current moment, the previous frame image is an image acquired by the unmanned aerial vehicle at the moment before the current moment, namely, the current frame image and the previous frame image are images acquired by the unmanned aerial vehicle at two adjacent moments.
S120, according to the current center point, the original target template, the large target template and the small target template corresponding to the region in the current frame image under different scales are obtained in parallel according to the original scale, the large scale and the small scale respectively.
The original dimension is the same as the dimension of the initial initialization template of the unmanned aerial vehicle, the large dimension is larger than the dimension of the initial initialization template, and the large dimension is smaller than the dimension of the initial initialization template.
Specifically, the unmanned aerial vehicle adopts a multithread parallel mode, and simultaneously obtains target templates corresponding to areas in the current frame image under the three different scales according to the original scale, the large scale and the small scale respectively, so as to correspondingly obtain the original target template, the large target template and the small target template.
S130, obtaining original-scale peak response data, large-scale peak response data and small-scale peak response data according to the original-scale target template, the large-scale target template and the small-scale target template, and regression coefficients of a previous target template and a previous classifier of the previous frame image respectively.
The return coefficient of the previous classifier corresponds to the previous classifier, and the previous classifier is used for detecting a tracking target in the previous frame of image.
Specifically, the unmanned aerial vehicle obtains the original-scale peak response data according to the original-scale target template, the previous target template of the previous frame image and the previous classifier regression coefficient, obtains the large-scale peak response data according to the large-scale target template, the previous target template of the previous frame image and the previous classifier regression coefficient, and obtains the small-scale peak response data according to the large-scale target template, the previous target template of the previous frame image and the previous classifier regression coefficient.
And S140, acquiring peak maximum values in the original-scale peak response data, the large-scale peak response data and the small-scale peak response data, and obtaining the current target position of the tracking target in the current frame image according to the peak maximum values.
The current target position is a position coordinate of the tracking target relative to the current frame image.
Specifically, the unmanned aerial vehicle compares peak data in the original-scale peak response data, the large-scale peak response data and the small-scale peak response data, selects a target template under a scale corresponding to the maximum value of the peak, and acquires the current target position of the tracking target in the current frame image according to the target template under the scale.
In this embodiment, the target templates of the original scale, the large scale and the small scale corresponding regions in the current frame image are obtained in parallel, so that the operation process is simplified, the operation efficiency is improved, huge calculation amount caused by one scale to one scale is avoided, and the peak response data corresponding to the target templates under different scales are selected and processed, so that the current target position of the tracking target in the current frame image is obtained, so that the tracking of the tracking target is realized. The target templates under different scales are obtained in parallel, the operation process is simplified, a large amount of redundant calculation in the original tracking process is removed, the overall tracking efficiency is greatly improved, the high requirements on calculation power and storage of an application end are reduced, the application of the target tracking method on an ARM embedded platform is realized, and the application range of the target tracking method is enlarged.
In another embodiment, as shown in fig. 2, the method further comprises:
s210, extracting features from the current target position, and multiplying the features by a Hanning window to obtain a current target template.
Wherein the hanning window may be generated from an initialization template.
Specifically, the unmanned aerial vehicle performs HOG (Histogram of Oriented Gradients, histogram of direction gradient) feature extraction on the region under the corresponding scale of the current target position, performs PCA (Principal Component Analysis ) processing to obtain an image feature of the tracking target in the current frame image, and multiplies the image feature by the hanning window to obtain the current target template.
S220, obtaining a regression coefficient of a next classifier corresponding to the next frame of image according to the current autocorrelation Gaussian kernel and the Gaussian matrix of the current target template.
The Gaussian matrix is obtained according to the scale of the initialization template. The next frame of image is an image acquired by the unmanned aerial vehicle at the next moment of the current moment. The next classifier regression coefficient corresponds to a next classifier, and the next classifier is used for detecting the tracking target in the next frame of image.
Specifically, the unmanned aerial vehicle acquires an intermediate classifier regression coefficient according to the current autocorrelation Gaussian kernel of the current target template and the Gaussian matrix, sets different weights for the intermediate classifier regression coefficient and the current classifier regression coefficient, and carries out linear fitting to obtain the next classifier regression coefficient.
Further, the intermediate classifier regression coefficients satisfy the following formula:
wherein, the A represents Fourier transform, alpha is a regression coefficient of the classifier, y is a Gaussian matrix, x represents the current frame image,representing the autocorrelation gaussian kernel, λ is the regularization coefficient.
In this embodiment, for the obtained current target position, the region of the current frame image corresponding to the selected scale is further used as a region of interest, the feature is extracted, and then the current target template of the current frame image is obtained through post-processing, and the regression coefficient of the next classifier corresponding to the next frame image is obtained according to the current target template, so as to detect the tracking target in the next frame image, thereby realizing continuous and stable tracking of the tracking target.
In another embodiment, as shown in fig. 3, when the current frame image is the second frame image, the previous frame image is the first frame image, and before S110, taking the previous center point as the current center point, the method includes:
S310, obtaining an initialization area according to the scale of the initialization template and the area of interest in the first frame image.
The initialization template is a template frame obtained according to a target frame input by people, the scale of the initialization template is the size of the template frame, and the region of interest in the first frame image is the region selected by the target frame input by people in the first frame image and generally comprises the tracking target.
Specifically, the unmanned aerial vehicle takes the difference value of the region of interest in the first frame image to the scale of the initialization template as the initialization region.
S320, obtaining a first frame target template of the first frame image according to the initialization feature and a Hanning window corresponding to the initialization template.
The initialization feature is obtained by extracting features from the initialization region.
Specifically, the unmanned aerial vehicle generates a hanning window according to the initialization template, performs HOG feature extraction on the initialization region, performs PCA processing to obtain image features of the tracking target in the first frame image, and multiplies the image features by the hanning window to obtain the first target template.
S330, obtaining the regression coefficient of the first classifier according to the first autocorrelation Gaussian kernel and the Gaussian matrix.
The first autocorrelation Gaussian kernel is obtained according to the first target template, and the Gaussian matrix is obtained according to the scale of the initialization template.
Further, the first autocorrelation gaussian kernel is an autocorrelation gaussian function obtained according to the first target template, and the gaussian matrix is obtained according to the size of the template frame of the initialization template.
Specifically, the unmanned aerial vehicle obtains the first classifier regression system according to the first autocorrelation Gaussian kernel and the calculation formula of the Gaussian matrix with reference to the regression coefficient of the intermediate classifier.
In this embodiment, feature extraction and processing are performed on the first frame image in combination with the region of interest selected by the person, so as to obtain the first target template, and a classifier regression coefficient corresponding to the first frame image is obtained according to the first target template, so that the classifier capable of detecting the tracking target in the first frame image is obtained by training the first frame image, and the classifier is applied to detection of the tracking target in the next frame image, namely, the second frame image, so that training and learning for detecting the tracking target are realized, and a foundation is laid for subsequent continuous stable tracking.
In another embodiment, as shown in fig. 4, the step S120 of obtaining, in parallel, an original scale target template, a large scale target template, and a small scale target template corresponding to the region in the current frame image under different scales according to the current center point and the original scale, the large scale, and the small scale, respectively, includes:
s410, taking the current center point as the center point of the candidate region of the tracking target in the current image, and acquiring the original scale candidate region with the same scale as the initializing template.
The original scale candidate region refers to a region which is selected from the current frame image and possibly comprises the tracking target by taking the scale of the initialization template as a selection scale.
Specifically, the unmanned aerial vehicle acquires the original scale candidate region in the current frame image based on the current center point as a region in which the tracking target may exist.
S420, extracting features from the original scale candidate region to obtain the original scale target template.
Specifically, the unmanned aerial vehicle takes the original scale candidate region as an interested region, performs HOG feature extraction and PCA processing to obtain image features of the tracking target in the current frame image, and multiplies the image features by the Hanning window to obtain the original scale target template.
And S430, simultaneously, taking the current center point as the center point of the candidate region of the tracking target in the current image, and acquiring a large-scale candidate region which is larger than the scale of the initialization template.
The large-scale candidate region refers to a region which is selected from the current frame image and possibly comprises the tracking target by taking a scale larger than the initialization template as a selection scale.
Specifically, the unmanned aerial vehicle acquires the original scale candidate region in the current frame image while acquiring the original scale candidate region in the current frame image based on the current center point, and the large scale candidate region is also used as a region where the tracking target may exist.
S440, extracting features from the large-scale candidate region to obtain the large-scale target template.
Specifically, the unmanned aerial vehicle takes the large-scale candidate region as an interested region, performs HOG feature extraction and PCA processing to obtain image features of the tracking target in the current frame image, and multiplies the image features by the Hanning window to obtain the large-scale target template.
S450, simultaneously, taking the current center point as the center point of the candidate region of the tracking target in the current image, and acquiring a small-scale candidate region smaller than the scale of the initialization template.
The large-scale candidate region refers to a region which is selected from the current frame image and possibly comprises the tracking target by taking a scale smaller than the initialization template as a selection scale.
Specifically, the unmanned aerial vehicle acquires the original scale candidate region in the current frame image based on the current center point, acquires the large scale candidate region in the current frame image, and acquires the small scale candidate region in the current frame image as a region where the tracking target may exist.
S460, extracting features from the small-scale candidate region to obtain the small-scale target template.
Specifically, the unmanned aerial vehicle takes the small-scale candidate region as an interested region, performs HOG feature extraction and PCA processing to obtain image features of the tracking target in the current frame image, and multiplies the image features by the Hanning window to obtain the small-scale target template.
In this embodiment, the target templates under the original scale, the large scale and the small scale are obtained in parallel, so as to implement multi-thread parallel optimization of the target tracking method. Specifically, the central point of the position of the tracking target in the previous frame image is used as the central point of the tracking target in the predicted current frame image, so that the probability of acquiring the tracking target in candidate areas under different scales is improved, the accuracy of feature extraction is correspondingly improved, the correspondingly obtained classifier is more accurate, the detection accuracy of the tracking target is facilitated, and accordingly tracking is more accurate.
In another embodiment, as shown in fig. 5, the step S130 of obtaining the original-scale peak response data, the large-scale peak response data and the small-scale peak response data according to the original-scale target template, the large-scale target template and the small-scale target template, and regression coefficients of a previous target template and a previous classifier of the previous frame image respectively includes:
s510, acquiring an original scale cross-correlation Gaussian kernel of the original scale target template and the previous target template.
S520, obtaining the original scale peak response data according to the original scale cross-correlation Gaussian kernel and the regression coefficient of the previous classifier.
Specifically, the unmanned aerial vehicle uses the original scale cross-correlation Gaussian kernel of the original scale target template and the previous target template as a kernel function, convolves the current frame image in a Fourier domain according to the original scale cross-correlation Gaussian kernel and the previous classifier regression coefficient to obtain an original scale peak response image, and obtains data in the original scale peak response image as the original scale peak response data.
Further, the image is convolved according to the cross-correlation Gaussian kernel and the regression coefficient of the classifier, and the process of obtaining the peak response diagram meets the following formula:
Where x represents the current frame image, z represents the previous frame image,for peak response data, ++>For cross-correlation Gaussian kernel->Regression coefficients for the classifier.
S530, acquiring a large-scale cross-correlation Gaussian kernel of the large-scale target template and the previous target template.
S540, obtaining the large-scale peak response data according to the large-scale cross-correlation Gaussian kernel and the regression coefficient of the previous classifier.
The large-scale peak response data is finally obtained as described in S510 and S520 above.
S550, acquiring a small-scale cross-correlation Gaussian kernel of the small-scale target template and the previous target template.
S560, obtaining the small-scale peak response data according to the small-scale cross-correlation Gaussian kernel and the regression coefficient of the previous classifier.
The small-scale peak response data is finally obtained as described in S510 and S520 above.
In another embodiment, as shown in fig. 6, the step S140 of obtaining the peak maximum value of the original-scale peak response data, the large-scale peak response data and the small-scale peak response data, and obtaining the current target position of the tracking target in the current frame image according to the peak maximum value includes:
And S610, acquiring the peak maximum value in the original scale peak response data as an original scale peak value.
S620, obtaining the peak maximum value in the large-scale peak response data as a large-scale peak value.
And S630, acquiring the peak maximum value in the small-scale peak response data as a small-scale peak value.
Specifically, the unmanned aerial vehicle respectively analyzes and compares the original-scale peak response data, the large-scale peak response data and the small-scale peak response data to respectively obtain a peak maximum value in the original-scale peak response data as the original-scale peak value, a peak maximum value in the large-scale peak response data as the large-scale peak value and a peak maximum value in the small-scale peak response data as the small-scale peak value.
And S640, acquiring the peak coordinates of the maximum peak value in the original scale peak value, the large scale peak value and the small scale peak value as target peak value coordinates.
Specifically, the unmanned aerial vehicle further compares the original-scale peak value, the large-scale peak value and the small-scale peak value to obtain a peak value maximum value, and obtains the coordinate of the peak value maximum value according to a peak response diagram of the scale corresponding to the peak value maximum value as the target peak value coordinate.
S650, acquiring the current target position according to the target peak value coordinates.
In this embodiment, in combination with the previous embodiment, the peak response data corresponding to different scales are obtained by using the target templates of the current frame image under different scales and the previous target template of the previous frame image respectively, the peak response data under different scales are compared, the peak maximum value is obtained, the image feature in the current frame image under the scale corresponding to the peak maximum value is considered to be nearest to the image feature in the previous target template in the previous frame image, that is, the area under the scale includes the tracking target, so that the tracking target in the current frame image is detected, and the current target position of the tracking target is obtained according to the target peak value coordinates corresponding to the peak maximum value. And obtaining the region of the target template under the scale corresponding to the maximum value of the selected peak value according to the target peak value coordinate corresponding to the maximum value of the peak value, further extracting the characteristic, and obtaining the regression coefficient of the next classifier so as to update the classifier and realize the detection of the tracking target in the next frame of image.
In any of the method embodiments above, the method further comprises:
And adopting C language to write the function used in the target tracking method. In this embodiment, the function used in the target tracking method is directly written in the C language, so as to optimize the data structure of the whole target tracking method, thereby avoiding the consumption of resources and memory caused by repeatedly calling the OpenCV library function in the conventional technology, reducing the consumption of resources and memory, and further realizing the application of the target tracking method in the ARM embedded platform.
It should be understood that, although the steps in the flowcharts of fig. 1-6 are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in fig. 1-6 may include multiple sub-steps or phases that are not necessarily performed at the same time, but may be performed at different times, nor does the order in which the sub-steps or phases are performed necessarily occur sequentially, but may be performed alternately or alternately with at least a portion of the sub-steps or phases of other steps or other steps.
In one embodiment, as shown in fig. 7, there is provided an object detection apparatus, the object tracking apparatus 700 including: a center point module 710, a multi-scale target template module 720, and a peak response module 730, and a target location module 740, wherein:
the center point module 710 is configured to take a previous center point as a current center point; the current center point is a position center point of a tracking target in a current frame image, and the previous center point is a position center point of the tracking target in a previous frame image;
the multi-scale target template module 720 is configured to obtain, according to the current center point, an original-scale target template, a large-scale target template, and a small-scale target template corresponding to the region in the current frame image under different scales in parallel according to the original scale, the large scale, and the small scale, respectively;
the peak response module 730 is configured to obtain original-scale peak response data, large-scale peak response data, and small-scale peak response data according to regression coefficients of the original-scale target template, the large-scale target template, and the small-scale target template, and a previous target template and a previous classifier of the previous frame image, respectively;
The target position module 740 is configured to obtain peak maximum values in the original-scale peak response data, the large-scale peak response data, and the small-scale peak response data, and obtain a current target position of the tracking target in the current frame image according to the peak maximum values.
For specific limitations of the target tracking apparatus, reference may be made to the above limitations of the target tracking method, and no further description is given here. The various modules in the above-described object tracking device may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a terminal, and the internal structure thereof may be as shown in fig. 8. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a target tracking method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be keys, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in fig. 8 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of:
taking the previous center point as the current center point; the current center point is a position center point of a tracking target in a current frame image, and the previous center point is a position center point of the tracking target in a previous frame image;
according to the current center point, an original scale target template, a large scale target template and a small scale target template corresponding to the region in the current frame image under different scales are obtained in parallel according to the original scale, the large scale and the small scale respectively;
obtaining original scale peak response data, large scale peak response data and small scale peak response data according to the original scale target template, the large scale target template and the small scale target template and the regression coefficients of the previous target template and the previous classifier of the previous frame image respectively;
And obtaining peak maximum values in the original-scale peak response data, the large-scale peak response data and the small-scale peak response data, and obtaining the current target position of the tracking target in the current frame image according to the peak maximum values.
In one embodiment, the processor, when executing the computer program, also implements the steps of any of the methods described above.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
taking the previous center point as the current center point; the current center point is a position center point of a tracking target in a current frame image, and the previous center point is a position center point of the tracking target in a previous frame image;
according to the current center point, an original scale target template, a large scale target template and a small scale target template corresponding to the region in the current frame image under different scales are obtained in parallel according to the original scale, the large scale and the small scale respectively;
obtaining original scale peak response data, large scale peak response data and small scale peak response data according to the original scale target template, the large scale target template and the small scale target template and the regression coefficients of the previous target template and the previous classifier of the previous frame image respectively;
And obtaining peak maximum values in the original-scale peak response data, the large-scale peak response data and the small-scale peak response data, and obtaining the current target position of the tracking target in the current frame image according to the peak maximum values.
In one embodiment, the computer program when executed by a processor further performs the steps of any of the methods described above:
those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the various embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples merely represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the invention. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application is to be determined by the claims appended hereto.

Claims (10)

1. The target tracking method is applied to an ARM embedded platform and is characterized by comprising the following steps of:
taking the previous center point as the current center point; the current center point is a position center point of a tracking target in a current frame image, and the previous center point is a position center point of the tracking target in a previous frame image;
taking the current center point as the center point of a candidate region of the tracking target in the current image, respectively acquiring an original scale candidate region with the same scale as the initializing template, a large scale candidate region with the scale larger than the initializing template and a small scale candidate region with the scale smaller than the initializing template;
Extracting features from the original scale candidate region to obtain the original scale target template; extracting features from the large-scale candidate region to obtain the large-scale target template; extracting features from the small-scale candidate region to obtain the small-scale target template;
respectively acquiring an original scale cross-correlation Gaussian kernel of the original scale target template and the previous target template, a large scale cross-correlation Gaussian kernel of the large scale target template and the previous target template, and a small scale cross-correlation Gaussian kernel of the small scale target template and the previous target template;
obtaining the original scale peak response data according to the original scale cross-correlation Gaussian kernel and the regression coefficient of the previous classifier; obtaining the large-scale peak response data according to the large-scale cross-correlation Gaussian kernel and the regression coefficient of the previous classifier; obtaining the small-scale peak response data according to the small-scale cross-correlation Gaussian kernel and the regression coefficient of the previous classifier;
and obtaining peak maximum values in the original-scale peak response data, the large-scale peak response data and the small-scale peak response data, and obtaining the current target position of the tracking target in the current frame image according to the peak maximum values.
2. The method according to claim 1, wherein the method further comprises:
extracting features from the current target position, and multiplying the features by a Hanning window to obtain a current target template;
obtaining a regression coefficient of a next classifier corresponding to the next frame of image according to the current autocorrelation Gaussian kernel and the Gaussian matrix of the current target template; the Gaussian matrix is obtained according to the scale of the initialization template.
3. The method according to claim 1, wherein when the current frame image is the second frame image, then the previous frame image is the first frame image, and the step of taking the previous center point as the current center point is preceded by:
obtaining an initialization area according to the scale of the initialization template and the area of interest in the first frame image;
obtaining a first frame target template of the first frame image according to the initialization characteristics and a hanning window corresponding to the initialization template; the initialization features are obtained by extracting features from the initialization region;
obtaining a first classifier regression coefficient according to the first autocorrelation Gaussian kernel and the Gaussian matrix; the first autocorrelation Gaussian kernel is obtained according to the first frame target template, and the Gaussian matrix is obtained according to the scale of the initialization template.
4. The method according to claim 1, wherein the obtaining peak maximum values in the original scale peak response data, the large scale peak response data, and the small scale peak response data, and obtaining the current target position of the tracking target in the current frame image according to the peak maximum values, includes:
obtaining the peak maximum value in the original scale peak response data as an original scale peak value;
obtaining the peak maximum value in the large-scale peak response data as a large-scale peak value;
obtaining the peak maximum value in the small-scale peak response data as a small-scale peak value;
obtaining peak coordinates of the maximum peak value in the original scale peak value, the large scale peak value and the small scale peak value as target peak value coordinates;
and acquiring the current target position according to the target peak value coordinates.
5. The method according to any one of claims 1 to 4, further comprising:
and adopting C language to write the function used in the target tracking method.
6. An object tracking device, the device comprising:
the center point module is used for taking the previous center point as the current center point; the current center point is a position center point of a tracking target in a current frame image, and the previous center point is a position center point of the tracking target in a previous frame image;
The multi-scale target template module is used for respectively acquiring an original scale candidate region with the same scale as that of an initialization template, a large scale candidate region with a scale larger than that of the initialization template and a small scale candidate region with a scale smaller than that of the initialization template by taking the current center point as a center point of a candidate region of the tracking target in the current image; extracting features from the original scale candidate region to obtain the original scale target template; extracting features from the large-scale candidate region to obtain the large-scale target template; extracting features from the small-scale candidate region to obtain the small-scale target template;
the peak response module is used for respectively acquiring an original-scale cross-correlation Gaussian kernel of the original-scale target template and the previous target template, a large-scale cross-correlation Gaussian kernel of the large-scale target template and the previous target template and a small-scale cross-correlation Gaussian kernel of the small-scale target template and the previous target template; obtaining the original scale peak response data according to the original scale cross-correlation Gaussian kernel and the regression coefficient of the previous classifier; obtaining the large-scale peak response data according to the large-scale cross-correlation Gaussian kernel and the regression coefficient of the previous classifier; obtaining the small-scale peak response data according to the small-scale cross-correlation Gaussian kernel and the regression coefficient of the previous classifier;
The target position module is used for acquiring peak values and maximum values in the original-scale peak response data, the large-scale peak response data and the small-scale peak response data, and obtaining the current target position of the tracking target in the current frame image according to the peak values and maximum values.
7. The apparatus of claim 6, wherein the target location module is further to:
extracting features from the current target position, and multiplying the features by a Hanning window to obtain a current target template; obtaining a regression coefficient of a next classifier corresponding to the next frame of image according to the current autocorrelation Gaussian kernel and the Gaussian matrix of the current target template; the Gaussian matrix is obtained according to the scale of the initialization template.
8. The apparatus of claim 6, wherein when the current frame image is a second frame image, the center point module is further configured to:
obtaining an initialization area according to the scale of the initialization template and the area of interest in the first frame image;
obtaining a first frame target template of the first frame image according to the initialization characteristics and a hanning window corresponding to the initialization template; the initialization features are obtained by extracting features from the initialization region; obtaining a first classifier regression coefficient according to the first autocorrelation Gaussian kernel and the Gaussian matrix; the first autocorrelation Gaussian kernel is obtained according to the first frame target template, and the Gaussian matrix is obtained according to the scale of the initialization template.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any one of claims 1 to 5 when the computer program is executed.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 5.
CN201911299409.7A 2019-12-17 2019-12-17 Target tracking method, device, computer equipment and storage medium Active CN111223123B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911299409.7A CN111223123B (en) 2019-12-17 2019-12-17 Target tracking method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911299409.7A CN111223123B (en) 2019-12-17 2019-12-17 Target tracking method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111223123A CN111223123A (en) 2020-06-02
CN111223123B true CN111223123B (en) 2024-03-19

Family

ID=70806113

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911299409.7A Active CN111223123B (en) 2019-12-17 2019-12-17 Target tracking method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111223123B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106887011A (en) * 2017-01-20 2017-06-23 北京理工大学 A kind of multi-template method for tracking target based on CNN and CF
WO2018121286A1 (en) * 2016-12-30 2018-07-05 纳恩博(北京)科技有限公司 Target tracking method and device
CN108694724A (en) * 2018-05-11 2018-10-23 西安天和防务技术股份有限公司 A kind of long-time method for tracking target
CN110097575A (en) * 2019-04-28 2019-08-06 电子科技大学 A kind of method for tracking target based on local feature and scale pond

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018121286A1 (en) * 2016-12-30 2018-07-05 纳恩博(北京)科技有限公司 Target tracking method and device
CN106887011A (en) * 2017-01-20 2017-06-23 北京理工大学 A kind of multi-template method for tracking target based on CNN and CF
CN108694724A (en) * 2018-05-11 2018-10-23 西安天和防务技术股份有限公司 A kind of long-time method for tracking target
CN110097575A (en) * 2019-04-28 2019-08-06 电子科技大学 A kind of method for tracking target based on local feature and scale pond

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李远状 ; 韩彦芳 ; 于书盼 ; .一种核相关滤波器的多尺度目标跟踪方法.电子科技.2018,(10),全文. *

Also Published As

Publication number Publication date
CN111223123A (en) 2020-06-02

Similar Documents

Publication Publication Date Title
WO2020238560A1 (en) Video target tracking method and apparatus, computer device and storage medium
JP7273157B2 (en) Model training method, device, terminal and program
CN108230357B (en) Key point detection method and device, storage medium and electronic equipment
US11538244B2 (en) Extraction of spatial-temporal feature representation
CN111047626B (en) Target tracking method, device, electronic equipment and storage medium
CN111612822B (en) Object tracking method, device, computer equipment and storage medium
CN109816694B (en) Target tracking method and device and electronic equipment
CN110210480B (en) Character recognition method and device, electronic equipment and computer readable storage medium
CN110991310A (en) Portrait detection method, portrait detection device, electronic equipment and computer readable medium
WO2021208373A1 (en) Image identification method and apparatus, and electronic device and computer-readable storage medium
CN108108769B (en) Data classification method and device and storage medium
CN112115937A (en) Target identification method and device, computer equipment and storage medium
CN112348116A (en) Target detection method and device using spatial context and computer equipment
CN110689014B (en) Method and device for detecting region of interest, electronic equipment and readable storage medium
CN113989656A (en) Event interpretation method and device for remote sensing video, computer equipment and storage medium
CN109978923B (en) Target tracking method and system based on double-template scale self-adaptive correlation filtering
CN110516559B (en) Target tracking method and device suitable for accurate monitoring and computer equipment
CN110956131B (en) Single-target tracking method, device and system
CN111223123B (en) Target tracking method, device, computer equipment and storage medium
CN114022752B (en) SAR target detection method based on attention feature refinement and alignment
CN113762017B (en) Action recognition method, device, equipment and storage medium
CN112509052B (en) Method, device, computer equipment and storage medium for detecting macula fovea
CN114926666A (en) Image data processing method and device
CN112862002A (en) Training method of multi-scale target detection model, target detection method and device
CN109993777B (en) Target tracking method and system based on dual-template adaptive threshold

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant