An automated calibration and data processing method and tool for monocular vision cameras

The automated calibration and data processing tools for monocular vision cameras enable automated calibration without human intervention, solving the problems of cumbersome calibration processes and easy error introduction in existing technologies, improving calibration efficiency and accuracy, and making it suitable for large-scale roadside and vehicle-mounted equipment.

CN121661153BActive Publication Date: 2026-05-19INNER MONGOLIA AGRICULTURAL UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
INNER MONGOLIA AGRICULTURAL UNIVERSITY
Filing Date
2025-12-11
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing monocular vision camera calibration tools rely on manual interaction, which is cumbersome, prone to errors, and difficult to maintain on large-scale roadside or vehicle-mounted equipment. Existing algorithms require manual data collection and processing, and the calibration results are easily affected by camera height and tilt angle, lacking end-to-end automation.

Method used

This invention provides an automated calibration and data processing tool for monocular vision cameras. It enables one-click calibration through a graphical user interface, automatically acquires and verifies calibration images, uses an integrated calculation process to solve for the equivalent variable focal length and downtilt angle, establishes a positioning error compensation model, and updates the error compensation coefficients synchronously in the cloud, achieving automated calibration with zero hardware additions and one-click completion.

Benefits of technology

It achieves automated calibration without the need for manual selection of chessboard corner points, reducing human error, shortening calibration time, improving positioning accuracy, supporting the maintenance and optimization of large-scale equipment, and enhancing the efficiency and intelligence of calibration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121661153B_ABST
    Figure CN121661153B_ABST
Patent Text Reader

Abstract

The application discloses a kind of monocular vision camera's automated calibration and data processing method and tool, the method includes: in response to a key calibration instruction, control camera to collect initial calibration image, and carry out quality check to obtain target calibration image;Based on the ground feature point of target calibration image, through integrated computing process, equivalent variable focal length model parameter and down angle angle value are solved synchronously;Using equivalent variable focal length model parameter, down angle angle value and the world coordinate value of ground feature point, establish and solve space distribution compensation model, obtain error compensation coefficient;Equivalent variable focal length model parameter, down angle angle value and error compensation coefficient are packaged as structured configuration file, and uploaded to cloud server;Receive the update instruction of cloud server, to error compensation coefficient hot update.The method can realize zero hardware addition, one-key completion, cloud synchronization of automated calibration, improve the efficiency and intelligent degree of monocular vision camera calibration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of computer vision and camera calibration technology, specifically to an automated calibration and data processing method and tool for a monocular vision camera. Background Technology

[0002] The calibration of monocular vision cameras has wide applications in vehicle speed measurement, traffic monitoring, roadside perception, and other scenarios. Existing monocular vision camera calibration tools, such as MATLAB Camera Calibration Toolbox and OpenCV calibration, all rely on manual interaction, requiring manual selection of checkerboard corner points, which is cumbersome and prone to human error. When the camera installation height or tilt angle changes, the calibration board needs to be repeatedly set up, resulting in a large workload and long calibration time. The calibration and error compensation of monocular vision cameras require switching between multiple software platforms, lacking end-to-end automation. The calibration results are easily affected by the camera height and tilt angle, making it difficult to maintain on a large scale of roadside or vehicle-mounted equipment.

