Global adaptive vehicle three-dimensional size measurement and over-limit warning method based on monocular geometric solution

By using a monocular geometric solution method to dynamically generate 3D bounding boxes and combine them with vanishing point detection, the accuracy and real-time performance issues of vehicle 3D dimension measurement in complex scenarios are solved. This enables multi-scenario adaptability over-limit warning, improving the system's adaptability and engineering application value.

CN122335951APending Publication Date: 2026-07-03SOUTHEAST UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SOUTHEAST UNIV
Filing Date
2026-03-12
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Existing technologies struggle to achieve efficient and automated identification of vehicle 3D dimensions in complex road traffic scenarios. In particular, the lack of flexible adaptive mechanisms under the premise of ensuring detection accuracy and real-time performance results in insufficient accuracy and robustness in detecting oversized vehicles.

Method used

A monocular geometry-based solution method is adopted. By acquiring video streams from traffic monitoring cameras, vehicle structured features are extracted, and 3D bounding boxes are dynamically generated. Combined with vanishing point detection and adaptive smoothing mechanisms, the 3D dimensions of the vehicle are calculated, and over-limit warnings are implemented based on a rule base for multiple scenarios.

Benefits of technology

It improves the accuracy and robustness of vehicle 3D dimension measurement, reduces system deployment costs, enhances adaptability to various road environments and different camera parameter settings, and realizes vehicle over-limit detection and automatic early warning in multiple scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122335951A_ABST
    Figure CN122335951A_ABST
Patent Text Reader

Abstract

This invention proposes a global adaptive method for vehicle 3D dimension measurement and over-limit warning based on monocular geometric solution. This method is based on the principle of single-view projective geometry. It constructs a spatial geometric reference system by detecting three mutually orthogonal vanishing points in a road scene. Based on the relative positional relationship between the vanishing points and the vehicle instance mask, it automatically matches the construction process of six typical viewpoints to complete robust fitting of the vehicle's 3D contour. Based on the aforementioned geometric reference system and bounding box, combined with the physical benchmark provided by the reference rod, a unified solution for the vehicle's length, width, and height 3D dimensions is achieved. Furthermore, this invention integrates a dimensional over-limit warning method to achieve graded risk alerts. This method ultimately forms a complete measurement system that can directly utilize existing traffic monitoring camera resources to achieve real-time, accurate vehicle 3D dimension measurement and over-limit warning on lightweight computing devices. It features flexible deployment, low cost, and strong adaptability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to an automatic measurement and over-limit warning method, and in particular to a global adaptive method for vehicle three-dimensional dimension measurement and over-limit warning based on monocular geometric calculation. Background Technology

[0002] With the rapid development of the freight transportation industry, the number of freight vehicles on the road has increased year by year. The widespread use of freight vehicles has led to a significant increase in the frequency of oversized vehicles, which not only seriously threatens road traffic safety and damages highway infrastructure, but also reduces transportation efficiency and increases the risk of loss of life and property due to traffic accidents. The frequent occurrence of such accidents has become a major pain point in urban traffic management.

[0003] Currently, most regions still rely on traditional passive prevention and control methods, such as height restriction signs and mechanical height restriction barriers. These methods have significant shortcomings in actual operation: firstly, they depend on the driver's subjective judgment, limiting their early warning effectiveness; secondly, they lack a real-time feedback mechanism, failing to form an effective closed-loop management system. While some high-grade highways or important passageways use laser or radar equipment for over-height detection, which improves accuracy, their high cost and complex maintenance make widespread deployment difficult in large-scale road networks.

[0004] In recent years, with the continuous improvement of traffic monitoring infrastructure, visual analysis-based methods for detecting oversized vehicles have gained widespread attention. Automatic estimation of vehicle dimensions using monocular cameras has become an important development direction for intelligent transportation systems. Mainstream technical approaches typically include geometric modeling of the image scene, segmentation and extraction of vehicle targets, and generation of 3D bounding boxes. With the introduction of deep learning methods, visual perception and traditional geometric reasoning have gradually merged, enabling automatic segmentation of vehicle contours and estimation of spatial dimensions. Despite these advancements, many challenges remain in real-world road environments. On the one hand, the detection of scene geometric features such as vanishing points is easily affected by environmental interference, resulting in insufficient accuracy and robustness. On the other hand, vehicle segmentation algorithms, while pursuing real-time performance, often struggle to maintain accuracy in complex scenarios. Furthermore, the 3D dimension measurement process lacks a flexible adaptive mechanism when facing different camera layouts or changing viewpoints, and the system's full-process automation and multi-scene transfer capabilities have not yet met practical engineering needs. Therefore, how to achieve efficient and automated identification of the 3D dimensions of oversized vehicles in complex scenarios while ensuring detection accuracy and real-time performance remains a critical technical challenge that urgently needs to be overcome in this field. Summary of the Invention

