Image motion trajectory tracking method and system based on space-time information

By constructing multi-scale spatiotemporal volumes and spatiotemporal topology maps in video image sequences, the problem of trajectory interruption caused by target intersection or occlusion is solved, and continuous tracking of target trajectories and accurate identification are achieved.

CN123181513APending Publication Date: 2026-11-27FUJIAN RUISIKE MEDICAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611675601.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-28
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing target trajectory tracking methods in video image sequences are prone to identity mismatch and trajectory interruption when targets cross or are occluded. Traditional methods are difficult to adapt to sudden changes in target motion and information loss during occlusion.

Method used

The image motion trajectory tracking method based on spatiotemporal information generates a multi-scale spatiotemporal volume by writing pixel spatial location, acquisition time, and inter-frame motion response into a unified spatiotemporal coordinate system. It then connects trajectory segments using motion connectivity, spatiotemporal tubes, and topology graphs, and verifies the propagation confidence of associated edges to ensure trajectory continuity.

Benefits of technology

It reduces trajectory identity mismatch and interruption caused by target intersection or occlusion, improves the accuracy and continuity of trajectory tracking, reduces irrelevant associations introduced by fixed neighborhoods, and ensures the traceability of the occlusion process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123181513A_ABST
    Figure CN123181513A_ABST
Patent Text Reader

Abstract

The application provides a method and system for tracking image motion trajectory based on space-time information, and relates to the technical field of image processing.The method comprises the following steps: according to a to-be-tracked image sequence, writing a pixel space position, a collection time and an inter-frame motion response into a unified space-time coordinate system, organizing the inter-frame motion response according to different spatial sampling scales and time sampling scales, and obtaining a multi-scale space-time body; according to the multi-scale space-time body, connecting voxels which are spatially adjacent, time-continuous and meet a consistent condition in terms of motion direction, fusing connection results of corresponding same motion regions under different scales, and obtaining a motion connected domain set.The application reduces trajectory identity mismatch and trajectory interruption caused by target intersection or occlusion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to a method and system for tracking image motion trajectories based on spatiotemporal information. Background Technology

[0002] In video image sequences, continuous and accurate trajectory tracking of moving targets is one of the core problems in the field of computer vision. Traditional trajectory tracking methods mostly rely on inter-frame target detection or optical flow estimation, and construct the target motion path by feature matching or position prediction between adjacent frames. However, in the actual acquisition environment, situations such as mutual occlusion, crossing, and brief out-of-view of targets frequently occur, causing the correlation of tracking algorithms to break in the time dimension.

[0003] Most existing mainstream methods employ local matching strategies within a fixed time window or spatial neighborhood. This involves establishing a correspondence based on the similarity of target appearance or the smoothness of motion within several consecutive frames. Such strategies perform well when targets move independently and the degree of occlusion is mild. However, when multiple targets overlap or intersect, local matching is prone to incorrectly connecting trajectory segments of different targets. Furthermore, the trajectory may be interrupted due to the target being invisible during occlusion, causing the identity label of the same target to switch or be lost before and after occlusion. Although some methods attempt to introduce motion prediction models, such as Kalman filtering or particle filtering, to compensate for the missing information during occlusion, the prediction results rely on the assumption of the stability of historical motion states. This may be difficult to adapt to sudden changes in motion direction during target interaction, and the prediction error will accumulate with the duration of occlusion, eventually leading to failure of continuation. Summary of the Invention

[0004] This invention provides a method and system for tracking motion trajectories in images based on spatiotemporal information, reducing trajectory identity mismatch and trajectory interruption caused by target intersection or occlusion.

[0005] To solve the above-mentioned technical problems, the technical solution of the present invention is as follows: Firstly, an image motion trajectory tracking method based on spatiotemporal information, the method comprising: Acquire consecutive image frames and acquisition time of the image sequence to be tracked; Based on the image sequence to be tracked, the spatial location of pixels, acquisition time, and inter-frame motion response are written into a unified spatiotemporal coordinate system, and the inter-frame motion response is organized according to different spatial sampling scales and temporal sampling scales to obtain a multi-scale spatiotemporal volume. Based on the multi-scale spatiotemporal volume, connect spatially adjacent, temporally continuous voxels with consistent motion directions, and fuse the connection results of the same motion region at different scales to obtain a set of motion connected domains. Based on the set of motion connected components, forward reachable spatiotemporal tubes and backward reachable spatiotemporal tubes are generated according to the temporal boundary, spatial boundary and motion direction of each motion connected component. The motion connected components with overlapping and temporally compatible reachable spatiotemporal tubes are connected as candidate associated edges to obtain a spatiotemporal topology graph. Based on the spatiotemporal topology graph, the candidate associated edge is verified based on the propagation confidence at both ends of each candidate associated edge. The corresponding motion connected domains are connected according to the verification results. The merging and splitting states of each motion connected domain are recorded to obtain a set of trajectory segments and topology event records. Based on the set of trajectory segments and topological event records, within the time interval between the merging and splitting states, the identity correspondence of each trajectory segment after splitting is constrained by the motion direction, spatial arrangement, and propagation confidence of each trajectory segment before merging, so as to obtain the continuous target trajectory and the propagation confidence of each continuous target trajectory.

[0006] Secondly, a motion tracking system based on spatiotemporal information includes: The acquisition module is used to acquire continuous image frames and the acquisition time of the image sequence to be tracked; The module is used to write the pixel spatial location, acquisition time and inter-frame motion response into a unified spatiotemporal coordinate system according to the image sequence to be tracked, and organize the inter-frame motion response according to different spatial sampling scales and temporal sampling scales to obtain a multi-scale spatiotemporal volume. The extraction module is used to connect spatially adjacent, temporally continuous voxels with consistent motion directions based on multi-scale spatiotemporal volumes, and fuse the connection results of the same motion region at different scales to obtain a set of motion connected domains. The generation module is used to generate forward-reachable spatiotemporal tubes and backward-reachable spatiotemporal tubes based on the set of motion connected domains and according to the temporal boundary, spatial boundary and motion direction of each motion connected domain. The motion connected domains with overlapping and temporally compatible two types of reachable spatiotemporal tubes are connected as candidate associated edges to obtain a spatiotemporal topology graph. The recording module is used to verify the candidate associated edge based on the propagation confidence at both ends of each candidate associated edge according to the spatiotemporal topology graph, connect the corresponding motion connected domains according to the verification results, record the merging and splitting states of each motion connected domain, and obtain a set of trajectory segments and topology event records. The trajectory module is used to obtain the continuous target trajectory and the propagation confidence of each continuous target trajectory by using the motion direction, spatial arrangement and propagation confidence of each trajectory segment before merging to constrain the identity correspondence of each trajectory segment after splitting, based on the trajectory segment set and topological event records within the time interval between the merging state and the splitting state.

[0007] Thirdly, a computer-readable storage medium storing a program that, when executed by a processor, implements the method.

[0008] The above-described solution of the present invention has at least the following beneficial effects: By organizing the pixel spatial location, acquisition time, and inter-frame motion response of continuous image frames into multi-scale spatiotemporal volumes and fusing the voxel connection results corresponding to the same motion region at different scales, the continuity of the motion region in both spatial and temporal dimensions can be preserved. Forward and backward reachable spatiotemporal tubes are generated based on the temporal boundary, spatial boundary, and motion direction of the motion connected domain, respectively. The candidate associated edges are then limited by the overlap relationship and temporal order of the two types of reachable spatiotemporal tubes, which can reduce irrelevant associations introduced by fixed neighborhoods. The association relationship is verified by the propagation confidence at both ends of the candidate associated edges, and the merging and splitting states are recorded, so that the occlusion process forms a traceable topological event. The identity correspondence of the split trajectory segments is determined based on the motion direction, spatial arrangement, and propagation confidence of the trajectory segments before merging, so that the trajectory segments before and after occlusion are continued according to the same topological event, thereby reducing trajectory identity mismatch and trajectory interruption caused by target intersection or occlusion. Attached Figure Description

[0009] Figure 1 This is a schematic diagram of the image motion trajectory tracking processing chain based on spatiotemporal information.

[0010] Figure 2 A line graph illustrating the confidence level of a continuous target trajectory interval is provided as an example.

[0011] Figure 3 This is an example of a scatter plot showing simulated identity candidate matching.

[0012] Figure 4 A bubble chart illustrating the simulation topology event duration, coverage ratio, and propagation confidence. Detailed Implementation

[0013] To make the technical objectives, processing chain, and data status of this embodiment clearer, the image motion trajectory tracking process based on spatiotemporal information will be described in detail below with reference to the accompanying drawings. The continuous image frames can be acquired by an imaging device that is fixed or movable. The acquisition time can be written into the frame header by the imaging device or written by the processing device that receives the image frames according to a unified clock. In this embodiment, the first and second are only used to distinguish similar objects and do not limit the importance of the objects. The multiple refers to two or more. The forward and backward directions are both referenced to the direction of increasing acquisition time. The forward direction corresponds to pointing from a smaller time position to a larger time position, and the backward direction corresponds to pointing from a larger time position to a smaller time position.

[0014] In this embodiment, the image frame is image data with a two-dimensional pixel array and acquisition time identifier. The image sequence to be tracked is a set of continuous image frames whose sequential relationship can be recovered according to the acquisition time. The spatial position of the pixels is represented by the horizontal pixel coordinates and the vertical pixel coordinates. The inter-frame motion response is a combination record of the grayscale changes and motion directions that occur in the corresponding spatial positions of adjacent registered image frames. The unified spatiotemporal coordinate system uses the pixel coordinates of the spatial reference frame as the two spatial axes and the acquisition time or the frame number sorted by acquisition time as the time axis. This allows pixels, motion responses and region boundaries from different image frames to be compared in the same data structure.

[0015] A motion connected component represents a set of voxels formed in one or more scale layers after being filtered for spatial adjacency, temporal continuity, and consistency of motion direction. The temporal boundary of the motion connected component includes the start time position of the acquisition time within the set that is less than the remaining acquisition time and the end time position that is greater than the remaining acquisition time. The spatial boundary can be saved separately for each time layer, or it can be saved as a sequence of boundary points that can recover the boundaries of each time layer. The motion direction represents the representative motion direction of the effective voxels in the set, and the propagation confidence represents the degree to which the motion connected component repeats across scales and maintains consistency in internal direction.

[0016] A spatiotemporal tube is a three-dimensional reachable range formed by the spatial boundary of a moving connected domain propagating along the time direction. A forward reachable spatiotemporal tube extends from the end time position to subsequent time positions, while a backward reachable spatiotemporal tube traces back from the start time position to the previous time position. A candidate associated edge represents a directed connection between two moving connected domains that have the conditions of association in terms of propagation range and time order but have not yet passed the confidence check. The spatiotemporal topology graph saves the moving connected domains as nodes and the candidate associated edges as directed edges, and saves the time, space, direction and confidence fields required for subsequent verification in the records of nodes and edges.

[0017] A trajectory segment represents a set of motion connected regions that are continuously connected along valid edges that have passed the verification and do not cross merged or split states. A merged state means that multiple valid incoming edges point to the same node, and a split state means that the same node is connected to multiple valid outgoing edges. The topology event record puts the merged state, split state, incoming trajectory segment, outgoing trajectory segment and intermediate motion connected region between the two states into the same record. Continuous target trajectories are formed after the identity continuation on both sides of the event interval is completed.

