A vehicle speed calculation method based on geographic calibration and spatiotemporal sequence modeling

By using geo-calibration and spatiotemporal sequence modeling, the problem of accurate detection and cross-camera correlation of vehicle targets in multi-camera visual monitoring was solved, achieving high-precision vehicle speed estimation and meeting the needs of comprehensive supervision in parks and urban roads.

CN122453871APending Publication Date: 2026-07-24青岛三三智能科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
青岛三三智能科技有限公司
Filing Date
2026-05-09
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Existing multi-camera visual monitoring solutions cannot achieve accurate vehicle target detection, stable cross-camera correlation, real geolocation, continuous trajectory tracking, and high-precision motion speed estimation in overlapping field-of-view camera scenarios. They are insufficient to meet the low-cost, high-precision, and all-area vehicle speed measurement and monitoring needs in scenarios such as park roads and urban roads.

Method used

By establishing the conversion relationship between the pixel coordinates of the ground contact point image of the target vehicle and the coordinates of the ground control point (UTM) through geocalibration and spatiotemporal sequence modeling, and combining RANSAC robust optimization and strict error verification, the system uses appearance features, spatiotemporal consistency constraints and camera topology to jointly determine the global ID association across cameras. A uniform linear Kalman filter model combined with sliding window smoothing is used to achieve high-precision estimation of vehicle speed.

Benefits of technology

It significantly improves vehicle geolocation accuracy, reduces cross-view target mismatch rate, achieves continuous tracking across the entire domain, and outputs stable and reliable speed values. It has the advantages of low deployment cost, wide coverage, and strong real-time performance, and the speed measurement error is controlled within ±3km/h within the range of 15-30km/h.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure REF-OBJ-1778311221679-000001
    Figure REF-OBJ-1778311221679-000001
  • Figure REF-OBJ-1778311221679-000002
    Figure REF-OBJ-1778311221679-000002
  • Figure REF-OBJ-1778311221679-000003
    Figure REF-OBJ-1778311221679-000003
Patent Text Reader

Abstract

The application discloses a kind of vehicle speed calculation method based on geographic calibration and space-time sequence modeling, it is related to intelligent transportation technical field, including the following steps: obtaining target vehicle driving video, target detection is carried out to the single frame image of target vehicle driving video, the ground contact point of target vehicle is calculated, obtain camera ground control point and ground control point UTM coordinate, the conversion relationship of target vehicle ground contact point image pixel coordinate and ground control point UTM coordinate is established;Continuous tracking and feature extraction are carried out to target vehicle detection result, generate local trajectory;Matching discrimination is carried out according to similarity, and the corresponding target global ID is assigned to the local trajectory of matching success;Target vehicle ground contact point image pixel coordinate is carried out geographic projection transformation, and target vehicle UTM coordinate is generated;And aggregate and time alignment are carried out, and output space-time observation sequence;Filtering estimation and constraint processing are carried out to space-time observation sequence, and the output target vehicle speed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent transportation technology, and in particular to a method for calculating vehicle speed based on geographic calibration and spatiotemporal sequence modeling. Background Technology

[0002] With the rapid development of smart parks, urban road traffic monitoring, and autonomous driving technologies, vehicle target detection, tracking, and speed estimation based on video surveillance have become key supporting technologies for intelligent transportation systems. In real-world road applications, single cameras suffer from limited field of view, insufficient coverage, and pixel-scale distortion of distant targets. Therefore, it is typically necessary to deploy multiple cameras with overlapping fields of view to achieve continuous, comprehensive monitoring and motion analysis of vehicle targets.

[0003] Existing vehicle speed measurement and tracking technologies are mainly divided into two categories: The first category is contact / non-contact speed measurement based on hardware devices such as radar and lasers. While these methods offer high accuracy, they are costly, complex to deploy, and difficult to maintain, making them unsuitable for widespread application in large-scale industrial parks and urban secondary roads. The second category is purely visual speed measurement and tracking technology, which relies on camera-collected video images for target analysis. This technology offers advantages such as flexible deployment, low cost, and strong compatibility, and has become the mainstream research and application direction.

[0004] However, existing multi-camera visual monitoring solutions cannot simultaneously achieve accurate vehicle target detection, stable cross-camera correlation, real geolocation, continuous trajectory tracking, and physically meaningful motion speed estimation in overlapping field-of-view camera scenarios. This makes it difficult to meet the low-cost, high-precision, and all-area vehicle speed measurement and monitoring needs in scenarios such as park roads and urban roads. Summary of the Invention

