A target tracking method based on improved CamShift algorithm
By correcting the trajectory prediction window using Lagrange interpolation and Kalman filtering, and dynamically adjusting the search window using an improved adaptive mean drift algorithm, the robustness and accuracy issues of the traditional CamShift algorithm in complex environments are resolved, achieving efficient target tracking.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- RICE MICROELECTRONICS
- Filing Date
- 2025-07-01
- Publication Date
- 2026-04-17
AI Technical Summary
Traditional CamShift target tracking algorithm is not robust and accurate enough in the face of target occlusion, motion deformation, background interference, etc., and has a large computational load, making it difficult to meet real-time requirements. In particular, it performs poorly in target tracking in complex dynamic environments.
The trajectory prediction window is generated using Lagrange interpolation, and then corrected using Kalman filtering. The search window is dynamically adjusted by an improved continuous adaptive mean drift algorithm to optimize target detection and recognition.
It improves the target acquisition probability and robustness in complex dynamic environments, enhances tracking stability and accuracy in situations with fast target movement, occlusion, and complex backgrounds, and reduces computational complexity.
Smart Images

Figure CN120807581B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of visual target tracking, and more specifically, to a target tracking method based on an improved CamShift algorithm. Background Technology
[0002] In recent years, the field of artificial intelligence has continued to develop, and visual target tracking technology has gradually become one of the research hotspots in this field. Target tracking technology has gradually penetrated from the previous military application field to various civilian fields, playing an increasingly important role in areas such as autonomous driving, automated production lines, drone navigation, intelligent monitoring, and medical image diagnosis, thus promoting the development of human society.
[0003] Real-time target tracking systems typically need to solve the following problems:
[0004] (1) Robustness. Robustness refers to the system's ability to resist external interference. When the tracked target is partially occluded, undergoes motion deformation, or is subject to background interference, the target's appearance information will change, causing the image tracking system to fail to locate the target.
[0005] (2) Accuracy. Accuracy refers to the difference between the target tracking algorithm's current location and the target's true location. It is usually expressed as a percentage and is used to intuitively evaluate the performance of the algorithm.
[0006] (3) Real-time performance. Real-time performance represents the running speed of the target tracking algorithm. In practical applications, the real-time processing capability of the system is required to be very high, which determines whether the system is practical. The main factors affecting real-time performance are the algorithm performance and the performance of the platform on which it runs. The same algorithm has very different computation times on different implementation platforms, and different algorithms on the same platform will also have different computation times due to different algorithm complexities. In practical applications, it is necessary to choose an appropriate algorithm and platform.
[0007] Traditional visual target tracking systems typically use Von Neumann architecture processors to process images. This involves transmitting image data obtained from a camera to a computer for image processing to ultimately track the target. The advantages are low algorithm implementation threshold and high efficiency, but the disadvantages include high system power consumption, high hardware costs, poor real-time performance, and lack of portability, making it difficult to meet the needs of specific applications with high real-time requirements. Both general-purpose processors (CPUs) and graphics processing units (GPUs) belong to the Von Neumann architecture. CPU instructions need to be decoded and executed serially, requiring various branch jump commands and complex control logic, and consuming a significant amount of time for data reading, greatly limiting processing speed. Compared to CPUs, GPUs have a simpler internal structure and more computing units, enabling parallel processing of massive amounts of data; however, their high price and enormous power consumption limit their widespread application.
[0008] Furthermore, traditional visual target tracking systems often use the CamShift target tracking algorithm for target tracking, but the traditional CamShift target tracking algorithm has the following shortcomings:
[0009] (1) The CamShift target tracking algorithm uses the second moment of the image to adjust the length and width of the search window, which requires a large amount of computation.
[0010] (2) The observation model of the CamShift tracking algorithm is determined by the initial target area and does not change with the appearance of the target. When there are large changes, the tracking effect is poor.
[0011] (3) When the target is tracked quickly, it leaves the search range, and the CamShift algorithm has difficulty in performing an effective search, resulting in the loss of the target.
[0012] (4) When the target and the background have similar color and texture, the CamShift tracking algorithm will expand the search window, increase the amount of computation, and reduce the tracking effect.
[0013] There are currently no effective solutions to the problems in the relevant technologies. Summary of the Invention
[0014] In view of the problems in the related technologies, this invention proposes a target tracking method based on an improved CamShift algorithm to overcome the aforementioned technical problems in the existing related technologies.
[0015] Therefore, the specific technical solution adopted by the present invention is as follows:
[0016] A target tracking method based on an improved CamShift algorithm, comprising the following steps:
[0017] S1. Acquire image data and preprocess the image data to obtain preprocessed image data. Use a target detection algorithm to detect targets in the preprocessed image data to obtain the tracking target.
[0018] S2. The historical trajectory of the tracked target is traced, and a trajectory prediction window is generated based on the traced historical trajectory using the Lagrange interpolation method. The trajectory prediction window is then corrected using the Kalman filter algorithm to obtain the corrected trajectory prediction window.
[0019] S3. Improve the continuous adaptive mean drift algorithm by dynamically adjusting the search window strategy to obtain the improved continuous adaptive mean drift algorithm. Based on the modified trajectory prediction window, use the improved continuous adaptive mean drift algorithm to track the target and obtain the tracking result.
[0020] Furthermore, in order to achieve target detection, the target detection algorithm is used to detect and identify the target being tracked. Image data is acquired and preprocessed to obtain preprocessed image data. The target detection algorithm is then used to detect targets in the preprocessed image data, resulting in the following tracked targets:
[0021] S11. Acquire image data, and perform scaling and normalization on the image data to obtain preprocessed image data;
[0022] S12. Train the target detection algorithm based on the pre-acquired image data to obtain the target detection model;
[0023] S13. Use the target detection model to detect targets in the preprocessed image data to obtain the tracking target.
[0024] Furthermore, to effectively address the re-identification problem of tracked targets after rapid movement, sudden changes, and occlusion, and to improve the target acquisition probability in complex dynamic environments by using the trajectory prediction window generated by Lagrange interpolation, the historical trajectory of the tracked target is traced. Based on the traced historical trajectory, a trajectory prediction window is generated using Lagrange interpolation. The Kalman filter algorithm is then used to correct the trajectory prediction window, resulting in the corrected trajectory prediction window, which includes:
[0025] S21. Track the historical trajectory of the target and construct a one-dimensional interpolation polynomial based on the tracked historical trajectory using the Lagrange interpolation method.
[0026] S22. Use a one-dimensional interpolation polynomial to predict the trajectory position and generate a trajectory prediction window based on the trajectory position prediction result.
[0027] S23. The trajectory prediction window is corrected by combining the Kalman filter algorithm with the tracking target to obtain the corrected trajectory prediction window.
[0028] Furthermore, to achieve trajectory prediction, the predicted position can be obtained through the construction of a one-dimensional interpolation polynomial. This involves tracing the historical trajectory of the tracked target and constructing a one-dimensional interpolation polynomial using the Lagrange interpolation method based on the traced historical trajectory, including:
[0029] S211. Perform historical trajectory tracing on the tracked target and obtain the center coordinate set of the target trajectory based on the tracing historical trajectory;
[0030] S212. Set the timestamp based on the center coordinate set, and divide the center coordinate set into horizontal and vertical coordinate sets to obtain the horizontal coordinate set and the vertical coordinate set.
[0031] S213. Using the Lagrange interpolation method combined with the timestamp setting result, construct a one-dimensional interpolation polynomial for the x-axis and y-axis sets to obtain the Lagrange interpolation polynomials for the x-axis and y-axis.
[0032] Furthermore, to improve the accuracy of the prediction window and enhance its probability of capturing the tracked target through the correction of the Kalman filter algorithm, the trajectory prediction window is corrected using the Kalman filter algorithm, resulting in the following corrected trajectory prediction window:
[0033] S231. Based on the Kalman filter algorithm combined with the tracking target, position prediction is performed to obtain the predicted position, and the prior error covariance matrix of the predicted position is calculated.
[0034] S232. Using the trajectory prediction window as the actual observation value, calculate the residual between the actual observation value and the predicted position, and use the prior error covariance matrix combined with the preset observation noise to calculate the Kalman gain. Generate the update weight of each point in the prediction window based on the Kalman gain.
[0035] S233. By adjusting the update weight of each point in combination with the residual, the trajectory prediction window of each trajectory point in the prediction window is obtained.
[0036] Furthermore, to address the problems encountered during target tracking, the continuous adaptive mean drift algorithm can be improved by adjusting the search window optimization strategy. This improves the algorithm and solves the identification problem during target tracking. The improved continuous adaptive mean drift algorithm is obtained by dynamically adjusting the search window strategy. Based on the corrected trajectory prediction window, the improved algorithm is used to track the target, yielding tracking results including:
[0037] S31. Generate an adaptive adjustment strategy for the search window using adaptive coefficients, and divide the problem based on the preset tracking problem. Generate an optimized adjustment strategy for the search window based on the problem division results.
[0038] S32. Integrate the adaptive adjustment strategy and the optimized adjustment strategy of the search window to obtain the dynamic adjustment strategy of the search window.
[0039] S33. Based on the dynamic adjustment strategy of the search window, the continuous adaptive mean drift algorithm is improved to obtain the improved continuous adaptive mean drift algorithm. The improved continuous adaptive mean drift algorithm is used to track the target according to the modified trajectory prediction window to obtain the tracking result.
[0040] Furthermore, to determine the search window optimization and adjustment strategy, and to aid in subsequent problem identification and adjustment by classifying the preset tracking problems, an adaptive coefficient is used to generate an adaptive adjustment strategy for the search window. Based on the preset tracking problems, a problem classification is performed, and the search window optimization and adjustment strategy is generated using the problem classification results.
[0041] S311. Calculate the size ratio of the tracked target, and use the adaptive coefficients combined with the size ratio and the zero-order moment to generate a dynamic update algorithm for the search window. Generate an adaptive adjustment strategy for the search window based on the dynamic update algorithm for the search window.
[0042] S312. Based on preset tracking issues, classify the issues and generate issue judgment thresholds based on the issue classification results;
[0043] S313. Based on the problem judgment threshold and the preset optimization and adjustment rules, generate a search window optimization and adjustment strategy.
[0044] Furthermore, in order to improve the accuracy of tracking problem identification, and to improve the identification accuracy of tracking target rapid movement, sudden changes and occlusion under the effect of the judgment threshold generation, the problem classification results include: tracking target rapid movement problem, tracking target search window occlusion problem and tracking target search window background identification problem;
[0045] The thresholds for determining the generation of issues include:
[0046] A threshold for determining the problem of rapid movement of the tracked target is generated based on the distance of movement between adjacent image frames of the tracked target.
[0047] The ratio of the area of the initial frame window of the tracking target to the area of the search window is used as the occlusion coefficient. Based on the magnitude of the occlusion coefficient, the judgment thresholds for the occlusion problem of the tracking target search window and the judgment thresholds for the background recognition problem of the tracking target search window are generated.
[0048] Furthermore, to avoid tracking problems, the probability of target acquisition in complex dynamic environments can be improved through the adjustment of preset optimization rules. These preset optimization rules include:
[0049] When the problem is determined to be a fast-moving target, the search window for the next frame of the target image is expanded according to a preset expansion value;
[0050] When the problem is determined to be an occlusion problem of the target tracking search window, the centroid coordinates obtained by the continuous adaptive mean drift algorithm are used as the centroid coordinates of the search window, and the size of the initial target tracking search window is used as the size of the search window for iterative calculation.
[0051] When the problem is identified as the background recognition problem of the target search window, the search window is constructed using the trajectory prediction window, and the target is located by combining the color probability map and the continuous adaptive mean drift algorithm.
[0052] Furthermore, to achieve trajectory tracking, and to achieve precise positioning under the influence of the target components acquired by the improved continuous adaptive mean drift algorithm, thereby enhancing the stability and robustness of tracking under conditions of drastic target movement or occlusion, the continuous adaptive mean drift algorithm is improved based on a dynamic adjustment strategy of the search window. This results in an improved continuous adaptive mean drift algorithm, which is then used to track the target using a modified trajectory prediction window. The tracking results include:
[0053] S331. An improved continuous adaptive mean drift algorithm is obtained by improving the search window dynamic adjustment strategy.
[0054] S331. Initialize the search window size using the improved continuous adaptive mean drift algorithm to obtain the initial search window. Extract the tracking target component based on the initial search window and the corrected trajectory prediction window, and calculate the color probability distribution map of the tracking target component.
[0055] S331. Output the centroid coordinates through the color probability distribution map, and perform trajectory tracking based on the centroid coordinates to obtain the tracking result.
[0056] The beneficial effects of this invention are as follows:
[0057] 1. This invention constructs a one-dimensional interpolation polynomial using the Lagrange interpolation method, which can predict the position of the tracked target at the next moment. The Lagrange interpolation method has a stronger nonlinear fitting capability and is suitable for scenarios where the tracked target has non-uniform motion trends such as acceleration or curves. It can effectively improve the tracking performance of the continuous adaptive mean drift algorithm for high-speed or nonlinear targets.
[0058] 2. This invention improves the continuous adaptive mean drift algorithm, which can achieve tracking robustness in complex backgrounds and motion uncertainty scenarios, thereby increasing the target acquisition probability in complex dynamic environments; it effectively solves the problems of rapid movement, sudden changes and re-identification after occlusion of the tracked target, and enhances the stability and robustness of tracking. Attached Figure Description
[0059] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0060] Figure 1 This is a flowchart of a target tracking method based on an improved CamShift algorithm according to an embodiment of the present invention;
[0061] Figure 2 This is a system overall framework diagram of a target tracking method based on an improved CamShift algorithm according to an embodiment of the present invention;
[0062] Figure 3 This is a flowchart of the Lagrange interpolation and CamShift tracking fusion algorithm in a target tracking method based on an improved CamShift algorithm according to an embodiment of the present invention. Detailed Implementation
[0063] To further illustrate the various embodiments, the present invention provides accompanying drawings, which are part of the disclosure of the present invention. These drawings are mainly used to illustrate the embodiments and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these drawings, those skilled in the art should be able to understand other possible implementation methods and the advantages of the present invention.
[0064] According to an embodiment of the present invention, a target tracking method based on an improved CamShift algorithm is provided.
[0065] The present invention will now be further described in conjunction with the accompanying drawings and specific embodiments, such as... Figure 1 As shown, the target tracking method based on the improved CamShift algorithm according to an embodiment of the present invention includes the following steps:
[0066] S1. Acquire image data and preprocess the image data to obtain preprocessed image data. Use a target detection algorithm to detect targets in the preprocessed image data to obtain the tracking target.
[0067] Specifically, image data is acquired and preprocessed to obtain preprocessed image data. Then, a target detection algorithm is used to detect targets in the preprocessed image data, resulting in the following tracked targets:
[0068] S11. Acquire image data, and perform scaling and normalization on the image data to obtain preprocessed image data;
[0069] S12. Train the target detection algorithm based on the pre-acquired image data to obtain the target detection model;
[0070] S13. The target detection model is used to detect targets in the preprocessed image data to obtain the tracking target; the target detection algorithm can be used to detect and identify the tracking target.
[0071] S2. The historical trajectory of the target is traced, and a trajectory prediction window is generated based on the traced historical trajectory using the Lagrange interpolation method. The trajectory prediction window is then corrected using the Kalman filter algorithm to obtain the corrected trajectory prediction window.
[0072] Specifically, the historical trajectory of the tracked target is traced, and a trajectory prediction window is generated based on the traced historical trajectory using the Lagrange interpolation method. The Kalman filter algorithm is then used to correct the trajectory prediction window, resulting in the corrected trajectory prediction window, which includes:
[0073] S21. Track the historical trajectory of the target and construct a one-dimensional interpolation polynomial based on the tracked historical trajectory using the Lagrange interpolation method.
[0074] Specifically, the process involves tracing the historical trajectory of the target and constructing a one-dimensional interpolation polynomial using the Lagrange interpolation method based on the traced historical trajectory, including:
[0075] S211. Perform historical trajectory tracing on the tracked target and obtain the center coordinate set of the target trajectory based on the tracing historical trajectory;
[0076] S212. Set the timestamp based on the center coordinate set, and divide the center coordinate set into horizontal and vertical coordinate sets to obtain the horizontal coordinate set and the vertical coordinate set.
[0077] S213. Using the Lagrange interpolation method combined with the timestamp setting result, a one-dimensional interpolation polynomial is constructed for the horizontal and vertical coordinate sets to obtain the Lagrange interpolation polynomials for the horizontal and vertical coordinates; under the construction of the one-dimensional interpolation polynomial, the predicted position can be obtained to achieve trajectory prediction.
[0078] S22. Use a one-dimensional interpolation polynomial to predict the trajectory position, and generate a trajectory prediction window based on the trajectory position prediction result.
[0079] S23. By combining the Kalman filter algorithm with the tracking target, the trajectory prediction window is corrected to obtain the corrected trajectory prediction window; under the effect of the trajectory prediction window generated by the Lagrange interpolation method, the acquisition probability of the tracking target in complex dynamic environment can be improved.
[0080] Specifically, the trajectory prediction window is corrected using the Kalman filter algorithm, resulting in the following corrected trajectory prediction window:
[0081] S231. Based on the Kalman filter algorithm combined with the tracking target, position prediction is performed to obtain the predicted position, and the prior error covariance matrix of the predicted position is calculated.
[0082] S232. Using the trajectory prediction window as the actual observation value, calculate the residual between the actual observation value and the predicted position, and use the prior error covariance matrix combined with the preset observation noise to calculate the Kalman gain. Generate the update weight of each point in the prediction window based on the Kalman gain.
[0083] S233. By adjusting the updated weights of each point in conjunction with the residuals, the trajectory prediction window of each point in the prediction window is adjusted to obtain the corrected trajectory prediction window. Under the correction effect of the Kalman filter algorithm, the probability of the prediction window capturing the tracked target is enhanced.
[0084] Specifically, the Kalman filter algorithm updates the current state estimate using the current state and the estimated state from the previous state. This invention uses the Kalman filter algorithm to predict target motion and establishes a mathematical model based on the application of a target tracking system.
[0085] The system state equations are as follows:
[0086] X n =AX n-1 +BU n-1 +W n ;
[0087] This formula shows that the state at time n is derived from the state at time n-1, where X n U is the system state at time n. n-1 It is the control quantity at time n-1; A and B are the transfer matrices set according to empirical control coefficients; W n This is the system's process noise, obtained from the Gaussian distribution N(0,Qn). The measurement equation yields the system observation value Z. n :
[0088] Z n =HX n - +V n ;
[0089] Among them, Z n V is the measured value of the target at time n. n It is the error caused by observation, V n Satisfies a Gaussian distribution N(0,R) n H is the system measurement parameter matrix, which represents the state vector X. n Convert to observation Z n The value is determined based on factors such as the physical characteristics of the system and the configuration of the sensors.
[0090] The state prediction equation for the Kalman filter algorithm can be rewritten as follows:
[0091]
[0092] Error covariance equation:
[0093]
[0094] Among them, X n-1 It is the state correction value at time n-1, P n-1 The result is the error correction value. It is the predicted value of the state at time n-1. This is the error prediction value. Q n-1 Q is the process noise covariance matrix, a symmetric matrix that represents the uncertainty of process noise and reflects the impact of model error or noise on state estimation during the state prediction process from time n-1 to time n. n-1 The larger the value of Q, the greater the uncertainty of process noise, and the less reliable the state prediction; conversely, if Q is smaller... n-1 A smaller value indicates higher accuracy in state prediction and more stable system state changes. In practical applications, the process noise covariance matrix needs to be adjusted experimentally.
[0095] Kalman gain equation of the system at time K n :
[0096]
[0097] Among them, K n The weighting ratio between the predicted state and the actual observation was determined for each filter update. If the prediction is more reliable (smaller prediction error), the Kalman gain is smaller, and the filter relies more on the prediction. If the observation is more reliable (smaller measurement error), the Kalman gain is larger, and the filter relies more on the observation to adjust the state estimate. R is the measurement noise covariance matrix, which describes the uncertainty in the observation results due to sensor errors or external noise during each observation, i.e.:
[0098] v k ~N(0,R);
[0099] In other words, the measurement noise is a Gaussian distribution with zero mean and variance R.
[0100] State correction equation:
[0101]
[0102] Covariance:
[0103]
[0104] The complete iterative process of Kalman filtering can be summarized as: time update process and state update process.
[0105] The time update process includes calculating the predicted state and calculating the predicted covariance.
[0106] Calculate the predicted state: X k =AX k-1 +BU k-1 +Q k-1 .
[0107] Calculate the predicted covariance:
[0108] The state update process includes Kalman gain, state correction, and error correction.
[0109] Kalman gain:
[0110] Status correction:
[0111] Error correction:
[0112] Kalman initialization steps: Define a state vector, which contains the target's position and velocity information.
[0113] Initializing the Kalman filter includes state estimation and an initial covariance matrix. The state estimation is the state vector X0 of the Kalman filter initialized based on the target detection results. The initial covariance matrix is the initial state covariance matrix P0, which represents the uncertainty of the initial state.
[0114]
[0115] in, and Indicates uncertainty in location. and This indicates the uncertainty of speed.
[0116] The process noise and measurement noise covariances are defined as follows: process noise covariance matrix, measurement noise covariance matrix, and state transition matrix. The process noise covariance matrix Q represents the error in model prediction and is typically set based on the system's dynamic model (such as a motion model of an object). It can be estimated through experiments or prior knowledge. The measurement noise covariance matrix R represents the inaccuracy of sensor measurements and can be estimated using a sensor error model. The state transition matrix F describes the state change from the previous time step to the current time step and can be derived based on the target's velocity and time step. The formula for calculating the state transition matrix is:
[0117]
[0118] Where v is the target velocity vector and Δt is the time interval.
[0119] S3. Improve the continuous adaptive mean drift algorithm by dynamically adjusting the search window strategy to obtain the improved continuous adaptive mean drift algorithm. Based on the modified trajectory prediction window, use the improved continuous adaptive mean drift algorithm to track the target and obtain the tracking result.
[0120] Specifically, the continuous adaptive mean drift algorithm is improved by dynamically adjusting the search window strategy, resulting in an improved continuous adaptive mean drift algorithm. Based on the modified trajectory prediction window, this improved algorithm is used to track the target, yielding tracking results including:
[0121] S31. Generate an adaptive adjustment strategy for the search window using adaptive coefficients, and divide the problem based on the preset tracking problem. Generate an optimized adjustment strategy for the search window based on the problem division results.
[0122] Specifically, an adaptive adjustment strategy for the search window is generated using adaptive coefficients, and the problem is divided based on a preset tracking problem. The search window optimization and adjustment strategy is generated based on the problem division results, including:
[0123] S311. Calculate the size ratio of the tracked target, and use the adaptive coefficients combined with the size ratio and the zero-order moment to generate a dynamic update algorithm for the search window. Generate an adaptive adjustment strategy for the search window based on the dynamic update algorithm for the search window.
[0124] S312. Based on preset tracking issues, classify the issues and generate issue judgment thresholds based on the issue classification results;
[0125] S313. Based on the problem judgment threshold and the preset optimization and adjustment rules, generate a search window optimization and adjustment strategy; this can help identify and adjust problems in the future by classifying the preset tracking problems.
[0126] S32. Integrate the adaptive adjustment strategy and the optimization adjustment strategy of the search window to obtain the dynamic adjustment strategy of the search window.
[0127] Specifically, the problem classification results include: tracking target fast movement problem, tracking target search window occlusion problem, and tracking target search window background recognition problem;
[0128] The thresholds for determining the generation of issues include:
[0129] A threshold for determining the problem of rapid movement of the tracked target is generated based on the distance of movement between adjacent image frames of the tracked target.
[0130] The ratio of the area of the initial frame window of the tracking target to the area of the search window is used as the occlusion coefficient. Based on the magnitude of the occlusion coefficient, a threshold for judging the occlusion problem of the tracking target search window and a threshold for judging the background recognition problem of the tracking target search window are generated. With the generation of the threshold, the recognition accuracy of the tracking target's rapid movement, sudden changes and occlusion can be improved.
[0131] Specifically, the preset optimization and adjustment rules include:
[0132] When the problem is determined to be a fast-moving target, the search window for the next frame of the target image is expanded according to a preset expansion value;
[0133] When the problem is determined to be an occlusion problem of the target tracking search window, the centroid coordinates obtained by the continuous adaptive mean drift algorithm are used as the centroid coordinates of the search window, and the size of the initial target tracking search window is used as the size of the search window for iterative calculation.
[0134] When the problem is identified as the background recognition problem of the target search window, the search window is constructed using the trajectory prediction window, and the target is located by combining the color probability map and the continuous adaptive mean drift algorithm. Under the adjustment of the preset optimization rules, the capture probability of the target in complex dynamic environment can be improved.
[0135] Specifically, four improvements were made to address the shortcomings of the traditional CamShift tracking algorithm (i.e., the continuous adaptive mean drift algorithm).
[0136] The first aspect (adaptive search window adjustment strategy) involves using adaptive coefficients. Since the zeroth and second moments in the CamShift target tracking algorithm's mathematical model require significant computation, a simplified search window update algorithm is introduced, defining W and L as follows:
[0137]
[0138] L = 1.5 * W;
[0139] Where W represents the width of the image search window for the next frame; L represents the length of the image search window; M 00 It is a moment, representing the zeroth moment in an image, referring to the overall quality of the image, which is the sum of the gray values of all pixels. The formula for calculating the zeroth moment is:
[0140]
[0141] The aspect ratio of the adaptive search window is set to 1.5:1. Since a fixed aspect ratio cannot adapt to the different changes in the appearance of the target in different scenarios, the aspect ratio coefficient needs to be improved. Considering the balance between reducing the computational load of the CamShift algorithm and the impact of a fixed aspect ratio on the tracking effect, this invention dynamically adjusts the size of the search window based on the target size ratio in the initial frame.
[0142] Assume the initial frame tracking window length of the target (i.e., the tracking target) is L. i Width is W i The ratio μ between the two is:
[0143]
[0144] Assuming the search window size adaptively changes by a coefficient of ε, then the width W of the updated search window... n and length L n They are respectively:
[0145]
[0146] If the search window size is constant, then the product of the width and length of the update is constant:
[0147]
[0148] The adaptive change coefficient ε can be calculated as follows:
[0149]
[0150] The width and length of the search window are updated as follows:
[0151]
[0152] The width W and length L of the search window are adjusted according to the aspect ratio μ of the target window in the initial frame, which realizes the adaptive change of the tracking window (i.e., the search window) and reduces the complexity of the algorithm.
[0153] The second aspect (i.e., the problem of tracking fast-moving targets) addresses this issue. Rapid target movement within a video image can lead to significant differences in target position between adjacent frames, making it difficult for the search window to capture the target's location in time, resulting in tracking failure. To address this, this invention proposes a search window expansion strategy. When the target is determined to be moving rapidly, the algorithm expands the search window. Assuming the target is between frame i-1 and frame i, the CamShift algorithm can determine the target position as (x...). i-1 ,y i-1 ) and (x i ,y i Further calculations show that the target's movement distance between the two frames is:
[0154]
[0155] In the formula, x i-1 Represents the x-coordinate of the (i-1)th frame; y i-1 x represents the ordinate of the (i-1)th frame; i Represents the x-coordinate of the i-th frame; y i Let L(i) represent the ordinate of the i-th frame; L(i) represent the target's movement distance between two frames; a threshold D is set, where L(i) > D indicates the target is moving rapidly. After obtaining the size and position information of the search window for the next frame using the CamShift algorithm, it is determined whether the target is moving rapidly. If so, the search window for the next frame is expanded by 5*D pixels in both dimensions; otherwise, the search continues at the original size. Through simulation results, when D is set to 20 pixels, the CamShift algorithm achieves a balance between tracking accuracy and speed.
[0156] The third aspect (i.e., the occlusion problem of the target search window) improves upon this issue. When the target is extensively occluded during target tracking using the CamShift tracking algorithm, only a small portion of the target appears in the search window. This results in a smaller zero-order moment of the target image within the search window. The CamShift tracking algorithm adaptively shrinks the search window. When the target reappears in the field of view, the previously occluded portion is no longer in the search window, leading to tracking failure. An occlusion judgment strategy is implemented; since the time difference between consecutive image frames is very short, and target motion is generally considered continuous, when the target is extensively occluded, the target should be near the search window. Expanding the search window will include the target. The initial frame image of the target contains comprehensive features, has good discriminative power, and does not suffer from occlusion or deformation. The initial frame window (Init_Window) is selected as the baseline window, and the search window (Search_Window) adaptively obtained by the CamShift tracking algorithm is used as the comparison window. The ratio of their areas, K, is used as the occlusion coefficient.
[0157]
[0158] In the formula, S Search_Window S represents the area of the search window in this frame. Init_Window This represents the area of the initial target tracking window. A threshold K is obtained through simulation calculations. When K < 0.3, it indicates that the target is largely occluded. The centroid coordinates obtained from the CamShift tracking algorithm are used as the centroid coordinates of the search window, and the length and width of the initial target tracking window (Init_Window) are used as the size of the search window for iterative calculations.
[0159] The fourth aspect (i.e., the background recognition problem of the target search window) optimizes the background approximation problem. When the background color and texture are similar to the target in the target's motion environment, the zero-order moment of the image search box will increase, causing the tracking window obtained by the algorithm through adaptive adjustment to become larger, which affects the tracking effect.
[0160] To address this problem, this invention proposes a target prediction and tracking method based on Lagrange interpolation. First, a Lagrange interpolation model is constructed using the historical centroid coordinates of the target to predict the target position in the next frame. Then, a search window is constructed with the predicted position as the center. Combining the color probability map and the CamShift algorithm, accurate positioning is achieved, which improves the stability and robustness of the tracking algorithm under conditions of drastic target movement or occlusion.
[0161] S33. Based on the dynamic adjustment strategy of the search window, the continuous adaptive mean drift algorithm is improved to obtain the improved continuous adaptive mean drift algorithm. The improved continuous adaptive mean drift algorithm is used to track the target according to the corrected trajectory prediction window to obtain the tracking result. It can improve the continuous adaptive mean drift algorithm under the adjustment effect of the search window optimization strategy, thereby solving the recognition problem that occurs when tracking the target.
[0162] Specifically, the continuous adaptive mean drift algorithm is improved based on a dynamic adjustment strategy of the search window, resulting in an improved continuous adaptive mean drift algorithm. The improved algorithm is then used to track the target based on the corrected trajectory prediction window, yielding tracking results including:
[0163] S331. An improved continuous adaptive mean drift algorithm is obtained by improving the search window dynamic adjustment strategy.
[0164] S331. Initialize the search window size using the improved continuous adaptive mean drift algorithm to obtain the initial search window. Extract the tracking target component based on the initial search window and the corrected trajectory prediction window, and calculate the color probability distribution map of the tracking target component.
[0165] S331. Output the centroid coordinates through the color probability distribution map, and perform trajectory tracking based on the centroid coordinates to obtain the tracking result; under the action of the improved continuous adaptive mean drift algorithm to obtain the target component, it can achieve accurate positioning and improve the stability and robustness of tracking under the condition of drastic target movement or occlusion.
[0166] Specifically, the RGB image is converted to an HSV image, and the search window size is initialized, which prepares for the improved CamShift tracking algorithm.
[0167] An RGB image can be converted to an HSV image using the following method:
[0168] Normalize the RGB values to the range [0,1]:
[0169]
[0170] In the formula, R represents the value of the red channel; G represents the value of the green channel; B represents the value of the blue channel; R' represents the normalized value of the red channel; G' represents the normalized value of the green channel; and B' represents the normalized value of the blue channel.
[0171] Calculate the maximum and minimum values:
[0172] C max =max(R',G',B');
[0173] C min =min(R',G',B');
[0174] Among them, C max It is the maximum value, representing the brightness of the color, C. min It is the minimum value, representing the depth of the color.
[0175] Calculate the hue H (i.e., the target component), if C max =R', meaning red is the primary color:
[0176]
[0177] If C max =G', meaning green is the primary color:
[0178]
[0179] If C max =B', meaning blue is the primary color:
[0180]
[0181] The calculated H might be negative, so 360° needs to be added to make it fall within the range of [0°, 360°].
[0182] H + = (H+360°)mod360°.
[0183] In the formula, H + This represents the standardized hue.
[0184] Calculate the saturation S:
[0185]
[0186] Calculate the lightness V: V = C max .
[0187] Then, the CamShift tracking algorithm steps are performed. First, the color probability distribution map of the target H component is calculated. The calculation method is as follows: extract the target area, extract the H component of the target area, and calculate the histogram of the target area H component; calculate the histogram of the target area H component, draw the vertical axis, and draw the horizontal axis [0,179]. Divide the horizontal axis into 180 bins and put each H into the corresponding bin according to its value.
[0188] Normalized histogram, i.e., calculating the centroid of the search window, is achieved as follows:
[0189] 1. Binarize the image, that is... Set the pixel value to white, and... Set the pixel value to black.
[0190] 2. Take all black points and record them as I(x,y)=1, and take all white points and record them as I(x,y)=0.
[0191] The x-coordinate of the centroid is:
[0192] The ordinate of the centroid is:
[0193] Move the search window to the centroid and iterate until convergence, with the following convergence conditions:
[0194] 1. Record the coordinates of the previous centroid as C. prev =(x prev ,y prev The current centroid coordinates are C = (x, y).
[0195] 2. Let C prev The Euclidean distance between C and C is d.
[0196] The formula for calculating Euclidean distance is:
[0197]
[0198] 3. If Then d is said to converge to d'. Specific implementation examples:
[0200] In practical applications, this invention may be used, for example, with an MZ7XA7020 FPGA platform and a Zynq7020 SoC chip, and an OV7725 CMOS camera.
[0201] The camera acquires image and video information from the outside and transmits it to the video input / output logic module, which then transmits it to the tracking algorithm and storage controller module via the bus.
[0202] In the tracking algorithm module, target detection and trajectory prediction are performed first to determine the tracking target and the starting coordinates for CamShift.
[0203] The object detection steps include data preprocessing, selecting YOLO as the object detection model, training the object detection model, and performing object detection. Data preprocessing includes image scaling, which adjusts the input image to the size required by the neural network; and normalizing the image pixels to ensure the data distribution falls within the range [-1, 1].
[0204] The trajectory prediction steps include Lagrange interpolation, window construction, back projection, and density tracking on the probability map using CamShift. Specifically, Lagrange interpolation involves continuously tracking the target for n frames, with their center coordinates being (x1, y1), (x2, y2), ..., (x...). n ,y n Assume timestamps are t1, t2, t3, ..., tt4. n The corresponding x-coordinates are x1, x2, x3, ..., x. n The corresponding ordinates are y1, y2, y3... y n The Lagrange interpolation polynomial for the x-axis is then obtained as:
[0205]
[0206] The position of the vertical axis is:
[0207]
[0208] Lagrange basis function l i The formula for calculating (t) is:
[0209]
[0210] Construct a window to predict the location (L) x (t),L y Construct a rectangular window centered at (t)).
[0211]
[0212] In the formula, W and h represent the size of the window in the previous frame.
[0213] Back projection, that is, then projecting onto the target area window. n+1 Statistical analysis was performed on the hue values H(x,y) of the pixels in the image.
[0214]
[0215] Histograms can be normalized:
[0216]
[0217] This forms a color probability distribution model, where we can consider the color feature of the target as a discrete distribution P. H .
[0218] Then iterate through each pixel (x, y) in the image, take its hue value H(x, y), and obtain its probability value:
[0219]
[0220] CamShift performs density tracking on the probabilistic map, that is, it uses the CamShift algorithm to calculate the centroid position of the image on this B(x,y) map:
[0221]
[0222] Among them, h H (i) represents the histogram value of the target region on the H channel, in the i-th bin (out of a total of N bins); δ(·) is an indicator function that takes the value 1 when the expression in parentheses is true, and 0 otherwise; p H B(x,y) is a discrete distribution of the target color features; B(x,y) is a back projection map, where each pixel value represents the probability of being similar to the target color [0,1].
[0223] After the tracking algorithm module finishes processing, it sends the real-time image information and tracking information to an external VGA image display via the video input / output logic module to show the real-time tracking results.
[0224] like Figure 3 As shown, the tracking algorithm's flow is as follows: It begins with target detection, then calculates the centroid of the search window, moves the search window to the centroid position, outputs the centroid coordinates, checks if the number of coordinates is less than n. If yes, it returns to target detection and re-outputs the centroid coordinates; otherwise, it performs trajectory prediction to obtain the HSV image and initializes the search window. Then, it calculates the color probability distribution map of the target's H component, outputs the centroid coordinates, performs trajectory prediction again to obtain the next frame image, sets the size and position of the search window, and returns to calculate the search window centroid, iterating in a loop.
[0225] Specifically, the rapid development of integrated circuits has led to the acceptance of using hardware processors for image processing. Hardware processors, with their high processing speed, parallel computing capabilities, and high integration, represent the future trend for visual target tracking processors. Currently, common hardware processors on the market include integrated image processing chips, field-programmable gate arrays (FPGAs), and digital signal processors (DSPs). While integrated image processing chips are highly specialized, they are expensive and have poor versatility and portability. DSP processors, while offering powerful processing speeds and capable of handling complex tracking algorithms, suffer from poor reconfigurability due to their underlying architecture, hindering widespread design. In contrast, FPGAs offer advantages such as reconfigurability, parallel processing, small size, low power consumption, and pipelined operation, making them suitable for implementing image processing algorithms on hardware platforms and enhancing algorithm performance. Furthermore, FPGAs have good compatibility, adapting to various working scenarios, resulting in systems with low cost, low power consumption, high flexibility, small size, and good compatibility. Therefore, this invention provides an FPGA-based Kalman filter visual tracking method and system.
[0226] To further improve the robustness of the CamShift algorithm in complex backgrounds and scenarios with motion uncertainty, this invention employs a dynamic region prediction mechanism based on multi-frame historical trajectories. Starting with the current frame, it traces the target's motion path back several frames, calculates its direction of motion and velocity change trends, forming a prediction window. A weighted average filtering algorithm is then used to correct the prediction center. This window serves as an auxiliary search region in subsequent frames, jointly constraining the initial search window position of CamShift with the Kalman prediction results, thereby increasing the target capture probability in complex dynamic environments. This strategy effectively addresses issues such as rapid target movement, abrupt changes, and re-identification after occlusion, enhancing the system's stability and robustness.
[0227] This invention is used for real-time monitoring of targets, providing services for various practical applications such as workshop production lines, drone systems, traffic monitoring systems, and autonomous vehicles. It solves the problems of high system power consumption, high hardware costs, and poor real-time performance caused by traditional visual tracking systems that rely on von Neumann processors.
[0228] This invention centers on a fusion target tracking algorithm that integrates the Kalman filter algorithm and an improved CamShift tracking algorithm. During target tracking, the interval between adjacent image frames is very short, and the target's motion during this period can be considered uniform, conforming to the application assumptions of the Kalman filter algorithm. Considering the characteristics of both the Kalman filter and CamShift tracking algorithms, this invention employs a fusion target tracking algorithm (hereinafter referred to as the fusion algorithm) to improve tracking performance. This algorithm first uses the target position information of the current frame obtained by the CamShift target tracking algorithm, then uses this position information to predict the possible position of the target in the next frame image using the Kalman filter algorithm, and feeds this position back to the CamShift tracking algorithm as the starting position of the search window for the next frame image in the CamShift target tracking algorithm.
[0229] In a fusion algorithm tracking system, the output value of the CamShift target tracking algorithm module is the target's observed position information, including the horizontal and vertical coordinates, while the Kalman filter algorithm outputs the measured value Z. k Since it's in matrix form, matrix inversion is required, which consumes significant computational resources on the FPGA hardware platform. Therefore, optimization is necessary. Two identical Kalman filters are used: one to predict the target's x-coordinate and the other to predict its y-coordinate. Combining these filters reduces the difficulty of implementing the prediction algorithm on the FPGA platform while maintaining computational accuracy.
[0230] like Figure 2 As shown in the diagram, the external circuit design of the overall system framework includes: an image sensor, an image display, and DDR3 memory; the internal logic design includes: an FPGA, a tracking algorithm module, a video input / output logic module, an internal bus, and a memory controller module.
[0231] First, an external image sensor, such as a camera, acquires image information and transmits it to the internal video input / output logic module for buffering. Next, the video input / output logic module, via an internal bus (typically an AXI or AHB bus), accesses the storage controller module and tracking algorithm module. The storage controller module buffers the image information and color probability distribution map into external DDR3 memory. Then, the tracking algorithm module calls the AXIDMAIP core to read the image frame information and color probability distribution map from the DDR3 memory through the storage controller module, and processes the data in the Kalman filter module and the improved CamShift target tracking algorithm module. Finally, after processing by the tracking algorithm module, the real-time image information and the final tracking result are again transmitted via the video input / output logic module to an external VGA graphics display for display of the real-time image and tracking results.
[0232] In summary, this invention enables dynamic region prediction based on multi-frame target historical trajectories. Instead of directly using the standard Kalman filter algorithm, this invention introduces a Lagrange interpolation method based on multi-frame target historical trajectories. Using the current frame as a reference, the position coordinates of several previous frames (e.g., 3 frames) are traced back, and a one-dimensional interpolation polynomial is constructed to predict the target's position at the next moment. This interpolation model has stronger nonlinear fitting capabilities and is suitable for scenarios where the target exhibits non-uniform motion trends such as acceleration or curvilinear movements. It effectively improves the tracking performance of the CamShift algorithm for high-speed or nonlinear targets, simplifies state modeling and covariance calculation, and has advantages such as low computational cost and high real-time performance, making it suitable for resource-constrained platforms.
[0233] In summary, by utilizing the above-mentioned technical solution of this invention, the present invention constructs a one-dimensional interpolation polynomial using the Lagrange interpolation method, which can predict the position of the tracked target at the next moment. This Lagrange interpolation method has stronger nonlinear fitting capabilities and is suitable for scenarios where the tracked target has non-uniform motion trends such as acceleration or curvilinearity. It can effectively improve the tracking performance of the continuous adaptive mean drift algorithm for high-speed or nonlinear targets. By improving the continuous adaptive mean drift algorithm, this invention can achieve tracking robustness in complex backgrounds and motion uncertainty scenarios, thereby improving the target acquisition probability in complex dynamic environments. It effectively solves the problems of rapid movement, sudden changes, and re-identification after occlusion of the tracked target, enhancing the stability and robustness of tracking.
[0234] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A target tracking method based on an improved CamShift algorithm, characterized in that, The method includes the following steps: S1. Acquire image data and preprocess the image data to obtain preprocessed image data. Use a target detection algorithm to detect targets in the preprocessed image data to obtain the tracking target. S2. The historical trajectory of the tracked target is traced, and a trajectory prediction window is generated based on the traced historical trajectory using the Lagrange interpolation method. The trajectory prediction window is then corrected using the Kalman filter algorithm to obtain the corrected trajectory prediction window. S3. Improve the continuous adaptive mean drift algorithm by dynamically adjusting the search window strategy to obtain the improved continuous adaptive mean drift algorithm. Then, based on the modified trajectory prediction window, use the improved continuous adaptive mean drift algorithm to track the target and obtain the tracking result. S3 includes: S31. Generate an adaptive adjustment strategy for the search window using adaptive coefficients, and divide the problem based on the preset tracking problem. Generate an optimized adjustment strategy for the search window based on the problem division results. S32. Integrate the adaptive adjustment strategy and the optimized adjustment strategy of the search window to obtain the dynamic adjustment strategy of the search window. S33. Based on the dynamic adjustment strategy of the search window, the continuous adaptive mean drift algorithm is improved to obtain the improved continuous adaptive mean drift algorithm. The improved continuous adaptive mean drift algorithm is used to track the target according to the modified trajectory prediction window to obtain the tracking result.
2. The target tracking method based on the improved CamShift algorithm according to claim 1, characterized in that, The process involves acquiring image data, preprocessing the image data to obtain preprocessed image data, and then using a target detection algorithm to detect targets in the preprocessed image data to obtain the tracked targets, including: S11. Acquire image data, and perform scaling and normalization on the image data to obtain preprocessed image data; S12. Train the target detection algorithm based on the pre-acquired image data to obtain the target detection model; S13. Use the target detection model to detect targets in the preprocessed image data to obtain the tracking target.
3. The target tracking method based on the improved CamShift algorithm according to claim 1, characterized in that, The process involves tracing the historical trajectory of the tracked target, generating a trajectory prediction window using Lagrange interpolation based on the traced historical trajectory, and then refining the trajectory prediction window using a Kalman filter algorithm. The refined trajectory prediction window includes: S21. Track the historical trajectory of the target and construct a one-dimensional interpolation polynomial based on the tracked historical trajectory using the Lagrange interpolation method. S22. Use a one-dimensional interpolation polynomial to predict the trajectory position and generate a trajectory prediction window based on the trajectory position prediction result. S23. The trajectory prediction window is corrected by combining the Kalman filter algorithm with the tracking target to obtain the corrected trajectory prediction window.
4. The target tracking method based on the improved CamShift algorithm according to claim 3, characterized in that, The process of tracing the historical trajectory of the tracked target and constructing a one-dimensional interpolation polynomial using the Lagrange interpolation method based on the traced historical trajectory includes: S211. Perform historical trajectory tracing on the tracked target and obtain the center coordinate set of the target trajectory based on the tracing historical trajectory; S212. Set the timestamp based on the center coordinate set, and divide the center coordinate set into horizontal and vertical coordinate sets to obtain the horizontal coordinate set and the vertical coordinate set. S213. Using the Lagrange interpolation method combined with the timestamp setting result, construct a one-dimensional interpolation polynomial for the x-axis set and the y-axis set to obtain the Lagrange interpolation polynomial for the x-axis and the Lagrange interpolation polynomial for the y-axis.
5. The target tracking method based on the improved CamShift algorithm according to claim 3, characterized in that, The process of correcting the trajectory prediction window using the Kalman filter algorithm yields the following corrected trajectory prediction window: S231. Based on the Kalman filter algorithm combined with the tracking target, position prediction is performed to obtain the predicted position, and the prior error covariance matrix of the predicted position is calculated. S232. Using the trajectory prediction window as the actual observation value, calculate the residual between the actual observation value and the predicted position, and use the prior error covariance matrix combined with the preset observation noise to calculate the Kalman gain, and generate the update weight of each point in the prediction window based on the Kalman gain. S233. By adjusting the update weight of each point and the residual, the trajectory prediction window of each trajectory point in the prediction window is obtained.
6. The target tracking method based on the improved CamShift algorithm according to claim 1, characterized in that, The process of generating an adaptive adjustment strategy for the search window using adaptive coefficients, and dividing the search window into sub-problems based on a preset tracking problem, and generating an optimization adjustment strategy for the search window based on the sub-problem division results, includes: S311. Calculate the size ratio of the tracked target, and use the adaptive coefficients combined with the size ratio and the zero-order moment to generate a dynamic update algorithm for the search window. Generate an adaptive adjustment strategy for the search window based on the dynamic update algorithm for the search window. S312. Based on preset tracking issues, classify the issues and generate issue judgment thresholds based on the issue classification results; S313. Based on the problem judgment threshold and the preset optimization and adjustment rules, generate a search window optimization and adjustment strategy.
7. The target tracking method based on the improved CamShift algorithm according to claim 6, characterized in that, The problem classification results include: tracking target fast movement problem, tracking target search window occlusion problem, and tracking target search window background recognition problem; The threshold for determining the generated problem includes: A threshold for determining the problem of rapid movement of the tracked target is generated based on the distance of movement between adjacent image frames of the tracked target. The ratio of the area of the initial frame window of the tracking target to the area of the search window is used as the occlusion coefficient. Based on the magnitude of the occlusion coefficient, the judgment thresholds for the tracking target search window occlusion problem and the judgment thresholds for the tracking target search window background recognition problem are generated.
8. The target tracking method based on the improved CamShift algorithm according to claim 7, characterized in that, The preset optimization and adjustment rules include: When the problem is determined to be a fast-moving target, the search window for the next frame of the target image is expanded according to a preset expansion value; When the problem is determined to be an occlusion problem of the target tracking search window, the centroid coordinates obtained by the continuous adaptive mean drift algorithm are used as the centroid coordinates of the search window, and the size of the initial target tracking search window is used as the size of the search window for iterative calculation. When the problem is identified as the background recognition problem of the target search window, the search window is constructed using the trajectory prediction window, and the target is located by combining the color probability map and the continuous adaptive mean drift algorithm.
9. A target tracking method based on an improved CamShift algorithm according to claim 1, characterized in that, The continuous adaptive mean drift algorithm is improved based on a search window dynamic adjustment strategy, resulting in an improved continuous adaptive mean drift algorithm. The improved algorithm is then used to track the target based on a modified trajectory prediction window, yielding tracking results including: S331. An improved continuous adaptive mean drift algorithm is obtained by improving the search window dynamic adjustment strategy. S331. Initialize the search window size using the improved continuous adaptive mean drift algorithm to obtain the initial search window. Extract the tracking target component based on the initial search window and the corrected trajectory prediction window, and calculate the color probability distribution map of the tracking target component. S331. Output the centroid coordinates through the color probability distribution map, and perform trajectory tracking based on the centroid coordinates to obtain the tracking result.
Citation Information
Patent Citations
Line-of-sight shielding scene target position prediction method for vulnerable road users
CN117901853A
Automatic order supplementing method for abnormal parking order based on Lagrange interpolation
CN118968812A