[0018] like Figure 1As shown, the processing device sequentially completes image reception, spatial registration, motion response formation, multi-scale organization, motion connectivity extraction, reachability propagation, candidate association verification, event recording, and identity continuation. The named data objects formed in the previous stage are written to the storage area and read by the next stage, avoiding inconsistent target judgments made from the original image in different steps. Since motion information first forms regional connections in the spatiotemporal body and then forms event connections in the topology map, even if the appearance of the target is temporarily unreadable during occlusion, the orientation, arrangement, and confidence constraints before and after occlusion can be preserved.

[0019] This implementation can be executed by an image processing device with a processor and memory, or the imaging end can complete frame acquisition and preliminary registration, and the computing end can complete the remaining steps. When distributed execution is used, each image frame sent by the imaging end carries the acquisition time and acquisition sequence number. After receiving it, the computing end first checks the sequence continuity, and then converts the time identifier according to the local unified clock. The conversion relationship and the original time identifier are saved at the same time so that the original order can be restored when there is frame loss or time repetition.

[0020] The system provides a complete execution path from continuous image frame input to confident motion trajectory output. The processing device first receives the image sequence and acquisition time, then establishes a spatial reference frame with the first valid image frame, estimates the position changes of the remaining image frames relative to the spatial reference frame through static feature points, and uses the position changes for resampling to obtain registered image frames. The processing device compares adjacent registered image frames to form inter-frame motion responses, and then establishes multiple scale layers according to the spatial block size and the number of time frames. Subsequently, it extracts connected components from each scale layer and fuses them across scales. The resulting set of motion connected components is used to generate forward reachable spatiotemporal tubes and backward reachable spatiotemporal tubes. The associated edges after propagation confidence verification form trajectory segments and topological events. The trajectory segments on both sides of the event are then identified according to direction, lateral arrangement, and confidence. Finally, a confident motion trajectory with interval state, termination position, and interval confidence is output.

[0021] The system acquires a sequence of consecutive image frames and acquisition times to be tracked. The processing device reads frame data, acquisition time, and acquisition sequence number from the image receiving buffer. It first checks whether the image width, image height, pixel format, and time field can be parsed, and then writes the frames that pass the check into a sorting list. Frames with different acquisition times are sorted in ascending order of acquisition time, and frames with the same acquisition time are sorted in ascending order of acquisition sequence number. If the acquisition sequence number is still the same, the frame that arrived in the receiving buffer first is retained, and the remaining duplicate frames are registered as duplicate inputs, thus obtaining time-ordered image frames.

[0022] When the time interval between two adjacent time-ordered image frames is no greater than the continuity limit, the processing device registers them as adjacent valid frame pairs. When the time interval is greater than the continuity limit, the processing device writes a missing frame mark between them and opens a new continuous segment. Subsequent motion responses are not calculated across the missing frame mark. When the image size of a frame is different from that of the spatial reference frame and the scaling relationship can be determined according to the acquisition configuration, it is first restored to a uniform size according to the scaling relationship. When the scaling relationship cannot be determined, the frame is marked as a size abnormal frame and skipped to avoid mistakenly writing size changes as target motion.

[0023] The acquisition time can be an integer timestamp with a fixed time unit. In this embodiment, the time unit is uniformly set to milliseconds. The time difference is obtained by directly subtracting the acquisition times. When the acquisition interval of each frame is consistent, the frame number can also be used as the discrete time position. However, the conversion relationship needs to be recorded in the parameter version and kept consistent throughout the entire processing segment. The time axis position is determined by the time difference between the current acquisition time and the acquisition time of the first frame of the continuous segment. When the acquisition interval of each frame is consistent, the frame number can also be used as the discrete time position, while the actual acquisition time is retained for use in determining the duration. Frames with a time difference of zero do not participate in velocity direction inference but can be used for duplicate frame checks. When the time difference is less than the time interval that the device can resolve, they are processed according to the same time layer. Since the frame order and abnormal boundaries are fixed before motion calculation, subsequent spatial displacements will not be assigned the opposite time direction due to out-of-order input.

[0024] A unified spatiotemporal coordinate system is established based on the image sequence to be tracked, and a multi-scale spatiotemporal volume is formed. The processing device selects the first valid frame in the time-ordered image frames as the spatial reference frame, takes the upper left pixel position of the frame as the spatial origin, takes the increasing direction of the pixel column as the horizontal axis, and takes the increasing direction of the pixel row as the vertical axis. For images with imaging geometric calibration information, the pixel position can also be converted to the calibration plane coordinates, but the coordinate units and directions are kept consistent within the same processing segment, and the pixel distance is not directly added to the physical distance.

[0025] The processing device selects static feature points in adjacent temporally ordered image frames. Specifically, it first reads a local texture window centered on the target pixel, subtracts the average gray level of the window from the gray level of each pixel in the window, and accumulates the absolute value of the gray level difference at the same position in the corresponding window of two adjacent frames to obtain the local texture difference. Then, it moves the next frame window within a limited search range, records the candidate positions that make the local texture difference less than the upper limit corresponding to the feature condition, and combines the horizontal and vertical differences between the candidate positions and the target pixel positions into a candidate displacement. When the length of the candidate displacement is less than the static threshold, the pixel pair is written into the static feature point set.

[0026] When all pixels within a local texture window have the same gray level or the number of effective pixels is less than the lower limit of the effective number of the window, the window does not provide stable position constraints, and the processing device excludes it from the set of static feature points. When the same target pixel corresponds to multiple candidate positions, the candidate position with a local texture difference less than the remaining candidate positions is selected first. If there are the same differences, the candidate position with a displacement length less than the remaining candidate positions is selected. If they are still the same, they are selected according to the fixed order of horizontal and vertical coordinates, so that each static feature point obtains a definite corresponding position.

[0027] The static threshold is used to exclude points that are obviously moving targets. Its source can be the calibration sequence acquired by the imaging device under conditions without target movement. The processing device sorts the displacement lengths of candidate static points in the calibration sequence and reads the displacement lengths corresponding to the positions that cover a preset stable sample ratio as the static threshold. This ratio is determined by optimizing the recall rate of correctly tracked samples in the calibration sequence, preferably between 90% and 95%. If the calibration sequence is empty, the threshold calculated from the imaging jitter tolerance range is used, and the source of the threshold is recorded. The upper limit corresponding to the feature condition can also be determined by the local texture difference distribution of the same static region in the calibration sequence. After the parameters are updated, the version identifier is written into the current spatiotemporal volume record.

[0028] The processing device estimates the spatial position transformation based on the positional deviation between static feature points. First, it pairs the horizontal and vertical coordinates of each static feature point in the current frame with their corresponding coordinates in the spatial reference frame, retaining at least the number of point pairs that can determine the selected transformation type. For each set of candidate transformation parameters, it sequentially maps the static feature points of the current frame to the spatial reference frame, calculates the horizontal and vertical differences between the mapped position and the corresponding reference position, and then determines the position residual based on the difference between the two directions. Point pairs whose position residuals satisfy the registration tolerance are recorded as interior points.

[0029] Candidate transformations can be position transformations that only include horizontal and vertical translations, or position transformations that include rotation and uniform scaling when there is a small rotation or scale change in the imaging device. The processing device compares the number of interior points of each candidate transformation and selects the candidate transformation with a greater number of interior points than the remaining candidate transformations. If the number of interior points is the same, the candidate transformation with a sum of position residuals of all interior points less than the remaining candidate transformations is selected. If they are still the same, the candidate transformation is selected according to the candidate generation sequence number, thereby obtaining the position transformation of the current frame relative to the spatial reference frame.

[0030] When the number of static feature points is insufficient or the number of interior points of all candidate transforms does not meet the registration conditions, the processing device does not use unverified transforms for the current frame. Instead, it reads the position transform of the previous valid registration frame as a temporary position transform and writes a registration confirmation flag to the current frame. If the number of consecutive registration confirmation frames reaches the re-initialization condition, the next valid frame is set as the new spatial reference frame and a new coordinate segment is opened. Pixel positions are directly compared without crossing coordinate segments. This processing avoids cumulative drift in the entire subsequent sequence due to insufficient texture in a single frame.

[0031] The processing device performs inverse resampling on the current frame according to the selected position transformation. For each target pixel position in the spatial reference frame, it reversely determines its source position in the current frame. When the source position falls on an integer pixel, the gray level of that pixel is read directly. When the source position is between adjacent pixels, the contribution level is allocated and the gray level is combined according to the relative distance from the source position to each adjacent pixel position. When the source position falls outside the boundary of the current frame, an invalid pixel mark is written. Zero gray level is not used to replace the actual observation. In this way, a registered image frame aligned with the spatial reference frame is obtained.

[0032] The processing device compares adjacent registered image frames pixel by pixel. First, it reads the effective grayscale values ​​of the same reference spatial position in the previous and next frames, calculates the difference between the grayscale values ​​of the next and previous frames, and takes the absolute value of the difference to obtain the grayscale change. Then, it compares the local texture windows in the search area around the position, writes the position offsets that meet the matching conditions as horizontal and vertical displacements, and determines the inter-frame motion direction based on the direction of the horizontal and vertical displacements in a unified coordinate system. If either of the two positions is an invalid pixel, or there is no candidate match in the search area, the response corresponding to that pixel is marked as an invalid response.

[0033] Inter-frame motion response records include spatial location, temporal location of the previous frame, temporal location of the next frame, grayscale change, lateral displacement, longitudinal displacement, motion direction, and valid status. When the displacement length is zero, the motion direction field is marked as stationary without arbitrarily assigning an angle. When multiple candidate positions have the same matching difference, a candidate is determined according to the order of displacement length, lateral coordinate, and longitudinal coordinate. If the candidate displacement crosses an invalid pixel area, its response validity level is reduced or it is directly excluded. Since grayscale change and motion direction are stored in the same response record, subsequent threshold filtering and direction connection read the common observation of the same spatial and temporal location.

[0034] The processing device aggregates inter-frame motion responses to form multiple scale layers according to preset spatial block sizes and preset time frame numbers. Preferably, the spatial block size is 8×8 pixels to 32×32 pixels; the time aggregation frame number is 3 to 7 frames. The first scale layer retains finer spatial blocks and a shorter time range, and subsequent scale layers gradually increase the spatial block coverage or time aggregation range. Each scale unit reads the effective responses within its coverage area, accumulates the grayscale changes and divides by the number of effective responses to obtain the aggregated response. At the same time, each effective displacement is converted into a unit direction and the horizontal and vertical components are accumulated respectively. The aggregated motion direction is obtained based on the direction of the accumulation result.

[0035] When the number of valid responses within a scale cell is zero, the scale cell is marked as an empty voxel. When the length of the accumulated unit directional components is less than the lower limit of directional stability, it indicates that there are mutually canceling motion directions within the scale cell. The processing device retains the aggregated response but marks the aggregated motion direction as directionally uncertain. Voxels with uncertain directions are not used as active expansion seeds and can only be processed as voxels to be confirmed when adjacent voxels with clear directions provide consistent directional constraints. Through this state distinction, regions with strong numerical responses but chaotic internal directions can be avoided from being directly expanded into stable motion regions.