[0005] To address the aforementioned problems, this invention provides a vehicle speed calculation method based on geographic calibration and spatiotemporal sequence modeling.

[0006] This invention provides a vehicle speed calculation method based on geographic calibration and spatiotemporal sequence modeling, comprising the following steps: S1: Acquire the target vehicle driving video, perform target detection on a single frame image of the target vehicle driving video, calculate the target vehicle ground contact point, and generate the target vehicle detection result and the pixel coordinates of the target vehicle ground contact point image. S2: Obtain the ground control point and UTM coordinates of the camera, establish the conversion relationship between the pixel coordinates of the ground contact point image of the target vehicle and the UTM coordinates of the ground control point, generate the camera spatial mapping function and calculate the calibration error; continuously track and extract features from the detection results of the target vehicle to generate a local trajectory; S3: Match and determine the local trajectory based on similarity, and assign a corresponding target global ID to the successfully matched local trajectory; S4: Perform geographic projection transformation on the pixel coordinates of the ground contact point image of the target vehicle to generate the UTM coordinates of the target vehicle; aggregate and time-align the target global ID, the UTM coordinates of the target vehicle, and the timestamp corresponding to the local trajectory assignment to output a spatiotemporal observation sequence; S5: Perform filtering estimation and constraint processing on the spatiotemporal observation sequence, and output the target vehicle speed.

[0007] In summary, the present invention has at least the following beneficial effects: This invention accurately converts image pixel coordinates into unified UTM geographic coordinates through camera geocalibration and homography matrix spatial mapping, completely eliminating the shortcomings of traditional visual speed measurement that relies on pixel displacement. It fundamentally eliminates the scale inconsistency problem caused by differences in distance, angle, and focal length of a single camera. By solving the homography matrix using ground control points and combining RANSAC robust optimization and rigorous error verification, the planar mapping error is controlled within 0.3-1.0m, giving the target location true physical meaning and significantly improving vehicle geolocation accuracy, providing a reliable spatial reference for subsequent speed estimation.

[0008] This invention employs a cross-camera global ID association mechanism that combines appearance features, spatiotemporal consistency constraints, and camera topology relationships for joint determination. Through a triple strategy of ReID feature similarity, reasonable speed range verification, and adjacency graph filtering, it effectively reduces the cross-camera target mismatch rate and solves problems such as broken ID jumps and trajectory fragmentation in multi-camera scenarios. It can automatically assign and maintain a globally unique ID for the same vehicle, enabling continuous tracking across view domains and forming a complete, continuous, and traceable global spatiotemporal trajectory, meeting the needs of large-scale road monitoring, trajectory playback, and GIS platform integration.

[0009] This invention, based on a uniform linear Kalman filter model combined with sliding window smoothing and outlier constraints, effectively suppresses position noise and speed jumps caused by detection frame jitter, occlusion, missed detections, and time asynchrony. Trajectory is filtered and estimated in a unified UTM coordinate system, directly outputting stable and reliable speed values. Speed ​​measurement errors can be controlled within ±3 km / h in the 15-30 km / h vehicle speed range. High-precision video speed measurement can be achieved without dedicated hardware such as radar or coils, offering advantages such as low deployment cost, wide coverage, strong real-time performance, and wide applicability. Detailed Implementation

[0010] The technical solutions of the present invention will be clearly and completely described below with reference to the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0011] A method for calculating vehicle speed based on geographic calibration and spatiotemporal sequence modeling includes the following steps: Step 1: Collection of raw data.

[0012] Video stream data is collected via network cameras. The equipment is fixed at a height of 4-8 meters and an angle of 30-60 degrees according to the installation specifications to ensure that the field of view covers the main area of ​​the road and that the overlap area between adjacent cameras is not less than 15%. The H.264 / H.265 encoded video stream with a resolution of 1920×1080 or higher and a frame rate of 25FPS or higher is output in accordance with the RTSP protocol. The camera number, pixel size, focal length and other factory parameters are collected simultaneously for subsequent image domain target detection.