[0005] The technical problem to be solved by the present invention is to address the shortcomings of the prior art by providing a global adaptive method for vehicle three-dimensional size measurement and over-limit warning based on monocular geometric calculation. This method can realize rapid detection and automatic warning of vehicle over-limit size in multiple environments and scenarios, and is applicable to key applications such as road safety management, infrastructure protection and intelligent traffic management.

[0006] To solve the above-mentioned technical problems, the first technical solution adopted by the present invention is:

[0007] A global adaptive method for measuring the three-dimensional dimensions of a vehicle based on monocular geometric solution includes the following steps:

[0008] Step 1: Acquire the motion video stream of the vehicle to be measured in three dimensions from the traffic monitoring camera, and set the measurement start frame image for three-dimensional dimension measurement from the motion video stream;

[0009] Step 2: Extract structured features of vehicle motion from the measurement start frame image; the structured features include vehicle appearance, lane lines, and lane facilities;

[0010] Step 3: Obtain the vanishing points in the 3D space of the scene where the vehicle to be measured is located along the road's direction of travel, in the mutually orthogonal longitudinal, lateral, and vertical directions. ;

[0011] Step 4: In the motion video stream, a three-dimensional bounding box that fits the vehicle to be measured in three dimensions is dynamically generated on each frame after the measurement start frame image;

[0012] Step 5: Calculate the height, width, and length of the vehicle to be measured in the real world based on the three-dimensional bounding box.

[0013] Furthermore, the specific process of dynamically generating the 3D bounding box in step 4 is as follows:

[0014] Step 4.1: Obtain the vehicle instance segmentation mask of the vehicle to be measured in 3D size in each frame of the motion video stream starting from the measurement start frame image using a lightweight instance segmentation model;

[0015] Step 4.2: Extract the minimum bounding rectangle B of the vehicle instance segmentation mask in real time, and calculate... Vanishing point and The relative position of the vanishing point with respect to rectangle B;

[0016] Step 4.3: Place the aforementioned Vanishing point and The relative position of the vanishing point with respect to the rectangle B is substituted into the rule base for dynamic generation of 3D bounding boxes for rule matching and the corresponding 3D bounding box construction order is selected. Tangents are fitted to the boundary of the vehicle instance segmentation mask based on the vanishing points in the vertical, horizontal and vertical directions, and the intersection points are calculated as the projection corner points of the dynamically generated 3D bounding boxes. The 3D bounding box is generated according to the 3D bounding box construction order.

[0017] Furthermore, the specific process for obtaining the vanishing points in the longitudinal, transverse, and vertical directions in step 3 is as follows:

[0018] Step 3.1: Obtain the calibration parameters of the traffic monitoring camera;

[0019] Step 3.2: Perform edge line segment detection on the motion video stream from the measurement start frame image and the subsequent T consecutive frame images, filter and accumulate all valid line segments with a length greater than a set threshold;

[0020] Step 3.3: Based on the calibration parameters, find the intersection points of all accumulated line segments, project them onto the unit equivalent sphere, and perform weighted voting on the polar coordinate grid to obtain the candidate vanishing point distribution map;

[0021] Step 3.4: Using a random sampling and exhaustive search strategy, search among the candidate points for a combination of vanishing points that makes the three points orthogonal and maximizes the global scoring function. );

[0022] Step 3.5: Perform time-series exponential weighted smoothing on the vanishing point results obtained from multi-frame detection to improve the stability and geometric consistency of vanishing points in consecutive frames. Final three-vanishing-point estimates. The following formula is used to derive:

[0023] ;

[0024] in, The estimated value for the current frame. α is the smoothing value of the previous frame, and α is the adaptive smoothing factor.

[0025] Furthermore, the specific content of the dynamic generation rule base for the 3D bounding box in step 4.4 is as follows:

[0026] Scenario 1: If the above Located in the To the left of, and its longitudinal position is located at the... Within the vertical range, and the Not mentioned Within the horizontal range, the target vehicle view is either "front & right" or "rear & left";

[0027] Scenario 2: If the above Located in the To the right of, and its longitudinal position is located in the... Within the vertical range, and the Not mentioned Within the horizontal range, the target vehicle view is either "front & left" or "rear & right";

[0028] Scenario 3: If the above Located in the The horizontal center region, and its longitudinal position is in the Above, and the above Not mentioned Within the horizontal range, the target vehicle view is either "top & front" or "top & rear";

[0029] Scenario 4: If the above Not mentioned The horizontal center region, and the Located in the If the horizontal center area is selected, the target vehicle view will be "top & right" or "top & left";

[0030] Case 5: If the above Located in the To the left and above it, and the Not mentioned Within the horizontal range, the target vehicle view is "top & right & front" or "top & left & rear";

[0031] Case 6: If the above Located in the To the right and above it, and the Not mentioned Within the horizontal range, the target vehicle view is either "top & left & front" or "top & right & rear".