[0036] Each scale layer stores the scale identifier, spatial block size, temporal aggregation frame number, voxel index range, and parameter version. It also stores the index relationship between the scale voxel and the original pixel position and acquisition time. This index relationship can be represented by the horizontal start and end coordinates, vertical start and end coordinates, and temporal start and end positions covered by each voxel, or it can be stored in a scale mapping table. The key of the mapping table is the scale identifier and the voxel index, and the value of the mapping table is the original coordinate range. Subsequent cross-scale comparisons first restore the unified original coordinate range through this index relationship to avoid directly comparing voxel numbers of different scale layers.

[0037] The spatial block size and the number of time aggregation frames can be determined by offline calibration. The processing device generates candidate scale combinations from calibration sequences with different target sizes and motion speeds, constructs spatiotemporal volumes one by one, and counts the temporal continuity length of the motion region, the number of region fragments, and the number of adjacent target mixtures. Among the candidate combinations that meet the limit on the number of adjacent target mixtures, the scale combination that meets the continuity requirement in terms of temporal continuity length and has a smaller number of region fragments than the remaining qualified combinations is selected. If there are ties, the combination with the smaller total number of spatial blocks and time frames is selected. If there are no qualified combinations, the basic scale is retained and the parameters are output as pending calibration.

[0038] The set of motion-connected domains is obtained based on the multi-scale spatiotemporal volume; the processing device traverses voxels in each scale layer and reads voxels with valid aggregate responses that are greater than the response threshold as seed voxels; the traversal order is determined by the time index, vertical index, and horizontal index in sequence, comparing the time index first, then the vertical index, and finally the horizontal index, so that the same input forms the same seed order when executed repeatedly; the processing device marks the seed voxel as enqueued before writing it into the seed queue to prevent the same voxel from being written repeatedly by multiple adjacent voxels.

[0039] The response threshold can be determined based on the background response of the corresponding scale layer. The processing device selects a calibration area where no continuous motion has been formed, counts the aggregated response of the effective voxels in the area and arranges them in ascending order of value. The response corresponding to the position covering a preset proportion of the background sample is read as the background upper limit of the scale layer. The background upper limit is then combined with the response safety margin to obtain the response threshold. When the background sample is empty, the most recent effective threshold of the same scale layer is used and a reuse mark is written. When there is no historical threshold, the connected component extraction of the scale layer is stopped and all voxels are not used as seeds.

[0040] For the target voxel at the front of the column, the processing device reads the voxels in the same time layer that share the spatial boundary with the target voxel, and reads the voxels in the previous time layer and the next time layer that have the same spatial index and are adjacent to the target voxel in time position. Shared spatial boundary means that two voxels are adjacent in the horizontal or vertical direction and their coverage in another direction overlaps. Voxels that only share corner points are not considered as spatially adjacent voxels. Temporal continuity means that the time intervals of two voxels are connected or the time interval between them is less than the continuous interval allowed by the current scale.

[0041] The processing device calculates the motion direction difference between the target voxel and its unvisited adjacent voxels. First, it converts the two directions to the same angular period, then determines the clockwise and counterclockwise angular differences. The angular difference where the value of the difference is less than the other is taken as the direction difference. For stationary voxels, the direction consistency condition is met only if the other voxel is also stationary. For voxels with uncertain directions, connection is allowed only if there is a representative direction within its valid internal directions that meets the direction difference threshold and the aggregation response meets the confirmation condition. When the direction difference is less than the direction difference threshold, the unvisited voxel is marked as visited and written to the tail of the queue. The direction difference threshold is determined through a calibration sequence. The processing device statistically analyzes the distribution of motion direction differences between adjacent time layers in the same motion region within the calibration sequence, reads the direction difference corresponding to the position covering a preset stable sample ratio as the direction difference threshold, and writes the version identifier into the spatiotemporal volume record after parameter updates.

[0042] After the processing device reads the head voxel, it removes it from the pending reading state and writes it into the currently visited voxel set. It repeats the adjacency reading, direction comparison, and queue update until there are no unread voxels in the seed queue. At this point, the currently visited voxel set is determined as a scale-connected component, and the spatial boundary, start time position, end time position, number of valid voxels, and representative motion direction of the scale-connected component at each time level are calculated. The representative motion direction is obtained by accumulating the unit direction components of each voxel. If the components and length are insufficient, the direction uncertainty state is retained.

[0043] After completing a scale-connected component, the processing device continues to read the voxels with the highest sorted position from the unvisited seed voxels and initializes a new seed queue. When there are no more unvisited seed voxels in the current scale layer, the traversal of that scale layer stops. When all scale layers have been traversed, a list of scale-connected components is formed. Empty scale layers retain a scale identifier and an empty list so that the scale layer is still counted in the total number of scale layers when calculating the scale ratio.

[0044] During cross-scale fusion, the processing device maps each intra-scale connected component to the original pixel coordinate range and acquisition time range through index relationships. For two intra-scale connected components from different scale layers, the proportion of the spatial overlap range to the spatial range of the two components whose area is smaller than the other area is calculated, and the proportion of the temporal overlap length to the duration of the two components whose duration is shorter than the other duration is calculated. When the two proportions satisfy the spatial fusion condition and the temporal fusion condition respectively, the two intra-scale connected components are connected in the fusion relationship table.

[0045] When the spatial area is zero or the duration is zero, the corresponding connected components do not participate in the proportional division. The processing device checks whether it is a legal boundary object of a single pixel or a single time layer. Legal objects are judged by whether their discrete positions fall into another range. Illegal objects are written into the boundary anomaly list. When the spatial overlap or temporal coincidence is exactly equal to the fusion condition, it is assigned to the branch that meets the condition. The processing device traverses the connection edges of the fusion relation table and assigns the connected components within the same scale that can be reached through one or more fusion edges to the same fusion group, thereby allowing fine-scale regions and mesoscale regions, and mesoscale regions and coarse-scale regions to form indirectly consistent fusion groups.

[0046] For each fusion group, the processing device counts the number of different scale identifiers within the group and compares this number with the total number of scale layers to obtain the scale ratio. If the same scale layer contains multiple intra-scale connected components that are assigned to the group, the scale identifier is counted only once to avoid artificially increasing the scale ratio in duplicate areas. The processing device then compares the representative motion directions of the intra-scale connected components within the group pair by pair to form a set of direction differences, and determines the largest direction difference that is greater than the remaining direction differences from the set. When there is only one valid direction within the group, the largest direction difference is recorded as a single-direction state and the corresponding single-direction interval in the mapping table is used.

[0047] The propagation confidence mapping table uses the parameter interval where the scale ratio is located as the row index and the parameter interval where the maximum directional difference is located as the column index. Each entry stores a normalized confidence score and a mapping version. The normalized confidence score ranges from 0 to 1 and is dimensionless. When the scale ratio is located at the common boundary of adjacent intervals, it is assigned to the interval with the larger scale ratio. When the maximum directional difference is located at the common boundary, it is assigned to the interval with the larger directional difference. When the parameter exceeds the table's coverage, it is assigned to the nearest end interval and an out-of-bounds flag is written. The processing device reads the corresponding entry to obtain the propagation confidence score. Fusion groups with a propagation confidence score less than the retention threshold are deleted, while fusion groups with a propagation confidence score equal to the retention threshold are retained. The confidence score retention threshold is determined by the propagation confidence score distribution of the correct fusion group and the incorrect fusion group in the calibration sequence. Among the candidate thresholds where the retention ratio of the correct fusion group meets the requirements, the threshold with the lowest retention ratio of the incorrect fusion group is selected.

[0048] The mapping table can be built using a calibration sequence. The specific construction process is as follows: Divide the scale ratio into several intervals and the maximum directional difference into several intervals to form a two-dimensional table. For each known motion region in the calibration sequence, calculate its scale ratio and maximum directional difference to determine which row and column interval the region belongs to, and record whether the region is still identified as the same motion region by the tracking algorithm in subsequent frames. For each cell in the table, count the number of all samples falling into that cell, and the number of samples that can continuously maintain the same motion region. Compare the subsequent count with the previous count to obtain the initial position of the cell. Reliability; If the number of samples in a cell is insufficient (e.g., less than ten), the initial value is not used directly. Instead, the lower confidence value among the cells above and to the left of that cell is used as a substitute. At the same time, the following smoothing operation is performed on the substitute value: the arithmetic mean of the original confidence values ​​of the cell and the four cells above, to the left, and to the upper left is taken as the final confidence value of the cell. If there are still cells with insufficient samples among the above adjacent cells, the same smoothing rule is recursively executed, with a recursion depth of no more than 3 levels. The final confidence values ​​of all cells are written into the mapping table, and the version number of the mapping table is recorded.

[0049] For the retained fusion groups, the processing device merges the original coordinate ranges within the group to form motion connected domains. The time boundaries are determined by objects whose start time position is less than the remaining start time position and objects whose end time position is greater than the remaining end time position. The spatial boundaries of each time layer are obtained by the union of the boundaries of the connected domains within the corresponding scale. The representative motion direction can be a combination of directions at each scale based on the number of effective voxels as the degree of contribution, or the direction with the total aggregated response greater than the connected domains within the remaining scale can be selected as the representative direction. The selected method is fixed and recorded in the same processing task. Since the cross-scale consistency and the internal direction dispersion are both included in the propagation confidence, the response formed by occasional noise at a single scale is not easy to enter the subsequent topology propagation.

[0050] A spatiotemporal topology graph is generated based on the set of motion connected components. For the target motion connected component, the processing device reads the spatial boundary and representative motion direction of the last valid time layer from the end time position, and moves each boundary point in the spatial boundary to the next time position along the representative motion direction. The moving distance is determined by the unit time displacement corresponding to the current motion direction and the time difference between adjacent time layers. When the motion direction only indicates the direction and does not carry velocity, the unit time displacement reads the displacement statistics of the adjacent spatial center positions of the connected component within the valid time range.

[0051] The spatial center position can be obtained by the average of the horizontal and vertical coordinates of the centers of each effective voxel within the same time layer boundary. The processing device first accumulates the horizontal and vertical coordinates separately, and then divides them by the number of effective voxels. Time layers with zero effective voxels do not participate in the center displacement calculation. When there is only one effective center position, the displacement length in the inter-frame motion response is used. When multiple center positions have the same acquisition time, they are first merged according to the voxel index. The displacement per unit time is obtained by dividing the center position difference by the acquisition time difference. Samples with zero acquisition time difference are excluded.

[0052] After the boundary moves to the next time layer, the processing device reads the motion direction of the target motion connected domain at different time layers, determines the difference between adjacent directions, and obtains the boundary expansion amount based on the expansion interval where the direction difference is located. The expansion amount corresponding to the interval where the direction difference is located does not decrease as the direction difference interval increases, so that a wider reachable space is retained when the direction change is obvious. The expansion operation increases the spatial range along the outward normal of the moved boundary, but the expanded boundary does not exceed the effective range of the image. The processing device connects the moving boundary and the expansion boundary of each time layer in chronological order to obtain the forward reachable spatiotemporal tube.

