Search

CN-122023459-A - Target tracking method based on improved MOSSE algorithm and storage medium

CN122023459ACN 122023459 ACN122023459 ACN 122023459ACN-122023459-A

Abstract

The invention discloses a target tracking method and a storage medium based on an improved MOSSE algorithm, aiming at the problem that tracking drift and misjudgment are easy to occur due to shielding, illumination mutation or jitter in the traditional MOSSE algorithm. The method is characterized in that the ROI is preprocessed through logarithmic transformation, standardization and Hann window, sub-pixel positioning is achieved by combining quadric surface fitting, PSR hysteresis threshold is dynamically calculated by EMA to judge tracking confidence, target offset is predicted through Lagrange interpolation after Gaussian smooth track, anti-interference capability is effectively improved, and the method is suitable for real-time target tracking scenes such as monitoring and automatic driving.

Inventors

  • LIU XIAONAN
  • WANG BIN
  • Huang Xiangyuxuan
  • QIAO GONGGUO
  • ZHANG CHUN
  • Qiao Bensen

Assignees

  • 江苏稻源科技集团有限公司

Dates

Publication Date
20260512
Application Date
20260202

Claims (10)

  1. 1. A target tracking method based on an improved MOSSE algorithm, comprising: step 1, acquiring continuous image frames as input data of target detection and tracking; step 2, adopting MOSSE filter to track target in real time and outputting central position of target in every frame ; Step 3, constructing the length as Track buffer of (2) and storing the latest output in step 2 in real time A frame target center position; Step 4, carrying out one-dimensional Gaussian smoothing on the target center position data in the track buffer; step 5, based on the smoothed latest of step 4 Constructing an interpolation polynomial by a Lagrange interpolation method for predicting the first target center position point A target center position of the frame; step 6, according to the latest The corresponding MOSSE relevant response diagram of the frame target center position obtains a two-stage self-adaptive threshold value of MOSSE tracking confidence coefficient through a process of PSR calculation-EMA estimation-hysteresis threshold value generation 、 ; Step 7, judging MOSSE whether the confidence of tracking output is continuous The frame is lower than If yes, predicting the first step of step 5 Taking the central position of the frame target as output and storing the position into a track buffer area, if not, taking the central position of the current frame target output in the step 2 as output and storing the position into the track buffer area; and 8, updating MOSSE the filter on line, namely recalculating the frequency domain characteristics based on the target area aligned with the current frame, updating the cumulant of filter training exponentially, and further updating the filter parameters to finish one tracking cycle.
  2. 2. The method of claim 1, wherein step 2 comprises initializing a first frame process and a per frame tracking process starting at frame 2, wherein initializing the first frame process comprises: step 2.1.1 acquiring an initial target frame and processing the ROI from the first frame image Initial target frame for middle clipping Corresponding ROI region Will be Conversion to grey-scale drawings And scaled to be wide and high respectively Wherein, For the upper left corner of the target frame, The width and the height of the initial target frame are respectively; step 2.1.2, ROI preprocessing, namely sequentially performing logarithmic transformation, normalization and Hann window weighting on the scaled ROI; Step 2.1.3 construction of an ideal Gaussian response generating an centered at the target within the ROI size range Two-dimensional gaussian response diagram for peak value Wherein And is also provided with Or (b) ; Step 2.1.4 frequency domain training the initial MOSSE filter by performing FFT transform on the preprocessed ROI and the two-dimensional Gaussian response map, respectively, to obtain frequency domain characteristics 、 Calculate the cumulative amount , Wherein, the Representing complex conjugate, initial filter , Is a regularization parameter.
  3. 3. The target tracking method based on the modified MOSSE algorithm as claimed in claim 2, wherein in step 2, the tracking process per frame from the 2 nd frame specifically includes: step 2.2.1, calculating a correlation response diagram, namely cutting a search window around the center of the target of the previous frame, preprocessing the search window in the step 2.1.2, and performing FFT conversion to obtain Calculating a frequency domain correlation response For a pair of Performing inverse FFT to obtain a spatial domain correlation response map ; Step 2.2.2-quadric fitting sub-pixel positioning-find response map Peak coordinates of (2) Taking the periphery of the peak value A neighborhood, fitting the neighborhood to a quadric surface Wherein A relative coordinate with the peak coordinate as an origin; solving fitting parameters by least square method ; Step 2.2.3 calculating the subpixel offset from the condition that the quadric gradient is 0 Solving for sub-pixel offset Final subpixel coordinates Wherein Is that Coordinates of the neighborhood center in the search window; step 2.2.4. Sub-pixel coordinates in the search window Mapping back to the original image coordinates to obtain the center coordinates of the current frame target in the original image 。
  4. 4. The method for target tracking based on the modified MOSSE algorithm as claimed in claim 1, wherein in step 4, the specific formula of the one-dimensional gaussian smoothing process is: (1) After smoothing Coordinates: ; (2) After smoothing Coordinates: ; Wherein, the Is the first in the track buffer A target center coordinate of the frame; a discrete index representing a frame offset relative to the currently processed frame, which is a summation operation; is a preset filter radius; the weight of the material is a gaussian weight, , Is a preset standard deviation of the gaussian kernel.
  5. 5. The improved MOSSE algorithm-based target tracking method as claimed in claim 1, wherein in step 5, the smoothed n-frame position is based on Constructing an interpolation polynomial by a Lagrange interpolation method, and predicting the first degree Target center position of frame The specific formula is as follows: (1) And (3) coordinate prediction: ; (3) And (3) coordinate prediction: ; Wherein, the Is the timestamp of the i-th frame; To the first% A time stamp of the frame; Is a Lagrangian basis function.
  6. 6. The improved MOSSE algorithm-based target tracking method as claimed in claim 1, wherein in step 6, PSR calculation specifically includes: Step 6.1.1 obtaining the correlation response map of the current frame Peak of (2) Peak coordinates ; Step 6.1.2 Is centered and structured Peak window of (2) , To preset window size, sidelobe region Is divided into response graphs All of the pixels outside of the pixel array, ; Step 6.1.3 calculating side lobe regions Mean of (2) And standard deviation of The formula is: , Wherein, the method comprises the steps of, The total number of pixels in the sidelobe region; Step 6.1.4, calculating the PSR value of the current frame: Wherein, the method comprises the steps of, Is a preset infinitesimal constant.
  7. 7. The improved MOSSE algorithm-based target tracking method of claim 1, wherein in step 6, the specific formula of EMA estimation is: (1) And (5) updating the self-adaptive mean value: ; (3) Adaptive variance update: ; Wherein, the For an exponential moving average of the PSR of the current frame, Exponentially moving the variance for the current frame PSR; for the preset smoothing coefficient to be a predetermined smoothing coefficient, The index moving average and the index moving variance of the PSR of the previous frame are respectively.
  8. 8. The target tracking method based on the modified MOSSE algorithm according to claim 1, wherein in step 6, the specific formula for generating the hysteresis threshold is: (1) Low threshold: ; (2) High threshold: ; Wherein, the The standard deviation is shifted by the index of the PSR, A preset minimum threshold value is set; 、 Are all preset correction parameters, satisfy ; The exponential moving average and the exponential moving variance of the current frame PSR, respectively.
  9. 9. The method for target tracking based on the modified MOSSE algorithm as claimed in claim 2, wherein the step 8 specifically includes: step 8.1 recalculating the frequency domain features by performing preprocessing and FFT transformation on the current frame aligned target ROI while reconstructing the two-dimensional Gaussian response ; Step 8.2, updating cumulative amount of index: Wherein The learning rate is preset; Step 8.3, updating the filter: , And (3) the value is in the step 2.1.4.
  10. 10. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the steps of the method according to any one of claims 1-9.

