CN108256394B - Target tracking method based on contour gradient - Google Patents
Target tracking method based on contour gradient Download PDFInfo
- Publication number
- CN108256394B CN108256394B CN201611239192.7A CN201611239192A CN108256394B CN 108256394 B CN108256394 B CN 108256394B CN 201611239192 A CN201611239192 A CN 201611239192A CN 108256394 B CN108256394 B CN 108256394B
- Authority
- CN
- China
- Prior art keywords
- target
- image
- scale
- gradient
- angle
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/40—Scenes; Scene-specific elements in video content
- G06V20/46—Extracting features or characteristics from the video content, e.g. video fingerprints, representative shots or key frames
Abstract
The invention discloses a target tracking method based on contour gradient, which comprises the steps of segmenting a candidate target from an initial frame of an input video or image sequence and extracting a reference image; extracting the reference image outline as a standard characteristic template, and carrying out scale and angle transformation to obtain a multi-scale multi-angle template sequence; inputting a next frame of a video or image sequence, and extracting gradient features of the target image; performing sliding window scanning with step length of 1 on a characteristic image of a target image by using the multi-scale multi-angle template sequence, and calculating the matching similarity of the two; according to the information such as the matching position, the scale factor, the angle factor and the like, dividing a sub-region where the target is located in the target image to serve as a reference image for the next detection for updating; until all the frames of the video or image sequence are detected. The invention aims to: the target tracking method based on the contour gradient is provided to adapt to the scale change and/or the angle change of a target and improve the accuracy of target tracking.
Description
Technical Field
The invention belongs to the technical field of computer image processing, and particularly discloses a contour gradient-based target tracking method.
Background
In a security monitoring task, in order to meet the requirement of automatic target tracking, it is often necessary to determine a target position of an area of interest in a video or a continuous image sequence, and to correspond the target position in each frame of image.
The research content of the target tracking technology is mainly divided into the following two aspects: firstly, the required information, such as the track of the target and the related motion parameters such as speed, acceleration, position, etc., is detected, tracked, identified and extracted from the moving target in the captured video sequence. And secondly, predicting and estimating the target by using the acquired motion parameters to assist decision making. Therefore, the accurate extraction of the characteristics of the moving target is a precondition for improving the target tracking, identification and classification accuracy; the accuracy of tracking in turn affects the accuracy and difficulty of high-level decisions.
The conventional target tracking solution can be described as follows:
(1) determining a template, generally called a reference image, on the acquired image sequence, wherein the reference image is recorded with a target to be tracked;
(2) taking each pixel point of the reference image as a feature point to form an original feature point set; or, in order to improve the efficiency of the operation, the pixels are uniformly extracted from the reference image at equal intervals (the process can be called equal-interval sampling), and an original characteristic point set is formed;
(3) calculating the original characteristic point set and the neighborhood thereof to obtain a new characteristic point set, and determining a matching region on the image to be matched according to the new characteristic point set;
(4) and calculating gray scale or texture information between the matching area and the reference template, and obtaining a matching coefficient matrix between the matching area and the reference image through iteration by using a method of minimizing errors, wherein the area corresponding to the maximum value of the matching coefficient is the tracked target.
(5) And (5) repeating the steps (3) - (4) on the acquired image sequence, and finally realizing continuous target tracking through template matching between the image frames.
The traditional target tracking method has the following defects:
(1) after the reference image is obtained, the reference image is used as a standard template and is not updated. However, in an actual tracking system, when an image capturing device such as a camera moves and a target moves, scales or rotates, a determined reference image may partially move out of a picture capturing range of the camera, so that a partial region of the reference image is not included in images of a subsequent image sequence, and if an initial reference image is adopted, tracking failure may be caused, and the target may be lost. Therefore, the tracking method with strong anti-interference capability has good application value.
(2) The obtained reference image has large randomness of characteristic points, usually contains less image information, can not well represent image characteristics, has low reliability and stability, and ensures that a tracking algorithm has no good robustness.
(3) The feature matching calculation is difficult to achieve real time, and the response speed of target tracking is influenced.
Disclosure of Invention
The purpose of the invention is: the target tracking method based on the contour gradient is provided to adapt to the scale change and/or the angle change of a target and improve the accuracy of target tracking; firstly, extracting the outline of a specified target and a gradient vector thereof as a standard scale template through a sobel operator, and then obtaining a multi-scale and multi-angle template sequence through scale and angle sampling; secondly, obtaining optimal matching information by a template matching method, wherein the optimal matching information comprises a position, a scale factor and an angle factor; and finally, cutting out an optimal matching area on the target image according to the optimal matching information, and taking the outline and the gradient vector thereof as an updated standard scale template.
The purpose of the invention is realized by the following technical scheme:
a target tracking method based on contour gradient comprises the following steps;
step 1: dividing a candidate target from an initial frame of an input video or image sequence, and extracting a reference image containing the candidate target;
step 2: extracting the outline of the target reference image to obtain a coordinate sequence p of each pixel point of the reference imagei=(xi,yi)TAnd corresponding gradient sequences d in horizontal and vertical directionsi=(ti,ui)TAs standard feature templates;
if the size of the target reference image is mxn, and the number of the detected edge points is L according to the preset threshold condition T, i is 1,2, 3., mxn, where only L points are sobel edge points, and gradients corresponding to other non-edge points are defined as (0, 0);
the sobel edge detection process is a process of utilizing a sobel operator to perform convolution with all pixel points and neighborhoods of reference images and then determining edge points according to a preset threshold condition T;
through sobel edge detection, the point p can be obtainedi=(xi,yi)TAnd its corresponding gradient direction di=(ti,ui)T;
And step 3: carrying out dimension and angle d on the standard characteristic templatei=(ti,ui)TTransforming to obtain a multi-scale and multi-angle template sequence (P)i1',di)T,(Pi2',di)T,(Pi3',di)T,......,(PiM',di)TTo enhance the robustness of the matching;
and 4, step 4: inputting a next frame of the video or image sequence, and extracting the gradient feature g of the target imager=(vr,wr)T;
performing sobel edge detection on the target image with the size of M × N by using the same method and preset threshold condition as the step2 to obtain the gradient feature g of the target imager=(vr,wr)Twherein, r is 1,2,3,., mxn, L' is the number of edge points in the detected target image, and if and only if the pixel point is an edge, the corresponding gradient has a value, otherwise (0, 0);
and 5: the M groups of multi-scale and multi-angle template pictures (P) obtained in the step3i1',di)T,(Pi2',di)T,(Pi3',di)T,......,(PiM',di)TRespectively carrying out sliding window scanning with the step length being a fixed value with the characteristic image of the target image, calculating the similarity matched with the characteristic image and the characteristic image, comparing the similarity obtained under all templates and all window positions, and obtaining the window position corresponding to the maximum value of the similarity, namely the best matching position, which is the final result of the target tracking of the current frame;
step 6: dividing a sub-region where the target is located in the target image according to the optimal matching position, the scale factor and the angle factor, and updating the sub-region as a reference image for next detection;
and 7: and (6) repeating the steps from the step2 to the step 6 until all the frames of the video or image sequence are detected.
Further, the method for performing appropriate scale and angle transformation on the standard feature template in step3 includes:
a) the standard scale template sequence (p)i,di)TEach point pi=(xi,yi)TAbscissa x ofiEnlargement/reduction
sxMultiple, ordinate yiEnlargement/reduction syDoubling;
b) by different transformation factors sx、syAfter processing, a plurality of multi-scale feature template sequences (P) can be obtainedi1,di)T,(Pi2,di)T,(Pi3,di)T,...,(Pik,di)TWherein k is the number of times of carrying out different scale transformation;
c) performing proper angle transformation on all the multi-scale characteristic templates obtained in the step b), and performing proper angle transformation on a multi-scale characteristic template sequence (P)ij,di)T(j ═ 1,2, 3.., k) is rotated by an angle θ, and the sequence of templates (P) is rotated in the positive direction by the rightward rotationij,di)TEach point P ofij=(Xij,Yij)TClockwise rotation of θ about (0,0) to obtain a point Pij'=(Xij',Yij')TThe mathematical formula can be expressed as:
d) obtaining M groups of multi-scale multi-angle template sequences (P)i1',di)T,(Pi2',di)T,(Pi3',di)T,......,(PiM',di)T。
Further, the scale transformation factor sx、syIn the range of0.9-1.1, and the angle theta is in the range of-30 degrees to 30 degrees.
Further, the method for calculating the similarity in step 5 includes:
1) for any point (x, y) on the target image, the gradient direction is recorded as gx,y=(vx,y,wx,y)T;
2) When the characteristic template window of the reference image is matched with a certain range with the same size in the target image to be detected, the matching similarity s of the two points can be defined as: normalizing the sum of cosine values at the included angles of the direction of the corresponding gradient vectors of the same coordinate position in the feature matrix of the feature template matrix and the feature matrix of the target image;
3) the gradient vector value of the non-edge point is (0,0), so the similarity can be simplified to the sum of the normalized cosine values of the included angles of the edge points corresponding to the gradient vector direction at the same coordinate position:
in the formula, the (x, y) value is the coordinate of the upper left corner of the position where the sliding window is located in the target image, the position of the window is directly represented by the coordinate of the point or the coordinate converted into the center point of the window, and the value range of the similarity s is 0-1;
4) combining M groups of multi-scale multi-angle templates (P)i1',di)T,(Pi2',di)T,(Pi3',di)T,......,(PiM',di)TAnd respectively scanning sliding windows with the step length of 1 on the feature matrix of the target image, comparing the similarity obtained under all templates and all window positions, and obtaining the window position corresponding to the maximum value of the similarity, namely the best matching position, which is the final result of the target tracking of the current frame.
Further, the method for fast calculating the similarity in step 5, which uses Fast Fourier Transform (FFT) to perform convolution operation to convert the similarity to a frequency domain, includes:
(1) for any multi-scale multi-angle feature template (p)ik,dik)TDefining two gradient direction component matrices Tx、Tythe size of the matrix is m × n, and the values of m and n are respectively represented by pikDetermining the maximum and minimum values of the horizontal and vertical coordinates; p is a radical ofik=(xik,yik)T,dik=(tik,uik)TAccording to pikCoordinate value of (1) is respectively for Tx、TyAssigning a value of TxMiddle (x)ikColumn yikThe line element is assigned a value of tikWill TyMiddle (x)ikColumn yikThe row element is assigned a value of uik;
(2) In the same way of (1), two gradient direction component matrixes O of the target image are obtained through assignmentx、OyAssignment is similar;
(3)Txand OxThe convolution operation is realized through FFT to obtain
Wherein the content of the first and second substances,
and calculating to obtain:
similarly, calculating to obtain:
(4) and according to the equivalent relation between convolution and Fast Fourier Transform (FFT), carrying out the following processing on the calculation result to obtain a similarity matrix:i.e. the set of matching similarities s.
The invention has the following beneficial effects:
firstly, the invention extracts the contour gradient of the target as the characteristic and adopts the gradient threshold value to process, thereby obtaining a reasonable and effective characteristic template based on the edge point gradient vector as the characteristic and effectively realizing the tracking of the target.
Secondly, the invention carries out proper scale and rotation transformation on the characteristic template to obtain the multi-scale multi-angle characteristic template, thereby avoiding the problem of target loss caused by the motion of image acquisition equipment such as a camera and the like or a target and the scale or rotation change of the target.
Thirdly, the method and the device can segment the target in time and update the template in real time, thereby avoiding the problem of tracking failure caused by adopting a fixed template in the traditional mode.
Fourthly, compared with the prior art, the method uses the gradient vector based on the edge point as the feature template, and the non-edge point does not participate in the calculation process of feature matching, thereby greatly reducing the calculation amount of feature matching.
Fifth, the method of the invention also provides a rapid calculation method for the implementation of feature matching, which realizes the magnitude order reduction of the calculated amount and can well adapt to the real-time requirement in the security monitoring system.
Drawings
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be further described in detail with reference to the accompanying drawings, in which:
FIG. 1 is a flow chart of an implementation of a contour gradient-based target tracking method according to the present invention;
FIG. 2 is a diagram illustrating the segmentation of candidate targets from an initial frame according to the present invention;
FIG. 3 is a schematic diagram of the sobel operator of the present invention;
FIG. 4 is a diagram illustrating a neighborhood of a pixel in an image according to the present invention;
FIG. 5 is a schematic diagram of a standard feature template of the present invention.
Detailed Description
Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. It should be understood that the preferred embodiments are illustrative of the invention only and are not limiting upon the scope of the invention.
As shown in fig. 1-5, in the first embodiment: a target tracking method based on contour gradient is provided, which comprises the following steps: establishing a feature template, matching the feature template with a target image and updating the feature template;
step1, segmenting candidate targets from an initial frame of an input video or image sequence, and extracting a reference image containing the candidate targets. This step is illustrated in figure 2. According to the requirements of practical application, the step is taken as the first step of the whole process, and can be realized by manual labeling or by implementing a complete segmentation algorithm on the target.
Step2, extracting the outline of the target reference image to obtain a coordinate sequence p of each pixel point of the reference imagei=(xi,yi)TAnd corresponding gradient sequences d in horizontal and vertical directionsi=(ti,ui)TAs standard feature templates.
It should be noted that, if the size of the target reference image is m × n, and the number of detected edge points is L according to the preset threshold condition T, i is 1,2, 3.
The sobel edge detection process is a process of convolving all pixel points of a reference image and neighborhoods thereof with sobel operators (Gx and Gy shown in fig. 3), and then determining edge points according to a preset threshold condition T.
Let a certain pixel (x, y) in the reference image and its neighborhood pixel value distribution be as shown in fig. 4.
Through sobel edge detection, the point p can be obtainedi=(xi,yi)TAnd its corresponding gradient direction di=(ti,ui)TWherein, the coordinate values of the gradient direction are as follows:
thus, the prototype of the feature template is obtained-with the gradient features d of the reference imagei Tthe constructed set/sequence, referred to herein as a standard feature template, is the same size as the reference image, m n in size, and an example of the distribution of gradient feature values is shown in FIG. 5.
Step3, carrying out scale and angle transformation on the standard characteristic template to obtain a multi-scale multi-angle template sequence (P)i1',di)T,(Pi2',di)T,(Pi3',di)T,......,(PiM',di)TTo enhance the robustness of the matching.
Performing appropriate scale transformation on standard feature templates, i.e. standard scale template sequence (p)i,di)TEach point pi=(xi,yi)TAbscissa x ofiEnlargement (reduction) of sxMultiple, ordinate yiEnlargement (reduction) of syMultiplying, scaling and transforming factor sx、syThe range is 0.9 to 1.1. If with Pi=(Xi,Yi)TRepresenting the scaled result, the mathematical formula of the process can be expressed as:
by different transformation factors sx、syAfter processing, a plurality of multi-scale feature template sequences (P) can be obtainedi1,di)T,(Pi2,di)T,(Pi3,di)T,...,(Pik,di)TAnd k is the number of times of carrying out different scale transformation.
Further, all the obtained multi-scale feature templates are subjected to proper angle transformation. Centering on the upper left corner of the reference image, and aligning the multi-scale feature template sequence (P)ij,di)TAnd (j ═ 1,2, 3.., k) rotation is performed at an angle θ, and the right rotation is assumed to be a positive direction, and the angle θ is taken to be in a range of-30 ° to 30 °. Template sequence (P)ij,di)TEach point P ofij=(Xij,Yij)TRotate θ around (0,0) to obtain a point Pij'=(Xij',Yij')TThe mathematical formula can be expressed as:
here, the method is not limited to the mode in which the upper left corner of the reference image is used as the rotation center, and if other fixed points such as the reference image center are selected as the rotation center, the essence is the same as that of the embodiment.
Through the processing, M groups of multi-scale multi-angle template sequences (P) are finally obtainedi1',di)T,(Pi2',di)T,(Pi3',di)T,......,(PiM',di)T。
The multi-scale multi-angle characteristic template obtained by the process can solve the problem of target loss caused by the motion of image acquisition equipment such as a camera or a target and the change of the scale or the angle of the target, has good robustness, and has simple and convenient transformation process and good real-time property.
Step4, inputExtracting gradient characteristic g of the target image from the next frame of the video or image sequencer=(vr,wr)T:
performing sobel edge detection on the target image with the size of M × N by using the same method and preset threshold condition as the step2 to obtain the gradient feature g of the target imager=(vr,wr)Twhere r is 1,2,3,., mxn, L' is the number of edge points in the detected target image, and if and only if a pixel point is an edge, the corresponding gradient has a value, otherwise it is (0, 0).
The specific implementation method of this step is shown in step2, and is not described herein again.
Step 5, the M groups of multi-scale multi-angle template pictures (P) obtained in the step3i1',di)T,(Pi2',di)T,(Pi3',di)T,......,(PiM',di)TRespectively carrying out sliding window scanning with the step length of 1 with the characteristic image of the target image, and calculating the matching similarity of the two. When the similarity obtains the maximum value, the corresponding position is the best matching position, and the multi-scale multi-angle template sequence for matching can give out the information such as the scale factor, the angle factor and the like corresponding to the best matching. The specific matching algorithm is as follows.
If any point (x, y) on the target image, the gradient direction is marked as gx,y=(vx,y,wx,y)T. When the characteristic template window of the reference image is matched with a certain range with the same size in the target image to be detected, the matching similarity s of the two points can be defined as: and normalizing the sum of cosine values at the included angles of the direction of the corresponding gradient vectors of the feature template matrix and the feature matrix of the target image at the same coordinate position.
In fact, since the gradient vector values of the non-edge points are (0,0), the similarity can be simplified to the sum of the normalized cosine values of the included angle between the edge points at the same coordinate position and the gradient vector direction. The mathematical formula can be expressed as:
in the formula, the (x, y) value is the coordinate of the upper left corner of the position where the sliding window is located in the target image, the position of the window is directly represented by the coordinate of the point or the coordinate converted into the center point of the window, and the value range of the similarity s is 0-1.
Combining M groups of multi-scale multi-angle templates (P)i1',di)T,(Pi2',di)T,(Pi3',di)T,......,(PiM',di)TAnd respectively scanning sliding windows with the step length of 1 on the feature matrix of the target image, comparing the similarity obtained under all templates and all window positions, and obtaining the window position corresponding to the maximum value of the similarity, namely the best matching position, which is the final result of the target tracking of the current frame.
It can be seen that the contour gradient vectors are extracted through the sobel operator and used as features for matching, only edge points need to be calculated in calculation, and compared with a traditional feature template, the calculation amount is greatly reduced, and the real-time performance of the algorithm is improved.
And 6, according to the information such as the optimal matching position, the scale factor, the angle factor and the like, dividing a sub-region where the target is located in the target image, and updating the sub-region as a reference image for next detection.
And 7, repeating the contents from the step2 to the step 6 until all frames of the video or image sequence are detected.
Example two: in the first embodiment, the similarity calculation involves a convolution operation of the feature template of the reference image and the gradient feature value of the feature matrix of the target image within a certain window. Although based on the definition that the feature gradient corresponds to a gradient value of (0,0) at a non-edge point, the calculation process has a greatly reduced amount of calculation compared with the conventional feature matching method. However, the convolution calculation is mechanical and tedious, and still consumes a lot of time, so that the matching similarity calculation is difficult to achieve in real time.
Therefore, a fast calculation method is provided herein, which uses Fast Fourier Transform (FFT) to perform convolution operation to convert the similarity into the frequency domain, and the specific method is as follows:
step1. for any multi-scale multi-angle feature template (p)ik,dik)TDefining two gradient direction component matrices Tx、Tythe size of the matrix is m × n, and the values of m and n are respectively represented by pikIs determined by the maximum and minimum values of the horizontal and vertical coordinates of (a). p is a radical ofik=(xik,yik)T,dik=(tik,uik)TAccording to pikCoordinate value of (1) is respectively for Tx、TyAssigning a value of TxMiddle (x)ikColumn yikThe line element is assigned a value of tikWill TyMiddle (x)ikColumn yikThe row element is assigned a value of uik。
Step2, in the same way, assigning values to obtain two gradient direction component matrixes O of the target imagex、OyThe assignment is similar.
Step3. consider TxAnd OxThe convolution operation is realized through FFT to obtain
Wherein the content of the first and second substances,
and calculating to obtain:
similarly, calculating to obtain:
step4, according to the equivalent relation between convolution and Fast Fourier Transform (FFT), the similarity matrix obtained by processing the calculation result as follows:i.e. the set of matching similarities s.
And according to the position of the obtained maximum similarity in the similarity matrix, obtaining the best matching position of the characteristic template in the target image, and realizing the target tracking result.
By adopting a rapid calculation mode, the calculation amount of feature matching can be reduced by orders of magnitude, and the aim of real-time calculation is achieved.
Finally, the above embodiments are only intended to illustrate the technical solutions of the present invention and not to limit the present invention, and although the present invention has been described in detail with reference to the preferred embodiments, it will be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions, and all of them should be covered by the claims of the present invention.
Claims (5)
1. A target tracking method based on contour gradient is characterized in that: comprises the following steps;
step 1: dividing a candidate target from an initial frame of an input video or image sequence, and extracting a reference image containing the candidate target;
step 2: extracting the outline of the target reference image to obtain a coordinate sequence p of each pixel point of the reference imagei=(xi,yi)TAnd corresponding gradient sequences d in horizontal and vertical directionsi=(ti,ui)TAs a standardA feature template;
if the size of the target reference image is mxn, and the number of the detected edge points is L according to the preset threshold condition T, i is 1,2, 3., mxn, where only L points are sobel edge points, and gradients corresponding to other non-edge points are defined as (0, 0);
the sobel edge detection process is a process of utilizing a sobel operator to perform convolution with all pixel points and neighborhoods of reference images and then determining edge points according to a preset threshold condition T;
through sobel edge detection, the point p can be obtainedi=(xi,yi)TAnd its corresponding gradient direction di=(ti,ui)T;
And step 3: carrying out dimension and angle d on the standard characteristic templatei=(ti,ui)TTransforming to obtain a multi-scale and multi-angle template sequence (P)i1',di)T,(Pi2',di)T,(Pi3',di)T,......,(PiM',di)TTo enhance the robustness of the matching;
and 4, step 4: inputting a next frame of the video or image sequence, and extracting the gradient feature g of the target imager=(vr,wr)T;
performing sobel edge detection on the target image with the size of M × N by using the same method and preset threshold condition as the step2 to obtain the gradient feature g of the target imager=(vr,wr)Twherein, r is 1,2,3,., mxn, L' is the number of edge points in the detected target image, and if and only if the pixel point is an edge, the corresponding gradient has a value, otherwise (0, 0);
and 5: the M groups of multi-scale and multi-angle template pictures (P) obtained in the step3i1',di)T,(Pi2',di)T,(Pi3',di)T,......,(PiM',di)TRespectively scanning with the characteristic image of target image by sliding window with fixed step length, and calculating twoComparing the similarity obtained under all templates and all window positions, and obtaining the window position corresponding to the maximum value of the similarity, namely the best matching position, which is the final result of the target tracking of the current frame;
step 6: dividing a sub-region where the target is located in the target image according to the optimal matching position, the scale factor and the angle factor, and updating the sub-region as a reference image for next detection;
and 7: and (6) repeating the steps from the step2 to the step 6 until all the frames of the video or image sequence are detected.
2. The contour gradient-based target tracking method according to claim 1, wherein: the method for performing appropriate scale and angle transformation on the standard feature template in the step3 comprises the following steps:
a) the standard scale template sequence (p)i,di)TEach point pi=(xi,yi)TAbscissa x ofiEnlargement/reduction sxMultiple, ordinate yiEnlargement/reduction syDoubling;
b) by different transformation factors sx、syAfter processing, a plurality of multi-scale feature template sequences (P) can be obtainedi1,di)T,(Pi2,di)T,(Pi3,di)T,...,(Pik,di)TWherein k is the number of times of carrying out different scale transformation;
c) performing proper angle transformation on all the multi-scale characteristic templates obtained in the step b), and performing proper angle transformation on a multi-scale characteristic template sequence (P)ij,di)T(j ═ 1,2, 3.., k) is rotated by an angle θ, and the sequence of templates (P) is rotated in the positive direction by the rightward rotationij,di)TEach point P ofij=(Xij,Yij)TClockwise rotation of θ about (0,0) to obtain a point Pij'=(Xij',Yij')TExpressed by a mathematical formula as:
d) obtaining M groups of multi-scale multi-angle template sequences (P)i1',di)T,(Pi2',di)T,(Pi3',di)T,......,(PiM',di)T。
3. The contour gradient-based target tracking method according to claim 2, wherein: the scale transformation factor sx、syThe range is 0.9-1.1, and the range of the angle theta is-30 degrees to 30 degrees.
4. The contour gradient-based target tracking method according to claim 1, wherein: the method for calculating the similarity in the step 5 includes:
1) for any point (x, y) on the target image, the gradient direction is recorded as gx,y=(vx,y,wx,y)T;
2) When the characteristic template window of the reference image is matched with a certain range with the same size in the target image to be detected, the matching similarity s of the two points is defined as: normalizing the sum of cosine values at the included angles of the direction of the corresponding gradient vectors of the same coordinate position in the feature matrix of the feature template matrix and the feature matrix of the target image;
3) the gradient vector value of the non-edge point is (0,0), so the similarity is simplified to the sum of the normalized cosine values of the included angles of the edge points corresponding to the gradient vector direction at the same coordinate position:
in the formula, the (x, y) value is the coordinate of the upper left corner of the position where the sliding window is located in the target image, the position of the window is directly represented by the coordinate of the point or the coordinate converted into the center point of the window, and the value range of the similarity s is 0-1;
4) combining M groups of multi-scale multi-angle templates (P)i1',di)T,(Pi2',di)T,(Pi3',di)T,......,(PiM',di)TAnd respectively scanning sliding windows with the step length of 1 on the feature matrix of the target image, comparing the similarity obtained under all templates and all window positions, and obtaining the window position corresponding to the maximum value of the similarity, namely the best matching position, which is the final result of the target tracking of the current frame.
5. The contour gradient-based target tracking method according to claim 1, wherein: the method for fast calculating the similarity in step 5, which uses Fast Fourier Transform (FFT) to perform convolution operation to convert the similarity to a frequency domain, includes:
(1) for any multi-scale multi-angle feature template (p)ik,dik)TDefining two gradient direction component matrices Tx、Tythe size of the matrix is m × n, and the values of m and n are respectively represented by pikDetermining the maximum and minimum values of the horizontal and vertical coordinates; p is a radical ofik=(xik,yik)T,dik=(tik,uik)TAccording to pikCoordinate value of (1) is respectively for Tx、TyAssigning a value of TxMiddle (x)ikColumn yikThe line element is assigned a value of tikWill TyMiddle (x)ikColumn yikThe row element is assigned a value of uik;
(2) In the same way of (1), two gradient direction component matrixes O of the target image are obtained through assignmentx、OyAssignment is similar;
(3)Txand OxThe convolution operation is realized through FFT to obtain
Wherein the content of the first and second substances,
and calculating to obtain:
similarly, calculating to obtain:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611239192.7A CN108256394B (en) | 2016-12-28 | 2016-12-28 | Target tracking method based on contour gradient |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611239192.7A CN108256394B (en) | 2016-12-28 | 2016-12-28 | Target tracking method based on contour gradient |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108256394A CN108256394A (en) | 2018-07-06 |
CN108256394B true CN108256394B (en) | 2020-09-25 |
Family
ID=62720243
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611239192.7A Active CN108256394B (en) | 2016-12-28 | 2016-12-28 | Target tracking method based on contour gradient |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108256394B (en) |
Families Citing this family (19)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109584250B (en) * | 2018-11-28 | 2022-09-20 | 哈工大机器人(合肥)国际创新研究院 | Robust method for automatically dividing and marking visual region |
CN111292350B (en) * | 2018-12-10 | 2024-03-01 | 北京京东乾石科技有限公司 | Optimization algorithm, system, electronic device and storage medium for target orientation |
CN111369599B (en) * | 2018-12-25 | 2024-04-16 | 阿里巴巴集团控股有限公司 | Image matching method, device, apparatus and storage medium |
CN110070557A (en) * | 2019-04-07 | 2019-07-30 | 西北工业大学 | A kind of target identification and localization method based on edge feature detection |
CN111951211A (en) * | 2019-05-17 | 2020-11-17 | 株式会社理光 | Target detection method and device and computer readable storage medium |
CN110210565B (en) * | 2019-06-05 | 2021-04-30 | 中科新松有限公司 | Normalized cross-correlation image template matching realization method |
CN112435211B (en) * | 2020-09-03 | 2022-04-26 | 北京航空航天大学 | Method for describing and matching dense contour feature points in endoscope image sequence |
CN112184785B (en) * | 2020-09-30 | 2023-03-24 | 西安电子科技大学 | Multi-mode remote sensing image registration method based on MCD measurement and VTM |
CN112014409B (en) * | 2020-10-25 | 2021-02-05 | 西安邮电大学 | Method and system for detecting defects of semiconductor etching lead frame die |
CN113091759B (en) * | 2021-03-11 | 2023-02-28 | 安克创新科技股份有限公司 | Pose processing and map building method and device |
CN113112516A (en) * | 2021-04-01 | 2021-07-13 | 广东拓斯达科技股份有限公司 | Image edge feature library construction method and device, computer equipment and storage medium |
CN113139988B (en) * | 2021-05-17 | 2023-02-14 | 中国科学院光电技术研究所 | Image processing method for efficiently and accurately estimating target scale change |
CN113538340A (en) * | 2021-06-24 | 2021-10-22 | 武汉中科医疗科技工业技术研究院有限公司 | Target contour detection method and device, computer equipment and storage medium |
CN113450378B (en) * | 2021-06-28 | 2022-06-03 | 河北工业大学 | Method for judging contact group difference plane height data matching degree |
CN113689397A (en) * | 2021-08-23 | 2021-11-23 | 湖南视比特机器人有限公司 | Workpiece circular hole feature detection method and workpiece circular hole feature detection device |
CN114663316B (en) * | 2022-05-17 | 2022-11-04 | 深圳市普渡科技有限公司 | Method for determining edgewise path, mobile device and computer storage medium |
CN115223240B (en) * | 2022-07-05 | 2023-07-07 | 北京甲板智慧科技有限公司 | Motion real-time counting method and system based on dynamic time warping algorithm |
CN115082472B (en) * | 2022-08-22 | 2022-11-29 | 江苏东跃模具科技有限公司 | Quality detection method and system for hub mold casting molding product |
CN115131587A (en) * | 2022-08-30 | 2022-09-30 | 常州铭赛机器人科技股份有限公司 | Template matching method of gradient vector features based on edge contour |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103218616A (en) * | 2013-05-05 | 2013-07-24 | 西安电子科技大学 | Image outline characteristic extraction method based on Gauss-Hermite special moment |
CN105678806A (en) * | 2016-01-07 | 2016-06-15 | 中国农业大学 | Fisher discrimination-based automatic tracking method for tracking behavior trace of live pig |
-
2016
- 2016-12-28 CN CN201611239192.7A patent/CN108256394B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103218616A (en) * | 2013-05-05 | 2013-07-24 | 西安电子科技大学 | Image outline characteristic extraction method based on Gauss-Hermite special moment |
CN105678806A (en) * | 2016-01-07 | 2016-06-15 | 中国农业大学 | Fisher discrimination-based automatic tracking method for tracking behavior trace of live pig |
Non-Patent Citations (3)
Title |
---|
Contour-based object tracking with gradient-based contour attraction field;Petr Dokladal 等;《2014 IEEE International Conference on Acoustics,Speech,and Processing》;20040830;第III-17-III-20页 * |
基于多尺度图像的主动轮廓线模型;黄海赟 等;《计算机研究与发展》;20001031;第37卷(第10期);第1240-1245页 * |
目标基视频编码中的运动目标提取与跟踪新算法;朱仲杰 等;《电子学报》;20130930;第31卷(第9期);第1426-1428页 * |
Also Published As
Publication number | Publication date |
---|---|
CN108256394A (en) | 2018-07-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108256394B (en) | Target tracking method based on contour gradient | |
CN109784333B (en) | Three-dimensional target detection method and system based on point cloud weighted channel characteristics | |
Le et al. | Deep homography estimation for dynamic scenes | |
CN106875381B (en) | Mobile phone shell defect detection method based on deep learning | |
CN109903313B (en) | Real-time pose tracking method based on target three-dimensional model | |
CN108229475B (en) | Vehicle tracking method, system, computer device and readable storage medium | |
CN110349207B (en) | Visual positioning method in complex environment | |
CN106683119B (en) | Moving vehicle detection method based on aerial video image | |
CN111028292B (en) | Sub-pixel level image matching navigation positioning method | |
CN111046856B (en) | Parallel pose tracking and map creating method based on dynamic and static feature extraction | |
Liu et al. | Tracking objects using shape context matching | |
CN111860439A (en) | Unmanned aerial vehicle inspection image defect detection method, system and equipment | |
WO2018049704A1 (en) | Vehicle detection, tracking and localization based on enhanced anti-perspective transformation | |
CN110110618B (en) | SAR target detection method based on PCA and global contrast | |
CN110751619A (en) | Insulator defect detection method | |
CN109410248B (en) | Flotation froth motion characteristic extraction method based on r-K algorithm | |
CN108961262B (en) | Bar code positioning method in complex scene | |
CN109558877B (en) | KCF-based offshore target tracking algorithm | |
CN113989308A (en) | Polygonal target segmentation method based on Hough transform and template matching | |
CN115984186A (en) | Fine product image anomaly detection method based on multi-resolution knowledge extraction | |
CN113689365B (en) | Target tracking and positioning method based on Azure Kinect | |
Zhou et al. | Target tracking based on foreground probability | |
Dai et al. | An Improved ORB Feature Extraction Algorithm Based on Enhanced Image and Truncated Adaptive Threshold | |
Walha et al. | Moving object detection system in aerial video surveillance | |
Zhou et al. | Speeded-up robust features based moving object detection on shaky video |
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 |