[0053] The expansion interval and corresponding expansion amount can be determined according to the calibration sequence. The processing device counts the directional difference between adjacent time layers and the offset distance of the next effective motion region relative to the predicted boundary. After grouping by directional difference, the offset distance covering the preset sample ratio is read as the candidate expansion amount of the group. Then, the overlap between the expanded region and the adjacent unrelated motion region is checked. If the unrelated overlap exceeds the allowable condition, the expansion amount is reduced one by one according to the decreasing sequence of candidate expansion amounts until the allowable condition is met. If all candidates do not meet the condition, the interval is marked as a non-propagable interval.

[0054] Each time layer is completed during forward propagation, the processing device checks the difference between the current extension time and the end time of the target motion connected domain. Propagation stops when the time difference reaches the time extension limit. Propagation also stops when the boundary has been extended to the entire effective image range and a range saturation marker is written. When a missing frame marker is encountered, propagation can continue once according to the actual time difference, but it stops immediately when the duration of the missing frame reaches the extension limit. When there is no effective unit time displacement and the direction of motion is uncertain, the forward reachable spatiotemporal tube only retains the boundary of the target motion connected domain itself and does not generate an extrapolated boundary.

[0055] The backward reachable spatiotemporal tube performs reverse processing from the starting time position of the target motion connectivity domain. The processing device reads the spatial boundary at the starting end, inverts the lateral and longitudinal components of the unit time displacement, and then moves the spatial boundary according to the backtracking time difference. The boundary expansion is still determined according to the direction difference between adjacent time layers at the starting end. The backtracking boundary is recorded layer by layer until the time backtracking upper limit, the image starting position, the range saturation condition, or the lack of effective motion direction is reached. The forward and backward directions use the same coordinate reference and boundary representation, so that the two can directly calculate the spatial overlap. The time extension upper limit and the time backtracking upper limit are determined in the following way: first, obtain the effective frame rate (i.e., frames per second) of the continuous image segment where the target motion connectivity domain is located, and multiply the frame rate according to the maximum occlusion duration allowed by the application scenario (in seconds) to obtain a frame number upper limit. At the same time, this upper limit shall not exceed the total number of frames of the entire image sequence. Take the smaller value of the above two frame numbers as the extension upper limit and the backtracking upper limit. When the maximum occlusion duration of the target in the scene is unknown, the 95th percentile of the number of consecutive lost frames of all targets in the calibration sequence is used as a reference value.

[0056] The processing device reads each pair of motion connected components whose end time is no later than the start time of another motion connected component. The motion connected component with the earlier time is designated as the previous motion connected component, and the motion connected component with the later time is designated as the next motion connected component. Then, the forward reachable spacetime tubes of the previous motion connected component and the backward reachable spacetime tubes of the next motion connected component are compared. Spatial overlap is calculated on the common time layer. As long as there is at least one spatial overlap on the common time layer that satisfies the candidate condition, the motion connected component pair is written into the candidate associated edge set.

[0057] When the temporal boundaries of two motion connected components partially overlap, if the order condition that the end time of the preceding motion connected component is no later than the start time of the following motion connected component is not met, then no candidate associated edge is established in that direction to avoid forming time reversal or circular connections. When two types of spatiotemporal tubes only touch at the boundary line, the number of touching pixels can be compared with the boundary length. If the contact condition is met, it is considered that there is overlap; otherwise, no candidate edge is established. The candidate edge records the start node identifier, end node identifier, common time layer, forward overlap range, backward overlap range, and parameter version.

[0058] The forward coverage ratio is determined by the proportion of the overlapping range to the spatial range of the forward reachable spatiotemporal tube in the common time layer, and the backward coverage ratio is determined by the proportion of the overlapping range to the spatial range of the backward reachable spatiotemporal tube. When the denominator corresponding range is empty, the coverage ratio is recorded as invalid and is not replaced by a zero value. An invalid coverage ratio causes the candidate edge to enter the pending confirmation state. The processing device uses the motion connected domain as the node and the candidate associated edge as the directed edge, and establishes a node index according to the start time position and node identifier to obtain the spatiotemporal topology graph.

[0059] Candidate associated edges are verified based on the spatiotemporal topology graph, forming a set of trajectory segments and topological event records. The processing device sorts the candidate associated edges by their start time in ascending order. Under the same start time, the edges are sorted by their start node end time, start node identifier, and end node identifier. The device reads the propagation confidence of the two nodes at both ends of each candidate associated edge in sequence, calculates the difference between the two propagation confidences, and takes the absolute value to obtain the propagation confidence difference. Edges with a difference less than the confidence difference threshold are marked as valid edges, while edges with a difference equal to or greater than the confidence difference threshold are marked as invalid edges.

[0060] The confidence difference threshold can be determined by the correct and incorrect connections in the calibration event. The processing device generates a candidate threshold sequence, and for each candidate threshold, the number of correct connections retained and the number of incorrect connections retained are counted. Among the candidates whose number of correct connections retained meets the retention requirement, the threshold with the number of incorrect connections retained is selected if it is less than the remaining qualified candidates. If there are ties, the threshold with a value less than the remaining tied threshold is selected. If the calibration sample is insufficient, the most recent valid version is used and marked as pending review.

[0061] After verification, the processing device counts the number of valid incoming edges and valid outgoing edges for each node. For nodes with no more than 1 valid incoming edge and no more than 1 valid outgoing edge, one valid outgoing edge is connected to the next node along the time direction. This process is repeated until the next node does not exist, the next edge is invalid, or the number of valid incoming edges or valid outgoing edges of the next node exceeds 1. The node sequence connected in this round is then determined as a trajectory segment. The quantity judgment here is used to identify ordinary connection segments without topological bifurcation. Nodes with multiple valid incoming edges or multiple valid outgoing edges are recorded separately as event boundaries.

[0062] When multiple valid incoming edges point to the same motion connected component, the processing device writes the state field of the node as merged and records the trajectory segment identifiers corresponding to all incoming edges; when the same motion connected component is connected to multiple valid outgoing edges, the state field of the node is written as split and the trajectory segment identifiers corresponding to all outgoing edges are recorded; when the same node satisfies both states at the same time, two state fields are retained respectively, and the event reading order is determined according to the incoming time and outgoing time, without compressing it into an undirected multi-branch state.

[0063] For each merge state, the processing device reads the split states with acquisition times greater than that of the merge state from the spatiotemporal topology graph and excludes split states that have already been paired with other merge states. The remaining split states are sorted in ascending order of acquisition time, and if the acquisition times are the same, they are sorted by node identifier. The processing device reads the unpaired split states in ascending order of acquisition time and selects the first split state that can reach the current merge state through an intermediate valid node as the paired state. If all unpaired split states are unreachable, the topology event record corresponding to the merge state is marked as unclosed and no longer forced to be paired. If a new split state arrives later and meets the reachability condition, the event record can be updated.

[0064] When pairing is successful, the processing device writes all incoming trajectory segment identifiers in the merged state, all outgoing trajectory segment identifiers in the split state, intermediate motion connectivity identifiers between the merged node and the split node, and the start and end time positions into the same event record; when pairing fails, the reachable intermediate motion connectivity after the merged node and the end time of the current sequence are written into the event record, and the event state is marked as unclosed; unclosed records are not forcibly assigned outgoing identities and can continue to be updated after subsequent new image frames arrive.

[0065] When processing images in a streaming manner, topological event records have four states: open, updated, closed, and timeout. An open record is established when a merge node appears. When a new motion connected component arrives, the intermediate identifier and end time are updated. When a paired split state is found, the record is switched to closed. When the duration reaches the event waiting limit and no split state is found, the record is switched to timeout. In offline processing, records that are still in the open state are uniformly marked as unclosed after the complete sequence traversal is completed. The original timestamp and the previous state are retained for all state transitions, which facilitates the tracing of the connection process.

[0066] The continuous target trajectory and propagation confidence are determined based on the trajectory segment set and topological event record. The processing device reads the inbound trajectory segment set and the outbound trajectory segment set from a closed topological event record. For each inbound trajectory segment, the final segment motion direction near the merging state is read. When the final segment contains multiple motion connected components, the contribution degree of each connected component is allocated according to its propagation confidence and then accumulated. The final segment motion direction is obtained based on the direction of the accumulated components. When the sum of the contribution degrees is zero, the last motion connected component with a valid direction in time is used instead.

[0067] The processing device uses the direction perpendicular to the final movement direction as the horizontal axis and selects the center position of the spatial region corresponding to the merging state as the origin of the horizontal axis. For the incoming trajectory segment near the end spatial region of the merging state, it reads the center position of each effective voxel in the region, projects the vector from the origin of the horizontal axis to the center position onto the horizontal axis, accumulates the projection value and divides it by the number of effective voxels to obtain the horizontal projection position of the trajectory segment. The processing device arranges the incoming trajectory segments in ascending order of horizontal projection position, and sorts them by trajectory segment identifier when the projection positions are the same, thus obtaining the incoming arrangement sequence.

[0068] The candidate identity region is generated starting from the end space region of the incoming trajectory segment. The processing device reads the final movement direction and unit time displacement of the trajectory segment, and moves the end space region according to the duration of the merged state. The duration is the difference between the end time and the start time of the paired event. If there are missing frames, it is still calculated based on the actual acquisition time difference. The moved region is then expanded according to the dispersion of the final direction. The method for determining the expansion amount is the same as the expansion rule of the reachable spatiotemporal tube or reads the expansion table dedicated to identity continuation. The version used is written into the event record.

[0069] If an intermediate motion connectivity domain exists within the duration of the merged state, the processing device can update the identity candidate region at each intermediate time layer. First, the candidate region of the previous time layer is moved along the incoming direction, and then the candidate region is restricted to the allowable range formed by the spatial boundary and the extended boundary of the intermediate motion connectivity domain. When the moved region and the allowable range do not overlap, the moved region is retained but the candidate state is reduced. When multiple consecutive time layers do not overlap, the update is stopped and the incoming trajectory segment is marked as identity pending confirmation. Layer-by-layer update enables identity propagation to utilize the overall motion range visible within the event, rather than just using a time difference to make a long-distance extrapolation.

[0070] For each outgoing trajectory segment, the processing device reads its starting spatial region and compares it with each identity candidate region one by one. The overlap ratio is obtained by comparing the overlap area of ​​the two regions with the area of ​​the region in the outgoing starting spatial region and the identity candidate region whose area is smaller than the other area. When the area is zero, discrete pixel fall-in judgment is used. When both regions are empty, the candidate is invalid. The processing device also calculates the period angle difference between the starting motion direction of the outgoing trajectory segment and the ending motion direction of the incoming trajectory segment, and calculates the absolute value of the difference in their propagation confidence.

[0071] The processing device first arranges the candidate correspondences according to the overlap ratio from large to small. If the overlap ratios are the same, they are arranged according to the difference in motion direction from small to large. If the direction differences are still the same, they are arranged according to the difference in propagation confidence from small to large. If all three are the same, they are sorted according to the incoming trajectory segment identifier and the outgoing trajectory segment identifier. The sorting only forms the candidate order and does not immediately allow multiple incoming segments to occupy the same outgoing segment. If the overlap ratio of the candidate correspondence does not meet the identity overlap condition, the direction difference does not meet the identity direction condition, or the confidence difference does not meet the identity confidence condition, it is excluded from the candidate list.

