Motion track real-time analysis system fusing depth map and space-time attention mechanism
By integrating depth maps and spatiotemporal attention mechanisms into a real-time motion trajectory analysis system, the problems of insufficient spatial depth characterization of moving objects in complex backgrounds and weak inter-frame correlation in existing technologies have been solved, achieving high-precision and high-stability motion trajectory analysis.
Patent Information
- Application Number
- CN202511535628.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-27
- Publication Date
- 2026-02-13
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing motion analysis techniques are insufficient in characterizing the spatial depth and hierarchical information of moving objects in complex backgrounds, resulting in blurred target boundaries and recognition errors. Furthermore, traditional methods have weak correlation modeling between adjacent frames, and the changes in the temporal dimension fail to form an effective coupling with spatial features, leading to delayed response or trajectory breakage in rapidly changing scenes, and unstable prediction results.
The real-time motion trajectory analysis system integrates depth maps and spatiotemporal attention mechanisms. It obtains the spatial gradient and depth change rate of the target through the feature extraction module, assigns weights in combination with the spatiotemporal attention module, detects the motion trajectory data of the target between consecutive frames, and performs depth position correction and gradient feature fusion through the trajectory correction module to optimize the trajectory similarity and occlusion handling among multiple targets.
It improves the accuracy and robustness of motion trajectory analysis, enhances real-time performance and stability in complex dynamic scenarios, and ensures the adaptability and accuracy of moving target detection, tracking and prediction.
Smart Images