[0013] The camera's geographic location data is collected through an RTK GPS device. The GPS receiver is placed at the camera's installation location to obtain WGS84 latitude and longitude coordinates with centimeter-level accuracy. This data is used for UTM partition determination and geographic coordinate benchmark establishment, and is the core foundational data for spatial mapping.

[0014] Ground control point data is collected jointly using RTK GPS and image marking equipment: at least four non-collinear ground control points are evenly distributed within the camera's field of view, covering near, middle, and far areas; the GPS equipment is used to collect the actual UTM coordinates of the control points, and the corresponding pixel coordinates are marked in the video footage to form image pixel coordinates-UTM geographic coordinates paired data, which is used for solving the homography matrix.

[0015] The time synchronization reference data is uniformly collected through NTP / PTP time servers, providing millisecond-level unified timestamps for all cameras and computing devices, ensuring that the time error of cross-camera data is less than 50ms, and providing a reference for subsequent spatiotemporal alignment.

[0016] Step 2: Camera calibration and spatial mapping establishment.

[0017] A unique spatial mapping relationship is established for each camera to achieve a precise mapping from image pixel coordinates (u,v) to UTM coordinates (X,Y). The mapping function is defined as follows: In the formula, c represents the camera number. The mapping function for each camera is stored and called independently to ensure the consistency and accuracy of coordinate transformation in multi-camera scenarios.

[0018] The required data for calibration includes the camera's GPS location and ground control points. The camera's GPS location is denoted as... With a positioning accuracy of ≤1m, it is used for UTM partition calibration to ensure that all cameras are in a unified geographic coordinate system.

[0019] Ground control points are denoted as GCPs. Each camera should capture at least four, preferably six to eight. These control points should be evenly distributed across the effective image area, covering near, middle, and far distance positions. All control points should be non-collinear to avoid singularities in the matrix solution. Image pixel coordinates must also be provided for each control point. With corresponding UTM coordinates This forms a one-to-one pair of points: The control points are divided into solution points and verification points. Solution points account for 80% of the total number and are used for solving the homography matrix. Verification points account for 20% of the total number and are used for calibration error verification. The two types of data are stored separately and used independently.

[0020] Based on the approximate assumption of the road surface plane, a 3×3 homography matrix H is used to establish the mapping relationship between image coordinates and UTM coordinates. The homogeneous coordinate transformation formula is: In the formula, This represents a non-zero scaling factor used to eliminate scale differences.

[0021] Expanding the matrix, we obtain the direct conversion formula from image pixel coordinates to UTM coordinates: A system of linear equations is constructed using the DLT (Direct Linear Transformation) algorithm. The homography transformation formula is expanded and substituted into the coordinates of the solution points to establish a system of equations related to the homography transformation. to The initial parameters of the H matrix are obtained by solving the system of equations.

[0022] Outliers were removed using the RANSAC random sampling consistency method, with 1000 iterations and an inlier threshold of 1.0m. The solution points were substituted into the initial H matrix for mapping calculation. Points with a mapping error less than 1.0m were recorded as inliers, and points exceeding the threshold were recorded as outliers and removed.

[0023] The solved matrix H is scaled and normalized, let , the final available standardized homography matrix is obtained .

[0024] Read the verification point data not involved in matrix solving to obtain the image coordinates and the corresponding true UTM coordinates . Call the mapping function to map the image coordinates of the verification points to the predicted UTM coordinates .

[0025] Calculate the Euclidean distance error of a single verification point. The formula is: Further calculate the total average error of all verification points: In the formula, M represents the number of verification points.

[0026] The calibration qualification standard is that the average plane error E ∈ [0.3m, 1.0m]. If E > 1.5m, it is necessary to re-collect the ground control points, increase the quantity and optimize the distribution, and then re-execute the calibration process; if 1.0m < E ≤ 1.5m, adjust the RANSAC iteration number to 2000 times, re-solve the matrix and verify again. Save the error value of each verification point and the total average error E to form a calibration report for subsequent accuracy verification and fault location.

[0027] Step 3: Detection of video stream and tracking of local trajectory.

[0028] Use a deep learning model to perform object detection on a single-frame image. The preferred model is YOLOv5s, and YOLOv7 can be used under the condition of allowing hardware performance to balance detection accuracy and real-time performance. Only the vehicle category is retained during the detection process, and irrelevant targets such as pedestrians and non-motor vehicles are filtered out. The category label is recorded as cls = vehicle.