[0072] The one-to-one correspondence processing starts from the first trajectory segment of the incoming sequence. The processing device reads the outgoing candidate that is ranked first in the incoming trajectory segment and has not yet been occupied, and checks whether the arrangement position of the candidate on the outgoing side horizontal axis intersects with the already determined correspondence. If the arrangement order does not change, the correspondence is written and the outgoing trajectory segment is occupied. If an intersection occurs, the next candidate is read until a candidate that meets the conditions is found or the candidates are exhausted. When the incoming trajectory segment candidates are exhausted, the original identity is retained and the post-event state is recorded as pending confirmation. The remaining outgoing segments are not arbitrarily assigned to the identity.

[0073] When the number of outbound trajectory segments is different from the number of inbound trajectory segments, the processing device still performs one-to-one correspondence and arrangement constraints. When the number of outbound segments is small, the unacquired inbound segments form the end of the trajectory to be continued at the end of the event. When the number of outbound segments is large, the unoccupied outbound segments establish temporary new identities and are marked as event-derived trajectories to be confirmed. They can be updated later based on appearance conditions or new topology events. Since the arrangement constraints only work within the same event, they do not force trajectory segments on different times and different topology paths to be arranged into the same sequence.

[0074] Appearance conditions are only used for supplementary checks after trajectory interruption and do not replace the spatiotemporal topology main chain; the processing device can extract grayscale distribution, edge direction distribution, or color channel statistics from the pixel region corresponding to the motion connected component, first unify the region size and effective pixel range, and then compare the feature differences between the end of the trajectory to be continued and the new motion connected component. When the difference meets the appearance threshold, it is allowed to enter the candidate list; the method for judging the appearance conditions is to extract the grayscale histogram and edge direction histogram of all effective pixels in the pixel region of the registered image frame corresponding to the motion connected component; the grayscale histogram uniformly divides the grayscale level into several intervals, and the edge direction histogram divides the grayscale level into several intervals. The angular range is uniformly divided into several intervals; for two motion connected domains to be compared, the degree of overlap of their gray-level histograms and the degree of overlap of their edge direction histograms are calculated respectively. These two degrees of overlap are added together with different weights (e.g., gray-level accounts for 60% and edge direction accounts for 40%) to obtain a comprehensive similarity; when the comprehensive similarity is greater than the preset appearance threshold, the appearance condition is determined to be met; the specific value of the appearance threshold is determined by the 5th percentile of the similarity of the same target at different times in the calibration sequence. If the input is a single-channel image, the non-existent color channel is not calculated. When the effective pixels of the region are empty, the appearance condition is recorded as not met.

[0075] After completing the identity mapping within the event, the processing device writes the identity identifier of the incoming trajectory segment into the corresponding outgoing trajectory segment and continues to connect along subsequent valid edges until the next topological event, no valid edges, or the end of the sequence, thus obtaining a continuous target trajectory. Each write simultaneously saves the source event identifier, candidate sorting position, and the constraint results used. If subsequent manual confirmation or a higher-confidence event provides contrary evidence, the trajectory segment state before the event can be rolled back according to the version and recalculated without overwriting the original event record. Figure 3 An illustrative simulation scatter plot illustrates the effect of overlap ratio and motion direction difference on candidate selection.

[0076] The propagation confidence of continuous target trajectories is calculated according to the trajectory interval. The processing device reads the propagation confidence of each motion connectivity within the interval in the order of acquisition time, and takes the value that is less than the remaining propagation confidence as the first candidate confidence. Then, it reads all the effective forward coverage ratios and backward coverage ratios between adjacent motion connectivity, and takes the value that is less than the remaining coverage ratio as the second candidate confidence. When there are ties, the same value is retained and the time position of the first occurrence is recorded.

[0077] When a trajectory interval contains only one motion-connected component and has no adjacent connections, the second candidate confidence score is recorded as missing, but the missing value is not written as zero. The interval confidence score directly adopts the first candidate confidence score and is marked as a single-node interval. When there are adjacent connections but any coverage ratio is invalid, the interval corresponding to the adjacent connection is in the state of pending confirmation and is isolated from the calculation of confirmed intervals. When both the first candidate confidence score and the second candidate confidence score are valid, the processing device selects the value less than the other value as the interval confidence score. If the two values ​​are equal, the same value is taken as the interval confidence score, and the equal-value hit status is recorded in the output metadata.

[0078] Interval division can be based on topology events, parameter version changes, registration re-initialization, or missing frame markings as boundaries. The processing device independently reads the lowest node confidence and lowest coverage ratio within each interval. When the interval confidence is greater than the output threshold, it is marked as a confirmed interval; when the interval confidence is less than the output threshold, it is marked as a pending interval; when the interval confidence is equal to the output threshold, it can be assigned to a confirmed interval according to pre-fixed boundary rules, and the equal-value hit status is recorded in the output metadata. Figure 2 An exemplary simulation variation is shown where the confidence level is reduced by merging into the split time interval and then recovers after the event closure.

[0079] The processing equipment monitors the interruption time between the end of each trajectory and the latest acquisition time. If the interruption time has not reached the termination duration, the trajectory is kept in a waiting state and the newly arrived motion connectivity is sequentially checked for spatiotemporal reachability and appearance conditions. If the interruption time reaches the termination duration and no motion connectivity that meets the appearance conditions is obtained, the end time position of the last connected motion connectivity is marked as the termination position, and the interval status and interval confidence of each interval before the termination position are written into the continuous target trajectory.

[0080] The termination duration can be determined from the time required for the target to leave the effective image range, the allowed duration of occlusion, or the processing buffer length. The processing device replays the calibration sequence one by one for the candidate termination durations, counts the number of premature terminations and the number of erroneous continuations, and selects the candidate value whose duration is less than the remaining qualified candidates from the candidates whose limits are met in both categories. If there is no qualified value, the parameters are output as pending calibration and a safe branch that does not perform automatic termination is adopted. When the trajectory reaches the image boundary and the direction of movement points out of the boundary, the reason for leaving the boundary can be recorded, but the determined termination time and position are still retained.

[0081] The final output confidence motion trajectory includes trajectory identifier, spatial regions or center positions arranged by time, corresponding motion connectivity identifiers, topological event identifiers passed through, start and end times of each interval, interval status, interval confidence, and termination position. The output can be written to a trajectory data file or sent to a display module to overlay trajectory lines on the image frame. When the display module reads only confirmed intervals, it represents them with solid lines; when reading intervals to be confirmed, it represents them with distinct line types. The display method does not change the stored trajectory judgment results.

[0082] Through the above processing, the multi-scale spatiotemporal volume first unifies the pixel position, acquisition time and motion response into comparable voxel records, and then uses the degree of repetition and the degree of directional consistency to suppress single-scale sporadic responses. The forward reachable spatiotemporal tube and the backward reachable spatiotemporal tube convert the regional motion propagation into candidate edges with temporal order, and the propagation confidence check converges the candidate edges into valid connections. After the merged state and the split state are stored in the same event record, identity recovery can use the forward direction, lateral arrangement and confidence of the event at the same time, without relying on the target appearance that is continuously visible during occlusion.

[0083] In the implementation of input buffering and sequence recovery, the processing device writes the frame record, acquisition time, acquisition sequence number, and reception order into the stage input record with task identifier and version identifier. It processes each item in the aforementioned determined order and writes the threshold version, candidate sequence number, and state change used for each comparison into the process record. At the end of the stage, only the time-ordered image frames and missing frame markers are submitted to the next stage. During processing, repeated time, size anomalies, and unresolved fields are detected. When the corresponding situation is hit, the defined exclusion, reuse, pending confirmation, or stop branches are executed. Processing is not continued by filling in arbitrary values. Since the input, state changes, and output can all be traced by identifiers, when an anomaly is subsequently discovered, the time layer, scale layer, node, or event that caused the anomaly can be located without reinterpreting the entire trajectory.

[0084] For parameter maintenance of input buffer and sequence recovery, the processing device saves the current parameters together with the calibration sequence summary, effective time range and applicable image size used to establish the parameters. New parameters are first generated, evaluated one by one and qualified on an independent copy, and then an incremental version identifier is generated. The image sequence to be tracked that is being processed keeps using the parameter version locked at startup. The new version takes effect from the next consecutive segment. If the new version is missing the fields required for input buffer and sequence recovery, the switch is refused and the original version is used. This method prevents the propagation confidence from being incomparable due to real-time changes in parameters before and after the same trajectory.

[0085] In the implementation of static feature point screening, the processing device writes adjacent temporally ordered image frames and local texture windows into a stage input record with task identifiers and version identifiers. It processes them one by one according to the aforementioned determined order, and writes the threshold version, candidate number and state change used for each comparison into the process record. At the end of the stage, only the set of static feature points with a determined corresponding position is submitted to the next stage. During the processing, texture windows without texture, parallel candidates and displacement exceeding the limit are detected. When the corresponding situation is hit, the defined exclusion, reuse, pending confirmation or stop branch is executed. Processing is not continued by filling in arbitrary values. Since the input, state change and output can all be traced by the identifier, when an anomaly is found later, the time layer, scale layer, node or event that caused the anomaly can be located without reinterpreting the entire trajectory.

[0086] For parameter maintenance in static feature point screening, the processing device saves the current parameters along with the calibration sequence summary, effective time range, and applicable image size used to establish the parameters. New parameters are first generated, evaluated one by one, and qualified selection is completed on an independent copy, and then an incremental version identifier is generated. The image sequence to be tracked that is being processed keeps using the parameter version locked at startup. The new version takes effect from the next consecutive segment. If the new version lacks the fields required for static feature point screening, the switch is refused and the original version is used. This method prevents incomparable propagation confidence from occurring before and after the same trajectory due to real-time parameter changes.

[0087] In the implementation of spatial position transformation, the processing device writes the static feature point coordinate pairs and registration tolerances into the stage input record with task identifier and version identifier, processes them item by item according to the aforementioned determined order, and writes the threshold version, candidate sequence number and state change used for each comparison into the process record. At the end of the stage, only the position transformation from the current frame to the spatial reference frame is submitted to the next stage. During the processing, insufficient point pairs, residual exceeding the limit and continuous registration pending confirmation are detected. When the corresponding situation is hit, the defined exclusion, reuse, pending confirmation or stop branch is executed, and the processing is not continued by filling in arbitrary values. Since the input, state change and output can all be traced by the identifier, when an anomaly is found later, the time layer, scale layer, node or event that caused the anomaly can be located without reinterpreting the entire trajectory.

[0088] For parameter maintenance of spatial location transformation, the processing device saves the current parameters together with the calibration sequence summary, effective time range, and applicable image size used to establish the parameters. New parameters are first generated, evaluated one by one, and qualified selection is completed on an independent copy, and then an incremental version identifier is generated. The image sequence to be tracked that is being processed keeps using the parameter version locked at startup. The new version takes effect from the next consecutive segment. If the new version lacks the fields required for spatial location transformation, the switch is rejected and the original version is used. This method prevents the propagation confidence from being incomparable due to real-time changes in parameters before and after the same trajectory.

