Multi-camera vehicle trajectory hierarchical clustering algorithm based on spatiotemporal group division

By employing a multi-camera vehicle trajectory hierarchical clustering algorithm based on spatiotemporal group division, and utilizing camera number and group number labels in conjunction with the homography matrix method for trajectory matching and clustering, the real-time performance and accuracy issues of large-scale cross-camera trajectory data are resolved, achieving more efficient trajectory clustering results.

CN116089680BActive Publication Date: 2026-03-03NANJING UNIV OF FINANCE & ECONOMICS
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-26
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

Existing video target trajectory clustering methods are not good in terms of real-time performance and accuracy in large-scale cross-camera and cross-camera group trajectory data. They do not take into account the geospatial relationship of multiple cameras, and traditional algorithms have failed to effectively handle trajectory data with unequal distances between camera groups.

Method used

A hierarchical clustering algorithm for vehicle trajectories based on spatiotemporal group division is adopted. The camera number and group number are used as labels. A mapping model is constructed by combining the homography matrix method to perform semi-supervised clustering of trajectories within and between groups. The overlap scaling factor and the optimal unequal length trajectory point correspondence rule are used for trajectory matching and clustering.

Benefits of technology

It achieves effective clustering of trajectories in multi-camera systems, making up for the shortcomings of traditional algorithms that do not consider the spatial relationship between cameras and video scenes, and improving the accuracy and real-time performance of trajectory classification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116089680B_ABST
    Figure CN116089680B_ABST
Patent Text Reader

Abstract

This invention discloses a multi-camera vehicle trajectory hierarchical clustering algorithm based on spatiotemporal group partitioning, comprising the following steps: spatializing the video target trajectory; then performing inter-group trajectory clustering on the video target trajectory: obtaining the longest interstellar number and overlap scaling factor; clustering vehicle target trajectories within a group according to the optimal unequal-length trajectory point correspondence rule, finally obtaining the inter-group trajectory clustering result; performing inter-group trajectory clustering: combining the start and end points of the trajectory to reflect the dynamic characteristics of the group trajectory; taking the entry and exit points of the vehicle target in each camera group as trajectory sampling points to form multiple trajectory sub-segments, and then performing multi-level clustering on the trajectory sub-segments. This invention uses the camera number of the trajectory within the same scene camera group as a label, which can effectively handle unequal-distance trajectory data of camera groups; using the group number of different geographical scenes between camera groups as labels, it performs rational clustering analysis on the trajectories between camera groups.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a trajectory clustering algorithm, specifically a multi-camera vehicle trajectory hierarchical clustering algorithm based on spatiotemporal group division. Background Technology

[0002] In recent years, urban video surveillance systems have gradually evolved from single-camera processing to multi-camera joint analysis, resulting in a large amount of trajectory data from multi-camera joint monitoring systems. This data records the movement of people, vehicles, and animals in various scenes, offering advantages such as convenient deployment, intuitive information, and rich media expression. Trajectory clustering defines the similarity of trajectories in the spatiotemporal dimensions, assigning each trajectory to a reasonable cluster. However, how to effectively cluster video target trajectories has become a current research challenge. Existing video target trajectory clustering methods have certain shortcomings at both the research object and methodological levels. Specifically, at the analysis object level, they are limited to image trajectories, neglecting the actual trajectories of video targets in geographic space; at the methodological level, traditional trajectory clustering algorithms do not consider the geographic spatial relationships of multiple cameras, performing clustering only on small-scale datasets under a single camera and a single scene, while exhibiting poor real-time performance and accuracy in large-scale cross-camera or even cross-camera group trajectory data.

[0003] Clustering large-scale trajectory data is challenging. First, the trajectory paths themselves are complex, and clustering analysis requires high computational costs. Second, trajectory sampling in multi-camera joint monitoring systems is not uniform, and the dimensionality between different target paths is difficult to unify; therefore, distance calculation requires reasonable point correspondence rules to measure differences. Finally, there are blind spots in the field of view between camera groups, and the geographical distances are large. If the trajectory is not simplified and directly calculated, local differences between trajectories will be ignored due to the large global scope. Traditional algorithms only cluster trajectories with uniform sampling points under a single camera for small-scale datasets, without considering camera position information, field of view, and the hierarchical relationship of video targets' motion between the camera and the scene, and do not perform reasonable analysis on cross-group trajectory data.