[0029] The detection confidence threshold is set to to filter out low-confidence detection results and reduce the false detection rate; the non-maximum suppression threshold is set to to remove duplicate detection frames and ensure that only one detection result is output for the same target. The input image size is uniformly 640×640, which is consistent with the training size to improve the detection stability.

[0030] Each detected target outputs a detection box (x, y, w, h), target category cls, and confidence , where x, y, w, and h are all integers, and the confidence retains three decimal places.

[0031] For each vehicle detection target, its ground contact point is extracted based on the detection bounding box, serving as the basis for mapping image coordinates to geographic coordinates. First, the target detection bounding box (x, y, w, h) is read, where x and y represent the pixel coordinates of the top-left corner of the detection bounding box, w represents the width of the detection bounding box, and h represents the height of the detection bounding box.

[0032] The image pixel coordinates (u,v) of the ground point are calculated using the following formula: The calculation results are rounded to one decimal place. Ground point (u,v) is correlated with the detection information to form detection-ground point correlation data. This is used for subsequent coordinate transformation and tracking.

[0033] The single camera employs the ByteTrack algorithm for continuous target tracking. This algorithm boasts strong anti-occlusion capabilities, high operating efficiency, and suitability for real-time video stream processing. Each target is assigned a local ID, which is uniquely numbered by camera and follows a specific format. , where k is an index that increments from 1.

[0034] Set tracking loss threshold If the same target is not detected for 5 consecutive frames, it is determined that the target has disappeared, and the update of the corresponding local trajectory is terminated. During the tracking process, a pre-trained ReID model is used to extract the target's appearance feature vector. The feature dimension is 512, which is used for subsequent cross-camera target association.

[0035] The final output is the local trajectory, whose structure is represented as follows: : In the formula, Indicates the camera number. Represents a local ID. Represents a timestamp sequence, This represents the sequence of pixel coordinates of the target vehicle's ground contact point image. This represents a sequence of feature vectors.

[0036] Step 4: Association of global IDs across cameras.

[0037] Cross-camera global ID association requires meeting three necessary conditions: all cameras must be time-synchronized with a synchronization error not exceeding 50ms; a camera adjacency graph G=(V,E) must be constructed, where V represents the set of cameras and E represents pairs of cameras with overlapping fields of view or connectivity, and trajectory association is performed only on camera pairs belonging to E to reduce computational complexity and the probability of mismatches; and each local trajectory must have completed ReID feature extraction to obtain a feature vector. And the local trajectory status is normal.

[0038] Using appearance features as the primary association criterion, weights are assigned. For two local trajectories and Calculate the cosine similarity of their ReID feature vectors. The calculation formula is: In the formula, These represent the feature vectors of the two local trajectories, respectively. A higher value indicates a greater similarity in appearance between the targets. The appearance similarity threshold is set to... If the result is below this threshold, a match is directly excluded.

[0039] Using spatiotemporal consistency as the second association criterion, weights are set. Assume the vehicle follows the trajectory (Corresponding camera c1) End-of-line travel trajectory (Corresponding to camera c2) The starting point must meet a reasonable speed range. First, obtain the trajectory. End UTM coordinates and end timestamp and trajectory End UTM coordinates and end timestamp .

[0040] The formulas for calculating time difference and spatial distance are as follows: Then calculate the estimated velocity: Set speed threshold If the value is outside the specified range, it is considered a mismatch.

[0041] Spatiotemporal compatibility score Calculate according to the following rules: If Within the threshold range, then: Normalize to the [0,1] interval; otherwise .in This serves as a reference speed for the scenario. , which is the maximum permissible speed.

[0042] Using camera topology as the third association criterion, weights are set. Association is performed only on camera pairs (c1, c2) belonging to edge set E in the camera adjacency graph G. If two cameras are not connected or have overlapping views, topology validity is scored. If the adjacency relationship is satisfied, then .

[0043] The overall association score is obtained by combining appearance similarity, spatiotemporal compatibility, and topological legality. The calculation formula is as follows: Set matching threshold ,when If two local trajectories belong to the same target, they are assigned the same global ID; otherwise, they are determined to be different targets and a new global ID is assigned.