[0089] In the implementation of inter-frame motion response, the processing device writes adjacent registered image frames and effective pixel markers into a stage input record with task identifier and version identifier, processes them item by item according to the aforementioned determined order, and writes the threshold version, candidate sequence number and state change used for each comparison into the process record. At the end of the stage, only the combination record of grayscale change, displacement and motion direction is submitted to the next stage. During processing, external sources, zero displacement and no matching candidates are detected. When the corresponding situation is hit, the defined exclusion, reuse, pending confirmation or stop branch is executed, and the processing is not continued by filling in arbitrary values. Since the input, state change and output can all be traced by the identifier, when an anomaly is found later, the time layer, scale layer, node or event that caused the anomaly can be located without reinterpreting the entire trajectory.

[0090] For parameter maintenance of inter-frame motion response, the processing device saves the current parameters along with the calibration sequence summary, effective time range, and applicable image size used to establish the parameters. New parameters are first generated, evaluated, and selected on an independent copy, and then an incremental version identifier is generated. The image sequence being processed retains the parameter version locked at startup. New versions take effect from the next consecutive segment. If the new version lacks the fields required for inter-frame motion response, the switch is rejected and the original version is used. This method prevents incomparable propagation confidence from occurring before and after the same trajectory due to real-time parameter changes.

[0091] In the implementation of scale layer construction, the processing device writes the inter-frame motion response and scale parameters into the stage input record with task identifier and version identifier, processes them item by item in the aforementioned determined order, and writes the threshold version, candidate sequence number and state change used for each comparison into the process record. At the end of the stage, only the multi-scale spatiotemporal volume with the original coordinate index is submitted to the next stage. During processing, empty voxels, direction cancellation and parameter version changes are detected. When the corresponding situation is hit, the defined exclusion, reuse, pending confirmation or stop branches are executed. Processing is not continued by filling in arbitrary values. Since the input, state change and output can all be traced by the identifier, when an anomaly is found later, the time layer, scale layer, node or event that caused the anomaly can be located without reinterpreting the entire trajectory.

[0092] For the maintenance of parameters for scale layer construction, the processing device saves the current parameters together with the calibration sequence summary, effective time range, and applicable image size used to establish the parameters. New parameters are first generated, evaluated one by one, and qualified selection is completed on an independent copy, and then an incremental version identifier is generated. The image sequence to be tracked that is being processed keeps using the parameter version locked at startup. The new version takes effect from the next consecutive segment. If the new version lacks the fields required for scale layer construction, the switch is refused and the original version is used. This method prevents the propagation confidence from being incomparable due to real-time changes in parameters before and after the same trajectory.

[0093] In the implementation of seed region growth, the processing device writes the scale voxels, response threshold, and orientation difference threshold into the stage input record with task identifier and version identifier. It processes them one by one according to the aforementioned determined order, and writes the threshold version, candidate number, and state change used for each comparison into the process record. At the end of the stage, only the list of connected components within the scale is submitted to the next stage. During processing, duplicate enqueues, orientation uncertainties, and empty scale layers are detected. When the corresponding situation is hit, the defined exclusion, reuse, pending confirmation, or stop branches are executed. Processing is not continued by filling in arbitrary values. Since the input, state changes, and output can all be traced by the identifier, when an anomaly is found later, the time layer, scale layer, node, or event that caused the anomaly can be located without reinterpreting the entire trajectory.

[0094] For parameter maintenance of seed region growth, the processing device saves the current parameters along with the calibration sequence summary, effective time range, and applicable image size used to establish the parameters. New parameters are first generated, evaluated, and selected on an independent copy, and then an incremental version identifier is generated. The image sequence being processed retains the parameter version locked at startup. The new version takes effect from the next consecutive segment. If the new version lacks the fields required for seed region growth, the switch is rejected and the original version is used. This method prevents incomparable propagation confidence from occurring before and after the same trajectory due to real-time parameter changes.

[0095] In the implementation of cross-scale fusion, the processing device writes the connected components within the scale and the original coordinate index into the stage input record with task identifier and version identifier, processes them item by item according to the aforementioned determined order, and writes the threshold version, candidate sequence number and state change used for each comparison into the process record. At the end of the stage, only the fusion group and propagation confidence are submitted to the next stage. During the processing, zero area, zero duration, table entry miss and low confidence deletion are detected. When the corresponding situation is hit, the defined exclusion, reuse, pending confirmation or stop branch is executed, and the processing is not continued by filling in arbitrary values. Since the input, state change and output can all be traced by the identifier, when an anomaly is found later, the time layer, scale layer, node or event that caused the anomaly can be located without reinterpreting the entire trajectory.

[0096] For parameter maintenance in cross-scale fusion, the processing device saves the current parameters along with the calibration sequence summary, effective time range, and applicable image size used to establish the parameters. New parameters are first generated, evaluated, and qualified on an independent copy, and then an incremental version identifier is generated. The image sequence being processed retains the parameter version locked at startup. The new version takes effect from the next consecutive segment. If the new version lacks the fields required for cross-scale fusion, the switch is rejected and the original version is used. This method prevents incomparable propagation confidence from occurring before and after the same trajectory due to real-time parameter changes.

[0097] In the implementation of bidirectional reachability propagation, the processing device writes the boundaries, directions, and time constraints of the motion connectivity domain into the stage input record with task identifiers and version identifiers, processes them item by item according to the aforementioned determined order, and writes the threshold version, candidate sequence number, and state change used for each comparison into the process record. At the end of the stage, only the forward reachable spatiotemporal tube and the backward reachable spatiotemporal tube are submitted to the next stage. During processing, missing frames, range saturation, no velocity, and non-propagable intervals are detected. When the corresponding situation is hit, the defined exclusion, reuse, pending confirmation, or stop branches are executed, and processing is not continued by filling in arbitrary values. Since the input, state changes, and outputs can all be traced by identifiers, when an anomaly is subsequently detected, the time layer, scale layer, node, or event that caused the anomaly can be located without reinterpreting the entire trajectory.

[0098] For parameter maintenance in two-way reachability propagation, the processing device saves the current parameters along with the calibration sequence summary, effective time range, and applicable image size used to establish the parameters. New parameters are first generated, evaluated, and selected on an independent copy, and then an incremental version identifier is generated. The image sequence being processed retains the parameter version locked at startup. The new version takes effect from the next consecutive segment. If the new version lacks the fields required for two-way reachability propagation, the switch is rejected and the original version is used. This method prevents incomparable propagation confidence from occurring before and after the same trajectory due to real-time parameter changes.

[0099] In the implementation of candidate edge generation, the processing device writes the two types of reachable spatiotemporal tubes and time boundaries into the stage input record with task identifier and version identifier, processes them one by one according to the aforementioned determined order, and writes the threshold version, candidate number and state change used for each comparison into the process record. At the end of the stage, only the set of candidate associated edges with coverage ratio is submitted to the next stage. During the processing, boundary contact, time inversion and empty coverage are detected. When the corresponding situation is hit, the defined exclusion, reuse, pending confirmation or stop branches are executed. Processing is not continued by filling in arbitrary values. Since the input, state change and output can all be traced by the identifier, when an anomaly is found later, the time layer, scale layer, node or event that caused the anomaly can be located without reinterpreting the entire trajectory.

[0100] For parameter maintenance during candidate edge generation, the processing device saves the current parameters along with the calibration sequence summary, effective time range, and applicable image size used to establish the parameters. New parameters are first generated, evaluated, and qualified on an independent copy, and then an incremental version identifier is generated. The image sequence being processed retains the parameter version locked at startup. New versions take effect from the next consecutive segment. If the new version lacks the fields required for candidate edge generation, the switch is refused and the original version is used. This method prevents incomparable propagation confidence from occurring before and after the same trajectory due to real-time parameter changes.

[0101] In the implementation of edge verification and fragmentation, the processing device writes the candidate associated edges and the propagation confidence of both ends into the stage input record with task identifier and version identifier, processes them one by one according to the aforementioned determined order, and writes the threshold version, candidate sequence number and state change used for each comparison into the process record. At the end of the stage, only the valid edges, trajectory fragments and event boundaries are submitted to the next stage. During the processing, threshold equality, multiple incoming edges, multiple outgoing edges and isolated nodes are detected. When the corresponding situation is hit, the defined exclusion, reuse, pending confirmation or stop branches are executed, and the processing is not continued by filling in arbitrary values. Since the input, state change and output can all be traced by the identifier, when an anomaly is found later, the time layer, scale layer, node or event that caused the anomaly can be located without reinterpreting the entire trajectory.

[0102] For parameter maintenance involving edge verification and fragmentation, the processing device saves the current parameters along with the calibration sequence summary, effective time range, and applicable image size used to establish the parameters. New parameters are first generated, evaluated, and selected on an independent copy, and then an incremental version identifier is generated. The image sequence being processed retains the parameter version locked at startup. New versions take effect from the next consecutive segment. If the new version lacks the fields required for edge verification and fragmentation, the switch is rejected and the original version is used. This method prevents incomparable propagation confidence from occurring before and after the same trajectory due to real-time parameter changes.

[0103] In the implementation of event pairing, the processing device writes the merged state, split state, and effective edge reachability relationship into the stage input record with task identifier and version identifier, processes them one by one according to the aforementioned determined order, and writes the threshold version, candidate sequence number, and state change used for each comparison into the process record. At the end of the stage, only the closed or unclosed topology event record is submitted to the next stage. During the processing, parallel time, path unreachability, and waiting timeout are detected. When the corresponding situation is hit, the defined exclusion, continuation, pending confirmation, or stop branch is executed, and the processing is not continued by filling in arbitrary values. Since the input, state change, and output can all be traced by the identifier, when an anomaly is found later, the time layer, scale layer, node, or event that caused the anomaly can be located without reinterpreting the entire trajectory.

[0104] For parameter maintenance of event pairing, the processing device saves the current parameters together with the calibration sequence summary, effective time range, and applicable image size used to establish the parameters. New parameters are first generated, evaluated one by one, and qualified selection is completed on an independent copy, and then an incremental version identifier is generated. The image sequence to be tracked that is being processed keeps using the parameter version locked at startup. The new version takes effect from the next consecutive segment. If the new version lacks the fields required for event pairing, the switch is rejected and the original version is used. This method prevents the propagation confidence from being incomparable due to real-time changes in parameters before and after the same trajectory.

[0105] In the implementation of identity correspondence, the processing device writes the inbound arrangement, identity candidate region, and outbound segment index into the stage input record with task identifier and version identifier. It processes them one by one according to the aforementioned determined order, and writes the threshold version, candidate number, and state change used for each comparison into the process record. At the end of the stage, only the one-to-one identity correspondence before and after the event is submitted to the next stage. During the processing, candidate crossover, unequal number, and candidate exhaustion are detected. When the corresponding situation is hit, the defined exclusion, continuation, pending confirmation, or stop branch is executed. Processing is not continued by filling in arbitrary values. Since the input, state change, and output can all be traced by the identifier, when an anomaly is found later, the time layer, scale layer, node, or event that caused the anomaly can be located without reinterpreting the entire trajectory.