[0003] Furthermore, in the field of monocular vision calibration algorithm research, existing technologies (e.g., the applicant's prior research [Xue et al., Monocular Vision Ranging and Camera Focal Length Calibration, Scientific Programming, 2021] and [Lian et al., A 2D Localization Model for Image Targets Based on Monocular Vision, ATDE, 2024]) have disclosed variable focal length calibration methods and positioning error compensation models based on polynomial fitting. However, these studies mainly focus on the derivation and verification of the algorithm model itself. The calibration process still requires manual intervention in data acquisition and processing switching, and the calibration results cannot be further optimized once obtained. Summary of the Invention

[0004] In view of this, this application provides an automated calibration and data processing method for a monocular vision camera, executed by an automated calibration and data processing tool for a monocular vision camera, comprising:

[0005] Responding to a one-click calibration command via the graphical user interface, the system triggers and controls the monocular vision camera to acquire initial calibration images of a foldable magnetic calibration plate deployed on the ground, and performs quality verification on the initial calibration images to obtain the target calibration image. The graphical user interface is provided by the monocular vision camera's automated calibration and data processing tools. Based on ground feature points extracted from the target calibration image, the system simultaneously solves for the equivalent variable focal length model parameters and the monocular vision camera's downtilt angle value, which are independent of the camera's installation height, through an integrated calculation process. Using the equivalent variable focal length model parameters, downtilt angle value, and world coordinate values ​​of the ground feature points, the system establishes and solves for a spatial distribution compensation model of the positioning error, obtaining the error compensation coefficients. The equivalent variable focal length model parameters, downtilt angle value, and error compensation coefficients are encapsulated into a structured configuration file and simultaneously uploaded to the cloud server. The system receives update commands from the cloud server for the error compensation coefficients and performs hot updates to the error compensation coefficients based on these commands.

[0006] Optionally, a spatial distribution compensation model for positioning error is established and solved, including: calculating the predicted world coordinates of ground feature points based on the parameters of the equivalent variable focal length model and the downtilt angle; calculating the positioning error between the predicted world coordinates and the real world coordinates; and performing surface fitting with the predicted image coordinates of ground feature points as the independent variable and the positioning error as the dependent variable to generate a spatial distribution compensation model for compensating for the positioning error of a monocular vision camera in the entire field of view.

[0007] Optionally, the monocular vision camera is controlled to acquire initial calibration images of a foldable magnetic calibration plate deployed on the ground, and the quality of the initial calibration images is verified to obtain target calibration images. This includes: controlling the monocular vision camera to acquire initial calibration images of the complete scene of the foldable magnetic calibration plate; the foldable magnetic calibration plate has a built-in 0.2mm thick steel sheet, and the maximum warping after 100 folds is less than 0.5mm; detecting and removing images in the initial calibration images that do not meet the image quality conditions to obtain target calibration images.

[0008] Optionally, detecting and removing images that do not meet the image quality conditions from the initial calibration image to obtain the target calibration image includes: calculating the corner missing rate of the initial calibration image using a corner extraction algorithm; detecting the reflective area of ​​the initial calibration image using the gray-scale variance method and determining the gray-scale variance value of the reflective area; deleting the initial calibration image if the corner missing rate is greater than or equal to a corner missing rate threshold, and / or if the gray-scale variance value is less than a gray-scale variance threshold, and displaying the corner missing rate and gray-scale variance value in real time on the graphical user interface corresponding to the graphical user interface to guide the user to adjust at least one of the flatness and illumination angle of the foldable magnetic calibration plate; controlling the monocular vision camera to re-acquire a reference calibration image of the foldable magnetic calibration plate at preset intervals, and using the reference calibration image as the target calibration image if it is determined that the missing rate of the reference calibration image is less than the corner missing rate threshold and the gray-scale variance value of the reflective area of ​​the reference calibration image is greater than or equal to the gray-scale variance threshold.

[0009] Optionally, the automated calibration and data processing method for monocular vision cameras further includes: displaying information indicating the calibration progress of the monocular vision camera in the graphical user interface corresponding to the graphical user interface, and outputting calibration error prompt information when the calibration quality of the monocular vision camera does not meet a preset threshold.

[0010] Optionally, the information on the monocular vision camera calibration progress includes the quality score value of the target calibration image, and the method further includes: calculating the quality score value of the target calibration image; if the quality score value is less than the quality score threshold issued by the cloud server, outputting the values ​​of the sub-indicators that cause the quality score value to decrease in the graphical user interface; if the quality score values ​​of N consecutive frames of target calibration images are all less than the quality score threshold, locking the graphical user interface; where N is an integer greater than 2.

[0011] Optionally, the automated calibration and data processing method for monocular vision cameras also includes acquiring vehicle videos of the actual speeds of multiple target vehicles; calculating the average absolute percentage error between the actual speed and the predicted speed of each target vehicle in the vehicle video; and generating a prompt message for updating the error compensation coefficient if the average absolute percentage error is greater than or equal to a percentage threshold.

[0012] Optionally, if the mean absolute percentage error is greater than or equal to the percentage threshold, the following steps may also be performed: send a recalibration request to the cloud server so that the cloud server retrains the spatial distribution compensation model based on the recalibration request to generate new error compensation coefficients, and generates update instructions based on the new error compensation coefficients.

[0013] This application provides an automated calibration and data processing tool for a monocular vision camera, including a calibration image acquisition module, a variable focal length and downtilt angle integrated calculation module, an error compensation module, a data encapsulation and interface module, and an error compensation hot update module, wherein:

[0014] The calibration image acquisition module is used to respond to the one-click calibration command of the graphical user interface, trigger and control the monocular vision camera to acquire the initial calibration image of the foldable magnetic calibration plate deployed on the ground, and perform quality verification on the initial calibration image to obtain the target calibration image; the graphical user interface is provided by the monocular vision camera's automated calibration and data processing tools;

[0015] The integrated variable focal length and downtilt angle calculation module is used to simultaneously solve the equivalent variable focal length model parameters and the downtilt angle value of the monocular vision camera based on the ground feature points extracted from the target calibration image through an integrated calculation process.

[0016] The error compensation module is used to establish and solve the spatial distribution compensation model of positioning error by using the parameters of the equivalent variable focal length model, the downtilt angle value, and the world coordinate value of the ground feature point, and to obtain the error compensation coefficient.

[0017] The data encapsulation and interface module is used to encapsulate the equivalent variable focal length model parameters, tilt angle values, and error compensation coefficients into a structured configuration file and upload them synchronously to the cloud server.

[0018] The error compensation hot update module is used to receive update instructions for the error compensation coefficients from the cloud server and perform hot updates on the error compensation coefficients based on the update instructions.

[0019] The automated calibration and data processing method for monocular vision cameras provided in this application is executed by an automated calibration and data processing tool for monocular vision cameras. The method includes: responding to a one-click calibration command via a graphical user interface, triggering and controlling the monocular vision camera to acquire an initial calibration image of a foldable magnetic calibration plate deployed on the ground, and performing quality verification on the initial calibration image to obtain a target calibration image; the graphical user interface is provided by the automated calibration and data processing tool for monocular vision cameras; based on ground feature points extracted from the target calibration image, simultaneously solving for the equivalent variable focal length model parameters and the downtilt angle value of the monocular vision camera, independent of the camera's installation height, through an integrated calculation process; using the equivalent variable focal length model parameters, the downtilt angle value, and the world coordinates of the ground feature points, establishing and solving a spatial distribution compensation model for positioning errors to obtain error compensation coefficients; encapsulating the equivalent variable focal length model parameters, the downtilt angle value, and the error compensation coefficients into a structured configuration file and simultaneously uploading it to a cloud server; receiving update commands from the cloud server for the error compensation coefficients and performing hot updates on the error compensation coefficients based on the update commands. Thus, by responding to a one-click calibration command, a target calibration image containing the complete scene of the foldable magnetic calibration board can be automatically acquired, eliminating the need to manually select checkerboard corner points on the calibration board and avoiding errors caused by manual operation. Based on ground feature points in the target calibration image, an integrated calculation process can be performed, enabling one-time calibration of the equivalent variable focal length and tilt angle independent of the camera's installation height. When the camera height or tilt angle changes, there is no need to repeatedly deploy the calibration board for recalibration, resulting in short calibration time. The calibration process utilizes the equivalent variable focal length model parameters, tilt angle values, and world coordinates of the ground feature points. By establishing and solving a spatial distribution compensation model for positioning errors through calibration, positioning error compensation can be achieved, thereby improving positioning accuracy. By encapsulating the equivalent variable focal length model parameters, tilt angle values, and error compensation coefficients into a structured configuration file and synchronously uploading it to a cloud server, unified management of calibration results and positioning data can be achieved, facilitating closed-loop optimization. By receiving update instructions for the error compensation coefficients sent by the cloud server and updating the error compensation coefficients according to these instructions, maintenance of monocular vision cameras in large-scale roadside or vehicle-mounted equipment can be achieved. The automated calibration and data processing method for monocular vision cameras provided in this application can achieve automated calibration with zero hardware additions, one-click completion, and cloud synchronization, improving the efficiency and intelligence of monocular vision camera calibration. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort, wherein:

[0021] Figure 1 A flowchart illustrating an automated calibration and data processing method for a monocular vision camera provided in an embodiment of this application;

[0022] Figure 2 A schematic diagram of the structure of an automated calibration and data processing tool for a monocular vision camera provided in an embodiment of this application;

[0023] Figure 3 This is a schematic diagram of the GUI interface provided by an automated calibration and data processing tool for a monocular vision camera, as provided in an embodiment of this application. Detailed Implementation

[0024] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. The following embodiments are used to illustrate this application, but are not intended to limit the scope of this application. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0025] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0026] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which the embodiments of this application pertain. It should also be understood that terms such as those defined in general dictionaries should be understood to have a meaning consistent with their meaning in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.

[0027] This application provides an automated calibration and data processing method for a monocular vision camera, which is executed by an automated calibration tool. Figure 1 A flowchart illustrating an automated calibration and data processing method for a monocular vision camera provided in this application embodiment is shown below. Figure 1 As shown, the method includes:

[0028] S101, responding to the one-click calibration command of the graphical user interface, triggers and controls the monocular vision camera to acquire the initial calibration image of the foldable magnetic calibration plate deployed on the ground, and performs quality verification on the initial calibration image to obtain the target calibration image.

[0029] It should be noted that the graphical user interface is provided by the automated calibration and data processing tool for the monocular vision camera. In some embodiments, when the user clicks or touches the one-click calibration button in the graphical user interface provided by the automated calibration and data processing tool for the monocular vision camera, the user can respond to the one-click calibration command in the graphical user interface corresponding to the one-click calibration button, thereby triggering and controlling the monocular vision camera to acquire the complete scene of the foldable magnetic calibration plate on the ground below the monocular vision camera, and obtain the initial calibration image.