[0032] Furthermore, the specific process for obtaining the calibration parameters of the traffic monitoring camera in step 3.1 is as follows:

[0033] By consulting the equipment manual or the parameter document provided by the manufacturer, if the intrinsic parameter information is complete, obtain the camera's intrinsic parameter matrix information, especially the principal point coordinates and focal length.

[0034] If the content information is missing, a chessboard calibration board with a known scale is slowly moved at multiple angles in the camera's field of view to collect image sequences containing different poses; the collected image sequences are processed using a chessboard-based camera calibration algorithm to calculate the camera intrinsic parameter matrix; the calibration accuracy is evaluated based on the reprojection error, and the calibration results are saved as system initialization parameters.

[0035] The second technical solution adopted in this invention is:

[0036] A global adaptive vehicle 3D dimension over-limit warning method based on monocular geometric solution includes the following steps:

[0037] Step 1: Calculate the three-dimensional dimensions of the vehicle based on the first technical solution described above. ;

[0038] Step 2: Set the traffic regulation limit μ and the historical sample standard deviation σ as the judgment threshold;

[0039] If any three-dimensional measurement dimension satisfies : If this occurs, a Level 1 "early warning" will be triggered;

[0040] If the following conditions are met: This will trigger a Level 2 "Collision Risk Warning";

[0041] If the following conditions are met: If this occurs, a Level 3 "Severe Over-Limit Alarm" will be triggered.

[0042] The third technical solution adopted in this invention is:

[0043] A cross-scenario, easily deployable automatic vehicle 3D dimension measurement and over-limit warning system includes:

[0044] The video input module is used to receive video streams or image frame sequences from a monocular traffic monitoring camera;

[0045] The data processing module is used to perform scene structure extraction, vanishing point detection, vehicle instance segmentation, adaptive 3D bounding box construction, and 3D size calculation on video images.

[0046] The visualization and early warning module is used for interactive auxiliary calibration result display, vehicle size visualization output, and issuance of multi-level early warning signals after over-limit analysis.

[0047] Furthermore, the video input module supports the access of multiple types of monitoring devices, including monocular cameras with different installation angles, heights, and resolutions.

[0048] Furthermore, the visualization and early warning module can be linked with the traffic guidance system to provide real-time alerts and upload information about overloaded vehicles through voice, sound and light, electronic screens, and other means.

[0049] The present invention has the following beneficial effects: 1. The present invention, through a standardized calibration process, can flexibly adapt to different application scenarios. Regardless of whether the camera manufacturer provides parameter information, it can efficiently obtain key intrinsic parameters such as principal point and focal length, providing reliable data support for subsequent vanishing point detection and the establishment of a spatial geometric reference system. This process is simple to operate, highly applicable, and can ensure the system maintains consistency and measurement accuracy under various actual installation conditions. 2. The present invention adopts a vanishing point detection method that combines multi-frame fusion and equivalent spherical mapping, which can significantly improve the robustness and accuracy of vanishing point detection. By accumulating high-quality line segment information across multiple frames, it overcomes the problems of single-frame noise interference and feature loss, greatly improving the stability of vanishing point localization in complex traffic scenarios. Based on the polar coordinate weighted voting of a unit sphere and the global optimal orthogonal three-point combination strategy, it can effectively guarantee the orthogonality and geometric consistency of the three-dimensional reference system. An adaptive exponential smoothing mechanism is introduced to perform time-series filtering on the multi-frame detection results, further suppressing instantaneous fluctuations and improving the continuity of results and the reliability of actual measurements. This method provides a robust and accurate geometric foundation for subsequent vehicle 3D dimension measurement, applicable to various road monitoring environments and different camera parameter settings, significantly enhancing the system's adaptability and engineering application value. 3. This invention employs a rule-based automatic matching strategy, which can flexibly adapt to various actual road scenarios and camera installation angles based on the relationship between the main vanishing point and the vehicle boundary, achieving efficient and accurate 3D bounding box modeling of the vehicle from different perspectives. By dividing the data into six typical view categories and selectively choosing the bounding box construction process, it eliminates the need for manual judgment or fixed configurations, greatly improving the system's adaptability to diverse road environments and vehicle postures. Compared to deep learning-based 3D detection methods, this strategy achieves comparable or even better 3D modeling results without requiring large-scale labeled data and repeated training, further reducing system deployment costs and maintenance difficulty. Attached Figure Description

[0050] Figure 1 This is a flowchart of the automatic measurement and over-limit warning method for vehicle three-dimensional dimensions according to an embodiment of the present invention.

[0051] Figure 2 This is a schematic diagram of the outdoor deployment of the automatic vehicle three-dimensional dimension measurement part of the present invention.

[0052] Figure 3 This is the masking effect after SAM2 segmentation and image processing.

[0053] Figure 4 This is a cumulative edge detection result image after LSD edge detection.

[0054] Figure 5 This is a schematic diagram of the equivalent sphere after vanishing point detection.