[0106] For maintaining the parameters corresponding to the identity, the processing device saves the current parameters together with the calibration sequence summary, effective time range, and applicable image size used to establish the parameters. New parameters are first generated, evaluated one by one, and qualified selection is completed on an independent copy, and then an incremental version identifier is generated. The image sequence to be tracked that is being processed keeps using the parameter version locked at startup. The new version takes effect from the next consecutive segment. If the new version lacks the fields required for identity correspondence, the switch is rejected and the original version is used. This method prevents the propagation confidence from being incomparable due to real-time changes in parameters before and after the same trajectory.

[0107] In the implementation of confidence aggregation, the processing device writes the node confidence, forward coverage ratio, and backward coverage ratio into the stage input record with task identifier and version identifier, processes them item by item in the aforementioned determined order, and writes the threshold version, candidate sequence number, and state change used for each comparison into the process record. At the end of the stage, only the confidence motion trajectory with interval state is submitted to the next stage. During the processing, single node intervals, invalid ratios, threshold equality, and trajectory termination are detected. When the corresponding situation is hit, the defined exclusion, continuation, pending confirmation, or stop branch is executed, and the processing is not continued by filling in arbitrary values. Since the input, state change, and output can all be traced by the identifier, when an anomaly is found later, the time layer, scale layer, node, or event that caused the anomaly can be located without reinterpreting the entire trajectory.

[0108] For the maintenance of confidence level summaries, the processing device saves the current parameters along with the calibration sequence summary, effective time range, and applicable image size used to establish the parameters. New parameters are first generated, evaluated, and qualified on an independent copy, and then an incremental version identifier is generated. The image sequence being processed retains the parameter version locked at startup. New versions take effect from the next consecutive segment. If the new version lacks the fields required for confidence level summaries, the switch is rejected and the original version is used. This method prevents incomparable propagation confidence levels from occurring before and after the same trajectory due to real-time parameter changes.

[0109] The spatiotemporal topology graph can be stored using a node table, an edge table, and an adjacency index. Each row in the node table corresponds to a motion-connected component and must at least store the node identifier, temporal boundary, spatial boundaries of each temporal layer, representative motion direction, propagation confidence, and state field. Each row in the edge table corresponds to a candidate associated edge and must at least store the starting node identifier, ending node identifier, time range of overlap between the two types of spatiotemporal tubes, forward coverage ratio, backward coverage ratio, and valid state. The adjacency index stores the edge table positions by starting and ending nodes, respectively. This allows the recording module to read the incoming and outgoing edges of a node without scanning the entire edge table. When a node or edge is deleted, only the valid state is changed while the original record is retained, so that event review can still restore the reason for deletion.

[0110] When spatial boundaries are defined using a time-series boundary point sequence, the processing device first arranges the boundary points in fixed directions according to the horizontal and vertical coordinates. Adjacent points are connected by horizontal, vertical, or diagonal segments to describe the closed area. When calculating the overlapping area, the common part of the circumscribed rectangles of the two boundaries is first determined. If the circumscribed rectangles have no common part, the overlapping area is recorded as zero. If there is a common part, the position within the common part is determined pixel by pixel or by scan line to see if it is simultaneously located within both boundaries, and the number of positions simultaneously located within both boundaries is accumulated. If the boundary is not closed, it is first attempted to close it according to the first-to-last distance condition. If the closure condition is still not met, the boundary is marked as abnormal, and the area of ​​the circumscribed rectangle is not used to replace the actual overlapping area.

[0111] When using periodic angles to determine direction difference, the processing device restricts the input direction to the same period interval. When the direction value is less than the lower limit of the interval, it increases by one full period; when the direction value reaches the upper limit of the interval, it decreases by one full period. After the restriction is completed, the absolute difference between the two direction values ​​is calculated, and the absolute difference is compared with the result obtained by subtracting the absolute difference from one full period. The value that is less than the other result is read as the direction difference value. When the input is a stationary marker or a marker with uncertain direction, it does not participate in the angle subtraction, but enters the corresponding state branch, thereby avoiding the use of arbitrary angles to represent missing directions.

[0112] During streaming execution, the processing device sets a received time threshold for each continuous segment. Only frames whose acquisition time is no greater than this threshold and exceed the out-of-order waiting range are fixed into the time-ordered image frames. Frames that arrive late but are still within the out-of-order waiting range are inserted into their corresponding positions, and the inter-frame motion responses that have not yet been frozen are updated. Frames that arrive late but are earlier than the frozen range are written into the late arrival record, and the already output confidence motion trajectories are not written back. During offline execution, no real-time threshold is set. Instead, all frames are sorted once after they are read, thus ensuring that real-time processing and offline processing maintain a clear update range within their respective defined input boundaries.

[0113] When the processing device needs to reduce storage usage, after the motion connectivity domain has been formed and the original response is no longer used for recalibration, the aggregate response, motion direction, effective state, and original coordinate index of each voxel can be retained, and the corresponding local texture window cache can be released. After the topological event is closed and the trajectory interval has been confirmed, the intermediate reachable spatiotemporal tube can be compressed into a sequence of boundary points of each time layer, while retaining the overlapping range used to calculate the forward coverage ratio and backward coverage ratio. Before releasing or compressing, it is checked that all downstream modules have obtained the required fields, and the release is performed after checking the failure delay, so as not to destroy the event backtracking capability due to storage optimization.

[0114] To illustrate the data changes in the above processing chain in occlusion and intersection scenarios, this embodiment uses a set of exemplary simulated image sequences for process demonstration. The simulation sequences are only used to demonstrate the calculation, state transition, and plot formation methods, and are not used as actual device performance test results. The sequence contains two motion regions that approach each other in different directions, overlap in spatial range in the middle time period, and then separate again. An independent motion region that does not participate in the merging event is set as a topological comparison. All normalized responses, confidence levels, and coverage ratios are generated by determined simulation generation rules.

[0115] The simulated image has two high-response bands that move toward each other over time in the horizontal position of the space. Each high-response band is represented by a smooth response distribution near the center position and is superimposed with a low-amplitude background perturbation generated by a fixed random seed. The processing device truncates the negative response to zero and then writes it into the spatiotemporal volume according to the same time and space index as the actual process.

[0116] In the exemplary simulation, the node propagation confidence is obtained by jointly mapping the cross-scale retention case and the directional discretization case. The trajectory interval confidence is then read for values ​​within the interval that are less than the remaining node confidence and values ​​that are less than the remaining bidirectional coverage ratio. To visually display the state boundaries, the example output threshold is set to a normalized confidence of 0.65, which is equivalent to being assigned to the confirmed interval. Figure 2 The shaded area in the curve represents the time range from the merged state to the split state. The curve declines during the occlusion period, corresponding to a reduction in the visible motion boundary. After the event closes, the curve rises again as bidirectional coverage is restored.

[0117] Figure 3 Each point in the graph represents a candidate correspondence between an incoming trajectory segment and an outgoing trajectory segment. The horizontal axis represents the normalized difference in motion direction, and the vertical axis represents the overlap ratio of the candidate identity regions. Green dots represent correspondences that simultaneously meet the candidate conditions and whose incoming arrangement order has not changed, while red crosses represent correspondences that are excluded due to direction difference, overlap ratio, or arrangement conflict. This scatter distribution is not intended to prove that the fixed threshold is applicable in all image scenarios; the actual threshold is still determined according to the calibration sequence and imaging conditions.

[0118] Figure 4 Each bubble in the diagram represents an exemplary topology event. The horizontal axis represents the number of frames from the merged state to the split state, and the vertical axis represents the bidirectional coverage ratio where the forward coverage ratio and backward coverage ratio are less than the other. The bubble area and color together represent the propagation confidence. The event number is only used to distinguish samples, and the processing device does not determine the event quality based on the number. The bubble position allows simultaneous verification of whether the duration, coverage, and confidence fields have been written to the same event record.

[0119] During the simulation process, the processing equipment first performs seed selection and region growth at each scale level based on the response data, then maps the connected components within the scale back to the original coordinates and forms fusion groups; nodes and edges are established for the retained fusion groups, and then... Figure 2 The corresponding interval confidence levels are marked as confirmed and unconfirmed intervals, and then... Figure 3 The candidate order shown completes the one-to-one identity matching, and finally... Figure 4 The event fields and trajectory identifiers shown are output together; the meanings of fields in the same exemplary scenario are shared between different graphs, and it is not required that each point in the graph corresponds to the same object numerically.

[0120] When the simulation sequence is replaced with real acquired images, the processing chain, data structure and boundary processing remain unchanged, and the parameter calibration uses a calibration sequence that matches the target imaging device and the target scene. When there is no actual measurement basis, the confidence level change, scatter distribution or bubble size in the example curve is not written into the performance conclusion. The real effect is verified by the consistency of identity between the manually labeled trajectory and the output trajectory, the trajectory interruption position and the number of erroneous connections.

[0121] In one system implementation, the acquisition module is connected to the image input interface to form a sequence of images to be tracked; the construction module reads the temporally ordered image frames output by the acquisition module, performs static feature point filtering, spatial position transformation, registration, inter-frame response combination and scale aggregation, and outputs a multi-scale spatiotemporal volume; the extraction module only reads the multi-scale spatiotemporal volume and its index relationship, and forms a set of motion connected components through a seed queue and cross-scale fusion; the generation module reads the set of motion connected components to form two types of reachable spatiotemporal tubes and candidate associated edges, and outputs a spatiotemporal topology graph.

[0122] The recording module reads the node confidence and candidate edge fields from the spatiotemporal topology graph, and sequentially completes edge verification, ordinary connection segment concatenation, merging state recognition, splitting state recognition, and event pairing, outputting a set of trajectory segments and topology event records. The trajectory module reads this output, generates horizontally arranged and identity candidate regions within the event interval, forming a one-to-one correspondence, and summarizes the node confidence and bidirectional coverage ratio along the continuous target trajectory, outputting a confident motion trajectory. The module name indicates the logical function boundary. Multiple modules can be executed by the same processor at different times, or they can be assigned to multiple processors, but the data fields passed between modules remain consistent.

[0123] The memory is configured with image frame buffer, spatiotemporal volume storage area, connected domain storage area, topology graph storage area, event record storage area and trajectory output storage area. Each storage area is associated with a task identifier. The processor reads program instructions from the memory and executes them in the order of steps. When a state to be confirmed is generated in any stage, the state along with the source identifier is written back to the corresponding storage area. After reading the state in subsequent stages, a conservative branch is used, and the data to be confirmed is not mixed with the data already confirmed in the statistics.

[0124] The image input interface can be a data interface connected to the imaging device, or a storage interface for reading stored image files; the output interface can send images with trajectory markers to the display device, or send trajectory data records to subsequent behavior analysis devices; if only offline trajectory files are needed, the display module can be omitted, and the spatial region, time position, and confidence fields in the trajectory output are still completely preserved.

[0125] The processing device can be implemented as a computing device, an edge processing device, or a processing cluster consisting of multiple computing nodes. The processor can include a general-purpose processor, an image processor, or a computing circuit for performing parallel voxel operations. When using parallel computing, different scale layers and different fusion groups can be processed in parallel, but the access tags within the same seed queue are atomically updated or merged after partitioning. Candidate edges and event records are merged in a determined order before being written to ensure that parallel execution and serial execution obtain the same connection relationship.