[0004] In summary, this invention presents a multi-camera vehicle trajectory hierarchical clustering algorithm based on spatiotemporal group partitioning. Summary of the Invention

[0005] To address the shortcomings of existing technologies, the present invention aims to provide a hierarchical clustering algorithm for multi-camera vehicle trajectories based on spatiotemporal group division. Within camera groups of the same scene, the camera number of the trajectory is used as a label, which can effectively handle trajectory data with unequal distances between camera groups. The group number of different geographical scenes between camera groups is used as a label to perform rational clustering analysis on the trajectories between camera groups.

[0006] To achieve the above objectives, this invention employs the following technical solution: a multi-camera vehicle trajectory hierarchical clustering algorithm based on spatiotemporal group division, comprising the following steps:

[0007] (1) Spatialize the video target trajectory;

[0008] (2) Then cluster the video target trajectories;

[0009] (3) Step (2) includes intra-group trajectory clustering algorithm and inter-group trajectory clustering algorithm;

[0010] (4) The group trajectory clustering algorithm in step (3) includes: obtaining the camera number with the longest time and the overlap scaling factor; performing vehicle target trajectory clustering within the group according to the optimal unequal length trajectory point correspondence rule, and finally obtaining the trajectory clustering result within the group;

[0011] Step (4) specifically includes: when cameras are divided into groups, the following conditions should be met simultaneously as much as possible: "the sum of the distances between cameras within a group is minimized and the overlap of the field of view between cameras is maximized";

[0012] Establish one-to-many and many-to-one matching to match the troughs and peaks of two trajectories with the same pattern.

[0013] Given two sequences of unequal lengths:

[0014] (12)

[0015] The trajectory sequence may not have equidistant time points; a fixed one is formed by... The feature space is represented; its local distance metric is defined as a function:

[0016] (13)

[0017] Define sequence

[0018] (14)

[0019] The optimal sequence of points corresponding to unequal-length trajectories is given by:

[0020] (15)

[0021] Then the sequence satisfy:

[0022] (16)

[0023] and The distance cost between them is expressed as:

[0024] (17)

[0025] and The optimal total cost between them is expressed as Minimum value: (18);

[0026] The overlap scaling factor in step (4) includes:

[0027] Assuming a camera group:

[0028] (19)

[0029] for Target Assuming quilt Captured; among them,

[0030] (20)

[0031] Sorted chronologically by capture time, the trajectory of this target is represented as a series of nodes:

[0032] (twenty one)

[0033] (twenty two)

[0034] in

[0035] (twenty three)

[0036] This means that the target was at this node. Captured;

[0037] Assuming two trajectories , In the camera , The trajectory of the camera group The total duration under both cameras is , Divided into Three parts, among which Captured by only one camera, and It will then be captured by two cameras simultaneously; Throughout its entire process, i.e. time Only inside Capture; if the distance between them is calculated directly, because exist Because of camera overlap in time, the density of trajectory nodes increases, leading to an increase in distance values. Therefore, to eliminate the increased distance, we first need to obtain... , The total global duration is as follows = , = However, in actual calculations, it is often... = + , = Therefore, we obtain , The scaling factor for the overlapping trajectories is:

[0038] (twenty four)

[0039] This coefficient should be multiplied during distance calculation to eliminate the increase in distance caused by camera overlap;

[0040] (5) The inter-group trajectory clustering algorithm in step (3) includes: Since the range of inter-group trajectory is larger than that within the group, the starting point and ending point of inter-group trajectory are combined to reflect the dynamic characteristics of the group trajectory; the entry point and exit point of the vehicle target under each camera group are taken as trajectory sampling points to form multiple trajectory sub-segments, and then multi-level clustering is performed on the trajectory sub-segments.

[0041] Step (1) specifically includes: taking the contact point between the video target sub-image and the ground as the positioning point, sampling at a certain time interval, and obtaining the video target trajectory in the geographic scene by constructing the mapping relationship between image space and geographic space;