Figure CN121527129A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of motion analysis technology, in particular to a motion trajectory real-time analysis system fusing depth map and spatio-temporal attention mechanism. BACKGROUND
[0002] The field of motion analysis technology includes motion trajectory recognition and analysis based on visual and sensor data, focusing on how to realize the detection, tracking and prediction of moving objects through computer vision technology, sensor technology and image processing algorithms. The core content includes motion target detection, motion trajectory extraction, motion state analysis, etc., through real-time processing of video images or depth images, to realize accurate description of the dynamic changes of moving objects in space and time. Motion analysis is widely used in sports, security, autonomous driving, robots and other fields, and involves deep learning and spatio-temporal data modeling technologies to improve the accuracy and efficiency of motion detection and prediction.
[0003] Among them, the motion trajectory real-time analysis system fusing depth map and spatio-temporal attention mechanism refers to a system that combines depth map technology and spatio-temporal attention mechanism to analyze motion trajectory. For the problem of trajectory analysis of moving objects, depth map is used to reconstruct the objects in the scene in three dimensions to provide more accurate spatial information; at the same time, spatio-temporal attention mechanism is applied to focus on key moments and features in the motion process, further improving the analysis accuracy of motion trajectory. By integrating these two technologies, real-time tracking and prediction of moving objects in different scenes can be achieved, providing a new solution for motion analysis in dynamic scenes.
[0004] Existing motion analysis techniques rely on two-dimensional image features or single sensor data, which are insufficient in describing the spatial depth and hierarchical information of moving objects, leading to boundary blurring and recognition errors in complex backgrounds. Traditional methods are weak in modeling the correlation between adjacent frames, and the changes in the time dimension are not effectively coupled with spatial features, resulting in delayed response or trajectory breakage of motion trajectory in rapidly changing scenes. When the moving object is occluded, rotated or has large speed changes, the algorithm is not stable enough in judging the true motion direction and speed, and the prediction result often shows drifting or jitter phenomenon. Due to the failure to fully utilize the inter-frame difference features, the existing methods have a high proportion of non-key frame information in the detection process, increasing the calculation redundancy and recognition error rate. In multi-target or complex lighting scenes, the existing technology processes depth information and time sequence features independently and dispersedly, making it difficult to achieve accurate spatial correction and trajectory continuity maintenance, which significantly limits the real-time performance and reliability of motion analysis. SUMMARY
[0005] In order to solve the technical problems existing in the prior art, the embodiment of the present application provides a motion trajectory real-time analysis system fusing a depth map and a space-time attention mechanism. The technical solution is as follows: In one aspect, a motion trajectory real-time analysis system fusing a depth map and a space-time attention mechanism is provided, which comprises: A feature extraction module acquires the spatial gradient of a target through a depth map and calculates the gradient amplitude, the gradient direction and the depth change rate, extracts the boundary intensity feature through a Sobel operator and screens the boundary intensity feature in combination with the gradient direction, generates a spatial boundary feature set and transmits it to a space-time attention module; The space-time attention module acquires the position change and the motion speed of a target to be detected in adjacent time frames based on the spatial boundary feature set, allocates the spatial and time attention weights through a space-time attention mechanism, generates a space-time attention distribution set and transmits it to a trajectory detection module; The trajectory detection module detects the motion trajectory data of a target between continuous frames based on the space-time attention distribution set, analyzes the motion direction difference and the speed difference of the target in adjacent frames, calculates the motion uncertainty of the target, generates a motion trajectory change result and transmits it to a trajectory correction module; The trajectory correction module corrects the depth position of the target according to the motion uncertainty based on the motion trajectory change result and the space-time attention distribution set, analyzes and fuses the change characteristics of the depth gradient and the attention weight, and generates a motion trajectory real-time analysis result; The multi-target optimization module calculates the trajectory similarity between multiple targets based on the motion trajectory real-time analysis result, screens the target trajectories exceeding the similarity threshold and aggregates them, simultaneously dynamically corrects and separates the trajectories that are occluded or intersected, and generates an optimized motion trajectory real-time analysis result.
[0006] As a further scheme of the present application, the spatial boundary feature set comprises a boundary intensity feature, a direction angle and a depth change rate, the space-time attention distribution set comprises a spatial weight mapping, a time weight mapping and a weight normalization coefficient, the motion trajectory change result comprises a direction difference value sequence, a speed difference value sequence and a trajectory uncertainty measure, the motion trajectory real-time analysis result comprises a coupling weight coefficient and a corrected trajectory coordinate, and the optimized motion trajectory real-time analysis result comprises a similar aggregation index, an occlusion separation label and a merged trajectory coordinate.
[0007] As a further scheme of the present application, the feature extraction module comprises: A gradient calculation sub-module acquires the depth value of each pixel of a target to be detected in a depth map, analyzes the spatial gradient components along the horizontal and vertical directions, calculates the gradient amplitude and the gradient direction angle of the pixel, compares the depth difference value of adjacent pixels to analyze the depth change rate, and generates a spatial gradient feature value set; The boundary strength sub-module calls gradient amplitude and direction based on the spatial gradient eigenvalue set, performs convolution calculation through a Sobel operator, extracts boundary response values of multiple pixel positions, filters out direction deviation points and merges boundary responses of the same direction, and generates a direction-matched boundary strength value set. The feature set construction sub-module aggregates the spatial distribution interval of boundary strength, calculates the intensity mean value and change amplitude in the local region, removes region points that do not reach the intensity threshold, and generates a spatial boundary feature set according to the direction-matched boundary strength value set.
[0008] As a further scheme of the application, the intensity threshold is set by detecting the boundary strength values of all pixels, calculating the average value and standard deviation, and selecting the sum of the average value and the standard deviation according to the boundary response distribution characteristics.
[0009] As a further scheme of the application, the spatio-temporal attention module includes: The motion estimation sub-module obtains the position change and motion speed of the target to be detected in the adjacent time frame based on the spatial boundary feature set, calculates the point-by-point displacement by calculating the pixel coordinate difference, analyzes the speed by dividing the time interval value between frames by the displacement distance, aggregates the displacement and speed according to the target identifier, and generates the target motion state quantity. The weight distribution sub-module calls the target motion state quantity, analyzes the weighted product of the boundary strength and the speed quantity in each spatial region as the spatial weight initial value, calculates the time weight initial value according to the speed difference and the displacement direction consistency between adjacent time frames, normalizes and merges the two types of weights, and obtains the spatio-temporal attention weight coefficient set. The attention distribution sub-module calculates the weight density for each pixel index and time stamp based on the spatio-temporal attention weight coefficient set, filters out the weight points according to the boundary strength threshold, accumulates and aggregates in the frame order, and generates the spatio-temporal attention distribution set. The boundary strength threshold is set by statistically setting the boundary strength value distribution in the spatial boundary feature set.
[0010] As a further scheme of the application, the trajectory detection module includes: The trajectory extraction sub-module reads the weight peak value and pixel coordinates and aggregates based on the spatio-temporal attention distribution set, calculates the weight center coordinates, analyzes the segment displacement length according to the adjacent frame time interval, matches the cross-frame corresponding relationship according to the nearest neighbor distance and weight proportion, removes the weight fragments, and generates the trajectory coordinate sequence. The uncertainty quantification sub-module calls the trajectory coordinate sequence, obtains the weight density, calculates the velocity scalar and direction vector of adjacent segments, analyzes the direction angle difference by dot product, takes the velocity scalar difference as the amplitude difference, normalizes the angle difference and the amplitude difference, and synthesizes the interval fluctuation quantity to obtain the motion uncertainty coefficient set. A change result submodule calculates an intra-segment position change rate in time sequence according to the trajectory coordinate sequence and the set of motion uncertainty coefficients, performs sliding accumulation, filters out abnormal confidence segments, aggregates change intervals, and outputs time start and end and change amplitude, and establishes a motion trajectory change result.
[0011] As a further scheme of the present application, the trajectory correction module comprises: A position correction submodule collects consecutive frame depth values based on the motion trajectory change result and the set of spatio-temporal attention distributions on the depth map according to a weight center, adjusts each frame depth deviation using a motion uncertainty coefficient, calculates a depth correction increment, and adds the depth correction increment to the sequence frame by frame to obtain a depth displacement compensation amount. A feature quantization submodule calls the depth displacement compensation amount, calculates an inter-frame depth difference and analyzes a gradient direction angle, analyzes a change rate of a weight density difference between adjacent frames, filters out abnormal change items, calculates a product mean of the gradient and the weight change in the same time period as the target, as a coupling degree, and generates a set of gradient weight coupling coefficients. A fusion output submodule calculates a weighted sum of each segment position correction value and coupling degree weight in time sequence according to the set of gradient weight coupling coefficients and the depth displacement compensation amount, calculates a direction consistency factor for adjacent segments and scales segment weight, and establishes a motion trajectory real-time analysis result.
[0012] As a further scheme of the present application, the multi-target optimization module comprises: A similarity calculation submodule extracts time sequence coordinates and depth values according to the motion trajectory real-time analysis result, combines target trajectory segments, calculates inter-segment position difference and velocity difference, analyzes trajectory similarity by weighting normalized position difference and velocity difference, and truncates abnormal values to generate a set of trajectory similarity coefficients. An aggregation filtering submodule merges groups according to the set of trajectory similarity coefficients, selects target pairs that exceed a similarity threshold, calculates a trajectory center and intra-group variance, and removes the upper bound segment of the variance to obtain a same-class aggregation table. An occlusion separation submodule calls the same-class aggregation table, detects occlusion and intersection time periods, extracts occlusion segment depth displacement difference and time overlap length, separates conflicting trajectories for overlapping segments, corrects the aggregation center according to the intra-segment offset average value, and rewrites the trajectory sequence to generate an optimized motion trajectory real-time analysis result.
[0013] As a further scheme of the present application, the similarity threshold is set by calculating the average similarity value of all target pairs in the time sequence, extracting the median and standard deviation of the distribution.
[0014] The technical scheme provided by the embodiment of the present application has at least the following beneficial effects: By extracting the spatial gradient of the target based on the depth map and calculating the gradient amplitude, direction and depth change rate, the three-dimensional contour and depth difference of the object can be accurately described at the spatial level, the saliency and hierarchy of the target boundary are enhanced, and the spatial structure information of the moving object is more fully expressed. The feature extraction method combining boundary strength and direction screening reduces background noise interference, highlights the boundary information of the real moving target, and improves the stability and accuracy of detection. In the time dimension, by analyzing the position and speed changes between adjacent frames, combined with the allocation of spatiotemporal attention weight, the model can focus on the key frames and mutation points of motion, reduce the interference of redundant information, and enhance the response ability to dynamic changes. Based on the attention distribution detection of motion direction difference and speed difference and the calculation of motion uncertainty, the trajectory inference is more in line with the real motion law, and the smoothness and continuity of trajectory prediction are improved. Through the correction of depth position and the re-fusion of gradient features, the spatial and temporal information is mutually compensated, which significantly improves the real-time analysis accuracy and robustness of the motion trajectory. The overall logic realizes the progressive processing from spatial structure feature extraction to spatiotemporal information fusion, so that the detection, tracking and prediction of the moving target have stronger adaptability and real-time performance, and can maintain high stability and high-precision trajectory analysis effect in complex dynamic scenes. BRIEF DESCRIPTION OF DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0016] Figure 1 is a schematic diagram of the system of the present application; Figure 2 is a schematic diagram of the system framework of the present application; Figure 3 is a flowchart of the feature extraction module in the present application; Figure 4 is a flowchart of the spatiotemporal attention module in the present application; Figure 5 is a flowchart of the trajectory detection module in the present application; Figure 6 is a flowchart of the trajectory correction module in the present application; Figure 7 is a flowchart of the multi-target optimization module in the present application. DETAILED DESCRIPTION
[0017] The technical solutions in the present application will be described below with reference to the drawings.
[0018] In the embodiments of the present application, the words such as "exemplary", "for example", etc. are used to represent an example, illustration, or description. Any embodiment or design scheme described as "exemplary" in the present application should not be interpreted as more preferred or more advantageous than other embodiments or design schemes. Rather, the word "exemplary" is intended to present the concept in a specific manner. In addition, in the embodiments of the present application, the meaning expressed by "and / or" can be both, or can be one of the two.
[0019] In the embodiments of the present application, "image" and "picture" can be used interchangeably at times, and it should be pointed out that when the distinction is not emphasized, the meanings expressed are consistent. "Of", "corresponding" and "corresponding" can be used interchangeably at times, and it should be pointed out that when the distinction is not emphasized, the meanings expressed are consistent.
[0020] In the embodiments of the present application, sometimes the subscript such as W1 can be written in the form of non-subscript such as W1, and when the distinction is not emphasized, the meanings expressed are consistent.
[0021] In order to make the technical problems, technical schemes and advantages to be solved by the present application more clear, the following will be described in detail in conjunction with the drawings and specific embodiments.
[0022] The embodiments of the present application provide a motion trajectory real-time analysis system fusing a depth map and a space-time attention mechanism, as shown in Figures 1-2 The motion trajectory real-time analysis system fusing a depth map and a space-time attention mechanism is a schematic diagram of the system, and the system comprises: A feature extraction module acquires the spatial gradient of a target through a depth map and calculates the gradient amplitude, gradient direction and depth change rate, extracts boundary intensity features through a Sobel operator and screens the boundary intensity features in combination with the gradient direction, generates a spatial boundary feature set and transmits the spatial boundary feature set to a space-time attention module; The space-time attention module acquires the position change and motion speed of a target to be detected of adjacent time frames based on the spatial boundary feature set, and allocates spatial and time attention weights through a space-time attention mechanism, generates a space-time attention distribution set and transmits the space-time attention distribution set to a trajectory detection module; The trajectory detection module detects the motion trajectory data of a target between consecutive frames based on the space-time attention distribution set, analyzes the motion direction difference and speed difference of the target in adjacent frames, calculates the motion uncertainty of the target, generates a motion trajectory change result and transmits the motion trajectory change result to a trajectory correction module; The trajectory correction module corrects the depth position of the target according to the motion uncertainty based on the motion trajectory change result and the space-time attention distribution set, analyzes and fuses the change characteristics of the depth gradient and the attention weight, and generates a motion trajectory real-time analysis result; The multi-objective optimization module calculates the trajectory similarity between multiple objectives based on the real-time analysis result of the motion trajectory, screens the objective trajectories exceeding the similarity threshold, and aggregates them, while dynamically correcting and separating the trajectories that are occluded or intersected, to generate the real-time analysis result of the optimized motion trajectory.
[0023] The spatial boundary feature set includes boundary intensity features, direction angles, and depth variation rates, the spatiotemporal attention distribution set includes spatial weight mappings, temporal weight mappings, and weight normalization coefficients, the motion trajectory variation result includes direction difference sequences, speed difference sequences, and trajectory uncertainty metrics, the real-time analysis result of the motion trajectory includes coupling weight coefficients and corrected trajectory coordinates, and the real-time analysis result of the optimized motion trajectory includes similarity aggregation indexes, occlusion separation labels, and merged trajectory coordinates.
[0024] Specifically, as shown in Figure 2 , 3 The feature extraction module includes: A gradient calculation submodule obtains the depth value of each pixel of the target to be detected in the depth map, analyzes the spatial gradient components along the horizontal and vertical directions, calculates the gradient amplitude and gradient direction angle of the pixel, and analyzes the depth variation rate by comparing the depth difference values of adjacent pixels to generate a set of spatial gradient feature values. In an application scenario for detecting microscopic scratches on the surface of a semiconductor wafer, the depth values of a specific pixel P(i, j) and its 3*3 neighborhood are processed from the depth map obtained by a high-precision depth camera. The depth value of the center pixel P(i, j) is 1.52 mm, and the depth values of the neighborhood pixels are distributed as follows: left upper 1.50, upper 1.51, right upper 1.51, left 1.48, right 1.56, left lower 1.47, lower 1.49, and right lower 1.55 mm. First, the spatial gradient components are analyzed along the horizontal direction by calculating the depth value difference between the center pixel and the pixels on the left and right sides. The depth value difference between the right side pixel and the left side pixel is 1.56-1.48=0.08 mm. Then, the spatial gradient components are analyzed along the vertical direction using the depth value difference between the lower pixel and the upper pixel, which is 1.49-1.51=-0.02. Next, the gradient amplitude and gradient direction angle of the pixel are calculated. The calculation process of the gradient amplitude is: The calculation process of the gradient direction angle is to take the inverse tangent of the ratio of the vertical gradient component -0.02 to the horizontal gradient component 0.08, resulting in a gradient direction angle of approximately -14.04 degrees. Meanwhile, the depth variation rate is analyzed by comparing the depth difference values of adjacent pixels. This process calculates the depth difference between the center pixel and the eight adjacent pixels, such as the depth difference between the center pixel and the lower left pixel: A set of spatial gradient feature values is generated for the pixel P(i, j), including the calculated horizontal and vertical gradient components, gradient amplitude, gradient direction angle, and eight directional depth difference values.
[0025] The boundary strength sub-module, based on the spatial gradient feature value set, calls the gradient amplitude and direction, performs convolution calculation through the Sobel operator, extracts the boundary response value of multiple pixel positions, filters out the direction deviation points and merges the boundary response of the same direction to generate a set of direction matching boundary strength values; Based on the generated spatial gradient feature value set, the gradient amplitude and gradient direction data are called. The boundary response value of multiple pixel positions is extracted by performing a convolution calculation based on the Sobel operator. This calculation process is not directly calling the existing algorithm, but is realized through specific weighted summation operation. For a 3x3 neighborhood gradient amplitude matrix with pixel point P(i, j) as the center, a horizontal convolution kernel and a vertical convolution kernel are used for processing. The weight distribution of the horizontal convolution kernel is to apply opposite weights to the left and right two columns, and the weight of the middle column is zero; the vertical convolution kernel is to apply opposite weights to the upper and lower two rows, and the weight of the middle row is zero. Apply these convolution kernels to the gradient amplitude matrix of the neighborhood, and calculate the horizontal boundary response value of the center pixel as 0.065 and the vertical boundary response value as -0.035 by accumulating the product of corresponding elements. Then, direction filtering and response merging are performed. The filtering of direction deviation points is based on a preset direction angle effective interval. The setting of the interval is based on the experimental verification results of 50 groups of standard part images with known scratch directions. Experiments show that the gradient direction angle of the target scratch is mainly distributed between -15 degrees and 15 degrees, so this interval is adopted as the effective interval. Since the gradient direction angle of pixel point P(i, j) is -14.04 degrees, which falls within the effective interval, its boundary response value is retained. For pixel points with gradient direction angles exceeding this interval, the boundary response value will be set to zero. Then, the boundary responses of adjacent pixel points that pass the direction filtering are merged. For example, the boundary response value of P(i, j) is averaged with the boundary response value of its right neighbor pixel that also passes the filtering to obtain a merged direction matching boundary strength value 0.0769.
[0026] The feature set construction sub-module, according to the direction matching boundary strength value set, aggregates the spatial distribution interval of the boundary strength, calculates the intensity mean value and variation amplitude in the local region, eliminates the region points that do not reach the intensity threshold, and generates a spatial boundary feature set; According to the generated direction matching boundary intensity value set, the spatial distribution interval of the boundary intensity is aggregated. First, the complete boundary intensity value atlas is divided into several non-overlapping local region blocks of 8*8 pixels. In a specific region block instance, most of the 64 pixel points have a boundary intensity value of 0, but a local part forms a continuous region composed of 9 non-zero values, which simulate the detected boundary fragments, including the intensity value 0.0769 calculated in the previous step. Then the intensity mean and variation amplitude in the local region are calculated. The intensity mean is calculated by adding all 64 boundary intensity values in the region block and dividing by 64, and the intensity mean of the region block is 0.01076. The intensity variation amplitude is quantified by calculating the standard deviation of the 64 values, and the result is 0.0255. Subsequently, the region points that do not meet the preset intensity threshold are removed. The setting of the intensity threshold refers to a verification experiment containing 200 samples (100 positive samples and 100 negative samples). Experimental data show that the intensity mean of the defect-free region is less than 0.005, and the intensity mean of the defect region is higher than 0.009. Accordingly, the intensity threshold is set to 0.007. The intensity mean 0.01076 calculated in this embodiment is compared with the threshold 0.007, and because the former is greater than the latter, the 8x8 region block is determined as an effective region and is retained. The features of all retained region blocks are integrated to generate a spatial boundary feature set; each feature item contains the position coordinates of the region block, the intensity mean 0.01076 and the variation amplitude 0.0255.
[0027] Specifically, as shown in Figure 2 、 4 , the spatio-temporal attention module includes: a motion estimation sub-module, which obtains the position change and motion speed of the target to be detected in adjacent time frames based on the spatial boundary feature set, calculates the pixel coordinate difference to obtain the point-by-point displacement, analyzes the speed by dividing the inter-frame time interval value by the displacement distance, aggregates the displacement and speed according to the target identification, and generates the target motion state quantity; The spatial boundary feature set is generated based on the previous steps. In one specific application example, the feature set contains a feature vector of an 8x8 pixel region block identified as "target 001" at time frame t, whose position is determined by the top-left coordinates (128, 256). At the subsequent time frame t+1, the new position of "target 001" is determined as (132, 257) through feature matching. The pixel coordinate difference is calculated to obtain the point-wise displacement. The horizontal displacement is calculated as the current frame x coordinate 132 minus the previous frame x coordinate 128, resulting in a displacement of 4 pixels. The vertical displacement is calculated as the current frame y coordinate 257 minus the previous frame y coordinate 256, resulting in a displacement of 1 pixel. Thus, the displacement vector of the region block is (4, 1). Subsequently, the motion speed is analyzed by dividing the inter-frame time interval value by the displacement distance. The inter-frame time interval value is determined by the frame rate of the depth camera, which is set to 100 frames per second in this example, i.e., the time interval is 0.01 second. The displacement distance is obtained by calculating the Euclidean norm of the displacement vector, specifically, the square root of the sum of the square of the horizontal displacement and the square of the vertical displacement, i.e., pixels. The calculation process of the motion speed is to divide the displacement distance 4.123 pixels by the time interval 0.01 second, resulting in a speed value of 412.3 pixels / second. Thereafter, the displacement and speed of all 8x8 region blocks belonging to "target 001" are aggregated according to the target identification. If "target 001" also contains another feature region block with a displacement vector of (4, 2) and a speed of 447.2 pixels / second, the aggregated displacement vector takes the average of each component, i.e., , and the aggregated speed is the average of the two speed values, i.e., pixels / second. By performing the above calculation and aggregation on all identified target feature region blocks, the target motion state quantity is generated, which is a collection of a series of data structures, each of which records the identification of a target, the aggregated displacement vector, and the average speed. For example, the generated state quantity for "target 001" is {target identification: 001, aggregated displacement: (4, 1.5), average speed: 429.75 pixels / second}.
[0028] The weight assignment sub-module calls the target motion state quantity, analyzes the weighted product of the boundary strength and the speed quantity of each spatial region as the spatial weight initial value, calculates the time weight initial value of the adjacent time frame speed difference and the displacement direction consistency, normalizes and merges the two types of weights, and obtains the spatio-temporal attention weight coefficient set; The generated target motion state quantity is called, and the module calls the average speed 429.75 pixels / s for "target 001", and obtains the corresponding intensity mean value 0.01076 from the spatial boundary feature set. First, the weighted product of the boundary intensity and the speed quantity is analyzed for each spatial region, which is used as the initial value of the spatial weight. The calculation process is to apply an exponential operation of 0.4 to the intensity mean value 0.01076, and an exponential operation of 0.6 to the average speed 429.75, and then multiply the two results to obtain the initial value of the spatial weight 5.970. The exponential coefficients 0.4 and 0.6 are determined by experimental analysis on 100 groups of samples containing different speed and intensity characteristics. Then, the speed difference and displacement direction consistency of adjacent time frames are calculated to obtain the initial value of the time weight. This process calls the motion data of "target 001" in two consecutive time intervals. The speed difference is obtained by calculating the absolute difference of the average speed in the two time periods, which is 14.75 pixels / s. The displacement direction consistency is obtained by calculating the cosine similarity of the two displacement vectors, and the value is 0.993. The initial value of the time weight is obtained by applying a negative exponential function to the speed difference, and then multiplying it by the direction consistency, and the calculation result is 0.475. Finally, the two types of initial weight values are normalized and combined. The normalization process is to divide the weight initial value of each target by the maximum value of the corresponding weight among all targets in the current frame. The combination process is to weight and sum the normalized spatial weight and time weight, and the weight coefficients are 0.7 and 0.3 respectively. The spatiotemporal attention weight coefficient of the region where "target 001" is located is 0.6339. After completing this series of operations for all targets, the spatiotemporal attention weight coefficient set is generated.
[0029] The attention distribution submodule calculates the weight density for each pixel index and timestamp based on the spatiotemporal attention weight coefficient set, filters out the weight points according to the boundary intensity threshold, accumulates and aggregates in frame order, and generates the spatiotemporal attention distribution set. The boundary intensity threshold is set by statistical analysis of the boundary intensity value distribution in the spatial boundary feature set. Processing is performed based on the generated spatiotemporal attention weight coefficient set. For the 8x8 region block corresponding to "Target 001", the spatiotemporal attention weight coefficient at time frame t is 0.6339. First, the weight density is calculated for each pixel index in the region and the current time stamp t. This process assigns the weight coefficient 0.6339 of the region block to all pixels in the region that are identified as valid boundary points in the previous step. For example, there are 9 pixels in the region block whose boundary intensity values are non-zero, then the weight density of these 9 pixels at time frame t is assigned as 0.6339, and the weight density of the remaining 55 pixels is 0. Subsequently, the points with assigned weights are filtered according to a boundary intensity threshold. The threshold here is a pixel-level intensity threshold, not an average intensity threshold of the region block. The threshold is set by analyzing 1000 independent pixels, of which 500 belong to known defect boundaries and 500 are background noise. Statistics show that 98% of the defect boundary pixels have a boundary intensity value higher than 0.06, and 99% of the background noise pixels are lower than this value. Therefore, the pixel-level boundary intensity threshold is set to 0.06. The boundary intensity values (see Table 1 above for data, e.g. 0.0712, 0.0769, etc.) of the 9 non-zero pixels in the region block are compared with the threshold 0.06. Since the boundary intensity values of these 9 pixels are all greater than 0.06, their weight densities 0.6339 are all retained. If the boundary intensity of a certain pixel is 0.055, its weight density will be set to 0. Finally, the weight densities are accumulated and aggregated in frame order. This process introduces a decay factor to make the attention weight of historical frames weaken over time. The decay factor is set based on a user experience test, and it is found that when the value is 0.85, the dynamic tracking effect of attention and the visual persistence perception are the most matched. If the accumulated attention value of a pixel belonging to "Target 001" at time frame t-1 is 0.550, then at time frame t, the new accumulated attention value of the pixel is: By performing the above calculation process on all pixels in the field of view at each frame, a spatiotemporal attention distribution set is generated.
[0030] Specifically, as shown in Figure 2 , 5 , the trajectory detection module includes: a trajectory extraction submodule, which reads the weight peak value and pixel coordinates based on the spatiotemporal attention distribution set, aggregates, calculates the weight center coordinates, analyzes the in-segment displacement length according to the adjacent frame time interval, matches the cross-frame corresponding relationship according to the nearest neighbor distance and weight proportion, removes the weight segments, and generates a trajectory coordinate sequence; Based on the set of spatio-temporal attention distribution, the pixel coordinates with peak value of attention weight are read in the attention map of each time frame and aggregated. In a specific time frame t, three spatially adjacent pixel points (134, 258), (135, 258) and (134, 259) are identified with higher attention weight values of 1.1014, 1.0500 and 1.0800 respectively, and they are aggregated into a peak cluster. Subsequently, the weight center coordinates of the cluster are calculated, which are obtained by weighted average of the coordinates of each pixel in the cluster, and the weight is the corresponding attention value. The calculated weight center coordinates are (134.25, 258.09). The same operation is performed on the previous time frame t-1, and the weight center is (130.13, 257.21). Then the displacement length in the analysis segment is analyzed according to the time interval of adjacent frames, which is the Euclidean distance between the weight centers of two consecutive frames, and the calculated value is 4.21 pixels. Next, the cross-frame correspondence matching is performed according to the two criteria of nearest neighbor distance and weight proportion. In time frame t+1, two candidate weight centers are calculated, and one of them is matched because it is closer to the center of frame t and its cluster total weight value is in the same order of magnitude as that of frame t. The other candidate point is determined as a weight segment and is removed because its cluster total weight value 0.4580 is lower than a threshold value 0.8 determined according to 500 trajectory samples experiments. By repeating the matching and removing process between consecutive frames, the trajectory coordinate sequence composed of a series of weight center coordinates is finally generated.
[0031] The uncertainty quantification sub-module calls the trajectory coordinate sequence, obtains the weight density, calculates the adjacent segment velocity scalar and direction vector, analyzes the direction angle difference by dot product, takes the velocity scalar difference as the amplitude difference, normalizes the angle difference and amplitude difference and synthesizes the interval fluctuation quantity to obtain the set of motion uncertainty degree coefficients; The trajectory coordinate sequence is called and the weight density corresponding to each coordinate point is obtained. Three consecutive coordinate points (130.13, 257.21), (134.25, 258.09), (138.52, 259.94) at time points t-1, t, t+1 are used. First, the velocity scalar and direction vector of adjacent trajectory segments are calculated. Based on a frame interval of 0.01 seconds, the direction vector of the first segment (t-1 to t) is calculated as (4.12, 0.88) and the velocity scalar is 421.3 pixels / s; the direction vector of the second segment (t to t+1) is calculated as (4.27, 1.85) and the velocity scalar is 465.5 pixels / s. Then, based on the dot product operation of the two direction vectors, the direction angle difference is analyzed and the angle difference is calculated to be about 11.48 degrees. The absolute difference of the two velocity scalars is taken as the amplitude difference, and the calculated value is 44.2 pixels / s. Next, the angle difference and the amplitude difference are normalized. The normalization reference value is set by statistical analysis of a large number of normal motion samples, which is 45 degrees and 100 pixels / s respectively. The normalized angle difference is calculated as 11.48 divided by 45, and the normalized amplitude difference is 44.2 divided by 100. Finally, the two normalized values are weighted and summed with a weight coefficient of 0.5 and 0.5, and the interval fluctuation is integrated, and the motion uncertainty coefficient at time point t is calculated to be 0.3485. This series of calculations is performed on each point in the trajectory sequence to obtain the motion uncertainty coefficient set.
[0032] The change result submodule calculates the intra-segment position change rate in time sequence according to the trajectory coordinate sequence and the motion uncertainty coefficient set, performs sliding accumulation, filters out abnormal reliable segments, summarizes the change interval and outputs the time start and end and the change amplitude, establishes the motion trajectory change result; According to the trajectory coordinate sequence and the set of motion uncertainty coefficients, the position change rate in each trajectory segment is first calculated in time sequence, i.e. the velocity scalar of each segment, such as 421.3 pixels / s and 465.5 pixels / s. A sliding window with a length of 3 is used to accumulate the position change rate of each segment in the window, such as obtaining a smoothed change rate of 443.4 pixels / s by taking the average. Subsequently, the module filters out abnormal confidence segments based on the set of motion uncertainty coefficients. This process uses an uncertainty threshold of 0.7, which is set by experimental statistics on 300 trajectory samples labeled as "smooth" or "abrupt". The motion uncertainty coefficient calculated at each time point is compared with the threshold. In the foregoing example, the calculated uncertainty coefficient 0.3485 is less than 0.7, so the trajectory segment corresponding to it is determined as a confidence segment and retained. If the uncertainty coefficient of a certain time point is greater than 0.7, the segment is marked as abnormal and excluded from subsequent processing. Finally, the module aggregates all continuous confidence segments to form one or more change intervals, and outputs the time start and end points and the change amplitude of each interval, thereby establishing the motion trajectory change result. For example, a summarized change interval has a start time of 0.25 seconds, an end time of 0.41 seconds, and an average change amplitude of 448.2 pixels / s in the interval.
[0033] Specifically, as shown in Figure 2 , 6 The trajectory correction module includes: a position correction submodule that collects continuous frame depth values on the depth map based on the motion trajectory change result and the set of spatiotemporal attention distributions according to the weight center, adjusts each frame depth deviation using the motion uncertainty coefficient, calculates the depth correction increment, and adds it frame by frame to the sequence to obtain the depth displacement compensation amount. Based on the motion trajectory change result and the set of spatiotemporal attention distributions, operations are performed on the depth map. First, according to the weight center coordinates in the trajectory coordinate sequence, continuous depth values are collected on the depth map of the corresponding time frames. Taking time frames t-1, t, t+1 as examples, the corresponding weight center coordinates are (130.13, 257.21), (134.25, 258.09), and (138.52, 259.94). The depths of these coordinates are queried to obtain the original depth value sequence: , , Subsequently, the depth bias of each frame is adjusted using the motion uncertainty coefficient. This adjustment process introduces a depth adjustment factor of 0.05, which is determined by a calibration experiment including 200 known trajectory points, and the experiment analyzes the relationship between the depth measurement error and the uncertainty coefficient. The depth correction increment of each frame is obtained by multiplying the motion uncertainty coefficient of the frame by the adjustment factor 0.05. At time point t, the uncertainty coefficient is 0.3485, and the depth correction increment of the frame is calculated as mm. Then the depth correction increment is calculated and the sequence is overlaid frame by frame. If the uncertainty coefficient of time frame t-1 is 0.4100, the correction increment is mm, which is the initial depth displacement compensation of the sequence. At time frame t, the compensation is overlaid as the compensation of the previous frame plus the increment of the current frame, that is mm. If the uncertainty coefficient of time frame t+1 is 0.2950, the correction increment is mm, and the cumulative compensation at t+1 is mm. This calculation is performed on the entire trajectory sequence to obtain a depth displacement compensation sequence corresponding to the trajectory coordinate sequence.
[0034] The feature quantization submodule calls the depth displacement compensation, calculates the inter-frame depth difference and analyzes the gradient direction angle, analyzes the change rate of the weight density difference of adjacent frames, filters out abnormal change items, calculates the product mean of the gradient and the weight change in the same time period as the coupling degree, and generates a gradient weight coupling coefficient set. The depth displacement compensation sequence is called and applied to the original depth value sequence to obtain the modified depth values. At time frames t-1, t, t+1, the modified depth values are 2.1705 mm, 2.217925 mm, 2.212675 mm, respectively. Then the inter-frame depth difference is calculated and the gradient direction angle is analyzed. For the time period from t-1 to t, the depth difference is 0.047425 mm, the plane displacement module length is 4.213 pixels, and the gradient direction angle is obtained by taking the inverse tangent of the ratio of the depth difference to the plane displacement module length, which is about 0.645 degrees. Subsequently, the change rate of the weight density difference of adjacent frames is analyzed. The total weight values of time frames t-1 and t are (3.1150-3.2314) / 3.1150=0.03737, respectively. This change rate is compared with a preset abnormal change threshold of 0.15. The threshold is set by experiments on 400 trajectory segments (100 of which contain abnormal situations), and the weight change rate of 98% of stable tracking segments is lower than this value. Since the calculated change rate is less than the threshold, the item is retained. Finally, the product of the depth gradient and the weight change rate is calculated for the target in the same time period, and the product results of consecutive time periods are averaged to serve as the coupling degree. For the two time periods from t-1 to t and t to t+1, the calculated products are 0.001772 and -0.000456, respectively, and the coupling degrees of the two time periods are the average of the two, which is 0.000658. This process is performed on the entire trajectory sequence to generate a set of gradient weight coupling coefficients.
[0035] The fusion output submodule calculates the weighted sum of each segment position correction value and the coupling degree weight according to the gradient weight coupling coefficient set and the depth displacement compensation sequence in chronological order, calculates the direction consistency factor for adjacent segments and scales the segment weight, and establishes the real-time analysis result of the motion trajectory. According to the gradient weight coupling coefficient set and the depth displacement compensation amount, the weighted sum of the position correction value and the coupling degree weight is calculated in time sequence. In a specific embodiment, for time periods t-1 to t, the three-dimensional displacement vector is (4.12, 0.88, 0.047425), and the corresponding coupling degree coefficient is 0.000658. The weighted sum process is to multiply each component of the three-dimensional displacement vector by a scaling factor derived from the coupling degree, that is, 1 plus the coupling degree coefficient. The calculation result is (4.12, 0.88, 0.047425) multiplied by 1.000658, resulting in the corrected displacement vector (4.1227, 0.8806, 0.047456). Subsequently, the direction consistency factor is calculated and the segment weight is scaled for the adjacent trajectory segment. The direction consistency factor is obtained by calculating the cosine similarity of two consecutive three-dimensional displacement vectors, and the calculation result is about 0.975. This factor is used to scale the corrected displacement vector of the previous time period. The scaled final displacement vector is (4.1227, 0.8806, 0.047456) multiplied by 0.975, resulting in (4.0196, 0.8586, 0.046269). By sequentially accumulating the initial coordinate points and the final displacement vectors calculated segment by segment, a finely corrected motion trajectory is established, which is the real-time analysis result of the motion trajectory. For example, if the corrected three-dimensional coordinates at t-1 time are (130.1300, 257.2100, 2.1705), then the coordinates at t time are updated to (134.1496, 258.0686, 2.2168).
[0036] Table 1 Motion trajectory real-time analysis result segment
[0037] As shown in Table 1, the table lists the final three-dimensional coordinates of three consecutive time points on the trajectory. Each coordinate point is obtained by adding the displacement vector after coupling degree weighting and direction consistency scaling to the previous coordinate point.
[0038] Specifically, as shown in Figure 2 , 7 , the multi-objective optimization module includes: A similarity calculation submodule extracts time series coordinates and depth values according to target identification based on the real-time analysis result of the motion trajectory, combines target trajectory segments, calculates the position difference and velocity difference between segments, analyzes the trajectory similarity by weighting the normalized position difference and velocity difference, truncates abnormal values, and generates a trajectory similarity coefficient set; According to the real-time analysis result of the motion trajectory, the time series coordinates and depth values are extracted according to the target identification, and are combined into target trajectory segments. In an embodiment, the module extracts the trajectory segments of two targets, namely "Target A" and "Target B". The corrected three-dimensional coordinates of "Target A" at time frames t and t+1 are With The coordinates of "Target B" in the same time frame are With First, the position difference between the corresponding time points of the two segments is calculated. In time frame t, the three-dimensional Euclidean distance between the two is calculated as Then, the velocity difference is calculated. The inter-frame time interval is 0.01 seconds. The velocity vector of "Target A" is The velocity vector of "Target B" is The velocity difference is the norm of the difference between the two velocity vectors, calculated as Subsequently, the normalized position difference and velocity difference are analyzed with weighting. The normalization reference value is determined by statistical analysis of a set of 500 known target pairs with different motion patterns. The analysis shows that the position difference of the associated targets is usually within 10 units and the velocity difference is usually within 100 units in the same scene. Therefore, 10 and 100 are taken as the normalization denominators. The normalized position difference is The normalized velocity difference is The setting of the weighting coefficient is based on another experiment, in which the similarity of 200 groups of trajectories is manually labeled and compared with the calculation results under different weights, to determine that when the position difference weight is set to 0.6 and the velocity difference weight is set to 0.4, the calculation results have the highest consistency with the manual labeling. The trajectory similarity is obtained by subtracting the weighted difference value from 1, calculated as Finally, the outliers are truncated. If the calculated weighted difference value is greater than 1, its value is reset to 1, so that the lowest similarity is 0. In this example, the weighted difference value does not exceed 1, and does not need to be truncated. This process is performed on all target pairs to generate a set of trajectory similarity coefficients.
[0039] The aggregation filtering submodule filters target pairs that exceed the similarity threshold according to the set of trajectory similarity coefficients, merges them into groups according to the time overlap interval, calculates the group trajectory center and group variance, and removes the upper bound segment of the variance to obtain a same-class aggregation table. According to the trajectory similarity coefficient set, first, the target pair exceeding the preset similarity threshold is screened. The similarity threshold is set to 0.8, and the determination of this value is based on a test experiment including 1000 pairs of trajectories that have been manually labeled as "homologous" and "heterologous". The experimental results show that when the threshold is set to 0.8, 96% of the "homologous" pairs can be correctly identified, and only 3% of the "heterologous" pairs are incorrectly identified as homologous. In the foregoing embodiment, the trajectory similarity coefficient of "target A" and "target B" is 0.859084, which is greater than the threshold 0.8, so this pair of targets is screened out. The module merges all targets with a similarity exceeding the threshold into a group according to the time overlap interval. If the similarity of "target C" with A and B is 0.5 and 0.6 respectively, C is not merged into the group. Finally, an aggregated group containing "target A" and "target B" is formed, denoted as "group 1". Next, the module calculates the trajectory center and the intra-group variance. For "group 1", at time frame t, the trajectory center coordinates are the arithmetic mean of the coordinates of all targets in the group at that time point, calculated as (134.15+134.5) / 2, (258.07+258.5) / 2, (2.22168+2.230) / 2, the result is (134.325, 258.285, 2.2234), and the intra-group variance is the average of the square of the distance between each target point and the trajectory center point, calculated as The trajectory segment with a variance exceeding the upper threshold is then removed. The upper threshold of the variance is set by statistical analysis of the intra-group variance of 300 stable aggregated groups, and the 95% quantile value 0.5 is taken as the threshold. Since the calculated variance 0.0769 is less than 0.5, this trajectory segment is retained. This calculation and judgment are performed for all time frames, and the same type of aggregation table is generated, group identifier, group 1, target identifier, target A, target B, aggregated center trajectory (time t), (134.325, 258.285, 2.2234), intra-group variance (time t), 0.0769.
[0040] The occlusion separation module calls the same type of aggregation table, detects the occlusion and intersection time period, extracts the occlusion segment depth displacement difference and time overlap length, separates the conflict trajectories for the overlap segment, corrects the aggregated center according to the average offset in the segment, and writes back the trajectory sequence to generate the optimized real-time analysis result of the motion trajectory; The same kind of aggregation table is called, and firstly, the occlusion and intersection time period is detected. The detection process is based on two conditions: the variance within the group is lower than a preset "proximity threshold", and the depth value difference of the target within the group is greater than a "depth separation threshold". The proximity threshold is set to 0.1, and the depth separation threshold is set to 0.005 mm. The two thresholds are determined by analyzing 500 samples containing adjacent, intersecting and occlusion events, and under this setting, the detection accuracy of the occlusion event is 94%. In "group 1", the variance within the group at time frame t is 0.0769, which is lower than the proximity threshold 0.1; at the same time, the depth values of "target A" and "target B" at this frame are 2.2168 mm and 2.2300 mm respectively, and the difference is 0.0132 mm, which is greater than the depth separation threshold 0.005 mm. Both conditions are met, so time frame t is determined to be occluded. The depth displacement difference of the occlusion segment is 0.0132 mm and the time overlap length (here, 1 time frame) is extracted. Next, the separation conflict track is performed on the overlap segment. "Target A" with smaller depth value is determined as the foreground target, and the track (134.15, 258.07, 2.2168) is considered reliable. For the occluded background target "target B", the position is extrapolated using the velocity vector before the occlusion occurs to correct its coordinates during the occlusion period. The velocity vector of "target B" from t-1 to t time period is set to (410, 160, -1.00), and its coordinates at t-1 time are (130.40, 256.90, 2.2400), so its extrapolated coordinates at t time (130.4+410*0.01, 256.9+160*0.01, 2.2400-1.00*0.01) = (134.5, 258.5, 2.2300). In this example, the extrapolated value is the same as the original value, and if there is a deviation, the extrapolated value is used. Then, the aggregation center is corrected according to the average offset within the segment. The corrected aggregation center is obtained by averaging the original coordinates of the foreground target and the extrapolated coordinates of the background target. Finally, the corrected background target coordinates are written back to the original track sequence. By performing this separation and correction process on all detected occlusion segments, the optimized motion track real-time analysis result is generated.
[0041] The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited thereto, and any skilled person in the art can easily think of changes or replacements within the technical range disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A real-time motion trajectory analysis system integrating depth maps and spatiotemporal attention mechanisms, characterized in that, The system includes: The feature extraction module obtains the spatial gradient of the target to be detected through the depth map and calculates the gradient magnitude, gradient direction and depth change rate. It extracts boundary intensity features through the Sobel operator and filters the boundary intensity features in combination with the gradient direction to generate a spatial boundary feature set and pass it to the spatiotemporal attention module. The spatiotemporal attention module obtains the position changes and motion speed of the target to be detected in adjacent time frames based on the spatial boundary feature set, and allocates spatial and temporal attention weights through the spatiotemporal attention mechanism to generate a spatiotemporal attention distribution set and transmit it to the trajectory detection module. The trajectory detection module, based on the spatiotemporal attention distribution set, detects the motion trajectory data of the target to be detected between consecutive frames, analyzes the difference in motion direction and velocity of the target in adjacent frames, calculates the motion uncertainty of the target, generates the motion trajectory change result and transmits it to the trajectory correction module. The trajectory correction module, based on the motion trajectory change results and the spatiotemporal attention distribution set, corrects the depth position of the target to be detected according to the motion uncertainty, analyzes and fuses the change characteristics of the depth gradient and attention weight, and generates real-time motion trajectory analysis results.
2. The real-time motion trajectory analysis system that integrates depth maps and spatiotemporal attention mechanisms according to claim 1, characterized in that: The spatial boundary feature set includes boundary strength features, direction angle, and depth change rate; the spatiotemporal attention distribution set includes spatial weight mapping, temporal weight mapping, and weight normalization coefficient; the motion trajectory change results include direction difference sequence, velocity difference sequence, and trajectory uncertainty metric; and the real-time motion trajectory analysis results include coupling weight coefficient and corrected trajectory coordinates.
3. The real-time motion trajectory analysis system that integrates depth maps and spatiotemporal attention mechanisms according to claim 1, characterized in that, The feature extraction module includes: The gradient calculation submodule obtains the depth value of each pixel of the target to be detected in the depth map, analyzes the spatial gradient components along the horizontal and vertical directions, calculates the gradient magnitude and gradient direction angle of the pixel, compares the depth difference values of adjacent pixels to analyze the depth change rate, and generates a set of spatial gradient feature values. The boundary strength submodule, based on the spatial gradient feature value set, calls the gradient magnitude and direction, performs convolution calculation through the Sobel operator, extracts the boundary response values at multiple pixel positions, filters out points with directional deviations and merges boundary responses in the same direction, and generates a set of direction-matched boundary strength values. The feature set construction submodule matches the boundary intensity value set according to the direction, aggregates the spatial distribution range of the boundary intensity, calculates the average intensity and variation range in the local area, removes the area points that do not reach the intensity threshold, and generates a spatial boundary feature set.
4. The real-time motion trajectory analysis system that integrates depth maps and spatiotemporal attention mechanisms according to claim 3, characterized in that, The intensity threshold is set by detecting the boundary intensity values of all pixels, calculating their average value and standard deviation, and selecting the sum of the average value and standard deviation based on the boundary response distribution characteristics.
5. The real-time motion trajectory analysis system that integrates depth maps and spatiotemporal attention mechanisms according to claim 1, characterized in that, The spatiotemporal attention module includes: The motion estimation submodule obtains the position change and motion speed of the target to be detected in adjacent time frames based on the spatial boundary feature set, calculates the pixel coordinate difference to obtain the point-by-point displacement, divides the inter-frame time interval value by the displacement distance to analyze the speed, aggregates the displacement and speed according to the target identifier, and generates the target motion state quantity. The weight allocation submodule calls the target motion state quantity, analyzes the weighted product of boundary strength and velocity for each spatial region as the initial value of spatial weight, calculates the initial value of temporal weight for the velocity difference and displacement direction consistency between adjacent time frames, normalizes and merges the two types of weights to obtain the spatiotemporal attention weight coefficient set. The attention distribution submodule calculates the weight density for each pixel index and timestamp based on the spatiotemporal attention weight coefficient set, filters out weight points according to the boundary strength threshold, accumulates and aggregates them in frame order, and generates a spatiotemporal attention distribution set. The boundary strength threshold is set statistically by analyzing the distribution of boundary strength values in the spatial boundary feature set.
6. The real-time motion trajectory analysis system that integrates depth maps and spatiotemporal attention mechanisms according to claim 1, characterized in that, The trajectory detection module includes: The trajectory extraction submodule, based on the spatiotemporal attention distribution set, reads and aggregates the weight peak values and pixel coordinates, calculates the weight center coordinates and analyzes the displacement length within the segment according to the time interval between adjacent frames, matches the cross-frame correspondence according to the nearest neighbor distance and weight ratio and removes weight segments to generate a trajectory coordinate sequence. The uncertainty quantification submodule calls the trajectory coordinate sequence, obtains the weight density, calculates the velocity scalar and direction vector of adjacent segments and analyzes the direction angle difference with dot product, then uses the velocity scalar difference as the amplitude difference, normalizes the angle difference and amplitude difference and synthesizes the interval fluctuation quantity to obtain the motion uncertainty coefficient set. The change results submodule calculates the rate of change of position within the segment in chronological order based on the trajectory coordinate sequence and the set of motion uncertainty coefficients, performs sliding accumulation, filters out abnormal and reliable segments, summarizes the change intervals, and outputs the start and end times and the magnitude of change to establish the motion trajectory change results.
7. The real-time motion trajectory analysis system that integrates depth maps and spatiotemporal attention mechanisms according to claim 1, characterized in that, The trajectory correction module includes: The position correction submodule collects continuous frame depth values on the depth map according to the weight center based on the motion trajectory change results and the spatiotemporal attention distribution set. It adjusts the depth deviation of each frame using the motion uncertainty coefficient, calculates the depth correction increment, and superimposes the sequence frame by frame to obtain the depth displacement compensation amount. The feature quantization submodule calls the depth displacement compensation amount, calculates the inter-frame depth difference and analyzes the gradient direction angle, analyzes the change rate of the weight density difference between adjacent frames, filters out abnormal change items, calculates the average of the product of gradient and weight change for the target in the same time period as the coupling degree, and generates a set of gradient weight coupling coefficients. The fusion output submodule calculates the weighted sum of the position correction value and coupling degree weight of each segment in chronological order based on the gradient weight coupling coefficient set and the depth displacement compensation amount. It also calculates the direction consistency factor for adjacent segments and scales the segment weights to establish real-time motion trajectory analysis results.
8. The real-time motion trajectory analysis system that integrates depth maps and spatiotemporal attention mechanisms according to claim 1, characterized in that, The system also includes: The multi-target optimization module, based on the real-time motion trajectory analysis results, calculates the trajectory similarity between multiple targets, filters target trajectories that exceed the similarity threshold and aggregates them, and simultaneously performs dynamic correction and separation optimization on occluded or intersecting trajectories to generate optimized real-time motion trajectory analysis results. The optimized real-time motion trajectory analysis results include similarity aggregation index, occlusion separation label, and merged trajectory coordinates.
9. The real-time motion trajectory analysis system that integrates depth maps and spatiotemporal attention mechanisms according to claim 8, characterized in that, The multi-objective optimization module includes: The similarity calculation submodule, based on the real-time analysis results of the motion trajectory, extracts time series coordinates and depth values according to the target identifier and combines target trajectory segments, calculates the position difference and velocity difference between segments, analyzes the trajectory similarity by weighting the normalized position difference and velocity difference, and truncates outliers to generate a trajectory similarity coefficient set; The aggregation and filtering submodule filters target pairs that exceed the similarity threshold according to the trajectory similarity coefficient set, merges them into groups according to the time overlap interval, calculates the trajectory center and variance within the group and removes the upper bound of the variance to obtain a similar aggregation table. The occlusion separation submodule calls the aforementioned aggregation table to detect occlusion and intersection time periods, extracts the depth displacement difference and time overlap length of the occluded segment, separates conflict trajectories for overlapping segments, corrects the aggregation center according to the average offset within the segment, writes back the trajectory sequence, and generates optimized motion trajectory real-time analysis results.
10. The real-time motion trajectory analysis system that integrates depth maps and spatiotemporal attention mechanisms according to claim 9, characterized in that: The similarity threshold is set by calculating the average similarity value of all target pairs in the time series, and extracting the median and standard deviation of the distribution.