[0126] The computer-readable storage medium may store program instructions for performing the above processing. After reading the program instructions, the processor sequentially establishes the image sequence to be tracked, the multi-scale spatiotemporal volume, the set of motion connected components, the spatiotemporal topology graph, the set of trajectory segments, the topological event record, and the confidence motion trajectory. The computer program product may include the program instructions and their parameter structure definition. The parameter structure definition at least defines the threshold version, scale layer information, mapping table fields, and boundary processing flags, so that the program can interpret the same data fields when reading the same input on different processing devices.

[0127] In the absence of technical logic conflicts, the above registration methods, scale combinations, propagation boundary representations, mapping table construction methods, event state maintenance methods, and appearance supplementary conditions can be combined with each other; the processing steps can be executed in a pipeline or in batches according to data dependencies, but the final judgment cannot be made in advance before the output of the previous step is formed for the next step, and the identity correspondence between the merged state and the split state cannot be forcibly completed across unclosed events.

[0128] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles 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 tracking motion trajectories in images based on spatiotemporal information, characterized in that, The method includes: Acquire consecutive image frames and acquisition time of the image sequence to be tracked; Based on the image sequence to be tracked, the spatial location of pixels, acquisition time, and inter-frame motion response are written into a unified spatiotemporal coordinate system, and the inter-frame motion response is organized according to different spatial sampling scales and temporal sampling scales to obtain a multi-scale spatiotemporal volume. Based on the multi-scale spatiotemporal volume, connect spatially adjacent, temporally continuous voxels with consistent motion directions, and fuse the connection results of the same motion region at different scales to obtain a set of motion connected domains. Based on the set of motion connected components, forward reachable spatiotemporal tubes and backward reachable spatiotemporal tubes are generated according to the temporal boundary, spatial boundary and motion direction of each motion connected component. The motion connected components with overlapping and temporally compatible reachable spatiotemporal tubes are connected as candidate associated edges to obtain a spatiotemporal topology graph. Based on the spatiotemporal topology graph, the candidate associated edge is verified based on the propagation confidence at both ends of each candidate associated edge. The corresponding motion connected domains are connected according to the verification results. The merging and splitting states of each motion connected domain are recorded to obtain a set of trajectory segments and topology event records. Based on the set of trajectory segments and topological event records, within the time interval between the merging and splitting states, the identity correspondence of each trajectory segment after splitting is constrained by the motion direction, spatial arrangement, and propagation confidence of each trajectory segment before merging, so as to obtain the continuous target trajectory and the propagation confidence of each continuous target trajectory.

2. The image motion trajectory tracking method based on spatiotemporal information according to claim 1, characterized in that, The set of motion connectivity components includes time boundaries, spatial boundaries, motion direction, and propagation confidence.

3. The image motion trajectory tracking method based on spatiotemporal information according to claim 1, characterized in that, The multi-scale spatiotemporal volume includes: Arrange consecutive image frames in ascending order of acquisition time; if the acquisition times are the same, arrange them according to the acquisition sequence number of the image frames to obtain time-ordered image frames. Static feature points are selected from adjacent temporally ordered image frames where the local texture difference satisfies the feature condition and the displacement is less than the static threshold. The first temporally ordered image frame is selected as the spatial reference frame. The remaining image frames are spatially transformed based on the positional deviation between static feature points to obtain the registered image frame. The grayscale changes of adjacent registered image frames are compared pixel by pixel, and the inter-frame motion direction is determined based on the pixel displacement after the position transformation. The grayscale changes and the inter-frame motion direction are combined into an inter-frame motion response. The inter-frame motion responses are aggregated according to the preset spatial block size and preset time frame number to form multiple scale layers; the index relationship between each scale layer and the original pixel position and acquisition time is saved, and the multiple scale layers and index relationships are combined into a multi-scale spatiotemporal volume.

4. The image motion trajectory tracking method based on spatiotemporal information according to claim 3, characterized in that, The set of motion-connected components includes: Within each scale layer, voxels whose inter-frame motion responses are greater than the response threshold are written into the seed queue. Read the target voxels in the seed queue in sequence, write the unvisited voxels that share the spatial boundary with the target voxels, are continuous in time position and have a motion direction difference less than the direction difference threshold into the seed queue, and mark the written unvisited voxels as visited voxels. If there are no unread voxels in the seed queue, the visited voxels obtained in this round are identified as scale-connected components; Compare the spatial overlap and temporal coincidence ranges of intra-scale connected components mapped to the original pixel locations in different scale layers, and group intra-scale connected components that satisfy the fusion conditions in both ranges into the same fusion group. Determine the scale ratio of the number of scale layers contained in the fusion group to the total number of scale layers, compare the directional differences between any two motion directions within the group, and determine the largest directional difference that is greater than the remaining directional differences. Determine the parameter intervals where the scale ratio and the maximum directional difference are located, respectively, and use the two parameter intervals as indexes to query the confidence mapping table to obtain the propagation confidence; delete the fusion groups whose propagation confidence is less than the confidence retention threshold to obtain the set of motion connected components.

5. The image motion trajectory tracking method based on spatiotemporal information according to claim 4, characterized in that, The spatiotemporal topology graph includes: For the target motion connected domain, starting from the end time position of the target motion connected domain, the spatial boundary is moved layer by layer according to the motion direction of the target motion connected domain, and the moved spatial boundary is expanded according to the difference in motion direction between adjacent time layers until the upper limit of time extension is reached, thus obtaining the forward reachable spacetime tube. Starting from the beginning time position of the target motion connected domain, reverse the spatial boundary movement and expansion until the upper limit of time backtracking is reached, and obtain the backward reachable spacetime tube; Compare the two types of reachable spatiotemporal tubes corresponding to different motion connected domains one by one. Write the motion connected domain pairs where the forward reachable spatiotemporal tubes of the previous motion connected domain overlap with the backward reachable spatiotemporal tubes of the next motion connected domain, and the end time of the previous motion connected domain is no later than the start time of the next motion connected domain into the candidate associated edge set. Use the motion connected domains as nodes and the candidate associated edges as connections between nodes to obtain the spatiotemporal topology graph.

6. The image motion trajectory tracking method based on spatiotemporal information according to claim 5, characterized in that, The set of trajectory segments and topological event records include: Candidate associated edges in the spatiotemporal topology graph are read sequentially according to the collection time, and the propagation confidence difference between the two ends of the candidate associated edge is determined. When the propagation confidence difference is less than the confidence difference threshold, the candidate associated edge is marked as a valid edge; otherwise, it is marked as an invalid edge. Connect the motion connected regions along the effective edges where the number of incoming edges and outgoing edges are both less than 1 to obtain the trajectory segment; record the state where multiple effective incoming edges point to the same motion connected region as the merging state, and record the state where the same motion connected region is connected to multiple effective outgoing edges as the splitting state; For each merge state, sort the split states whose acquisition time is greater than that of the merge state and which have not yet been paired with other merge states in ascending order of acquisition time, and pair the split state with the first number with the merge state. Write the incoming trajectory segment identifier, outgoing trajectory segment identifier, intermediate motion connected component identifier, and time interval of the paired state into the same event record; when no paired split state is found, mark the corresponding event record as an unclosed state to obtain the spatiotemporal topological event sequence.

7. The image motion trajectory tracking method based on spatiotemporal information according to claim 6, characterized in that, The continuous target trajectory is obtained in the following way: Read the inbound trajectory fragment set and the outbound trajectory fragment set from the same topology event record; For each incoming trajectory segment, the projection position of the incoming trajectory segment on the horizontal axis is written into the incoming arrangement sequence, with the direction perpendicular to the direction of motion as the horizontal axis. The candidate identity region is obtained by moving the end spatial region according to the motion direction and duration of the merging state of the incoming trajectory segment. The overlap ratio, motion direction difference, and propagation confidence difference of the starting spatial region of the trajectory segment and each candidate identity region are compared one by one. The matching order is established in order of overlap ratio from large to small, motion direction difference from small to large, and propagation confidence difference from small to large. The identity correspondence is determined according to the rule that the incoming trajectory segment and the outgoing trajectory segment are in one-to-one correspondence without changing the incoming arrangement sequence. The identity correspondence is written into the corresponding trajectory segment to obtain the continuous target trajectory.

8. The image motion trajectory tracking method based on spatiotemporal information according to claim 7, characterized in that, The propagation confidence of each continuous target trajectory is obtained in the following way: Following the acquisition time sequence of continuous target trajectories, the propagation confidence of each motion connectivity region and the forward and backward coverage ratios between adjacent motion connectivity regions are read. The propagation confidence that is less than the remaining propagation confidence within the same trajectory interval is determined as the first candidate confidence, and the coverage ratio that is less than the remaining coverage ratio among each forward coverage ratio and each backward coverage ratio within the trajectory interval is determined as the second candidate confidence. The smaller of the first and second candidate confidence scores is determined as the interval confidence score. When the interval confidence is greater than the output threshold, the corresponding trajectory interval is marked as a confirmed interval; when the interval confidence is less than the output threshold, the corresponding trajectory interval is marked as an interval to be confirmed. When the trajectory interruption time reaches the termination duration and no motion connectivity that meets the appearance conditions is obtained, the end of the corresponding trajectory is marked as the termination position, and the confidence of the interval before the termination position is written into the continuous target trajectory, thus obtaining a confident motion trajectory with interval state, termination position and interval confidence.

9. A spatiotemporal information-based image motion trajectory tracking system, wherein the system implements the method as described in any one of claims 1 to 8, characterized in that, include: The acquisition module is used to acquire continuous image frames and the acquisition time of the image sequence to be tracked; The module is used to write the pixel spatial location, acquisition time and inter-frame motion response into a unified spatiotemporal coordinate system according to the image sequence to be tracked, and organize the inter-frame motion response according to different spatial sampling scales and temporal sampling scales to obtain a multi-scale spatiotemporal volume. The extraction module is used to connect spatially adjacent, temporally continuous voxels with consistent motion directions based on multi-scale spatiotemporal volumes, and fuse the connection results of the same motion region at different scales to obtain a set of motion connected domains. The generation module is used to generate forward-reachable spatiotemporal tubes and backward-reachable spatiotemporal tubes based on the set of motion connected domains and according to the temporal boundary, spatial boundary and motion direction of each motion connected domain. The motion connected domains with overlapping and temporally compatible two types of reachable spatiotemporal tubes are connected as candidate associated edges to obtain a spatiotemporal topology graph. The recording module is used to verify the candidate associated edge based on the propagation confidence at both ends of each candidate associated edge according to the spatiotemporal topology graph, connect the corresponding motion connected domains according to the verification results, record the merging and splitting states of each motion connected domain, and obtain a set of trajectory segments and topology event records. The trajectory module is used to obtain the continuous target trajectory and the propagation confidence of each continuous target trajectory by using the motion direction, spatial arrangement and propagation confidence of each trajectory segment before merging to constrain the identity correspondence of each trajectory segment after splitting, based on the trajectory segment set and topological event records within the time interval between the merging state and the splitting state.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a program that, when executed by a processor, implements the method as described in any one of claims 1 to 8.