Description

Target tracking method based on improved MOSSE algorithm and storage medium Technical Field The present invention relates to an image processing method and a storage medium, and more particularly, to a target tracking method and a storage medium. Background In the field of computer vision and image processing, a target tracking technology is one of core support technologies applied to intelligent monitoring, man-machine interaction, robot navigation and the like, and the core requirement is to accurately position a target position in real time in continuous image frames. Of the existing target tracking algorithms, MEAN SHIFT algorithm based on color histogram and CamShift algorithm are typical representatives. The algorithm has the advantages of simple logic realization and high calculation efficiency, but depends on the stability of the color characteristics of the target, and under the scene of target shielding, scale dynamic change or intense illumination interference, the matching deviation of the characteristics of the target is easy to occur, so that tracking failure is caused. In recent years, MOSSE (Minimum Output Sum of Squared Error, minimum output square error) filters have been widely used in template matching type tracking tasks because of their frequency domain calculation characteristics, high calculation speed, and high real-time performance. However, the conventional MOSSE algorithm still has the obvious defects of insufficient robustness on target shielding, rapid movement and template drift, when the target is shielded, the MOSSE filter is easy to learn background noise characteristics to cause subsequent tracking and positioning offset, and when the target rapidly moves, the peak value of a relevant response graph is fuzzy, and the target is easy to lose. Meanwhile, the existing tracking system generally lacks modeling and short-time prediction capability for historical tracks, namely, once tracking is interrupted, the target position is difficult to quickly recover. Although the state prediction can be realized by Kalman filtering, particle filtering and other methods, the methods have the advantages of complex state model construction, high calculation cost and difficult adaptation to embedded equipment or low-calculation-force real-time application scenes. In summary, there is still a lack of a target tracking method with high speed, light weight and robustness in the prior art, which cannot meet the tracking requirements under complex scenes such as shielding, dithering or blurring, so that an improved target tracking scheme is needed to improve the stability and adaptability of the tracking system. Disclosure of Invention The invention aims to overcome the defects that the existing target tracking algorithm, especially the traditional MOSSE algorithm, is insufficient in robustness in the situations of target shielding, rapid movement and tracking drift and lacks of light track smoothing and prediction capability, and provides a target tracking method and a storage medium combining Gaussian filtering and improving MOSSE tracking and Lagrange interpolation, so that stable and real-time tracking of a target in a complex environment is realized. The technical scheme is that the target tracking method based on the improved MOSSE algorithm comprises the following steps: step 1, acquiring continuous image frames as input data of target detection and tracking; step 2, adopting MOSSE filter to track target in real time and outputting central position of target in every frame ; Step 3, constructing the length asTrack buffer of (2) and storing the latest output in step 2 in real timeA frame target center position; Step 4, carrying out one-dimensional Gaussian smoothing on the target center position data in the track buffer; step 5, based on the smoothed latest of step 4 Constructing an interpolation polynomial by a Lagrange interpolation method for predicting the first target center position pointA target center position of the frame; step 6, according to the latest The corresponding MOSSE relevant response diagram of the frame target center position obtains a two-stage self-adaptive threshold value of MOSSE tracking confidence coefficient through a process of PSR calculation-EMA estimation-hysteresis threshold value generation、; Step 7, judging MOSSE whether the confidence of tracking output is continuousThe frame is lower thanIf yes, predicting the first step of step 5Taking the central position of the frame target as output and storing the position into a track buffer area, if not, taking the central position of the current frame target output in the step 2 as output and storing the position into the track buffer area; and 8, updating MOSSE the filter on line, namely recalculating the frequency domain characteristics based on the target area aligned with the current frame, updating the cumulant of filter training exponentially, and further updating the filter parameters to finish one tracki