[0030] The foldable magnetic calibration board serves as a physical reference. It measures 1 meter x 1.5 meters and features a 6 cm x 6 cm black and white checkered pattern on its surface, with a folded thickness of less than or equal to 10 millimeters. Specifically, the board is made of a flexible substrate with a high-contrast, regular grid pattern (6 cm x 6 cm black and white squares) on its surface. Magnetic strips or sheets are integrated on the back of the board, allowing it to be quickly attached to ferrous roadside facilities or temporary supports, adapting to complex roadside installation environments. When not in use, the board can be folded along preset creases, with a folded thickness of less than or equal to 10 millimeters, facilitating transportation and storage. Its typical unfolded size of 1 meter x 1.5 meters provides sufficient field of view and a sufficient number of feature points in typical road scenarios.

[0031] In some embodiments, a monocular vision camera can acquire an initial calibration image of all the black and white square patterns on the surface of a foldable magnetic calibration plate. Then, the quality of the acquired initial calibration image can be evaluated by the automated calibration and data processing tools of the monocular vision camera. Initial calibration images that do not meet the quality requirements are discarded, and the target calibration image is obtained.

[0032] S102. Based on the ground feature points extracted from the target calibration image, the equivalent variable focal length model parameters and the downtilt angle value of the monocular vision camera, which are independent of the camera installation height, are solved simultaneously through an integrated calculation process.

[0033] In some embodiments, the automated calibration and data processing tool for monocular vision cameras can establish and solve an equivalent variable focal length model based on the image physical coordinates of ground feature points in the target calibration image; based on the image physical coordinates and the solved equivalent variable focal length model parameters, a nonlinear function related to the height and tilt angle of the monocular vision camera above the ground is obtained, and the tilt angle of the monocular vision camera is obtained by solving the nonlinear function, thereby realizing the integrated calibration of the equivalent variable focal length and tilt angle.

[0034] In some embodiments, the ground feature points in the target calibration image include multiple points. The ground feature points can be the vertices (corner points) of the black and white squares on the surface of the foldable magnetic calibration plate. The image of the foldable magnetic calibration plate can be captured by controlling a monocular vision camera, and then the pixel coordinate values ​​of the ground feature points on the calibration plate can be automatically extracted using image processing algorithms (such as the corner detection method of OpenCV), and then the pixel coordinate values ​​can be converted into the corresponding image physical coordinate values.

[0035] In some embodiments, an equivalent variable focal length model can be established based on the nonlinear mapping relationship between the image physical coordinates and the equivalent focal lengths corresponding to ground feature points. The equivalent focal length can be a quantity that changes with the image physical coordinates of the ground feature points, and can be used to compensate for distortion, perspective effects, etc. of monocular vision cameras. The equivalent variable focal length model is a cubic polynomial function associated with the image physical coordinates, which can be represented by the following formula (1):

[0036] (1);

