Tiny multi-target tracking method based on dual trajectory storage and adaptive threshold

By employing an adaptive correlation threshold and a dual trajectory storage structure, the problems of trajectory breakage and data integrity in tracking small targets in underwater sonar images are solved, achieving efficient and accurate target tracking results.

CN121639744APending Publication Date: 2026-03-10GUANGDONG OCEAN UNIVERSITY
View PDF 6 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-02-04
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing methods for tracking micro-targets in underwater sonar images suffer from frequent trajectory breakages due to the inability of fixed association thresholds to adapt to different frame sampling rates, and single trajectory storage makes it difficult to balance association calculation efficiency and trajectory integrity.

Method used

An adaptive association threshold mechanism and a dual trajectory storage structure are adopted to dynamically adjust the association distance threshold. The real-time trajectory retains only the last valid centroid for fast association calculation, while the complete trajectory retains all centroid information. A balance between efficiency and integrity is achieved through a synchronous update mechanism.

Benefits of technology

It significantly improves trajectory integrity and correlation accuracy, reduces trajectory breakage rate, enhances real-time performance, and achieves a balance between efficient real-time correlation and data integrity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121639744A_ABST
    Figure CN121639744A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computer vision and image processing, in particular to a tiny multi-target tracking method based on dual trajectory storage and an adaptive threshold, which comprises the following steps of: S1, carrying out background modeling by adopting a Gaussian mixture model, and extracting foreground pixels to generate a binary image; s2, morphological processing and connected region analysis are carried out on the data, and a centroid set meeting an area threshold value is extracted; s3, establishing a dual-track structure, calculating an Euclidean distance, and performing centroid association or new track creation according to an adaptive threshold value; s4, filtering tracks with insufficient lengths to obtain an effective track set; and S5, visualizing the effective track, marking starting and ending points, and distinguishing colors to display a target motion path. According to the method, the contradiction problem between the correlation calculation efficiency and the trajectory integrity is solved through a dual trajectory storage mechanism, the correlation distance is dynamically adjusted according to the frame sampling rate, the trajectory disconnection problem is effectively solved, and the trajectory integrity, the recognition accuracy and the practicability of subsequent analysis are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of computer vision and image processing technology, and in particular to a method for tracking tiny multi-target objects based on dual trajectory storage and adaptive threshold. Background Technology

[0002] In applications such as multi-target video monitoring and behavior analysis of underwater sonar images, continuous tracking of micro- and small targets has always been an important research direction in the field of computer vision. Due to the high acquisition cost, low efficiency, and limited datasets of underwater sonar images, and the small pixel area and indistinct texture features of micro- and small targets in images, they are easily affected by noise in low-contrast backgrounds, leading to problems such as low image resolution, speckle noise, blurred contours, and degraded motion features. Therefore, motion trajectory modeling methods have become the mainstream approach for small target tracking. However, existing methods face two core problems: first, fixed association thresholds cannot adapt to different frame sampling rates, resulting in frequent trajectory breaks; second, single trajectory storage struggles to balance association calculation efficiency and trajectory integrity.

[0003] Existing methods suffer from the following problems when processing micro-targets in underwater sonar images: First, the fixed association threshold problem: Existing methods typically use a fixed distance threshold for centroid association. When the video frame sampling rate changes, the fixed threshold cannot adapt to the maximum displacement changes at different frame intervals, leading to frequent trajectory breaks. Second, the trajectory storage contradiction: Existing methods only maintain single trajectory information. If only the last centroid is retained for fast association calculation, historical trajectory information is lost, compromising data integrity. If all centroid information is retained to ensure integrity, the association calculation time overhead increases, impacting real-time performance, making it difficult to strike a balance between efficiency and integrity. Furthermore, due to fluctuations in detection accuracy, micro-targets are prone to inter-frame loss, resulting in discontinuous trajectories. Summary of the Invention