[0044] The global ID uses a unified format: global_id=GLOBAL_ID_k, where k is a 4-digit numeric sequence number, incrementing from 0001. For new targets appearing for the first time without a matching trajectory, a completely new global ID is assigned. If two local trajectories match successfully, the global ID of the later-appearing trajectory is unified with the global ID of the earlier-appearing trajectory. The same global ID remains unchanged when switching between cameras until the target has lost a certain number of consecutive frames. The trajectory terminates. A global ID deduplication check is performed every 10 frames. If a duplicate ID is found, the earliest assigned ID is retained, and subsequent duplicate IDs are discarded to ensure the uniqueness and continuity of the global ID.

[0045] First, all observation data that have been associated with the global ID are grouped according to global_id, so that all observation data of the same target vehicle are grouped together to form a grouping structure: For the observation data within each group, they are arranged in ascending order according to the timestamp τ to ensure that the observation sequence is continuous and orderly in time.

[0046] For each global ID, construct the corresponding spatiotemporal observation sequence, denoted as: In the formula, Represents a timestamp in milliseconds. This represents the UTM plane coordinates, and N represents the total number of observation points for this target.

[0047] The sequences are filtered, and only sequences with N≥2 observation points are retained for velocity calculation; sequences with N<2 observation points are marked as initial and are not included in velocity estimation for the time being.

[0048] To address the uneven time intervals caused by inconsistent frame rates from different cameras, linear interpolation is used to supplement observation points and achieve time alignment. The interpolation formula is as follows: In the formula, Target uniform time interval The milliseconds can be adaptively adjusted according to the actual camera frame rate. After interpolation, a standard spatiotemporal observation sequence with uniform time intervals is obtained, which can be directly used for Kalman filtering.

[0049] Step 5: Estimation of Kalman filter speed.

[0050] A uniform linear (CV) Kalman filter model is used, with all parameters set fixedly and requiring no real-time adjustment.

[0051] The state vector is defined as : State transition matrix Defined as: The observation matrix A is defined as follows: This indicates that only the position is observed, and the velocity is not directly observed.

[0052] The process noise covariance matrix Q is: The observation noise covariance matrix R is: Initial covariance matrix for: In the formula, Represents UTM coordinates. This indicates the eastward and northward components of velocity, expressed in m / s. This indicates the time difference between adjacent observations, in seconds. For observation sequence O, take the first two observation points. and Calculate the initial velocity components using the following formula: Obtain the initial state vector : If the number of observation points is 1, then the initial velocity component is set to... Further updates are pending.

[0053] Execution status and covariance prediction: In the formula, This represents the predicted state vector at time k. This represents the optimal state vector at time k-1. Let k represent the prior prediction covariance matrix at time k. Let the covariance matrix at time k-1 be represented. This represents the transpose of the state transition matrix.

[0054] Innovation in computational observation: In the formula, This represents the positional error between the observed value and the predicted state value at time k. This indicates the observation position at time k.

[0055] Calculate the innovation covariance: In the formula, This represents the transpose of the observation matrix.

[0056] Calculate the Kalman gain: In the formula, This represents the inverse matrix of the innovation covariance matrix.

[0057] Perform a status update: Perform covariance update: In the formula, I represents a 4×4 identity matrix.

[0058] Based on the updated state vector Extracting velocity components Calculate the resultant velocity : Converted to kilometers per hour: The result is rounded to one decimal place.

[0059] For all observation points from the third point onwards in the sequence, iteratively execute the prediction and update steps, and output the target's total velocity estimation sequence after the traversal is complete. .

[0060] Step Six: Speed ​​Smoothing and Anomaly Handling.

[0061] To suppress speed fluctuations and improve output stability, a sliding window averaging method is used to smooth the filtered speed. The sliding window size is set to window_size=5, which can be adjusted within the range of 3-7 according to the actual frame rate. The arithmetic mean of the speed values ​​at the current moment and the previous four moments is then calculated.

[0062] The speed after each new filter is added The window slides one position forward, discarding the earliest velocity values ​​and retaining only the latest `window_size` velocity values. The final smoothed velocity at the current moment is calculated using the following formula: In the formula, This represents the output speed of the Kalman filter at time i. Keep one decimal place.

[0063] Speed ​​thresholds are set according to the application scenario to identify and handle abnormal speeds, ensuring the validity and reliability of the results. The speed threshold ranges are as follows: Enclosed environments such as industrial parks and factories: Effective speed range ; Urban road scenario: effective speed range ; like If the value exceeds the above range, it is considered abnormal.