[0042] A mapping model is constructed using the homography matrix method; assuming the image coordinates of a certain point are... The geographic spatial coordinates are ,So and The homogeneous coordinates are represented as:

[0043] ( )

[0044] ( )

[0045] Let the mapping matrix be ,but and The relation is:

[0046] ( )

[0047] The transformation from the image plane to the geospatial plane involves scaling, translation, and rotation, thus changing the mapping matrix. Decomposed into:

[0048] ( )

[0049] ( )

[0050] In the formula, This is the scaling factor; The translation transformation matrix is ​​the camera translation matrix. It is a 3×4 dimensional rotation transformation matrix;

[0051] ( )

[0052] ( )

[0053] In the formula, , These represent the product of the lens's physical focal length and the sensor's dimensions in the horizontal and vertical directions of each unit, respectively. , The offset of the image center relative to the principal optical axis on the horizontal and vertical axes, respectively; , , These represent the rotational relationships of the coordinate system in the X, Y, and Z axes of physical space, respectively. Indicates the translation relationship between coordinate systems;

[0054] When using the homography matrix method, it is assumed that the camera's field of view in geospace is a horizontal plane, i.e., Z=0 at this plane. Therefore, the mapping relationship from image space to geographic space is considered as a mapping from one plane to another. To simplify calculations, [the following is omitted as it is not directly related to the initial statement about homography matrix methods]. Z and The middle represents rotation about the Z-axis. Remove; then the homography matrix H simplifies to:

[0055] ( )

[0056] The geospatial coordinates of the video target trajectory can be obtained by solving the homography matrix H.

[0057] Step (5) specifically includes:

[0058] Assume the sampled trajectory is represented as follows:

[0059] (26)

[0060] (27)

[0061] in, express The camera group numbers passed through;

[0062] In cases where the trajectory of the same video target exists in the field of view of multiple cameras, in order to perform hierarchical clustering of trajectory segments at different levels, it is necessary to represent the trajectories between groups in a multi-layered manner.

[0063] The goal of the algorithm is to obtain Cluster Center

[0064] (28)

[0065] in,

[0066] (29)

[0067] (30)

[0068] (31)

[0069] in, The number of camera groups spanned by the trajectory between groups. The number of camera groups spanned by the trajectory between groups is . The set of cluster centers at time Indicates the first Cluster centers;

[0070] Given a set of sampled cross-camera group video target trajectories, perform multi-level trajectory segment decomposition based on the number of camera groups the video target passes through; for each trajectory segment set at the same level, arbitrarily select... Using 1 sample as the initial cluster center, calculate the distance between this trajectory segment and all other samples in the set and all cluster centers, and assign each sample to the nearest cluster center:

[0071] (32)

[0072] (33)

[0073] in Represents any sample, Indicates the first Cluster centers;

[0074] Finally, check if the label of each sample is the same as the label of the current cluster center. If the labels are the same, perform a sample-to-center operation:

[0075] (34)

[0076] Otherwise, perform a sample distance operation:

[0077] (35)

[0078] The beneficial effects of this invention are as follows: This method uses camera ID and group ID as labels to perform semi-supervised clustering algorithms that take camera information into account for trajectories within and between groups, respectively. This method ensures that trajectories are classified into reasonable cluster centers. This method overcomes the shortcomings of traditional algorithms that do not consider the spatial relationship between the camera and the video scene. Attached Figure Description

[0079] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments;

[0080] Figure 1 This is a schematic diagram of the spatialization of the video target trajectory according to the present invention;

[0081] Figure 2 This is a schematic diagram of the overlapping trajectory capture cameras of the present invention;

[0082] Figure 3 This is an overall flowchart of the present invention;

[0083] Figure 4 This is a schematic diagram illustrating the trajectory of the present invention "approaching" the cluster center;

[0084] Figure 5 This is a schematic diagram representing the trajectory sub-segment of the present invention. Detailed Implementation

[0085] To make the technical means, creative features, objectives and effects of this invention easier to understand, the invention will be further described below in conjunction with specific embodiments.