[0004] This invention provides a method for tracking small multi-target targets based on dual trajectory storage and adaptive thresholding. Addressing the problem of frequent trajectory breakage due to fixed association thresholds in existing methods failing to adapt to different frame sampling rates, an adaptive association threshold mechanism is employed. This mechanism dynamically adjusts the association distance threshold based on the frame sampling interval, effectively resolving the trajectory breakage issue. To address the trade-off between association calculation efficiency and trajectory integrity in existing methods, a dual trajectory storage structure is established: the real-time trajectory retains only the last valid centroid for rapid association calculation, while the complete trajectory retains all centroid information (including NaN placeholders) to ensure data integrity. A synchronous update mechanism achieves a balance between efficiency and integrity. Through this dual trajectory storage mechanism and adaptive thresholding mechanism, combined with foreground extraction, morphological processing, connected component analysis, and trajectory filtering, robust tracking of small underwater multi-target targets is achieved, significantly improving trajectory integrity, association accuracy, and real-time performance.

[0005] A method for tracking small multi-target objects based on dual trajectory storage and adaptive thresholding includes the following steps: S1. A Gaussian mixture model is used to model the background of the input image. Foreground pixels are extracted based on the matching relationship between pixels and the background model to generate a binary foreground image. S2, perform opening, closing and hole filling operations on the binary foreground image to obtain the final foreground image, perform connected region analysis on it, calculate the area and centroid coordinates of each foreground region, retain the foreground regions whose area is not less than the set minimum area threshold, and extract the corresponding centroid set. S3. Establish a dual trajectory storage structure for each target, including real-time trajectory and complete trajectory. Calculate the Euclidean distance between the current centroid and the last centroid of each trajectory, and calculate the adaptive association threshold to complete centroid association or new trajectory creation. If no associated centroid is detected in the current frame, add missing values ​​to the real-time trajectory and complete trajectory respectively. S4. Filter the complete trajectory by length threshold, count the number of valid centroids for each complete trajectory, and retain only the trajectories with a valid length not less than the minimum length threshold to obtain the set of valid complete trajectories. S5 visualizes the complete set of valid trajectories, marks the start and end points and assigns colors, and is used to observe the target's movement path and tracking effect.

[0006] Optionally, S1 includes: S11, for Current pixel at time step Its probability density function is defined as: In the formula: For the first Each Gaussian component in The weight of time, satisfying ; It is the mean vector; Let covariance matrix be the variance matrix. Standard deviation, It is an identity matrix.

[0007] S12, pixels The probability density function of a single Gaussian component is: ;in The data dimension determines the function. Mathematical structure: for dimensional vector, for Matrix. In this study, data dimensions After the model parameters are initialized, the Gaussian component suitable for the pixel is determined through parameter updates.

[0008] S13, Background model selection adopts stability index The background component set is defined as: ;in T Select a threshold for the background. For the current pixel. X t If it matches B set If any component in the image is not identified, it is classified as a background pixel; otherwise, it is classified as a foreground pixel, resulting in a foreground binary image. ,in Represents the foreground pixel. This represents the background pixels. With all parameters remaining relatively stable, the classification of foreground and background pixels is completed, and the statistical distribution of each pixel is estimated through online updates.

[0009] Optionally, S2 includes: S21, for the foreground binary image Perform morphological processing, including opening, closing, and hole filling, to generate the final foreground binary image. ; S22, Final Foreground Image Connectivity components are labeled using the 4-connectivity or 8-connectivity criteria to obtain... A set of independent connected components For each connected region Calculate its area and centroid coordinates ; S23, Set minimum area threshold , retain satisfaction Connected regions This constitutes a set of effective connected regions. And extract the corresponding set of valid centroids. .

[0010] Optionally, S21 includes: S211, for the input foreground binary image Perform the opening operation, using a size of rectangular structural elements Remove noise and small protrusions from the image to obtain the intermediate image after the opening operation. ; S212, the intermediate image after the opening operation. Perform the closing operation, using a size of rectangular structural elements Fill in small depressions and smooth target edges to obtain the image after the closing operation. ; S213, the image after the closing operation A hole-filling operation is performed using iterative dilation and image inversion intersection to fill the holes inside the target area, resulting in the final foreground image. .