[0064] Simultaneously, a supplementary judgment condition is set: speed fluctuation threshold. If the conditions are met for three consecutive time points It was also determined to be abnormal.

[0065] Single outlier: Replaced with the smoothed velocity from the previous time step, i.e. .

[0066] Three or more consecutive outliers: Determine the current trajectory is invalid, mark the status as "invalid", terminate speed estimation and record the anomaly log.

[0067] Generate an exception log, recording the time of the exception. Global ID (global_id), abnormal speed And the corresponding camera number (camera_id), which is used for subsequent calibration verification, mismatch analysis and fault location.

[0068] The above are merely preferred embodiments of the invention and are not intended to limit the invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the invention should be included within the protection scope of the invention.

Claims

1. A method for calculating vehicle speed based on geographic calibration and spatiotemporal sequence modeling, characterized in that, Includes the following steps: S1: Acquire the target vehicle driving video, perform target detection on a single frame image of the target vehicle driving video, calculate the target vehicle ground contact point, and generate the target vehicle detection result and the pixel coordinates of the target vehicle ground contact point image. S2: Obtain the ground control point and UTM coordinates of the camera, establish the conversion relationship between the pixel coordinates of the ground contact point image of the target vehicle and the UTM coordinates of the ground control point, generate the camera spatial mapping function and calculate the calibration error; continuously track and extract features from the detection results of the target vehicle to generate a local trajectory; S3: Match and determine the local trajectory based on similarity, and assign a corresponding target global ID to the successfully matched local trajectory; S4: Perform geographic projection transformation on the pixel coordinates of the ground contact point image of the target vehicle to generate the UTM coordinates of the target vehicle; aggregate and time-align the target global ID, the UTM coordinates of the target vehicle, and the timestamp corresponding to the local trajectory assignment to output a spatiotemporal observation sequence; S5: Perform filtering estimation and constraint processing on the spatiotemporal observation sequence, and output the target vehicle speed.

2. The vehicle speed calculation method based on geographic calibration and spatiotemporal sequence modeling according to claim 1, characterized in that, The specific steps for acquiring a target vehicle driving video, performing target detection on a single frame of the target vehicle driving video, calculating the target vehicle's ground contact point, and generating the target vehicle detection result and the pixel coordinates of the target vehicle's ground contact point image are as follows: The YOLO model is used to detect targets in a single frame of the target vehicle driving video, filtering out interfering targets that are not the target vehicle, and outputting the target vehicle detection result. Read the detection bounding box (x, y, w, h) of the target vehicle in the single frame image, and calculate the pixel coordinates (u, v) of the target vehicle's ground contact point image: In the formula, x represents the horizontal coordinate of the top-left corner of the detection box, y represents the vertical coordinate of the top-left corner of the detection box, w represents the width of the detection box, and h represents the height of the detection box.

3. The vehicle speed calculation method based on geographic calibration and spatiotemporal sequence modeling according to claim 2, characterized in that, The specific steps for obtaining the camera's ground control point and UTM coordinates, establishing the conversion relationship between the pixel coordinates of the target vehicle's ground contact point image and the ground control point's UTM coordinates, generating the camera's spatial mapping function, and calculating the calibration error are as follows: Let the coordinates of the ground control point UTM be (X, Y); Establish the mapping relationship through the homography matrix H: In the formula, Indicates a non-zero scaling factor; Expanding the mapping relationship yields the conversion formula from the pixel coordinates of the target vehicle ground contact point image to the coordinates of the ground control point (UTM): Construct camera space mapping function ; The calculation did not pass the camera spatial mapping function. Mapped UTM coordinates of the ground control points With the camera spatial mapping function Mapped UTM coordinates of the ground control points Euclidean distance error e: Calculate the total average error : In the formula, M represents the failure to pass the camera spatial mapping function. The number of UTM coordinates of the mapped ground control points, where i represents the i-th point that did not pass the camera spatial mapping function. The mapped UTM coordinates of the ground control point; when When the total average error is used as the calibration error, the total average error is used as the calibration error.