[0055] Figure 6 This is a schematic diagram illustrating the deployment and calibration of the three-way orthogonal reference rod of the present invention.

[0056] Figure 7 This is a segmentation rendering of the vehicle's outline.

[0057] Figure 8 This is a schematic diagram showing the relationship between the vanishing point coordinates and the edge position of the vehicle mask.

[0058] Figure 9 Create a rendering of the vehicle's 3D inspection frame.

[0059] Figure 10 This is a schematic diagram of a single-view measurement method for three-directional measurements. Detailed Implementation

[0060] The present invention will now be described in further detail with reference to the accompanying drawings and specific preferred embodiments.

[0061] In the description of this invention, it should be understood that the terms "left side," "right side," "upper part," "lower part," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. "First," "second," etc., do not indicate the importance of the components, and therefore should not be construed as a limitation of this invention. The specific dimensions used in this embodiment are only for illustrating the technical solution and do not limit the scope of protection of this invention.

[0062] Example 1

[0063] The global adaptive vehicle 3D dimension measurement method based on monocular geometric solution in this embodiment includes the following steps:

[0064] Step 1: Acquire the motion video stream of the vehicle to be measured in 3D from the traffic monitoring camera, and set the measurement start frame image for 3D dimension measurement from the motion video stream;

[0065] Step 2: Based on the semantic annotations provided to the visual segmentation model with prompting capabilities through human-computer interaction, extract the structured features of vehicle motion from the measurement start frame image; the structured features include vehicle appearance, lane lines, and lane facilities;

[0066] Step 3: Obtain the vanishing points in the 3D space of the scene where the vehicle to be measured is located along the road's direction of travel, in the mutually orthogonal longitudinal, lateral, and vertical directions. The specific details are as follows:

[0067] Step 3.1: Obtain the calibration parameters of the traffic monitoring camera, the details of which are as follows:

[0068] By consulting the equipment manual or the parameter document provided by the manufacturer, if the intrinsic parameter information is complete, obtain the camera's intrinsic parameter matrix information, especially the principal point coordinates and focal length.

[0069] If the content information is missing, a chessboard calibration board with a known scale is slowly moved at multiple angles in the camera's field of view to collect image sequences containing different poses; the collected image sequences are processed using a chessboard-based camera calibration algorithm to calculate the camera intrinsic parameter matrix; the calibration accuracy is evaluated based on the reprojection error, and the calibration results are saved as system initialization parameters.

[0070] Step 3.2: Perform edge line segment detection on the motion video stream from the starting frame image and the subsequent T consecutive frames, filter and accumulate all valid line segments with a length greater than a set threshold;

[0071] Step 3.3: Based on the calibration parameters, find the intersection points of all accumulated line segments, project them onto the unit equivalent sphere, and perform weighted voting on the polar coordinate grid to obtain the candidate vanishing point distribution map;

[0072] Step 3.4: Using a random sampling and exhaustive search strategy, search among the candidate points for a combination of vanishing points that makes the three points orthogonal and maximizes the global scoring function. );

[0073] Step 3.5: Perform time-series exponential weighted smoothing on the vanishing point results obtained from multi-frame detection to improve the stability and geometric consistency of vanishing points in consecutive frames. Final three-vanishing-point estimates. The following formula is used to derive:

[0074]

[0075] in, The estimated value for the current frame. The smoothing value of the previous frame. This is an adaptive smoothing factor.

[0076] Step 4: In the motion video stream, dynamically generate a 3D bounding box that fits the vehicle to be measured in 3D dimensions on each frame after the initial measurement frame. The specific process is as follows:

[0077] Step 4.1: Obtain the vehicle instance segmentation mask of the vehicle to be measured in 3D dimensions in each frame of the motion video stream starting from the measurement start frame image through a lightweight instance segmentation model;

[0078] Step 4.2: Extract the minimum bounding rectangle B of the vehicle instance segmentation mask in real time, and calculate... Vanishing point and The relative position of the vanishing point with respect to rectangle B;