[0086] Reference Figure 3 This specific implementation adopts the following technical solution: a multi-camera vehicle trajectory hierarchical clustering algorithm based on spatiotemporal group division, including the following steps:

[0087] 1. Spatializing the video target trajectory: Using the contact point between the video target sub-image and the ground as positioning points, sampling is performed at certain time intervals. By constructing a mapping relationship between image space and geographic space, the video target trajectory in the geographic scene is obtained, such as... Figure 1 As shown.

[0088] A mapping model is constructed using the homography matrix method. Assume the image coordinates of a certain point are... The geographic spatial coordinates are ,So and Homogeneous coordinates can be represented as:

[0089] ( )

[0090] ( )

[0091] Let the mapping matrix be ,but and The relation is:

[0092] ( )

[0093] The mapping matrix can be transformed from the image plane to the geospatial plane through scaling, translation, and rotation. Decomposed into:

[0094] ( )

[0095] ( )

[0096] In the formula, This is the scaling factor; The translation transformation matrix is ​​the camera translation matrix. It is a 3×4 dimensional rotation transformation matrix.

[0097] ( )

[0098] ( )

[0099] In the formula, , These represent the product of the lens's physical focal length and the sensor's dimensions in the horizontal and vertical directions of each unit, respectively. , The offset of the image center relative to the principal optical axis on the horizontal and vertical axes, respectively; , , These represent the rotational relationships of the coordinate system in the X, Y, and Z axes of physical space, respectively. This indicates the translation relationship between coordinate systems.

[0100] When using the homography matrix method, it is assumed that the camera's field of view in geographic space is a horizontal plane, i.e., it is assumed that Z=0 at this plane. Therefore, the mapping relationship from image space to geographic space can be viewed as a mapping from one plane to another. To simplify the calculation, [the following is omitted as it is not directly related to the initial statement about homography matrix methods]. Z and The middle represents rotation about the Z-axis. Remove. Then the homography matrix H simplifies to:

[0101] ( )

[0102] The geospatial coordinates of the video target trajectory can be obtained from the solution of the homography matrix H.

[0103] 2. Then, cluster the target trajectories in the video;

[0104] 3. Step 2 includes intra-group trajectory clustering algorithms and inter-group trajectory clustering algorithms;

[0105] 4. The intra-group trajectory clustering algorithm in step 3 includes: obtaining the camera number with the longest duration and the overlap scaling factor; performing intra-group vehicle target trajectory clustering according to the optimal unequal length trajectory point correspondence rule, and finally obtaining the intra-group trajectory clustering result;

[0106] Step 4 specifically includes: when cameras are divided into groups, the following conditions should be met simultaneously as much as possible: "the sum of the distances between cameras within a group is minimized and the overlap of the field of view between cameras is maximized";

[0107] Establish one-to-many and many-to-one matching to match the troughs and peaks of two trajectories with the same pattern.

[0108] Given two sequences of unequal lengths:

[0109] (12)

[0110] The trajectory sequence may not have equidistant time points. A fixed point is formed by... The feature space is represented. Its local distance metric is defined as a function:

[0111] (13)

[0112] Define sequence

[0113] (14)

[0114] The optimal sequence of points corresponding to unequal-length trajectories is given by:

[0115] (15)

[0116] Then the sequence satisfy:

[0117] (16)

[0118] and The distance cost between them is expressed as:

[0119] (17)

[0120] and The optimal total cost between them is expressed as Minimum value: (18)

[0121] The overlap scaling factor in step 4 includes:

[0122] Assuming a camera group:

[0123] (19)

[0124] for Target Assuming quilt Detected. Among them,

[0125] (20)

[0126] Based on the order of capture time, the trajectory of this target can be represented as a series of nodes:

[0127] (twenty one)

[0128] (twenty two)

[0129] in

[0130] (twenty three)

[0131] This means that the target was at this node. Detected.