4. The vehicle speed calculation method based on geographic calibration and spatiotemporal sequence modeling according to claim 2, characterized in that, The specific steps for continuously tracking and extracting features from the target vehicle detection results to generate a local trajectory are as follows: The same target vehicle is continuously tracked based on the detection results, and a local ID is assigned to each target vehicle. Simultaneously, appearance feature vectors are extracted using a ReID model. ; If no target vehicle is detected in 5 consecutive frames of the target vehicle detection results, it is determined that the target vehicle has disappeared and the local trajectory recording is terminated. The final output is the local trajectory. : In the formula, Indicates the camera number. Represents a local ID. Represents a timestamp sequence, This represents the sequence of pixel coordinates of the target vehicle's ground contact point image. This represents a sequence of feature vectors.

5. The vehicle speed calculation method based on geographic calibration and spatiotemporal sequence modeling according to claim 4, characterized in that, The specific steps for matching and judging the local trajectories based on similarity, and assigning a corresponding target global ID to the successfully matched local trajectories, are as follows: Calculate cosine similarity based on the local trajectory. : In the formula, These represent the feature vectors of two local trajectories, when At that time, candidate matching pairs are retained; Perform spatiotemporal consistency constraints to obtain the terminal UTM coordinates of the local trajectory. and end timestamp The starting coordinates of the local trajectory are the UTM coordinates. and 7 o'clock timestamp Calculate the time difference Spatial distance d: Then calculate the estimated velocity: Only keep The inferred velocity was calculated, and the spatiotemporal phase score was determined. : In the formula, Indicates reference speed. Indicates the maximum speed threshold; Construct the camera adjacency graph G: In the formula, V represents the set of cameras, and E represents a pair of cameras with overlapping fields of view or that are connected. The topology validity score is determined based on the camera adjacency graph. When two cameras with local trajectories are facing each other... hour, Otherwise, it is 0; Calculate the overall score S(i,j): In the formula, These represent the weighting coefficients; when If the two local trajectories match, they are assigned the same global target ID. Update the local trajectory Generate standardized observation structure : In the formula, Indicates the target's global ID.

6. The vehicle speed calculation method based on geographic calibration and spatiotemporal sequence modeling according to claim 5, characterized in that, The specific steps for aggregating and aligning the target global ID, the target vehicle UTM coordinates, and the timestamp corresponding to the local trajectory to output the spatiotemporal observation sequence are as follows: The standardized observation structure is sorted in ascending order by timestamp, and an observation sequence O corresponding to each target global ID is constructed: In the formula, k represents the sequence number of the target's global ID, and N represents the number of observation points for the target vehicle; reserve The observation sequence is supplemented with observation points by linear interpolation based on timestamps: After the linear interpolation is performed, the final spatiotemporal observation sequence is output.

7. The vehicle speed calculation method based on geographic calibration and spatiotemporal sequence modeling according to claim 6, characterized in that, The specific steps for filtering and estimating the spatiotemporal observation sequence are as follows: Constructing state vectors State transition matrix Observation matrix A, process noise covariance matrix Q, observation noise covariance matrix R, initial covariance matrix : In the formula, Represents UTM coordinates. This represents the components of velocity in the x and y directions. Indicates the time difference between adjacent observations; Take the first two observation points of the observation sequence O. Calculate the initial velocity components and : Obtain the initial state vector : The initial velocity when the number of observation points is 1 is set to Perform the prediction steps: In the formula, This represents the predicted state vector at time k. This represents the optimal state vector at time k-1. Let k represent the prior prediction covariance matrix at time k. Let the covariance matrix at time k-1 be represented. The transpose of the state transition matrix; Computing Innovation Innovation Covariance and Kalman gain : In the formula, This represents the positional error between the observed value and the predicted state value at time k. This represents the observed position vector at time k. The matrix representing the inverse of the innovation covariance matrix; Execution status update and covariance update: In the formula, I represents a 4×4 identity matrix; Based on the updated state vector Calculate the actual speed of the target vehicle : Iteratively perform prediction and update steps for all observation points starting from the 3rd point in the observation sequence to obtain velocity estimates. .

8. The vehicle speed calculation method based on geographic calibration and spatiotemporal sequence modeling according to claim 7, characterized in that, The specific steps for constraining the spatiotemporal observation sequence are as follows: Set the size of the sliding window Each time a new speed estimate is added The sliding window then moves one position to the right, discarding the earliest velocity value and retaining the new one. Calculate the smoothing speed using a given value. : Determine whether the speed fluctuation exceeds the set speed error threshold. If it does, replace it with the smoothed speed from the previous moment and output the target vehicle speed.