[0037] in, The physical coordinates of the image are ( The equivalent focal length corresponding to the ground feature points. These are the fitting coefficients for the equivalent variable focal length model. The values ​​of are all 0, 1, 2, 3. The right side of the equation (1) is a double cubic polynomial, which, after expansion, includes 16 first fitting coefficients. This equivalent variable focal length model can fit extremely complex nonlinear surfaces.

[0038] In some embodiments, the equivalent variable focal length model can be solved using the least squares method to obtain the equivalent variable focal length model parameters (fitting coefficients of the equivalent variable focal length model). Then, by substituting the equivalent variable focal length model parameters and the corresponding image physical coordinate values ​​into the equivalent variable focal length model, the predicted focal length of the monocular vision camera (the equivalent calibration focal length associated with the image physical coordinate values) can be calculated.

[0039] In some embodiments, the predicted focal length and image physical coordinates of ground feature points obtained by solving the equivalent variable focal length model can be used to establish a nonlinear function between the height of the monocular vision camera above the ground, the downtilt angle of the monocular vision camera, and a specific distance (the Euclidean distance from the ground feature point to the reference point, where the reference point is the intersection of the optical center of the monocular vision camera perpendicularly downwards and the plane where the ground is located). This nonlinear function can be represented by the following formula (2):

[0040] (2);

[0041] in, Indicates a specific distance. Indicates the height of the monocular vision camera above the ground. This represents the downtilt angle value of a monocular vision camera. This indicates that the physical coordinates of the image are ( The predicted focal length is calculated from the ground feature points.

[0042] In the above formula (2), the left side of the equal sign is the known ground distance, and the right side of the equal sign is the theoretically calculated distance derived from the physical coordinates of the ground feature points in the image, the equivalent focal length calculated by the equivalent variable focal length model, the height of the monocular vision camera and the angle of the tilt angle to be solved, and the pinhole model and coordinate system rotation.

[0043] In some embodiments, the physical coordinates of the ground feature points and the predicted focal length corresponding to the physical coordinates can be substituted into formula (2), and the nonlinear function can be solved by combining Newton's method and Brent's method to obtain the angle value of the downtilt angle.

[0044] S103. Using the parameters of the equivalent variable focal length model, the downtilt angle value, and the world coordinates of ground feature points, establish and solve the spatial distribution compensation model of positioning error to obtain the error compensation coefficient.

[0045] In some embodiments, the automated calibration and data processing tool for monocular vision cameras can establish and solve a spatial distribution compensation model for positioning errors based on the equivalent variable focal length model parameters, downtilt angle values, world coordinate values ​​of ground feature points, and the solved nonlinear function obtained after solving, so as to compensate for the positioning errors of the automated calibration and data processing tool for monocular vision cameras.

[0046] In some embodiments, the predicted physical coordinates of multiple ground feature points can be calculated based on the solved variable focal length model parameters, the solved nonlinear function, and the angle value of the downtilt angle. The predicted physical coordinates of the images are then converted into corresponding predicted world coordinates. The positioning error is then calculated based on the predicted world coordinates of each ground feature point and its corresponding world coordinates (the real world coordinates of each ground feature point are known, and these real world coordinates can be predefined based on the size of the calibration plate). The positioning error is then created by performing surface fitting (e.g., spline fitting or neural network fitting) on ​​each error and its corresponding predicted physical coordinates.

[0047] For example, the spatial distribution compensation model for positioning error is a functional relationship between positioning error and image physical coordinate values. The spatial distribution compensation model for positioning error can be expressed by the following formulas (3) and (4):

[0048] (3);

[0049] (4);

[0050] in, These represent the positioning errors corresponding to the x and y coordinates, respectively. The predicted physical coordinates of ground feature points in the image. These all represent the error compensation coefficients of the spatial distribution compensation model for positioning errors. The spatial distribution compensation model for positioning errors described above can be solved using the least squares algorithm to obtain the error compensation coefficients.

[0051] S104. Encapsulate the equivalent variable focal length model parameters, tilt angle values, and error compensation coefficients into a structured configuration file and upload it to the cloud server simultaneously.

[0052] In some embodiments, the structured configuration file can be a JSON file. The automated calibration and data processing tool for monocular vision cameras can encapsulate calibration results such as equivalent variable focal length model parameters, error compensation coefficients of the spatial distribution compensation model for positioning errors, and downtilt angle values, as well as calibration timestamps and hardware device serial numbers, into a JOSN file. The JOSN file is a lightweight and easy-to-read configuration format, which facilitates the storage and transmission of all calibration results.

[0053] S105. Receive update instructions from the cloud server for the error compensation coefficients, and perform hot updates on the error compensation coefficients based on the update instructions.

[0054] In some embodiments, after the equivalent variable focal length model parameters, error compensation coefficients, and downtilt angle values ​​are uploaded to the cloud server via the automated calibration and data processing tool for the monocular vision camera, if it is subsequently determined that the positioning accuracy of the automated calibration and data processing tool for the monocular vision camera has decreased, a recalibration request can be sent to the cloud server. The cloud server then updates the error compensation coefficients based on the update instruction sent by the cloud server. The cloud server can be a cloud-based server that, by uploading the equivalent focal length model parameters, error compensation coefficients, and downtilt angle values ​​to the cloud server, enables batch management of roadside or vehicle-mounted monocular vision cameras. Furthermore, the error compensation coefficients can be updated according to the update instruction issued by the cloud server, thereby optimizing the positioning accuracy of the monocular vision camera.

[0055] The automated calibration and data processing method for monocular vision cameras provided in this application is executed by an automated calibration and data processing tool for monocular vision cameras. The method includes: responding to a one-click calibration command via a graphical user interface, triggering and controlling the monocular vision camera to acquire an initial calibration image of a foldable magnetic calibration plate deployed on the ground, and performing quality verification on the initial calibration image to obtain a target calibration image; the graphical user interface is provided by the automated calibration and data processing tool for monocular vision cameras; based on ground feature points extracted from the target calibration image, simultaneously solving for the equivalent variable focal length model parameters and the downtilt angle value of the monocular vision camera, independent of the camera's installation height, through an integrated calculation process; using the equivalent variable focal length model parameters, the downtilt angle value, and the world coordinates of the ground feature points, establishing and solving a spatial distribution compensation model for positioning errors to obtain error compensation coefficients; encapsulating the equivalent variable focal length model parameters, the downtilt angle value, and the error compensation coefficients into a structured configuration file and simultaneously uploading it to a cloud server; receiving update commands from the cloud server for the error compensation coefficients and performing hot updates on the error compensation coefficients based on the update commands. Thus, by responding to a one-click calibration command, a target calibration image containing the complete scene of the foldable magnetic calibration board can be automatically acquired, eliminating the need to manually select checkerboard corner points on the calibration board and avoiding errors caused by manual operation. Based on ground feature points in the target calibration image, an integrated calculation process can be performed, enabling one-time calibration of the equivalent variable focal length and tilt angle independent of the camera's installation height. When the camera height or tilt angle changes, there is no need to repeatedly deploy the calibration board for recalibration, resulting in short calibration time. The calibration process utilizes the equivalent variable focal length model parameters, tilt angle values, and world coordinates of the ground feature points. By establishing and solving a spatial distribution compensation model for positioning errors, positioning error compensation can be achieved, improving positioning accuracy. By encapsulating the equivalent variable focal length model parameters, tilt angle values, and error compensation coefficients into a structured configuration file and synchronously uploading it to a cloud server, unified management of calibration results and positioning data can be achieved, facilitating closed-loop optimization. By receiving update instructions for the error compensation coefficients sent by the cloud server and updating the error compensation coefficients according to these instructions, maintenance of monocular vision cameras in large-scale roadside or vehicle-mounted equipment can be achieved. The automated calibration and data processing method for monocular vision cameras provided in this application enables automated calibration with zero hardware additions, one-click completion, and cloud synchronization, improving the efficiency and intelligence of monocular vision camera calibration.

[0056] In some embodiments of this application, the control of the monocular vision camera in step S101 to acquire the initial calibration image of the foldable magnetic calibration plate deployed on the ground and to perform quality verification on the initial calibration image to obtain the target calibration image can be achieved through the following steps S1011 to S1012.

[0057] S1011, Control the monocular vision camera to acquire the initial calibration image of the complete scene of the foldable magnetic calibration plate.

[0058] The foldable magnetic calibration plate has a built-in 0.2mm thick steel sheet, and the maximum warping after 100 folds is less than 0.5mm.

[0059] In some embodiments, the automated calibration and data processing tools for monocular vision cameras can support USB 3.0 GPIO triggering or software triggering, with a frame rate of up to 30fps, ensuring the synchronization and low latency of image acquisition.

[0060] S1012. Detect and remove images in the initial calibration image that do not meet the image quality conditions to obtain the target calibration image.

[0061] In some embodiments, images that do not meet the image quality requirements may be initial calibration images with occlusion, motion blur, or other issues, or initial calibration images acquired by a foldable magnetic calibration plate due to unevenness or positional deviation, resulting in excessive corner missing rate or excessive reflection.

[0062] In some embodiments, the automated calibration and data processing tool for the monocular vision camera can detect the initial calibration image acquired by the monocular vision camera. If the currently acquired initial calibration image does not meet the image quality conditions, it can be discarded, and the monocular vision camera can be controlled to acquire a new initial calibration image until an initial calibration image that meets the image quality conditions, i.e., the target calibration image, is obtained.

[0063] It is understandable that controlling a monocular vision camera to acquire initial calibration images of the complete scene of the foldable magnetic calibration board can obtain multiple ground feature points to facilitate camera calibration. By detecting and discarding images that do not meet the image quality requirements, the reliability of the calibration images can be improved, thereby enhancing the efficiency and accuracy of subsequent monocular vision camera calibration.

[0064] In some embodiments of this application, the detection and removal of images that do not meet the image quality conditions in the initial calibration image in step S1012 to obtain the target calibration image can be achieved through the following steps S201 to S203.

[0065] S201. Calculate the corner missing rate of the initial calibration image using a corner extraction algorithm; and use the gray-scale variance method to detect the reflective area of ​​the initial calibration image and determine the gray-scale variance value of the reflective area.

[0066] It should be noted that the corner missing rate can be used to measure the scene integrity of the foldable magnetic calibration board captured by the monocular vision camera, and the gray-scale variance can measure the reflectivity of the foldable magnetic calibration board. By determining the corner missing rate and the gray-scale variance of the reflective area of ​​the initial calibration image, the current flatness of the foldable magnetic calibration board and whether the setting position is appropriate can be determined.

[0067] S202. If the corner missing rate is greater than or equal to the corner missing rate threshold, and / or if the grayscale variance value is less than the grayscale variance threshold, delete the initial calibration image and display the corner missing rate and grayscale variance value in real time on the graphical user interface corresponding to the graphical user interface to guide the user to adjust at least one of the flatness and illumination angle of the foldable magnetic calibration plate.

[0068] Here, the corner missing rate threshold can be 2%, 3%, 5%, etc., and the grayscale variance threshold can be 20, 30, 40, etc. The corner missing rate threshold and grayscale variance threshold described here are merely illustrative examples, and this application does not impose any limitations on them.

[0069] In some embodiments, if the corner missing rate of the initial calibration image is determined to be greater than or equal to the corner missing rate threshold, it indicates that the foldable magnetic calibration plate has surface unevenness, bending, or deformation (possibly due to frequent folding, rolling, or external pressure). If the gray-level variance threshold of the reflective area of ​​the initial calibration image is determined to be greater than or less than the gray-level variance threshold, it indicates that the current reflectivity of the foldable magnetic calibration plate is too high.

[0070] In some embodiments, the automated calibration and data processing tool for a monocular vision camera can automatically delete initial calibration images with corner missing rate greater than a corner missing rate threshold and grayscale variance greater than a grayscale variance threshold. The tool can then display the calculated corner missing rate and grayscale variance of the initial calibration image in real time on a graphical user interface to inform the user that the currently acquired initial calibration image is unqualified due to the current setting position of the foldable magnetic calibration plate, surface unevenness, etc., and that the flatness and / or illumination angle of the foldable magnetic calibration plate need to be adjusted.

[0071] S203. The monocular vision camera is controlled to re-acquire the reference calibration image of the foldable magnetic calibration plate at a preset interval. If the missing rate of the reference calibration image is less than the corner missing rate threshold and the gray-scale variance value of the reflective area of ​​the reference calibration image is greater than or equal to the gray-scale variance threshold, the reference calibration image is used as the target calibration image.

[0072] In some embodiments, the preset duration can be 30 seconds, 50 seconds, 2 minutes, etc., and is not limited here. In practice, it can be determined according to the time required for the user to adjust the flatness of the foldable magnetic calibration plate and the illumination angle. After the monocular vision camera acquires a new reference calibration image, it is still necessary to calculate the corner missing rate and the gray-level variance of the reflective area of ​​the reference calibration image until the missing rate of the acquired reference calibration image is less than the corner missing rate threshold, and the gray-level variance value of the reflective area of ​​the reference calibration image is greater than or equal to the gray-level variance threshold. Only then is the reference calibration image determined as the target calibration image.

[0073] In some embodiments of this application, the establishment and solution of the spatial distribution compensation model of the positioning error in step S103 can be achieved by the following steps S1031 to S1033.

[0074] S1031. Calculate the predicted world coordinates of ground feature points based on the parameters of the equivalent variable focal length model and the downtilt angle.

[0075] In some embodiments, the automated calibration and data processing tool for monocular vision cameras can substitute the angle value of the downtilt angle and the height of the monocular vision camera from the ground into the solved nonlinear function (formula (2)), and jointly solve the solution based on the solved nonlinear function and the solved constant down-variable focal length model to calculate the predicted image physical coordinate value of the ground feature point, and convert the predicted image physical coordinate value into the corresponding predicted world coordinate value.

[0076] S1032. Calculate the positioning error between the predicted world coordinates and the actual world coordinates.

[0077] In some embodiments, the automated calibration and data processing tool for monocular vision cameras can use the absolute value of the difference between the predicted world coordinates and the real world coordinates as the positioning error. It can calculate the absolute value of the difference between the predicted world coordinates and the real world coordinates corresponding to the x-axis and y-axis respectively, thereby obtaining the positioning errors corresponding to the x-axis and y-axis respectively.

[0078] S1033. Using the predicted image coordinates of ground feature points as independent variables and the positioning error as the dependent variable, perform surface fitting to generate a spatial distribution compensation model for compensating for the positioning error of a monocular vision camera in the entire field of view.

[0079] In some embodiments, the automated calibration and data processing tool for monocular vision cameras can analyze the relationship between the predicted image coordinates and positioning errors of ground feature points through spline fitting, neural network fitting, and other methods, thereby generating a spatial distribution compensation model that includes positioning errors and predicted image physical coordinates.

[0080] Understandably, the predicted world coordinates of ground feature points are calculated based on the parameters of the equivalent variable focal length model and the downtilt angle. The positioning error between the predicted world coordinates and the real world coordinates is then calculated. Surface fitting is performed on the relationship between the predicted image coordinates and the positioning error to generate a spatial distribution compensation model for compensating for the positioning error of a monocular vision camera across the entire field of view. This allows for subsequent compensation of the positioning error of the measured vehicle in vehicle speed measurement applications, thereby improving the accuracy of vehicle speed measurement.

[0081] In some embodiments of this application, after step S101, the automated calibration and data processing method for a monocular vision camera provided in this application may further include the following step S301:

[0082] S301. In the graphical user interface corresponding to the graphical user interface, information indicating the calibration progress of the monocular vision camera is displayed, and a calibration error prompt message is output when the calibration quality of the monocular vision camera does not meet the preset threshold.

[0083] In some embodiments, information indicating the calibration progress of the monocular vision camera can be displayed in real time using a progress bar or similar method. This information can include the specific progress of each stage, such as calibration image data acquisition, monocular vision camera calibration, and solving the positioning error model. For example, it can include the fitted surface plot of the equivalent variable focal length, the box plot of the downtilt angle distribution, the error compensation heatmap, the parameters of the equivalent variable focal length model, the error compensation coefficients of the spatial distribution compensation model for positioning errors, and the downtilt angle value. By displaying this information indicating the calibration progress of the monocular vision camera, clear feedback can be provided to the user, improving the user experience.

[0084] In some embodiments, the calibration quality of a monocular vision camera can be fed back through the goodness of fit of the equivalent variable focal length model and the calibration error of the downtilt angle value. The corresponding preset thresholds can be the goodness of fit threshold of the equivalent variable focal length model (e.g., 0.995) and the calibration error threshold of the downtilt angle (e.g., 0.2). For example, when the goodness of fit R of the equivalent variable focal length model is... 2 If the calibration angle error is <0.995 or the tilt angle error is >0.2°, the calibration quality of the monocular vision camera is considered to fail to meet the preset threshold. In this case, a "Recalibration required" message will be displayed in the graphical user interface. This abnormal calibration message prevents unqualified calibration results from being used, thereby improving the reliability of automated calibration and data processing tools for monocular vision cameras.

[0085] In some embodiments of this application, the information on the calibration progress of the monocular vision camera includes the quality score value of the target calibration image. Based on this, after step S101, the automated calibration and data processing method for the monocular vision camera provided in this application may further include the following steps S401 to S403.

[0086] S401. Calculate the quality score of the target calibration image.

[0087] In some embodiments, the quality score of the target calibration image can be calculated using the following formula (5):

[0088] (5);

[0089] in, and These represent Tenengrad sharpness, Michelson contrast, and corner dot distribution uniformity, respectively. These represent the weights of Tenengrad sharpness, Michelson contrast, and corner distribution uniformity, respectively. , It can be predetermined based on the scene template tags.

[0090] In some embodiments, the automated calibration and data processing tool for a monocular vision camera can first calculate the Tenengrad sharpness, Michelson contrast and corner distribution uniformity of the target calibration image, and then substitute the Tenengrad sharpness, Michelson contrast and corner distribution uniformity into formula (5) to calculate the quality score of the target calibration image.

[0091] S402. If the quality score is less than the quality score threshold issued by the cloud server, output the values ​​of the sub-indicators that caused the quality score to decrease in the graphical user interface.

[0092] Here, the sub-indicators may include Tenengrad sharpness, Michelson contrast, and the uniformity of corner distribution.

[0093] In some embodiments, the automated calibration and data processing tool for monocular vision cameras can display the Tenengrad sharpness, Michelson contrast, and corner distribution uniformity of target calibration images with quality scores below the quality score threshold in real time on the graphical user interface. This indicates to the user that the current target calibration image is of substandard quality and may affect the accuracy of subsequent calibrations. The user can choose not to use the current calibration result or reset the calibration board based on the displayed sub-indicator values. Subsequently, the automated calibration and data processing tool for monocular vision cameras can re-acquire calibration images at intervals until the quality score of the obtained target calibration image reaches the quality score threshold before performing subsequent calibration calculations, thereby ensuring the accuracy of camera calibration.

[0094] S403. If the quality score values ​​of N consecutive target calibration images are all less than the quality score threshold, lock the graphical user interface.

[0095] In some embodiments, N is an integer greater than 2. If the quality score values ​​of consecutive N consecutive target calibration images are all less than the quality score threshold, it indicates that the quality of the currently acquired target calibration image is low. Continuing to use the target calibration image for camera calibration will lead to a large error in the calibration result of the monocular vision camera. In this case, by locking the graphical user interface, invalid calibration data caused by calibration plate warping, sudden changes in illumination, etc., can be prevented from being written to the structured configuration file, thereby avoiding the deterioration of positioning accuracy.

[0096] In some embodiments of this application, after step S105, the automated calibration and data processing method for monocular vision cameras provided in this application may further include the following steps S501 to S502.

[0097] S501. Collect vehicle videos showing the actual speeds of multiple known target vehicles.

[0098] In some embodiments, after the monocular vision camera is calibrated, the automated calibration and data processing tool for the monocular vision camera can control the monocular vision camera to acquire vehicle videos corresponding to multiple target vehicles.

[0099] S502. Calculate the average absolute percentage error between the actual speed and the predicted speed of each target vehicle in the vehicle video, and generate a prompt message for updating the error compensation coefficient if the average absolute percentage error is greater than or equal to the percentage threshold.

[0100] The percentage threshold can be 5%. When the calculated average absolute percentage error is greater than or equal to 5%, the accuracy of the target vehicle speed measurement is considered to be low. At this time, a prompt message "Error compensation coefficient needs to be updated" can be output, reminding the user that the current speed calculation accuracy is not high and it is not recommended to use it. The user can wait for the cloud server to send a new error compensation coefficient before measuring the speed.

[0101] Understandably, by calculating the average absolute percentage error between the actual speed and the corresponding predicted speed of each target vehicle in the vehicle video, and generating a prompt message to update the error compensation coefficient when the average absolute percentage error is greater than or equal to a percentage threshold, the error compensation coefficient in the positioning error compensation model created during the calibration process can be updated, thereby improving the accuracy of speed measurement.

[0102] In some embodiments of this application, in step S502, if the mean absolute percentage error is greater than or equal to the percentage threshold, a recalibration request can be sent to the cloud server so that the cloud server can retrain the spatial distribution compensation model based on the recalibration request to generate new error compensation coefficients and generate update instructions based on the new error compensation coefficients.

[0103] In some embodiments, if the average absolute percentage error between the actual speed and the predicted speed of the target vehicle is greater than or equal to a percentage threshold, it may be due to vibration of the vehicle or roadside equipment, causing a slight shift in the tilt angle of the monocular vision camera, which affects the positioning accuracy of the target vehicle and reduces the accuracy of vehicle speed measurement. In this case, sending a recalibration request to the cloud server can enable the cloud server to retrain the spatial distribution compensation model, generate new error compensation coefficients, and generate update instructions for the error compensation coefficients based on the new error compensation coefficients.

[0104] Understandably, when the average absolute percentage error between the actual speed and the predicted speed of the target vehicle is greater than or equal to the percentage threshold, sending a recalibration request to the cloud server can solve the problem of inaccurate vehicle measurement caused by changes in the pose of the monocular vision camera. This allows for closed-loop optimization of the error compensation coefficient, maintaining the accuracy of speed measurement over the long term.

[0105] This application provides an automated calibration and data processing tool for monocular vision cameras, such as... Figure 2 As shown, the automated calibration and data processing tool 600 for monocular vision cameras includes a calibration image acquisition module 601, a variable focal length and tilt angle integrated calculation module 602, an error compensation module 603, a data encapsulation and interface module 604, and an error compensation hot update module 605, wherein:

[0106] The calibration image acquisition module 601 is used to respond to the one-click calibration command of the graphical user interface, trigger and control the monocular vision camera to acquire the initial calibration image of the foldable magnetic calibration plate deployed on the ground, and perform quality verification on the initial calibration image to obtain the target calibration image; the graphical user interface is provided by the monocular vision camera's automated calibration and data processing tools.

[0107] The variable focal length and downtilt angle integrated calculation module 602 is used to simultaneously solve the equivalent variable focal length model parameters and the downtilt angle value of the monocular vision camera based on the ground feature points extracted from the target calibration image through an integrated calculation process.

[0108] Error compensation module 603 is used to establish and solve the spatial distribution compensation model of positioning error by using the equivalent variable focal length model parameters, the downtilt angle value and the world coordinate value of ground feature points, and to obtain the error compensation coefficient.

[0109] The data encapsulation and interface module 604 is used to encapsulate the equivalent variable focal length model parameters, tilt angle values ​​and error compensation coefficients into a structured configuration file and upload them to the cloud server simultaneously.

[0110] The error compensation hot update module 605 is used to receive update instructions for the error compensation coefficients from the cloud server and perform hot updates on the error compensation coefficients based on the update instructions.

[0111] In some embodiments, the automated calibration and data processing tool 600 for monocular vision cameras can provide a cross-programming language application programming interface (API). The cross-programming language API includes at least C / C++ header files and Python packages, so that developers with different technology stacks can integrate the API into their respective vehicle speed measurement systems, thereby improving the versatility of the automated calibration and data processing tool for monocular vision cameras.

[0112] For example, a schematic diagram of the GUI interface provided by the automated calibration and data processing tool 600 for monocular vision cameras is shown below. Figure 3 As shown, the automated calibration and data processing tool 600 for monocular vision cameras can automatically summarize the pixel coordinates and real-world coordinates of feature points on the foldable magnetic calibration plate extracted by the calibration image acquisition module 601 into an Excel file. Then, the data file can be selected using the GUI interactive interface, and the camera can be calibrated according to the built-in functional modules (variable focal length and tilt angle integrated calculation module 602 and error compensation module 603).

[0113] In some embodiments of this application, the error compensation hot update module 605 supports transport layer security encryption and over-the-air (OTA) hot update. The OTA hot update includes an update of the error compensation coefficient, which does not require a device restart.

[0114] In some embodiments, transport layer security encryption can be TLS 1.2 encryption, which can ensure the security of data transmission between the device (roadside device or vehicle-mounted device) and the cloud server.

[0115] In some embodiments, when multiple vehicle speed measurement accuracies are found to be substandard, such as when the average absolute percentage error (MAPE) calculated based on the actual vehicle speed and the predicted vehicle speed of the target vehicle is greater than a preset threshold (e.g., 5%), the cloud server can issue new error compensation coefficients to multiple roadside devices or vehicle-mounted devices. During this process, the roadside devices or vehicle-mounted devices can take effect without restarting, thus solving the problem of high maintenance costs after large-scale deployment.

[0116] In some embodiments of this application, the automated calibration and data processing tool 600 for a monocular vision camera may further include a speed measurement accuracy verification module. The speed measurement accuracy verification module is used to automatically acquire vehicle videos of known real speeds of multiple target vehicles; calculate the average absolute percentage error between the real speed and the predicted speed of each target vehicle in the vehicle video; and generate a prompt message for updating the error compensation coefficient if the average absolute percentage error is greater than or equal to a percentage threshold.

[0117] The automated calibration and data processing tool for monocular vision cameras provided in this application integrates a calibration image acquisition module, a variable focal length and tilt angle integrated calculation module, an error compensation module, a data encapsulation and interface module, an error compensation hot update module, and a speed measurement accuracy verification module. This enables an integrated process for monocular vision camera calibration, positioning error compensation, and speed measurement accuracy verification, solving the problem in existing technologies where monocular camera calibration, positioning error compensation, and speed measurement accuracy verification require switching between multiple software platforms and cannot achieve end-to-end automation.

[0118] The following is an example illustrating the cloud synchronization process of an automated calibration and data processing tool based on a monocular vision camera:

[0119] Step 1: Hardware devices (such as roadside devices or vehicle-mounted devices) that integrate automated calibration and data processing tools for monocular vision cameras complete all calibration data acquisition, integrated calibration of variable focal length and tilt angle, and error compensation model solving processes through "one-click calibration". The automated calibration and data processing tools based on monocular vision cameras automatically encapsulate the calibration results (fitting coefficients of the variable focal length model, angle values ​​of the tilt angle, error compensation coefficients of the positioning error compensation model, calibration timestamp, and serial number of the hardware device) into a JOSN file.

[0120] The second step involves using an automated calibration and data processing tool based on a monocular vision camera as an embedded MQTT client. This tool publishes a pre-packaged JSON configuration file to a specific topic on the MQTT Broker. The topic format is ` / device / {device_sn} / calibration_result`, where `device` is the device name, `{device_sn}` is the unique serial number of the hardware device, and `calibration_result` is the calibration result. This JSON configuration file not only contains core calibration results such as equivalent variable focal length model parameters, downtilt angle values, and error compensation coefficients, but also includes contextual information such as calibration timestamps, device hardware fingerprints, and the average ambient light intensity during image acquisition. This information is used for comprehensive analysis and traceability in the cloud.

[0121] Step 3: The MQTT Broker acts as a message intermediary, responsible for forwarding the received JSON data to all clients that have subscribed to the topic (i.e., the cloud server in this application).

[0122] Step 4: After receiving the message, the cloud server parses the JSON file and stores the key calibration parameters in the database. At this point, the calibration data upload is complete. The server can then perform centralized monitoring, data analysis, and report generation, providing a basis for decision-making regarding the next OTA update.

[0123] Step 5: When the cloud server determines that a specific device needs parameter updates based on feedback from the speed accuracy verification module or the global model optimization strategy, it publishes a command containing a differential update package or all new parameters to the corresponding subscription topic for that specific device (e.g., / device / {device_sn} / firmware_update). After parsing the command, the specific device silently completes the parameter replacement and loading in the background without restarting the application or device, achieving true OTA hot update.

[0124] Step 6: After parsing the update command or update package, the specific hardware device applies the replaced and loaded new parameters to subsequent speed test calculations. The entire process does not require restarting the device or application, achieving true OTA hot update.

[0125] In the cloud synchronization process of the automated calibration and data processing tool for monocular vision cameras described above, the architecture of "hardware device -> MQTT Broker -> cloud server" enables centralized, asynchronous, and efficient collection of massive amounts of hardware device calibration data. Through the reverse OTA channel of "cloud server -> MQTT Broker -> device", the hardware device where the automated calibration and data processing tool for monocular vision cameras is located can be continuously optimized, remotely diagnosed, and quickly repaired, greatly reducing long-term operation and maintenance costs.

[0126] Compared with existing technologies, the contribution of the automated calibration and data processing tool for automated monocular vision cameras provided in this application lies in:

[0127] System integration and automation: Improved calibration algorithms (such as variable focal length calculation and error compensation) are encapsulated and integrated into an end-to-end automated tool with a graphical user interface, realizing "one-click calibration" and completely eliminating the need for manual intervention and cross-platform operation.

[0128] Dedicated hardware collaboration: An innovative foldable magnetic calibration board, a dedicated physical component, was designed to work in conjunction with software tools, solving the problems of convenient on-site deployment and reusability, which has not been addressed in pure algorithm research.

[0129] Intelligent closed-loop management: A speed measurement accuracy verification module and a cloud-synchronized update module have been introduced, forming a data-driven closed loop of "calibration-application-verification-optimization". The tool can not only complete calibration, but also automatically verify the accuracy of its output results in actual applications (such as speed measurement), and trigger or receive remote optimization instructions when the accuracy is not met, realizing continuous lifecycle management of calibration parameters.

[0130] Engineering and Deployability: The invention defines a complete calibration result data encapsulation format (such as JSON), a communication process based on protocols such as MQTT, and an OTA hot update mechanism, transforming the invention from a "laboratory algorithm" into an "engineered product" that can be directly deployed in roadside or vehicle environments.

[0131] Furthermore, the high-efficiency and intelligent monocular vision camera calibration tool provided in this application can improve the real-time performance and accuracy of vehicle speed measurement in subsequent traffic monitoring and roadside perception processes.

[0132] The description of the above embodiments of the automated calibration and data processing tool for monocular vision cameras is similar to the description of the above embodiments of the automated calibration and data processing method for monocular vision cameras, and has the same beneficial effects as the method embodiments. For technical details not disclosed in the embodiments of the automated calibration and data processing tool for monocular vision cameras in this application, please refer to the description of the embodiments of the automated calibration and data processing method for monocular vision cameras in this application for understanding.

[0133] It should be noted that, depending on the implementation needs, the various components / steps described in the embodiments of this application can be broken down into more components / steps, or two or more components / steps or parts of the operation of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of this application.

[0134] Those skilled in the art will recognize that the modules or units of the various examples described in connection with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of this application.

[0135] The above embodiments are only used to illustrate the embodiments of this application, and are not intended to limit the embodiments of this application. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the embodiments of this application. Therefore, all equivalent technical solutions also fall within the scope of the embodiments of this application, and the patent protection scope of the embodiments of this application should be defined by the claims.

Claims

1. An automated calibration and data processing method for a monocular vision camera, characterized in that, Performed by automated calibration and data processing tools for monocular vision cameras, including: In response to a one-click calibration command from the graphical user interface, the system triggers and controls the monocular vision camera to acquire an initial calibration image of a foldable magnetic calibration plate deployed on the ground, and performs quality verification on the initial calibration image to obtain a target calibration image; the graphical user interface is provided by the automated calibration and data processing tool of the monocular vision camera. Based on the ground feature points extracted from the target calibration image, the equivalent variable focal length model parameters and the downtilt angle value of the monocular vision camera, which are independent of the camera installation height, are solved simultaneously through an integrated calculation process. Using the equivalent variable focal length model parameters, the downtilt angle value, and the world coordinate value of the ground feature point, a spatial distribution compensation model for positioning error is established and solved to obtain the error compensation coefficient. The equivalent variable focal length model parameters, the tilt angle value, and the error compensation coefficient are encapsulated into a structured configuration file and uploaded to the cloud server simultaneously. Receive an update instruction from the cloud server for the error compensation coefficient, and perform a hot update on the error compensation coefficient based on the update instruction; The process of solving the equivalent variable focal length model parameters includes: establishing an equivalent variable focal length model based on the nonlinear mapping relationship between the image physical coordinates of the ground feature points and the equivalent focal lengths corresponding to the ground feature points; solving the equivalent variable focal length model using the least squares method to obtain the equivalent variable focal length model parameters; the equivalent variable focal length model is a cubic polynomial function associated with the image physical coordinates, expressed as: ; in, The physical coordinates of the image are represented as The equivalent focal length corresponding to the ground feature points. These are the fitting coefficients for the equivalent variable focal length model. The values ​​are all 0, 1, 2, and 3; The establishment and solution of the spatial distribution compensation model for positioning error includes: calculating the predicted world coordinates of the ground feature points based on the parameters of the equivalent variable focal length model and the downtilt angle; calculating the positioning error between the predicted world coordinates and the real world coordinates; and performing surface fitting with the predicted image coordinates of the ground feature points as the independent variable and the positioning error as the dependent variable to generate a spatial distribution compensation model for compensating for the positioning error of the monocular vision camera in the full field of view.

2. The method according to claim 1, characterized in that, The control of the monocular vision camera to acquire initial calibration images of a foldable magnetic calibration plate deployed on the ground, and to perform quality verification on the initial calibration images to obtain target calibration images, includes: The monocular vision camera is controlled to acquire the initial calibration image of the complete scene of the foldable magnetic calibration plate; the foldable magnetic calibration plate has a built-in 0.2mm thick steel sheet, and the maximum warping after 100 folds is less than 0.5mm; Images that do not meet the image quality requirements in the initial calibration image are detected and removed to obtain the target calibration image.

3. The method according to claim 2, characterized in that, The process of detecting and removing images that do not meet the image quality conditions from the initial calibration image to obtain the target calibration image includes: The corner missing rate of the initial calibration image is calculated using a corner extraction algorithm, and the reflective area of ​​the initial calibration image is detected using the gray-scale variance method to determine the gray-scale variance value of the reflective area. If the corner missing rate is greater than or equal to the corner missing rate threshold, and / or if the grayscale variance value is less than the grayscale variance threshold, the initial calibration image is deleted, and the corner missing rate and the grayscale variance value are displayed in real time on the graphical user interface corresponding to the graphical user interface, so as to guide the user to adjust at least one of the flatness and illumination angle of the foldable magnetic calibration plate. The monocular vision camera is controlled to re-acquire the reference calibration image of the foldable magnetic calibration plate at preset intervals. If the corner missing rate of the reference calibration image is less than the corner missing rate threshold and the gray-level variance value of the reflective area of ​​the reference calibration image is greater than or equal to the gray-level variance threshold, the reference calibration image is used as the target calibration image.

4. The method according to claim 1, characterized in that, Also includes: The graphical user interface corresponding to the graphical user interface displays information indicating the calibration progress of the monocular vision camera, and outputs calibration error prompt information when the calibration quality of the monocular vision camera does not meet a preset threshold.

5. The method according to claim 4, characterized in that, The information regarding the monocular vision camera calibration progress includes a quality score value for the target calibration image, and the method further includes: Calculate the quality score of the target calibration image; If the quality score is less than the quality score threshold issued by the cloud server, the values ​​of the sub-indicators that caused the quality score to decrease will be output in the graphical user interface. If the quality score of N consecutive target calibration images is less than the quality score threshold, the graphical user interface is locked; where N is an integer greater than 2.

6. The method according to any one of claims 1 to 5, characterized in that, Also includes: Collect vehicle videos at the known actual speeds of multiple target vehicles; Calculate the average absolute percentage error between the actual speed and the predicted speed of each target vehicle in the vehicle video, and generate a prompt message for updating the error compensation coefficient if the average absolute percentage error is greater than or equal to a percentage threshold.

7. The method according to claim 6, characterized in that, If the mean absolute percentage error is greater than or equal to the percentage threshold, the following steps may also be performed: A recalibration request is sent to the cloud server, so that the cloud server retrains the spatial distribution compensation model based on the recalibration request to generate new error compensation coefficients, and generates the update instruction based on the new error compensation coefficients.

8. An automated calibration and data processing tool for a monocular vision camera, characterized in that, It includes a calibration image acquisition module, a variable focal length and downtilt angle integrated calculation module, an error compensation module, a data encapsulation and interface module, and an error compensation hot update module, among which: The calibration image acquisition module is used to respond to the one-click calibration command of the graphical user interface, trigger and control the monocular vision camera to acquire the initial calibration image of the foldable magnetic calibration plate deployed on the ground, and perform quality verification on the initial calibration image to obtain the target calibration image; the graphical user interface is provided by the automated calibration and data processing tool of the monocular vision camera; The integrated variable focal length and downtilt angle calculation module is used to simultaneously solve the equivalent variable focal length model parameters and the downtilt angle value of the monocular vision camera based on the ground feature points extracted from the target calibration image through an integrated calculation process. The error compensation module is used to establish and solve the spatial distribution compensation model of the positioning error using the equivalent variable focal length model parameters, the tilt angle value, and the world coordinate value of the ground feature point, and to obtain the error compensation coefficient. The data encapsulation and interface module is used to encapsulate the equivalent variable focal length model parameters, the tilt angle value and the error compensation coefficient into a structured configuration file and upload it to the cloud server synchronously. An error compensation hot update module is used to receive update instructions for error compensation coefficients from a cloud server and perform hot updates on the error compensation coefficients based on the update instructions; The process of solving the equivalent variable focal length model parameters includes: establishing an equivalent variable focal length model based on the nonlinear mapping relationship between the image physical coordinates of the ground feature points and the equivalent focal lengths corresponding to the ground feature points; solving the equivalent variable focal length model using the least squares method to obtain the equivalent variable focal length model parameters; the equivalent variable focal length model is a cubic polynomial function associated with the image physical coordinates, expressed as: ; in, The physical coordinates of the image are represented as The equivalent focal length corresponding to the ground feature points. These are the fitting coefficients for the equivalent variable focal length model. The values ​​are all 0, 1, 2, and 3; The establishment and solution of the spatial distribution compensation model for positioning errors includes: Based on the equivalent variable focal length model parameters and the downtilt angle value, the predicted world coordinates of the ground feature points are calculated; the positioning error between the predicted world coordinates and the real world coordinates is calculated; using the predicted image coordinates of the ground feature points as the independent variable and the positioning error as the dependent variable, surface fitting is performed to generate a spatial distribution compensation model for compensating the positioning error of the monocular vision camera in the entire field of view.