[0079] Step 4.3: [The text appears to be incomplete and contains several grammatical errors. A more accurate translation would require Vanishing point and The relative position of the vanishing point with respect to the rectangle B is substituted into the rule base for dynamic generation of 3D bounding boxes for rule matching and the corresponding 3D bounding box construction order is selected. Tangents are fitted to the boundary of the vehicle instance segmentation mask based on the vanishing points in the vertical, horizontal and vertical directions, and the intersection points are calculated as the projection corner points of the dynamically generated 3D bounding boxes. The 3D bounding box is generated according to the 3D bounding box construction order.

[0080] The specific details of the rule base for dynamically generating 3D bounding boxes are as follows:

[0081] Scenario 1: If lie in On the left, and its vertical position is at the left side, and its longitudinal position is at the right. Within the vertical range, and Not here Within the horizontal range, the target vehicle view is either "front & right" or "rear & left";

[0082] Scenario 2: If lie in On the right side, and its vertical position is at Within the vertical range, and Not here Within the horizontal range, the target vehicle view is either "front & left" or "rear & right";

[0083] Scenario 3: If lie in The horizontal center region, and its vertical position is in Above, and Not here Within the horizontal range, the target vehicle view is either "top & front" or "top & rear";

[0084] Scenario 4: If Not here The horizontal central area, and lie in If the horizontal center area is selected, the target vehicle view will be "top & right" or "top & left";

[0085] Scenario 5: If lie in To the left and above it, and Not here Within the horizontal range, the target vehicle view is "top & right & front" or "top & left & rear";

[0086] Scenario 6: If lie in To the right and above it, and Not here Within the horizontal range, the target vehicle view is either "top & left & front" or "top & right & rear".

[0087] Step 5: Calculate the height, width, and length of the vehicle to be measured in 3D in the real world based on the 3D bounding box. The specific details are as follows:

[0088] The details are as follows:

[0089] Step 5.1: Select a reference rod with three mutually orthogonal edges. The reference rod consists of three rectangular cross-section metal rods of known length. The three rods are fixed together by a T-joint connector. The ends of the rods are painted or pasted with eye-catching colored marking lines.

[0090] Step 5.2: Temporarily place the reference pole in a safe area within the camera's field of view;

[0091] Step 5.3: Acquire the coordinates of the four vertices of the reference rod in the image and use them as the geometric reference for image-physical space scale transformation;

[0092] Step 5.4: After completing the one-time calibration operation, remove the reference pole from its original location to restore the road surface to its original state, and save the collected reference pole vertex coordinates;

[0093] Step 5.5: Based on the vanishing points in the mutually orthogonal longitudinal, transverse, and vertical directions, and the known actual height of the reference rod. Based on the principle of single-view projective geometry, the height, width and length of the vehicle to be measured in the three-dimensional dimension are obtained by solving the three-dimensional bounding box.

[0094] Example 2

[0095] The global adaptive vehicle 3D size over-limit warning method based on monocular geometric solution in this embodiment is as follows: Figure 1 As shown, it includes the following steps:

[0096] Step 1: Calculate the three-dimensional dimensions of the vehicle according to the measurement method of one of the above embodiments. ;

[0097] Step 2: Set the traffic regulation limit μ and the historical sample standard deviation σ as the judgment threshold;

[0098] If any three-dimensional measurement dimension satisfies : If this occurs, a Level 1 "early warning" will be triggered;

[0099] If the following conditions are met: This will trigger a Level 2 "Collision Risk Warning";

[0100] If the following conditions are met: If this occurs, a Level 3 "Severe Over-Limit Alarm" will be triggered.

[0101] Example 3

[0102] The vehicle three-dimensional dimension measurement and over-limit warning system in this embodiment is used to implement the method in Embodiment 1 or 2 above, including:

[0103] The video input module is used to receive video streams or image frame sequences from a monocular traffic monitoring camera;

[0104] The video input module supports the connection of various types of monitoring devices, including monocular cameras with different installation angles, heights and resolutions.

[0105] The data processing module is used to perform scene structure extraction, vanishing point detection, vehicle instance segmentation, adaptive 3D bounding box construction, and 3D size calculation on video images.

[0106] The visualization and early warning module is used for interactive auxiliary calibration result display, vehicle size visualization output, and issuance of multi-level early warning signals after over-limit analysis. This module can be linked with traffic guidance systems to provide real-time alerts and information uploads for over-limit vehicles through voice, sound and light displays, and electronic screens.

[0107] In this embodiment, the video input module uses a Hikvision camera. The remaining component data processing module terminal is selected with... Laptops with graphics cards, such as Figure 2 The figure shows a schematic diagram of the outdoor deployment of an automated three-dimensional measurement system for vehicles.

[0108] Access to traffic monitoring cameras via fiber optic network cable. The real-time video stream. Furthermore, due to the lack of intrinsic parameter information for this camera model, [the following will occur]. Interior corners, grid side length The checkerboard calibration plate is rigidly installed on the side or rear of the test vehicle to ensure the flatness and reliable fixation of the calibration plate.

[0109] In the target scenario It travels at a low, constant speed and changes lanes as instructed to create multi-line-of-sight and multi-angle (pitch / yaw) observation conditions, and collects 20 images in different postures.

[0110] The OpenCV function `cv2.findChessboardCorners` is used to extract corner points, and `cv2.calibrateCamera` is called to calculate the camera intrinsic parameter matrix. Once the reprojection error is less than 0.15 pixels, the intrinsic parameters are saved as an XML file.

[0111] Select the measurement start frame image containing structural features from the motion video stream (the 100th frame in this embodiment, which contains a square van). Provide positive and negative cue points to Segment AnythingModel 2 (SAM2) through human-computer interaction in the system interface. Positive cue points include driving vehicles, lane lines, and road facilities, while negative cue points are background areas.

[0112] SAM2 obtains binary masks for each segmented object from a total of 20 frames, from the starting frame to the subsequent frames, and performs a logical OR operation on all masks pixel by pixel to generate a single-channel merged mask.

[0113] The original frame is converted into a grayscale image, and only the original grayscale values ​​of the masked area are retained on a pure black background to form a mask-preserved grayscale image.

[0114] like Figure 3 As shown, to improve the clarity of structured edge information, the image is sequentially subjected to Gaussian blur filtering and adaptive histogram equalization (CLAHE, with clipLimit set to 2.0 and tileGridSize set to 8×8) to reduce noise and enhance contrast. The processed result is saved in JPG format to the specified archive directory.

[0115] like Figure 4 As shown, OpenCV LSD line segment detection is performed frame by frame based on camera intrinsic parameters and 20 consecutive frames of images. The minimum length threshold is set to 30 pixels, and a set of line segments is accumulated in the buffer that does not exceed 20 frames.

[0116] All line segments are mapped to the unit spherical coordinate system after decentralization and correction by combining the camera principal point and focal length parameters.

[0117] In polar coordinate grid ( The candidate vanishing point distribution is generated by weighted voting on a resolution basis.

[0118] The "2-Line Minimum Sample Set Exhaustive Search" (2-Line MSS) method is used to enumerate line segment pairs. The combination of the three vanishing points with the highest search scores corresponds to the longitudinal (VPx), lateral (VPy), and vertical (VPz) directions of the road, respectively.

[0119] Introducing coefficients The exponential smoothing update strategy (0.4-0.8) weights and fuses the detection results of the current frame with the vanishing point of the previous frame to suppress geometric fluctuations caused by single-frame jitter, thereby obtaining a stable triorthogonal vanishing point in multi-frame scenes. The final stable point is as follows: Figure 5 As shown.

[0120] like Figure 6 As shown, reference poles were deployed within the camera's shooting scene. A reference pole assembly with three mutually orthogonal edges was selected. This assembly consisted of three rectangular metal poles, each 1.5 meters long, fixed together by a T-joint connector. For easy identification, each end of the three metal poles was uniformly coated with a red and white alternating high-brightness marking strip approximately 50 mm wide. The reference poles were temporarily placed on the hard shoulder within the camera's field of view. After the camera started, image frames containing the reference poles were acquired, and the coordinates of the four vertices of the reference pole's three-dimensional structure in the image were extracted through manual interaction or automated detection algorithms. After completing the initial calibration, the reference poles were removed from their original positions, the site was restored to its original state, and the obtained vertex coordinates and physical dimension parameters of the reference poles were saved for later use.

[0121] From 3860 tire images in a self-made traffic flow dataset (2571 trucks, 1623 cars, 440 vans, and 376 buses), a vehicle contour segmentation dataset was created using Roboflow. This dataset was divided into training, validation, and test sets in an 8:1:1 ratio. A baseline model for the custom-YOLO11-seg network was selected and trained, resulting in the optimal YOLO11n-seg vehicle contour segmentation model. This model integrates the DCNv3, PConv, and CGAFusion modules, achieving an average accuracy of 0.948 and an inference speed of 2.7ms on the test set with a threshold of 0.5. Figure 7 As shown, the optimal model is used and runs synchronously with the video input to achieve real-time vehicle segmentation and mask generation. The corresponding construction rule is selected based on the relative relationship between the extreme values ​​of the vehicle mask boundary and the orthogonal vanishing points VPx, VPy, and VPz in S3. In this embodiment, the relationship between the vanishing point coordinates and the mask boundary coordinates is as follows: Figure 8As shown, the camera is located on the right side of the road and slightly above the vehicle. The rule meets condition five: "If v_p is located to the left and above B, and v_q is not within the horizontal range of B." Therefore, the rule base selects the "right-front-upper view" construction mode to generate the 3D bounding box, as shown below. Figure 9 As shown.

[0122] After obtaining the three orthogonal vanishing points (denoted as VPx along the lane direction, VPy laterally, and VPz vertically) and the known actual height of the reference pole, Under the premise of [specific conditions], single-view projective measurement is used to uniformly solve the three-dimensional dimensions of the vehicle. For example... Figure 10 As shown, the vanishing horizon is first constructed using VPx and VPy. .

[0123] For the vehicle height, select a vertical edge of the established 3D bounding box, and denote its top and bottom edges as follows: The top and bottom of the vertical edge of the reference rod are respectively denoted as... (Its true height is) ).Pass and Connect the dots, with Hand over After that and Draw a line, the vertical vanishing line of the reference rod ( Intersect at auxiliary point Based on this, a one-dimensional projective transformation is established from the image line to the actual vertical distance, representing the vehicle height. It is given by the following formula:

[0124]

[0125] To suppress the impact of single-edge noise, the above calculation was repeated for all four visible vertical edges of the vehicle within the same frame, and the intra-frame average was taken.

[0126]

[0127] The vehicle height estimate for this frame is obtained. Subsequently, all valid frame-level estimates of the same target during its passage through the detection area are processed. Take the median:

[0128]

[0129] As the final height result, a two-level robust aggregation of "intra-frame average + cross-frame median" is achieved.

[0130] The vehicle width and length are solved using the same principle: Based on the known dimensions of the reference rod in the horizontal / vertical directions, select one set of edges parallel to VPy (horizontal) and another set of edges parallel to VPx (vertical) of the 3D bounding box established in S6, and reuse the above construction (removing the vertical vanishing point). With line segment (Replace the vanishing point and reference edge in the corresponding direction) to obtain the intra-frame average. Then take the median across frames, and finally record it as .

[0131]

[0132] Therefore, the three-dimensional dimensions are output as follows: .

[0133] The vehicle's three-dimensional dimensions are compared with traffic regulation limits, where the regulation limits are used as the mean parameter μ in the statistical determination. In this embodiment, the upper limits of the regulations for vehicle length, width, and height are taken as follows: , , Based on the standard deviation σ obtained from historical sample statistics, a multi-level over-limit early warning mechanism is constructed: when the measurement result of any dimension meets the requirements... (Right now or or When the measurement result of any dimension is within a certain range, a level three "serious over-limit alarm" is triggered; When the traffic is within the specified range (in this embodiment, this corresponds to exceeding 95% of the regulatory limit but not yet exceeding the limit), a level-two "risk warning" is triggered; otherwise, the traffic is considered to be in a normal passage state.

[0134] The preferred embodiments of the present invention have been described in detail above. However, the present invention is not limited to the specific details in the above embodiments. Within the scope of the technical concept of the present invention, various equivalent transformations can be made to the technical solutions of the present invention, and these equivalent transformations all fall within the protection scope of the present invention.

Claims

1. A monocular geometry based global adaptive vehicle three-dimensional dimension measurement method, characterized in that: Includes the following steps: Step 1: Acquire the motion video stream of the vehicle to be measured in three dimensions from the traffic monitoring camera, and set the measurement start frame image for three-dimensional dimension measurement from the motion video stream; Step 2: Extract structured features of vehicle motion from the measurement start frame image; the structured features include vehicle appearance, lane lines, and lane facilities; Step 3: Obtain the vanishing points in the longitudinal, lateral and vertical directions that are mutually orthogonal in the three-dimensional space of the scene in which the vehicle to be measured is advancing in the direction of the road ; Step 4: In the motion video stream, a three-dimensional bounding box that fits the vehicle to be measured in three dimensions is dynamically generated on each frame after the measurement start frame image; Step 5: Calculate the height, width, and length of the vehicle to be measured in the real world based on the three-dimensional bounding box.

2. The automatic measurement method for three-dimensional dimensions of a vehicle according to claim 1, characterized in that: The specific process of dynamically generating the 3D bounding box in step 4 is as follows: Step 4.1: Obtain the vehicle instance segmentation mask of the vehicle to be measured in 3D size in each frame of the motion video stream starting from the measurement start frame image using a lightweight instance segmentation model; Step 4.2: Extract the minimum bounding rectangle B of the vehicle instance segmentation mask in real time, and calculate... Vanishing point and The relative position of the vanishing point with respect to rectangle B; Step 4.3: Place the aforementioned Vanishing point and The relative position of the vanishing point with respect to the rectangle B is substituted into the rule base for dynamic generation of 3D bounding boxes for rule matching and the corresponding 3D bounding box construction order is selected. Tangents are fitted to the boundary of the vehicle instance segmentation mask based on the vanishing points in the vertical, horizontal and vertical directions, and the intersection points are calculated as the projection corner points of the dynamically generated 3D bounding boxes. The 3D bounding box is generated according to the 3D bounding box construction order.

3. The global adaptive vehicle three-dimensional dimension measurement method based on monocular geometric solution according to claim 1, characterized in that: The specific process for obtaining the vanishing points in the longitudinal, transverse, and vertical directions in step 3 is as follows: Step 3.1: Obtain the calibration parameters of the traffic monitoring camera; Step 3.2: Perform edge line segment detection on the motion video stream from the measurement start frame image and the subsequent T consecutive frame images, filter and accumulate all valid line segments with a length greater than a set threshold; Step 3.3: Based on the calibration parameters, find the intersection points of all accumulated line segments, project them onto the unit equivalent sphere, and perform weighted voting on the polar coordinate grid to obtain the candidate vanishing point distribution map; Step 3.4: Using a random sampling and exhaustive search strategy, search among the candidate points for a combination of vanishing points that makes the three points orthogonal and maximizes the global scoring function. ; Step 3.5: Perform time-series exponential weighted smoothing on the vanishing point results obtained from multi-frame detection to improve the stability and geometric consistency of vanishing points in consecutive frames. Final three-vanishing-point estimates. The following formula is used to derive: ; in, The estimated value for the current frame. The smoothing value of the previous frame. This is an adaptive smoothing factor.

4. The global adaptive vehicle three-dimensional dimension measurement method based on monocular geometric solution according to claim 2, characterized in that: The specific details of the dynamic generation of the 3D bounding box rule base in step 4.4 are as follows: Scenario 1: If the above Located in the To the left of, and its longitudinal position is located at the... Within the vertical range, and the Not mentioned Within the horizontal range, the target vehicle view is "front & right" or "rear & left"; Scenario 2: If the above Located in the To the right of, and its longitudinal position is located in the... Within the vertical range, and the Not mentioned Within the horizontal range, the target vehicle view is "front & left" or "rear & right"; Scenario 3: If the above Located in the The horizontal center region, and its longitudinal position is in the Above, and the above Not mentioned Within the horizontal range, the target vehicle view is either "top & front" or "top & rear"; Scenario 4: If the above Not mentioned The horizontal center region, and the Located in the If the horizontal center area is selected, the target vehicle view will be "top & right" or "top & left"; Case 5: If the above Located in the To the left and above it, and the Not mentioned Within the horizontal range, the target vehicle view is "top & right & front" or "top & left & rear"; Case 6: If the above Located in the To the right and above it, and the Not mentioned Within the horizontal range, the target vehicle view is "top & left & front" or "top & right & rear".

5. The global adaptive vehicle three-dimensional dimension measurement method based on monocular geometric solution according to claim 3, characterized in that: The specific process for obtaining the calibration parameters of the traffic monitoring camera in step 3.1 is as follows: By consulting the equipment manual or the parameter document provided by the manufacturer, if the intrinsic parameter information is complete, obtain the camera's intrinsic parameter matrix information, especially the principal point coordinates and focal length. If the content information is missing, a chessboard calibration board with a known scale is slowly moved at multiple angles within the camera's field of view to collect image sequences containing different poses; the collected image sequences are then processed using a chessboard-based camera calibration algorithm to calculate the camera intrinsic parameter matrix. The calibration accuracy is assessed based on the reprojection error, and the calibration results are saved as system initialization parameters.

6. The global adaptive vehicle three-dimensional dimension measurement method based on monocular geometric solution according to claim 1, characterized in that: The specific details of step 5 are as follows: Step 5.1: Select a reference rod with three mutually orthogonal edges. The reference rod consists of three rectangular cross-section metal rods of known length. The three rods are fixed together by a T-joint connector. The ends of the rods are painted or pasted with eye-catching colored marking lines. Step 5.2: Temporarily place the reference rod in a safe area within the camera's field of view; Step 5.3: Acquire the coordinates of the four vertices of the reference rod in the image and use them as the geometric reference for image-physical space scale transformation; Step 5.4: After completing the one-time calibration operation, remove the reference pole from its original location to restore the road surface to its original state, and save the collected reference pole vertex coordinates; Step 5.5: Based on the vanishing points in the mutually orthogonal longitudinal, transverse, and vertical directions and the known actual height of the reference rod. Based on the principle of single-view projective geometry, the height, width and length of the vehicle to be measured in the three-dimensional dimension are obtained by solving the three-dimensional bounding box.

7. A global adaptive vehicle 3D dimension over-limit warning method based on monocular geometric solution, characterized in that: Includes the following steps: Step 1: Calculate the three-dimensional dimensions of the vehicle according to the global adaptive vehicle three-dimensional dimension measurement method based on monocular geometric solution as described in any one of claims 1 to 5. ; Step 2: Set traffic regulation limits And the historical sample standard deviation σ is used as the judgment threshold; If any three-dimensional measurement dimension satisfies If this occurs, a Level 1 "early warning" will be triggered; If the following conditions are met: This will trigger a level 2 "collision risk warning"; If the following conditions are met: If so, a Level 3 "Severe Over-Limit Alarm" will be triggered.

8. A vehicle three-dimensional dimension measurement and over-limit warning system for implementing the method of claim 1 or claim 7, characterized in that: include: The video input module is used to receive video streams or image frame sequences from a monocular traffic monitoring camera; The data processing module is used to perform scene structure extraction, vanishing point detection, vehicle instance segmentation, adaptive 3D bounding box construction, and 3D size calculation on video images. The visualization and early warning module is used for interactive auxiliary calibration result display, vehicle size visualization output, and issuance of multi-level early warning signals after over-limit analysis.

9. The system according to claim 8, characterized in that: The video input module supports the access of multiple types of monitoring devices, including monocular cameras with different installation angles, heights, and resolutions.

10. The system according to claim 8, characterized in that: The visualization and early warning module can be linked with the traffic guidance system to provide real-time alerts and upload information about overloaded vehicles through voice, sound and light, electronic screens, and other means.