[0132] Assuming two trajectories , In the camera , The trajectory formed by the camera group, such as Figure 2 As shown, where The total duration under both cameras is , It can be divided into Three parts, among which Captured by only one camera, and It will then be captured by two cameras simultaneously; Throughout its entire process, i.e. time Only inside Capture. If the distance between them is directly calculated, then... exist Because of camera overlap in time, the density of trajectory nodes increases, leading to an increase in distance values. Therefore, to eliminate the increased distance, we first need to obtain... , The total global duration is as follows = , = However, in actual calculations, it is often... = + , = Therefore, we can obtain , The scaling factor for the overlapping trajectories is:

[0133] (twenty four)

[0134] This coefficient should be multiplied during distance calculation to eliminate the increase in distance caused by camera overlap.

[0135] 5. In a camera group within a camera joint system, the camera number that captures the most times should also be the same among targets with similar characteristics. Therefore, to accurately cluster the trajectory data, the camera with the most capture times for each target is used as the label for semi-supervised clustering:

[0136] (25)

[0137] For camera groups, the camera group number is used as the label for semi-supervised clustering.

[0138] The inter-group trajectory clustering algorithm in step 3 includes:

[0139] Assume the sampled trajectory is represented as follows:

[0140] (26)

[0141] (27)

[0142] in, express The camera group numbers passed through.

[0143] When the trajectory of the same video target exists in the field of view of multiple cameras, in order to perform hierarchical clustering of trajectory segments at different levels, it is necessary to represent the trajectories of different groups in a multi-layered manner: Figure 5 The tracks between the three groups were displayed. In camera group The situation in [the context]. Among them... go through , , The number of levels is 5; Pass , The number of levels is 3. Pass The number of levels is 1. Simultaneously includes from Start to The trajectory sub-segment ending at level 3. Simultaneously includes The trajectory sub-segment below has a level of 1.

[0144] To facilitate reasonable analysis of cross-camera group trajectories, a multi-level inter-group trajectory clustering algorithm is proposed. The algorithm aims to obtain... Cluster centers:

[0145] (28)

[0146] in,

[0147] (29)

[0148] (30)

[0149] (31)

[0150] in, The number of camera groups spanned by the trajectory between groups. The number of camera groups spanned by the trajectory between groups is . The set of cluster centers at time Indicates the first Cluster centers.

[0151] The pseudocode for the SCAIBG algorithm is shown below:

[0152] Semi-supervised trajectory Clustering algorithm considering cameraInformation trajectory clustering algorithm Between Groups(SCAIBG)

[0153] 1. Input: A set of target trajectories across a group of cameras.

[0154] 2. Output: The prototype vector set {C(1)}, {C(2)}, …, {C(λ)}

[0155] 3 for t 1 to :

[0156] 4 Initialize a new set

[0157] 5 for u 1 to :

[0158] 6if<000,0573> / / indicates the total number of camera groups passed

[0159] 7 for v 0 to :

[0160] 8 add to

[0161] 9 set clusters number

[0162] 10 Randomly select samples from as Initial cluster centers

[0163] 11 Set as the maximum number of iterations

[0164] 12 Repeat:

[0165] 13 for each sample s from :

[0166] 14 calculate the distance between s and each center

[0167] 15 find =argmin

[0168] 16 check the label (Group ID):

[0169] 17 if label(s) == label( ) :

[0170] 18

[0171] 19 else

[0172] 20

[0173] 21 until iterations exceed or there is no change in cluster centers

[0174] 22t=t+1

[0175]

[0176] Given a set of sampled cross-camera group video target trajectories, perform multi-level trajectory sub-segments based on the number of camera groups the video target passes through. For each set of trajectory sub-segments within the same level, arbitrarily select... Using 1 sample as the initial cluster center, calculate the distance between this trajectory segment and all other samples in the set and all cluster centers, and assign each sample to the nearest cluster center:

[0177] (32)

[0178] (33)

[0179] in Represents any sample, Indicates the first Cluster centers.

[0180] Finally, check if the label of each sample is the same as the label of the current cluster center. If the labels are the same, perform a sample-to-center operation:

[0181] (34)

[0182] Otherwise, perform a sample distance operation:

[0183] (35)