[0011] Optionally, S3 includes: S31 establishes a dual trajectory storage structure for each target, including real-time trajectory. and complete trajectory ,in For trajectory indexing, Indexing for time frames; real-time trajectory Only the last valid centroid is retained for fast correlation calculation, complete trajectory Retain all centroid information (including NaN placeholders) to ensure data integrity; S32, for the centroid detected in the current frame Calculate its relationship with each existing trajectory The last effective centroid Euclidean distance Based on adaptive association threshold (in Based on the threshold, Determine the current centroid (within the frame sampling interval). Is it related to the trajectory? Related; if If so, the association is considered successful; S33, when the center of mass Successfully linked to the trajectory At that time, the newly detected centroid Synchronized updates to both real-time and complete tracks: , When all At that time, a new trajectory is created for the current centroid: , and update the total number of trajectories. = If the current frame has no associated centroid, then set... =NaN, add missing value placeholders to both the real-time trajectory and the complete trajectory to maintain time synchronization; Optionally, S31 includes: S311, establish a dual trajectory storage structure for each detected target and assign trajectory indexes. Including real-time trajectory and complete trajectory ,in t Indexing for time frames; real-time trajectory Only the last valid centroid is retained for fast correlation calculation, complete trajectory All centroid information (including NaN placeholders) is preserved to ensure data integrity; when a target is detected for the first time, its centroid coordinates in the current frame are written as initial values ​​into the real-time trajectory and the complete trajectory, and a trajectory index is assigned. S312, in each time frame In this process, all established target trajectories are stored and managed, specifically including: Real-time trajectory Only record the trajectory In the previous frame The final centroid coordinates in the data; Complete trajectory Updated sequentially according to time frames, recording the trajectory. In each frame, if no matching target is detected in a certain frame, a missing value is written at the corresponding position in that frame to maintain the continuity of the trajectory structure on the time axis.

[0012] Optionally, S32 includes: S321, for each centroid detected in the current frame Calculate its relationship with all established trajectories. The final center of mass Euclidean distance between ; S322, based on the basic correlation distance threshold set during trajectory processing. Sampling interval with the current frame Calculate the adaptive correlation threshold ; S323, if the current centroid With trajectory satisfy Then it is considered that the centroid and the trajectory If the connection is successful, the centroid will be considered an unconnected target and the new trajectory creation process will begin.

[0013] Optionally, S4 includes: S41, for the complete trajectory set Each complete trajectory Extract its effective centroids to form a set. ,in The total number of trajectories is represented by NaN, which is a placeholder for missing values ​​added when no valid target is detected in the frame. S42, count the number of valid centroids in each complete trajectory, and use this as the effective length of the complete trajectory. ; S43, Set minimum length threshold Retain all that meet the requirements The complete trajectory is obtained, resulting in a filtered set of valid complete trajectories. .

[0014] Optionally, S5 includes: S51, for the filtered set of valid complete trajectories Each trajectory is assigned a unique color code for visual differentiation, and a green dot is drawn at the starting centroid of each complete trajectory, and a red square is drawn at the ending centroid to clearly indicate the start and end positions of the target's motion. S52, based on the temporal centroid coordinate sequence of each complete trajectory, draws the target motion path image, and overlays all complete trajectories to form a trajectory visualization map, intuitively showing the target's motion trajectory shape, direction change, displacement range and aggregation distribution.

[0015] The beneficial effects of this invention are: This invention employs an adaptive association threshold mechanism, dynamically adjusting the association distance threshold based on the frame sampling interval. This effectively solves the problem of frequent trajectory breakage caused by a fixed threshold failing to adapt to different frame sampling rates. Experimental results show that this method reduces the trajectory breakage rate to 0.9% and increases the association accuracy to 96.19% (compared to 45.56% for the fixed threshold method), significantly improving trajectory integrity and association accuracy.

[0016] This invention establishes a dual trajectory storage structure. For real-time trajectories, only the last valid centroid is retained for rapid correlation calculation, while the complete trajectory retains all centroid information to ensure data integrity. This effectively resolves the contradiction between correlation calculation efficiency and trajectory integrity. Experimental results show that, while ensuring 100% trajectory integrity, the average correlation time is only 0.255 ms / frame, far below the real-time target threshold of 1.0 ms / frame, achieving a balance between efficient real-time correlation and data integrity.

[0017] This invention, by visualizing a set of effective trajectories, marking the start and end points of the trajectories and encoding their colors, not only helps to intuitively display the motion paths, directional changes, and spatial distribution characteristics of multiple targets, but can also be used for underwater tracking algorithm performance verification and target behavior pattern analysis. It provides high-quality data support for tasks such as multi-target behavior modeling and clustering recognition in applications such as underwater sonar image multi-target motion trajectory detection and tracking in marine ecological monitoring, fishery resource assessment, and autonomous navigation of underwater robots. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only for this invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a schematic diagram of the tracking method according to an embodiment of the present invention; Figure 2 Schematic diagram of an underwater target sonar measurement experimental platform; Figure 3 Sonar images of the target to be tested in the experiment; Figure 4 Diagram showing the foreground modeling and processing, and the three-step morphological post-processing; Figure 5 Image showing the results of the Blob detection; Figure 6 This is a Blob area statistics chart (the red dashed line represents the minimum area threshold). Figure 7 The graph shows the performance analysis of the target association algorithm. Detailed Implementation

[0020] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. Those skilled in the art may employ other alternative methods to implement some well-known technologies; moreover, the accompanying drawings are only for more specific description of the embodiments and are not intended to specifically limit the present invention.

[0021] like Figure 1-7 As shown, a method for tracking small multi-target objects based on dual trajectory storage and adaptive thresholding includes the following steps: S1. A Gaussian mixture model is used to model the background of the input image. Foreground pixels are extracted based on the matching relationship between pixels and the background model to generate a binary foreground image. S2, perform opening, closing and hole filling operations on the binary foreground image to obtain the final foreground image, perform connected component analysis on it, calculate the area and centroid coordinates of each foreground region, retain the foreground regions whose area is not less than the set minimum area threshold, and extract the corresponding centroid set. S3. Establish a dual trajectory storage structure for each target, including real-time trajectory and complete trajectory. Calculate the Euclidean distance between the current centroid and the last centroid of each trajectory, and calculate the adaptive association threshold to complete centroid association or new trajectory creation. If no associated centroid is detected in the current frame, add missing values ​​to the real-time trajectory and complete trajectory respectively. S4. Filter the complete trajectory by length threshold, count the number of valid centroids for each complete trajectory, and retain only the trajectories with a valid length not less than the minimum length threshold to obtain the set of valid complete trajectories. S5 visualizes the complete set of valid trajectories, marks the start and end points and assigns colors, and is used to observe the target's movement path and tracking effect.

[0022] S1 includes: S11, for Current pixel at time step Its probability density function is defined as: In the formula: For the first Each Gaussian component in The weight of time, satisfying ; It is the mean vector; Let covariance matrix be the variance matrix. Standard deviation, It is an identity matrix.

[0023] S12, pixels The probability density function of a single Gaussian component is: ;in The data dimension determines the function. Mathematical structure: for dimensional vector, for Matrix. In this study, data dimensions After the model parameters are initialized, the Gaussian component suitable for the pixel is determined through parameter updates.

[0024] S13, Background model selection adopts stability index The background component set is defined as: ;in T Select a threshold for the background. For the current pixel. X t If it matches B set If any component in the image is not identified, it is classified as a background pixel; otherwise, it is classified as a foreground pixel, resulting in a foreground binary image. ,in Represents the foreground pixel. This represents the background pixels. With all parameters remaining relatively stable, the classification of foreground and background pixels is completed, and the statistical distribution of each pixel is estimated through online updates.

[0025] S2 includes: S21, for the foreground binary image Perform morphological processing, including opening, closing, and hole filling, to generate the final foreground binary image. ; S22, Final Foreground Image Connectivity components are labeled using the 4-connectivity or 8-connectivity criteria to obtain... A set of independent connected components For each connected region Calculate its area and centroid coordinates ; ; ; in, For the first The total number of pixels in each connected region Connected region Pixel coordinates in; S23, Set minimum area threshold , retain satisfaction Connected regions This constitutes a set of effective connected regions. And extract the corresponding set of valid centroids. .

[0026] S21 includes: S211, for the input foreground binary image Perform an opening operation (erosion followed by dilation) using a size of rectangular structural elements Remove noise and small protrusions from the image to obtain the intermediate image after the opening operation. , is represented as: ; in, For morphological erosion operations, For morphological dilation operations; S212, the intermediate image after the opening operation. Perform the closing operation (dilation followed by erosion), using a size of rectangular structural elements Fill in small depressions and smooth target edges to obtain the image after the closing operation. , is represented as: ; S213, the image after the closing operation ,Right now Perform the hole filling operation. for The supplement, for The iterative process for filling holes in a rectangular structural element is as follows:

[0027] In the formula: As the initial seed image, For the first The binary image after the next iteration. This iterative process expands the filled region through dilation and combines it with the image complement. Find the intersection. Iterate until convergence. At this time from Extract all pixels with a value of 1; the regions formed by these pixel positions are the filled hole regions. Merge the filled hole regions with the morphologically filtered foreground binary image to obtain the final foreground image. .

[0028] S3 includes: S31 establishes a dual trajectory storage structure for each target, including real-time trajectory. and complete trajectory ,in For trajectory indexing, Indexing for time frames; real-time trajectory Only the last valid centroid is retained for fast correlation calculation, complete trajectory Retain all centroid information (including NaN placeholders) to ensure data integrity; S32, for the centroid detected in the current frame Calculate its relationship with each existing trajectory The last effective centroid Euclidean distance Based on adaptive association threshold (in Based on the threshold, Determine the current centroid (within the frame sampling interval). Is it related to the trajectory? Related; if If so, the association is considered successful; S33, when the center of mass With trajectory When the association is successful, the new detection centroid will be... Synchronously updated to real-time and complete tracks, when all When a new trajectory is created for the current centroid, if no associated centroid is detected in the current frame, then... NaN is used, and missing values ​​are added as placeholders to both the real-time trajectory and the complete trajectory to maintain the synchronization consistency of the trajectory on the time axis, as shown below: ; .

[0029] S31 includes: S311, for each detected target, establish a trajectory index. The identifier features a dual trajectory storage structure, including real-time trajectories. With complete trajectory When a target is detected for the first time, the centroid coordinates of the target in the current frame are written as initial values ​​into the real-time trajectory and the complete trajectory, and the trajectory index is assigned. S312, in each time frame In this process, all established target trajectories are stored and managed, specifically including: Real-time trajectory Only record the trajectory In the previous frame The final centroid coordinates in the data; Complete trajectory Updated sequentially according to time frames, recording the trajectory. In each frame, if no matching target is detected in a certain frame, a missing value is written at the corresponding position in that frame to maintain the continuity of the trajectory structure on the time axis.

[0030] S32 includes: S321, for each centroid detected in the current frame Calculate its relationship with all established trajectories. The final center of mass Euclidean distance between , is represented as: ; in, For trajectory The last centroid coordinates recorded in the previous time frame; S322, based on the basic correlation distance threshold set during trajectory processing. Sampling interval with the current frame Calculate the adaptive correlation threshold , is represented as: ; S323, if the current centroid With trajectory satisfy Then it is considered that the centroid and the trajectory If the connection is successful, the centroid will be considered an unconnected target and the new trajectory creation process will begin.

[0031] S4 includes: S41, for the complete trajectory set Each complete trajectory Extract its effective centroids to form a set. ,in The total number of trajectories is represented by NaN, which is a placeholder for missing values ​​added when no valid target is detected in the frame. S42, count the number of valid centroids in each complete trajectory, and use this as the effective length of the complete trajectory. , is represented as: ; in, for The number of elements in the middle; S43, Set minimum length threshold Retain all that meet the requirements The complete trajectory; S5 includes: S51. For each trajectory in the filtered valid complete trajectory, a unique color code is assigned for visual differentiation, and a green dot is drawn at the starting centroid position of each complete trajectory, and a red square is drawn at the ending centroid position to clearly indicate the starting and ending positions of the target's motion. S52, based on the temporal centroid coordinate sequence of each complete trajectory, draws the target motion path image, and overlays all complete trajectories to form a trajectory visualization map, intuitively showing the target's motion trajectory shape, direction change, displacement range and aggregation distribution.

[0032] This invention encompasses any substitutions, modifications, equivalent methods, and solutions made within the spirit and scope of this invention. To provide the public with a thorough understanding of this invention, specific details are described in detail in the following preferred embodiments; however, those skilled in the art will fully understand the invention even without these details. Furthermore, to avoid unnecessary misunderstanding of the essence of this invention, well-known methods, processes, procedures, components, and circuits are not described in detail.

[0033] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for micro multi-target tracking based on dual track storage and adaptive threshold, characterized in that, The method comprises the following steps: S1, background modeling is performed on an input image using a Gaussian mixture model, foreground pixels are extracted according to the matching relationship between the pixels and the background model, and a binary foreground image is generated; S2, open operation, close operation and hole filling processing are performed on the binary foreground image to obtain a final foreground image, connected region analysis is performed on the final foreground image, the area and the centroid coordinates of each foreground region are calculated, foreground regions with an area not less than a set minimum area threshold are retained, and a corresponding centroid set is extracted; S3, a double-track storage structure is established, wherein only the last valid centroid is retained in a real-time track for rapid correlation calculation, and all centroid information is retained in a complete track to ensure data integrity; the Euclidean distance between a newly detected centroid and an existing track is calculated, centroid correlation or new track creation is performed according to an adaptive threshold, and the real-time track and the complete track are updated synchronously; if there is no associated centroid in the current frame, NaN placeholders are added to the real-time track and the complete track; S4, length threshold filtering is performed on the complete track, the number of valid centroid points of each complete track is counted, only tracks with an effective length not less than a minimum length threshold are retained, and an effective complete track set is obtained; S5, the effective complete track set is visualized and displayed, start and end points are labeled, and colors are allocated, so as to observe the motion path and tracking effect of the target.

2. The method according to claim 1, wherein, The S1 comprises: S11, for the current pixel at time , whose probability density function is defined as: ; where: is the weight of the th Gaussian component at time , satisfying ; is the mean vector; is the covariance matrix, is the standard deviation, is the identity matrix; S12, pixel The probability density function of the single Gaussian component is ; where is the data dimension, which determines the mathematical structure of the function is a dimensional vector, is a dimensional matrix; the data dimension is determined by the parameter update after the model parameter initialization, which determines the Gaussian component suitable for the pixel;​ S13, Background model selection adopts stability index The background component set is defined as: ;in T Select a threshold for the background; for the current pixel X t If it matches B set If any component in the image is not identified, it is classified as a background pixel; otherwise, it is classified as a foreground pixel, resulting in a foreground binary image. ,in Indicates the foreground pixel. This represents the background pixels; when all parameters remain relatively stable, the classification of foreground and background pixels is completed, and the statistical distribution of each pixel is estimated through online updates.

3. The method of claim 2, wherein, The S2 comprises: S21, to the foreground binary image Perform morphological processing including open operation, close operation and hole filling to generate the final foreground binary image ; S22, to the final foreground image The connected region labeling is performed by using 4-connected or 8-connected rule to obtain a set composed of independent connected regions For each connected region , its area and the coordinates of its centroid are calculated ; S23, set a minimum area threshold , retain connected regions satisfying , form a set of valid connected regions , and extract a corresponding set of valid centroids .​ 4. The method of claim 3, wherein, The S21 comprises: S211, to the input foreground binary map Performing open operation, using a rectangular structure element with size of 3x3 , to remove noise and small protrusion regions in the image, obtaining the intermediate image after open operation ; S212, the intermediate image after the open operation Performing a close operation, using a rectangular structuring element of size , filling small concave and smoothing the target edge, obtaining the image after the close operation ;​ S213, on the image after the closing operation Hole filling operation is performed, using the method of iterative dilation and image inversion intersection, filling the holes inside the target region, and obtaining the final foreground image .

5. The method of claim 4, wherein, The S3 comprises: S31, establish dual trajectory storage structure for each target, including real-time trajectory and complete trajectory wherein is trajectory index, is time frame index; real-time trajectory only last valid centroid is kept for fast association computation, complete trajectory all centroid information is kept to ensure data integrity; S32, for the centroid detected in the current frame Calculate its relationship with each existing trajectory The last effective centroid Euclidean distance Based on adaptive association threshold ,in Based on the threshold, Determine the current centroid at the frame sampling interval. Is it related to the trajectory? Related; if If so, the association is considered successful; S33, when the centroid successfully associates to a trajectory , update the newly detected centroid to the live trajectory and the complete trajectory synchronously: , ; when all centroids are associated to trajectories, create a new trajectory for the current centroid: , and update the total number of trajectories = ; if there is no associated centroid for the current frame, set = NaN and add a missing value placeholder in the live trajectory and the complete trajectory respectively, keeping time synchronization.

6. The method of claim 5, wherein, The S31 comprises: S311, establishing a double track storage structure for each detected target, assigning a track index , including real-time track and complete track , wherein t is the time frame index; real-time track only retains the last valid centroid for fast association calculation, complete track retains all centroid information to ensure data integrity; when a target is first detected, its centroid coordinates in the current frame are written as initial values to the real-time track and the complete track, and a track index is assigned; S312, in each time frame management is performed on all established target trajectories, specifically including: Real-time trajectory Recorded trajectory only Last centroid coordinates in the previous frame ​ complete trajectory the trajectory is updated sequentially in time frame order, and recorded the coordinates of the centroid in each frame, if a matching target is not detected in a frame, a missing value is written in the corresponding position of the frame to maintain the continuity of the trajectory structure on the time axis.

7. The method according to claim 6, wherein, The S32 comprises: S321, for each of the mass centers detected in the current frame , calculate the Euclidean distance between it and the last mass center of all the established trajectories ; ; S322, according to the basic association distance threshold set in the trajectory processing process sampling interval of the current frame , calculate the adaptive association threshold ; S323, if the current centroid With trajectory satisfy Then it is considered that the centroid and the trajectory If the connection is successful, the centroid will be considered an unconnected target and the new trajectory creation process will begin.

8. The method according to claim 7, wherein, The S4 comprises: S41, for the complete trajectory set Each complete trajectory in Extract its effective centroids to form a set. ,in The total number of trajectories is represented by NaN, which is a placeholder for missing values ​​added when no valid target is detected in the frame. S42, count the number of valid centroid points in each complete trajectory as the valid length of the complete trajectory ; S43, set minimum length threshold , keep all complete trajectories that satisfy .

9. The method of claim 8, wherein, The S5 comprises: S51, for each track in the filtered effective complete track set, a unique color code is allocated for visual differentiation, a green dot marker is drawn at the starting centroid position of each complete track, and a red square marker is drawn at the terminal centroid position, so as to clearly indicate the motion start and end positions of the target; S52, based on the time sequence centroid coordinate sequence of each complete track, a target motion path image is drawn, and all complete tracks are superimposed to form a track visualization image, so as to intuitively display the motion track shape, direction change, displacement range and convergence distribution of the target.

Citation Information

Patent Citations

  • Satellite video multi-target tracking method and system based on space-time state propagation and progressive trajectory association

    CN120431128A

  • Multi-target tracking method based on long and short term trajectory association

    CN120747166A

  • Accurate identification method and system based on air dynamic target

    CN121010895A

  • Infrared image forest fire point early recognition method based on space-time analysis

    CN121170703A

  • Multi-target fish identification method and system based on deep learning

    CN121458972A