[0184] The goal of the intra-group trajectory clustering algorithm in this specific implementation is to obtain a set of cluster centers. First, the video targets within the camera group are spatialized, and then the video target trajectories are clustered. The pseudocode for intra-group trajectory clustering is shown below:

[0185] Semi-supervised trajectory Clustering Algorithm considering cameraInformation under Multi-camera collaborative monitoring Group (SCAIMG)

[0186] 1. Input: Given a group of cameras The target trajectory group it captured is: .

[0187] 2. Output: A set of trajectory cluster centers .

[0188] 3. Obtain the capture time of each target under each camera according to formula (24), and use the camera number with the most captures as the label: .

[0189] 4. Obtain the overlap scaling factor for each trajectory according to formula (25): .

[0190] 5. Initialize a new set ,set clusters number Initialize set

[0191] 6 Randomly select samples from as Initial cluster centers

[0192] 7 Set the Number of Iterations parameter

[0193] 8 while not each vector in is updated and steps< :

[0194] 9 for each sample from :

[0195] 10Calculate the correspondence of each s to each center : and distance between them according to Equation 16 and 19.

[0196] 11find

[0197] 12 check the and the label :

[0198] 13if

[0199] 14 ,where the correspondence of the points follows

[0200] 15else:

[0201] 16 ,where the correspondence of the points follows

[0202] 17

[0203]

[0204] In this diagram, rows 14 and 16 represent the "approach" and "remove" operations, respectively. A simplified diagram of the approach operation is shown below. Figure 4 As shown. Assume that it is known. trajectory Each node in the process sends to move.

[0205] And "staying away" operation and Figure 4 The only difference is that the trajectory moves in the opposite direction.

[0206] This specific implementation proposes a multi-camera vehicle trajectory hierarchical clustering algorithm based on spatiotemporal group partitioning: First, semi-supervised clustering of vehicle target trajectories within a camera group is performed according to the optimal unequal-length trajectory point correspondence rule; second, the start and end points of the targets in each group are extracted, and the trajectories are hierarchically represented according to the number of camera groups spanned, and semi-supervised clustering is performed on the sub-segments of different levels. This method overcomes the shortcomings of traditional algorithms that do not consider the spatial relationship between the camera and the video scene.

[0207] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of this invention is defined by the appended claims and their equivalents.

Claims

1. A multi-camera vehicle trajectory hierarchical clustering algorithm based on spatiotemporal group partitioning, characterized in that, Includes the following steps: (1) Spatialize the video target trajectory; (2) Then cluster the video target trajectories; (3) Step (2) includes intra-group trajectory clustering algorithm and inter-group trajectory clustering algorithm; (4) The group trajectory clustering algorithm in step (3) includes: obtaining the camera number with the longest time and the overlap scaling factor; performing vehicle target trajectory clustering within the group according to the optimal unequal length trajectory point correspondence rule, and finally obtaining the trajectory clustering result within the group; Step (4) specifically includes: when cameras are divided into groups, the following conditions should be met simultaneously as much as possible: "the sum of the distances between cameras within a group is minimized and the overlap of the fields of view between cameras is maximized"; Establish one-to-many and many-to-one matching to match the troughs and peaks of two trajectories with the same pattern. Given two unequal trajectory sequences: (12) The trajectory sequence may not have equidistant time points; a fixed one is formed by... The feature space is represented; its local distance metric is defined as a function: (13) Define sequence (14) The optimal sequence of points corresponding to unequal-length trajectories is given by: (15) Then the sequence satisfy: (16) and The distance cost between them is expressed as: (17) and The optimal total cost between them is expressed as Minimum value: (18); The overlap scaling factor in step (4) includes: Assuming a camera group: (19) for Target Assuming quilt Captured; among them, (20) Sorted chronologically by capture time, the trajectory of this target is represented as a series of nodes: (21) (22) in (23) This means that the target was at this node. Captured; Assuming two trajectories , In the camera , The trajectory of the camera group The total duration under both cameras is , Divided into Three parts, among which Captured by only one camera, and It will then be captured by two cameras simultaneously; Throughout its entire process, i.e. time Only inside Capture; if the distance between them is calculated directly, because exist Because of camera overlap in time, the density of trajectory nodes increases, leading to an increase in distance values. Therefore, to eliminate the increased distance, we first need to obtain... , The total global duration is as follows = , = However, in actual calculations, it is often... = + , = Therefore, we obtain , The scaling factor for the overlapping trajectories is: (24) This coefficient should be multiplied during distance calculation to eliminate the increase in distance caused by camera overlap; (5) The inter-group trajectory clustering algorithm in step (3) includes: Since the range of inter-group trajectory is larger than that within the group, the starting point and ending point of inter-group trajectory are combined to reflect the dynamic characteristics of the group trajectory; the entry point and exit point of the vehicle target under each camera group are taken as trajectory sampling points to form multiple trajectory sub-segments, and then multi-level clustering is performed on the trajectory sub-segments.

2. The multi-camera vehicle trajectory hierarchical clustering algorithm based on spatiotemporal group partitioning according to claim 1, characterized in that, Step (1) specifically includes: taking the contact point between the video target sub-image and the ground as the positioning point, sampling at a certain time interval, and obtaining the video target trajectory in the geographic scene by constructing the mapping relationship between image space and geographic space; A mapping model is constructed using the homography matrix method; assuming the image coordinates of a certain point are... The geographic spatial coordinates are ,So and The homogeneous coordinates are represented as: ( ) ( ) Let the mapping matrix be ,but and The relation is: ( ) The transformation from the image plane to the geospatial plane involves scaling, translation, and rotation, thus changing the mapping matrix. Decomposed into: ( ) ( ) In the formula, This is the scaling factor; The translation transformation matrix is ​​the camera translation matrix. It is a 3×4 dimensional rotation transformation matrix; ( ) ( ) In the formula, , These represent the product of the lens's physical focal length and the sensor's dimensions in the horizontal and vertical directions of each unit, respectively. , The offset of the image center relative to the principal optical axis on the horizontal and vertical axes, respectively; , , These represent the rotational relationships of the coordinate system in the X, Y, and Z axes of physical space, respectively. Indicates the translation relationship between coordinate systems; When using the homography matrix method, it is assumed that the camera's field of view in geospace is a horizontal plane, i.e., Z=0 at this plane. Therefore, the mapping relationship from image space to geographic space is considered as a mapping from one plane to another. To simplify calculations, [the following is omitted as it is not directly related to the initial statement about homography matrix methods]. Z and The middle represents rotation about the Z-axis. Remove; then the homography matrix H simplifies to: ( ) The geospatial coordinates of the video target trajectory can be obtained by solving the homography matrix H.

3. The multi-camera vehicle trajectory hierarchical clustering algorithm based on spatiotemporal group partitioning according to claim 1, characterized in that, Step (5) specifically includes: Assume the sampled trajectory is represented as follows: (26) (27) in, express The camera group numbers passed through; In cases where the trajectory of the same video target exists in the field of view of multiple cameras, in order to perform hierarchical clustering of trajectory segments at different levels, it is necessary to represent the trajectories between groups in a multi-layered manner. The goal of the algorithm is to obtain Cluster Center . (28) in, (29) (30) (31) in, The number of camera groups spanned by the trajectory between groups. This indicates the number of camera groups spanned by the trajectory between groups. The set of cluster centers at time Indicates the first Cluster centers; Given a set of sampled cross-camera group video target trajectories, perform multi-level trajectory segment decomposition based on the number of camera groups the video target passes through; for each trajectory segment set at the same level, arbitrarily select... Using 1 sample as the initial cluster center, calculate the distance between this trajectory segment and all other samples in the set and all cluster centers, and assign each sample to the nearest cluster center: (32) (33) in Represents any sample, Indicates the first Cluster centers; Finally, check if the label of each sample is the same as the label of the current cluster center. If the labels are the same, perform a sample-to-center operation: (34) Otherwise, perform a sample distance operation: (35)。

Citation Information

Patent Citations

  • A cross-scene tracking method and device based on object re-identification and a computer vision platform

    CN108986158A

  • Methods, devices, electronic equipment, and storage media for vehicle tracking across cameras.

    CN114937248A