Camera calibration method and electronic equipment
By establishing the correspondence between pixels and latitude and longitude and displaying the true value vehicle trajectory and calibrating the camera vehicle trajectory, the problems of low and unintuitive camera calibration efficiency in the prior art are solved, and efficient and intuitive camera calibration and accuracy testing are achieved. Reduced labor costs.
Patent Information
- Application Number
- CN202411518942.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-10-29
AI Technical Summary
The prior art is inefficient, unintuitive in camera calibration and accuracy testing, and cannot visually compare calibration results, resulting in high labor costs.
Provide a camera calibration method, by establishing the correspondence between pixels and latitude and longitude, obtaining the data files of the true value vehicle and calibration camera, displaying the true value vehicle trajectory and calibration camera vehicle trajectory, and modifying and generating updated calibrations based on user identification parameters. Camera vehicle track.
It realizes visualization and intuitiveness of camera calibration, improves calibration efficiency, reduces human resource costs, and can conduct multi-calibration tests in multiple scenarios more efficiently.
Smart Images

Figure CN119478058A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicle-related technologies, and in particular to a camera calibration method, electronic equipment, storage medium and computer program product. Background Art
[0002] With the development of the autonomous driving industry, the calibration of camera internal and external parameters in the application of camera based on the roadside perception algorithm of autonomous driving is an important basis for later detection and tracking. Camera calibration is the basic work of many tasks. The accuracy and speed of calibration determine the upper limit of downstream solution fusion. And as the speed of algorithm iteration is getting faster and faster, how to achieve efficient, fast and accurate camera calibration and fast calibration testing is a problem that technicians are currently concerned about.
[0003] Camera calibration is mainly to obtain the internal parameters (such as focal length, distortion, etc.) and external parameters (such as the relative position and orientation between cameras) of the camera. The current existing technology for camera calibration and accuracy testing is to first manually run a real car to obtain the actual real-time dynamic positioning (Real-Time Kinematics, RTK) vehicle trajectory data, and then compare the vehicle trajectory data obtained after camera calibration. RTK is a technology for high-precision positioning, commonly used in the fields of measurement and navigation. RTK technology uses signals from multiple receivers (such as GPS receivers) to provide centimeter-level positioning accuracy through real-time processing and differential technology.
[0004] In order to analyze multiple deployment scenarios such as intersections and road sections, the existing technology can only calibrate the camera through third-party tools or code engineering to adjust the calibration parameters to view the calibration status, and it is impossible to visualize or compare the calibration results in a more intuitive form and adjust the calibration parameters. In addition, other people other than the developers themselves cannot participate in the entire process of calibration and calibration testing. Therefore, the current technology requires a lot of time and manpower costs to calibrate and test the camera. Summary of the invention
[0005] Based on this, it is necessary to provide a camera calibration method, electronic device, storage medium and computer program product to address the technical problems that camera calibration in the prior art is not intuitive and inefficient.
[0006] The present invention provides a camera calibration method, comprising:
[0007] Calibrate the camera to obtain camera calibration parameters, and establish a correspondence between pixels and longitude and latitude based on the camera calibration parameters;
[0008] Acquire a true value vehicle data file and a calibrated camera data file, wherein the true value vehicle data file includes multiple frames of true value vehicle data frames, each frame of the true value vehicle data frame includes at least the longitude and latitude of the true value vehicle when it is running, and the calibrated camera data file includes multiple frames of camera data frames, each frame of the camera data frame includes at least the longitude and latitude corresponding to the central pixel of the recognition target obtained by the camera recognizing the true value vehicle;
[0009] Displaying a true value vehicle trajectory generated according to the true value vehicle data file and a calibrated camera vehicle trajectory generated according to the calibrated camera data file;
[0010] Obtaining the modification of the recognition parameters by the user, updating the recognition parameters, wherein the recognition parameters are used to determine the center pixel of the target recognized by the camera, updating the center pixel of the recognized target based on the updated recognition parameters, and generating and displaying the updated calibration camera vehicle trajectory according to the longitude and latitude corresponding to the center pixel of the updated recognized target;
[0011] After the user finishes modifying the recognition parameters, the updated recognition parameters and camera calibration parameters are output.
[0012] Further, the displaying of the true value vehicle trajectory generated according to the true value vehicle data file and the calibrated camera vehicle trajectory generated according to the calibrated camera data file includes:
[0013] The first layer of the display area displays the true value vehicle trajectory generated according to the true value vehicle data file, and the second layer of the display area displays the calibrated camera vehicle trajectory generated according to the calibrated camera data file.
[0014] Furthermore, the recognition parameters include a longitudinal adjustment parameter and a lateral adjustment parameter, and the updating of the central pixel of the recognition target based on the updated recognition parameters includes:
[0015] Obtain the horizontal coordinates of the bottom midpoint pixel of the target box of the identified target, the vertical coordinates of the bottom midpoint pixel, the horizontal width of the target box, and the vertical height of the target box;
[0016] Calculate the horizontal ratio of the center pixel according to the updated horizontal adjustment parameter and the horizontal coordinate of the center pixel of the bottom edge, and calculate the vertical ratio of the center pixel according to the updated vertical adjustment parameter and the vertical coordinate of the midpoint pixel of the bottom edge;
[0017] The horizontal coordinate of the central pixel of the recognized target is calculated according to the horizontal ratio of the central pixel, the horizontal coordinate of the bottom midpoint pixel and the horizontal width of the target frame;
[0018] The vertical coordinate of the central pixel of the identified target is calculated based on the vertical ratio of the central pixel, the vertical coordinate of the bottom midpoint pixel, and the vertical height of the target frame.
[0019] Furthermore, it also includes:
[0020] Generate a position positioning accuracy trend graph according to the true value vehicle data file and the calibration camera data file; and / or
[0021] A heading angle positioning accuracy trend graph is generated according to the true value vehicle data file and the calibrated camera data file.
[0022] Furthermore, generating a position positioning accuracy trend graph according to the true value vehicle data file and the calibrated camera data file includes:
[0023] Using the timestamp of each real vehicle data frame in the real value vehicle data file as a reference timestamp;
[0024] For each reference timestamp, the timestamp closest to the reference timestamp in the calibration camera data file is used as the camera timestamp, the longitude and latitude corresponding to the camera timestamp in the calibration camera data file is used as the camera longitude and latitude, the longitude and latitude corresponding to the reference timestamp in the ground truth vehicle data file is used as the real vehicle longitude and latitude, and the position distance difference between the camera longitude and longitude and the real vehicle longitude and latitude is calculated;
[0025] Based on the position distance difference corresponding to each of the reference timestamps, a position positioning accuracy trend graph is generated.
[0026] Furthermore, generating a heading angle positioning accuracy trend graph according to the true value vehicle data file and the calibration camera data file includes:
[0027] Using the timestamp of each real vehicle data frame in the real value vehicle data file as a reference timestamp;
[0028] For each reference timestamp, the timestamp closest to the reference timestamp in the calibration camera data file is used as the camera timestamp, the heading angle corresponding to the camera timestamp in the calibration camera data file is used as the camera heading angle, the heading angle corresponding to the reference timestamp in the ground truth vehicle data file is used as the real vehicle heading angle, and the heading angle difference between the camera heading angle and the real vehicle heading angle is calculated;
[0029] Based on the heading angle difference corresponding to each of the reference timestamps, a heading angle positioning accuracy trend graph is generated.
[0030] Furthermore, the step of calibrating the camera to obtain camera calibration parameters and establishing a correspondence between pixels and longitude and latitude based on the camera calibration parameters includes:
[0031] Generating initial camera calibration parameters based on chessboard calibration, wherein the camera calibration parameters are used to represent the correspondence between pixels and longitude and latitude;
[0032] Displaying a road surface picture taken by a camera including one or more road surface markings;
[0033] Displaying pixels of the road surface marking determined based on initial camera calibration parameters in the road surface feature image;
[0034] The modification of the camera calibration parameters by the user is obtained, the camera calibration parameters are updated, and the pixels of the road surface mark determined based on the updated camera calibration parameters are displayed in the road surface picture.
[0035] The present invention provides an electronic device, comprising:
[0036] at least one processor; and,
[0037] a memory communicatively connected to at least one of the processors; wherein,
[0038] The memory stores instructions that can be executed by at least one of the processors. The instructions are executed by at least one of the processors to enable the at least one of the processors to perform the camera calibration method as described above.
[0039] The present invention provides a storage medium, wherein the storage medium stores computer instructions, and when a computer executes the computer instructions, it is used to execute all steps of the camera calibration method as described above.
[0040] The present invention provides a computer program product, comprising a computer program / instruction, which implements the camera calibration method as described above when executed by a processor.
[0041] The present invention displays the true value vehicle trajectory generated according to the true value vehicle data file, and the calibrated camera vehicle trajectory generated based on the calibrated camera data file, and generates and displays the updated calibrated camera vehicle trajectory by obtaining the user's modification of the recognition parameters, so that the recognition parameters can be adjusted visually. The present invention allows users to intuitively understand the changes in vehicle trajectories caused by changes in recognition parameters in a visual manner, and through a visual form, camera calibration can be performed more efficiently and intuitively. The present invention greatly improves efficiency and reduces human resource costs in the case of multiple calibration tests in multiple scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 This is a workflow diagram of a camera calibration method according to an embodiment of the present invention;
[0043] Figure 2 This is a workflow diagram of a camera calibration method according to another embodiment of the present invention;
[0044] Figure 3 A display diagram of a chessboard in a camera field of view according to an example of the present invention;
[0045] Figure 4 A schematic diagram of characteristic points of an example of the present invention;
[0046] Figure 5 A schematic diagram of the projection effect of an example of the present invention;
[0047] Figure 6 A schematic diagram of a calibration device tool interface according to an example of the present invention;
[0048] Figure 7 A flowchart of a camera calibration method according to a preferred embodiment of the present invention;
[0049] Figure 8 The figure is a schematic diagram of the hardware structure of an electronic device of the present invention.
[0050] Fig. 9 This is a schematic diagram of a tool interface for calculating and adjusting internal parameters, external parameters, and distortion parameters according to an example of the present invention. DETAILED DESCRIPTION
[0051] The specific embodiments of the present invention are further described below in conjunction with the accompanying drawings. The same components are represented by the same reference numerals. It should be noted that the words "front", "rear", "left", "right", "upper" and "lower" used in the following description refer to directions in the accompanying drawings, and the words "inner" and "outer" refer to directions toward or away from the geometric center of a specific component, respectively.
[0052] like Figure 1 The flowchart of a camera calibration method according to an embodiment of the present invention includes:
[0053] Step S101, calibrating the camera to obtain camera calibration parameters, and establishing a correspondence between pixels and longitude and latitude based on the camera calibration parameters;
[0054] Step S102, obtaining a true value vehicle data file and a calibrated camera data file, wherein the true value vehicle data file includes multiple frames of true value vehicle data frames, each frame of the true value vehicle data frame at least includes the longitude and latitude of the true value vehicle when it is running, and the calibrated camera data file includes multiple frames of camera data frames, each frame of the camera data frame at least includes the longitude and latitude corresponding to the central pixel of the recognition target obtained by the camera recognizing the true value vehicle;
[0055] Step S103, displaying the true value vehicle trajectory generated according to the true value vehicle data file and the calibrated camera vehicle trajectory generated according to the calibrated camera data file;
[0056] Step S104, obtaining the modification of the recognition parameters by the user, updating the recognition parameters, the recognition parameters being used to determine the central pixel of the target recognized by the camera, updating the central pixel of the recognized target based on the updated recognition parameters, and generating and displaying the updated calibrated camera vehicle trajectory according to the longitude and latitude corresponding to the central pixel of the updated recognized target;
[0057] Step S105 , after the user finishes modifying the recognition parameters, the updated recognition parameters and camera calibration parameters are output.
[0058] Specifically, the present invention can be applied to electronic devices with processing capabilities, such as computers.
[0059] Specifically, firstly, step S101 is executed to calibrate the camera to obtain camera calibration parameters, and then a corresponding relationship between pixels and longitude and latitude is established based on the camera calibration parameters.
[0060] Specifically, the existing checkerboard calibration method can be used to calibrate the camera to obtain camera calibration parameters. The camera calibration parameters are used to establish the correspondence between the pixels in the image taken by the camera and the real longitude and latitude. The camera calibration parameters include but are not limited to: intrinsic parameters, extrinsic parameters, and distortion parameters.
[0061] Then, step S102 is executed to obtain a true value vehicle data file and a calibrated camera data file, wherein the true value vehicle data file includes multiple frames of true value vehicle data frames, each frame of the true value vehicle data frame includes at least the longitude and latitude of the true value vehicle when it is running, and the calibrated camera data file includes multiple frames of camera data frames, each frame of the camera data frame includes at least the longitude and latitude corresponding to the central pixel of the recognition target obtained by the camera recognizing the true value vehicle.
[0062] Specifically, the true value vehicle data file is preferably a true value vehicle RTK data file. RTK is a technology for high-precision positioning. The RTK receiver can receive GPS satellite information and calculate high-precision location information. First, install the RTK receiver on the vehicle, then connect the RTK receiver to the vehicle, and then obtain the data generated by the RTK receiver. These data usually include the position, speed, direction, etc. of the vehicle. The true value vehicle RTK data is obtained by manually running the true value vehicle, and the RTK data is structured to obtain the true value vehicle RTK structured data and saved in the true value vehicle RTK data file. The true value vehicle RTK structured data includes multiple frames of true value vehicle data frames, and each frame of the true value vehicle data frame can include the timestamp, longitude and latitude, and heading angle information of the true value vehicle trajectory data. At the same time, the true value vehicle is photographed by a camera. The camera raw data is obtained from the camera, and the camera raw data is structured to generate camera raw structured data and saved in the camera data file. The camera raw structured data includes multiple frames of camera data frames, and each frame of the camera data frame can report the identified trajectory longitude and latitude, timestamp, heading angle, category and other geographic location information. Specifically, the camera identifies the true value car, takes the true value car as the recognition target, and determines the central pixel of the recognition target based on the recognition parameters. The camera continuously takes multiple frames of pictures, and then uses the existing trajectory recognition method to use the correspondence between pixels and longitude and latitude established by the camera calibration parameters. The longitude and latitude corresponding to the central pixel of the recognition target in each frame of the picture is used as the longitude and latitude of each camera data frame, and the timestamp of the shooting is recorded and the geographical location information such as the heading angle and category is determined.
[0063] Initially, the recognition parameters use default parameters, and the recognition parameters include but are not limited to: longitudinal recognition adjustment parameters and transverse recognition adjustment parameters.
[0064] Specifically, the recognition parameters include a longitudinal adjustment parameter and a lateral adjustment parameter, and determining the central pixel of the recognition target based on the recognition parameters includes:
[0065] Obtain the horizontal coordinates of the bottom midpoint pixel of the target box of the identified target, the vertical coordinates of the bottom midpoint pixel, the horizontal width of the target box, and the vertical height of the target box;
[0066] The horizontal ratio of the center pixel is calculated according to the horizontal adjustment parameter and the horizontal coordinate of the center pixel of the bottom edge, and the vertical ratio of the center pixel is calculated according to the vertical adjustment parameter and the vertical coordinate of the midpoint pixel of the bottom edge;
[0067] The horizontal coordinate of the central pixel of the recognized target is calculated according to the horizontal ratio of the central pixel, the horizontal coordinate of the bottom midpoint pixel and the horizontal width of the target frame;
[0068] The vertical coordinate of the central pixel of the identified target is calculated based on the vertical ratio of the central pixel, the vertical coordinate of the bottom midpoint pixel, and the vertical height of the target frame.
[0069] Specifically, yThresh, yRatio1, and yRatio2 are used as longitudinal adjustment parameters, and xThresh and xRatio1 are used as transverse recognition adjustment parameters. The recognition target is identified by a two-dimensional target frame. According to the width and height of the target frame, the longitudinal position of the central pixel point of the recognition target is adjusted based on the longitudinal recognition adjustment parameters. According to the width and height of the target frame, the transverse position of the central pixel point of the recognition target is adjusted based on the transverse recognition adjustment parameters. The longitudinal recognition parameters and the transverse recognition parameters jointly determine the pixel point corresponding to the center of the recognition target.
[0070] As an example, yThresh is the vertical adjustment threshold, yRatio1 and yRatio2 are two different vertical adjustment ratios, xThresh is the horizontal adjustment threshold, and xRatio1 is the horizontal adjustment ratio.
[0071] Get the horizontal coordinate centerX of the bottom midpoint pixel of the target box of the identified target, the vertical coordinate centery of the bottom midpoint pixel, the horizontal width objectWidth of the target box, and the vertical height objectHeight of the target box;
[0072] According to the horizontal adjustment parameters and the horizontal coordinates of the bottom center pixel, the horizontal ratio of the center pixel is calculated, specifically:
[0073] Calculate w_ratio = (centerX / xThresh-1)*xRatio1, where w_ratio is the horizontal ratio of the center pixel;
[0074] According to the vertical adjustment parameter and the vertical coordinate of the bottom midpoint pixel, the vertical ratio of the center pixel is calculated as follows:
[0075] For the case of yThresh>0:
[0076] If centerY>yThresh, calculate h_ratio=(centerY / yThresh-1)*yRatio1;
[0077] If centerY≤yThresh, calculate h_ratio=(centerY / yThresh-1)*yRatio2;
[0078] For the case of yThresh≤0: calculate h_ratio=centerY / 720*yRatio1;
[0079] Among them, h_ratio is the vertical ratio of the central pixel.
[0080] Finally, the horizontal coordinate of the central pixel of the recognized target is calculated according to the horizontal ratio of the central pixel, the horizontal coordinate of the bottom midpoint pixel, and the horizontal width of the target frame, specifically:
[0081] reflectX=centerX+w_ratio*objectWidth, where reflectX is the horizontal coordinate of the center pixel of the identified target;
[0082] The vertical coordinate of the central pixel of the recognized target is calculated according to the vertical ratio of the central pixel, the vertical coordinate of the bottom midpoint pixel, and the vertical height of the target frame:
[0083] reflectY=centerY-h_ratio*objectHeight, where reflectY is the vertical coordinate of the center pixel of the identified target.
[0084] Then use the calibration device tool to import the true value vehicle RTK data file used for calibration as the true value vehicle data file, and import the camera raw data file used for calibration as the calibration camera data file.
[0085] Then, step S103 is executed to display the true value vehicle trajectory generated according to the true value vehicle data file and the calibrated camera vehicle trajectory generated according to the calibrated camera data file.
[0086] Specifically, the calibration device tool is combined with the high-precision map to convert the geographic location information and 2D pixels, so as to perform a comparative display of vehicle trajectories.
[0087] Among them, the true value vehicle data file is preferably an RTK data file. Through the existing RTK trajectory generation method, the true value vehicle trajectory is generated according to the true value vehicle data file. For example, in the high-precision map, the longitude and latitude of each frame of true value vehicle data in the true value vehicle data file are connected to obtain the true value vehicle trajectory. Through the existing camera recognition vehicle trajectory method, the calibrated camera vehicle trajectory is generated according to the calibrated camera data file. For example, in the high-precision map, the longitude and latitude of each frame of camera data in the camera data file are connected to obtain the camera vehicle trajectory. The true value vehicle trajectory and the calibrated camera vehicle trajectory are displayed together, for example, the true value vehicle trajectory and the calibrated camera vehicle trajectory are displayed on the same high-precision map.
[0088] Then, execute step S104, obtain the user's modification of the recognition parameters, update the recognition parameters, the recognition parameters are used to determine the center pixel of the target recognized by the camera, update the center pixel of the recognized target based on the updated recognition parameters, and generate and display the updated calibrated camera vehicle trajectory according to the longitude and latitude corresponding to the center pixel of the updated recognized target.
[0089] Specifically, users can adjust the values of several identification parameters directly through the calibration device tool to adjust the camera positioning. Use the RTK trajectory data of the real value vehicle as a benchmark to adjust the vehicle trajectory of multi-point and multi-directional camera positioning. The overall interface is displayed as follows Figure 6 Display. Figure 6 In the display area 61 in the figure, the true value vehicle trajectory 611 and the calibrated camera vehicle trajectory 612 are displayed. The user modifies the phase recognition parameters in the parameter adjustment area 62 to update the central pixel of the target recognized by the camera, and then updates the central pixel of the recognized target based on the updated recognition parameters, and generates and displays the updated calibrated camera vehicle trajectory 612 according to the longitude and latitude corresponding to the central pixel of the updated recognized target. The calibrated camera vehicle trajectory 612 is adjusted to be close to the true value vehicle trajectory 611.
[0090] Finally, step S105 is executed to output updated recognition parameters and camera calibration parameters after the user finishes modifying the recognition parameters.
[0091] Specifically, the user adjusts the calibration camera vehicle trajectory 612 to be close to the true value vehicle trajectory 611. When the user is satisfied with the consistency between the two, the user can end the modification of the recognition parameters. At this time, the recognition parameters and camera calibration parameters retained after the user ends the modification of the recognition parameters are output.
[0092] The present invention displays the true value vehicle trajectory generated according to the true value vehicle data file, and the calibrated camera vehicle trajectory generated based on the calibrated camera data file, and generates and displays the updated calibrated camera vehicle trajectory by obtaining the user's modification of the recognition parameters, so that the recognition parameters can be adjusted visually. The present invention allows users to intuitively understand the changes in vehicle trajectories caused by changes in recognition parameters in a visual manner, and through a visual form, camera calibration can be performed more efficiently and intuitively. The present invention greatly improves efficiency and reduces human resource costs in the case of multiple calibration tests in multiple scenarios.
[0093] like Figure 2 FIG. 1 is a flowchart of a camera calibration method according to another embodiment of the present invention, comprising:
[0094] Step S201, generating initial camera calibration parameters based on chessboard calibration, wherein the camera calibration parameters are used to represent the correspondence between pixels and longitude and latitude;
[0095] Step S202, displaying a road surface picture taken by the camera including one or more road surface markings;
[0096] Step S203, displaying pixels of the road surface mark determined based on the initial camera calibration parameters in the road surface feature image;
[0097] Step S204, obtaining the modification of the camera calibration parameters by the user, updating the camera calibration parameters, and displaying the pixels of the road surface marking determined based on the updated camera calibration parameters in the road surface picture.
[0098] Step S205, obtaining a true value vehicle data file and a calibrated camera data file, wherein the true value vehicle data file includes multiple frames of true value vehicle data frames, each frame of the true value vehicle data frame includes at least the longitude and latitude of the true value vehicle when it is running, and the calibrated camera data file includes multiple frames of camera data frames, each frame of the camera data frame includes at least the longitude and latitude corresponding to the center pixel of the recognition target obtained by the camera recognizing the true value vehicle.
[0099] Step S206, displaying the true value vehicle trajectory generated according to the true value vehicle data file in the first layer of the display area, and the calibrated camera vehicle trajectory generated according to the calibrated camera data file in the second layer of the display area.
[0100] Step S207, obtaining the user's modification of the recognition parameters, updating the recognition parameters, the recognition parameters are used to determine the center pixel of the target recognized by the camera, updating the center pixel of the recognized target based on the updated recognition parameters, and generating and displaying the updated calibrated camera vehicle trajectory according to the longitude and latitude corresponding to the center pixel of the updated recognized target.
[0101] Step S208: After the user finishes modifying the recognition parameters, the updated recognition parameters and camera calibration parameters are output.
[0102] Step S209, generating a position positioning accuracy trend graph according to the true value vehicle data file and the calibration camera data file; and / or
[0103] A heading angle positioning accuracy trend graph is generated according to the true value vehicle data file and the calibrated camera data file.
[0104] Specifically, step S201 is first performed to generate initial camera calibration parameters based on the checkerboard calibration, where the camera calibration parameters are used to represent the correspondence between pixels and longitude and latitude.
[0105] Specifically, this embodiment uses a checkerboard calibration method to generate camera calibration parameters. The camera calibration parameters include but are not limited to: intrinsic parameters, extrinsic parameters, and distortion parameters.
[0106] Checkerboard calibration is to place checkerboards at different positions within the camera's field of view, and use Zhang Zhengyou's calibration method to obtain the camera's intrinsic parameters and distortion parameters. Figure 3 As shown in the figure, the chessboard is displayed in the camera field of view. Then use RTK to record the position as feature points in different places in the real scene, such as Figure 4The distribution diagram of feature points 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, and 16 is shown. The pixel coordinates of the feature points in the image taken by the camera and the corresponding RTK coordinates are input into the algorithm. At the same time, the calculated camera intrinsic parameters and distortion parameters are input to obtain the external parameters. According to the camera intrinsic parameters, distortion parameters, and external parameters, the real longitude and latitude of each 3D ground point in the scene can be projected into the picture to obtain the corresponding relationship between the pixels of the image taken by the camera and the real longitude and latitude. The projection effect is as follows: Figure 5 As shown, the chessboard calibration method can be completed. Figure 5 The yellow line in the figure refers to the projection of the real longitude and latitude onto the image plane, showing the process of projecting the real longitude and latitude of the map onto the image.
[0107] After completing the checkerboard calibration, the initial camera calibration parameters will be obtained, including but not limited to intrinsic parameters, extrinsic parameters and distortion parameters. The camera calibration parameters determine the correspondence between each pixel in the image captured by the camera and the actual longitude and latitude.
[0108] Then, step S202 is executed to display a road surface picture including one or more road surface markings taken by the camera.
[0109] Specifically, the overall interface design of the calibration device tool is carried out through pyqt. Among them, pyqt is a cross-platform library of Python for creating desktop applications and mobile applications. It is based on the Qt framework and provides a rich GUI component and tool library. Qt is a cross-platform C++ development framework for creating desktop applications and mobile applications. It provides a rich GUI component, tool library and platform-related functions.
[0110] like Fig. 9 As shown, in Fig. 9 In the display area 91 in the display, a road surface image 911 is displayed, and the road surface image includes a plurality of road surface markings 913. The road markings 913 include, but are not limited to, arrows, lane lines, and the like.
[0111] Then, step S203 is executed to display pixels of the road surface mark determined based on the initial camera calibration parameters in the road surface feature image.
[0112] Specifically, a high-precision map corresponding to the road surface image is obtained, and the longitude and latitude of multiple points on the boundary line of the road surface mark are obtained from the high-precision map. Based on the initial camera calibration parameters, the longitude and latitude of multiple points on the boundary line of the road surface mark are converted into pixels and displayed in the road surface image 911. The display can be to display the pixels in a preset color. Fig. 9 As shown, the pixel 912 corresponding to the road surface mark is displayed in green.
[0113] Then, step S204 is executed to obtain the modification of the camera calibration parameters by the user, update the camera calibration parameters, and display the pixels of the road surface mark determined based on the updated camera calibration parameters in the road surface picture.
[0114] During the calibration process, there may be problems such as measurement accuracy, which will lead to inaccurate camera calibration parameters. Therefore, users can modify the camera calibration parameters.
[0115] like Fig. 9 As shown, the user can modify the camera calibration parameters in the calibration parameter adjustment area 92. The calibration parameter adjustment area 92 includes an internal parameter adjustment area 921, an external parameter adjustment area 922 and a distortion parameter adjustment area 923.
[0116] After the user modifies the camera calibration parameters, the updated camera calibration parameters will update the correspondence between pixels and longitude and latitude, so the longitude and latitude of multiple points on the boundary line of the road marking obtained in the high-precision map will be converted into pixels determined based on the updated camera calibration parameters, and displayed again in the road image 911. Therefore, the user will see that the pixels used for display have changed, and can intuitively see the changes in the camera calibration parameters. The user modifies the camera calibration parameters so that the displayed pixels are consistent with the road markings. When the user stops modifying the calibration parameters, the camera calibration parameters will stop being updated, and the accuracy of the camera calibration parameters at this time best meets the user's expectations.
[0117] Then execute step S205 to obtain a true value vehicle data file and a calibrated camera data file, wherein the true value vehicle data file includes multiple frames of true value vehicle data frames, each frame of the true value vehicle data frame includes at least the longitude and latitude of the true value vehicle when it is running, and the calibrated camera data file includes multiple frames of camera data frames, each frame of the camera data frame includes at least the longitude and latitude corresponding to the central pixel of the recognition target obtained by the camera recognizing the true value vehicle.
[0118] Specifically, the true value vehicle data file and the calibration camera data file are imported into the calibration device tool, and the camera recognition trajectory data and the true value vehicle trajectory data under the two camera calibration modes are simultaneously obtained.
[0119] The true value vehicle trajectory data is saved in a true value vehicle data file. Preferably, the true value vehicle data file is a true value vehicle RTK data file. RTK is a technology for high-precision positioning. The RTK receiver can receive GPS satellite information and calculate high-precision location information. First, install the RTK receiver on the vehicle, then connect the RTK receiver to the vehicle, and then obtain the data generated by the RTK receiver. These data usually include the position, speed, direction, etc. of the vehicle. The true value vehicle RTK data is obtained by manually running the true value vehicle, and the RTK data is structured to obtain the true value vehicle RTK structured data and saved in the true value vehicle RTK data file. The true value vehicle RTK structured data includes the timestamp, longitude and latitude, and heading angle information of the true value vehicle trajectory data. At the same time, the true value vehicle is photographed by a camera such as a roadside device. The camera raw data is obtained from the camera, and the camera raw data is structured to generate camera raw structured data and saved in the camera data file. The camera raw structured data includes the geographical location information such as the longitude and latitude, timestamp, heading angle, and category of the trajectory of the true value vehicle.
[0120] Then, step S206 is executed to display the true value vehicle trajectory generated according to the true value vehicle data file in the first layer of the display area, and the calibrated camera vehicle trajectory generated according to the calibrated camera data file in the second layer of the display area.
[0121] Specifically, an overall area is set in the calibration device tool to display the overall high-precision map and vehicle trajectory. The calibration device tool combines the high-precision map to convert the geographic location information and 2D pixels, so as to compare and display the true value vehicle trajectory and the calibrated camera vehicle trajectory.
[0122] The true vehicle trajectory is generated according to the true vehicle data file using the existing RTK trajectory algorithm, while the calibrated camera vehicle trajectory is generated according to the calibrated camera data file based on the camera calibration parameters and the existing camera trajectory recognition method.
[0123] like Figure 6 As shown, in Figure 6 In the display area 61, the center longitude and latitude of the intersection (lon base ,lat base) as the origin of the local coordinates, set the area of interest to determine the display area of the map, then convert the geodetic coordinate system of the map into the local coordinate system, and then convert it into pixel coordinates. Then the true value vehicle trajectory 611, the calibrated camera vehicle trajectory 612 and the high-precision map are projected onto the display area 61. Among them, three layers are set in the display area 61, the bottom layer is placed on the high-precision map, the middle layer is placed on the true value vehicle trajectory 611, and the true value vehicle trajectory 611 is displayed on the high-precision map based on the longitude and latitude of each trajectory point in the true value vehicle trajectory 611, and the top layer is placed on the camera vehicle trajectory 612, and the calibrated camera vehicle trajectory 612 is displayed on the high-precision map based on the longitude and latitude of each trajectory point in the calibrated camera vehicle trajectory 612.
[0124] Then execute step S207, obtain the user's modification of the recognition parameters, update the recognition parameters, the recognition parameters are used to determine the center pixel of the target recognized by the camera, update the center pixel of the recognized target based on the updated recognition parameters, and generate and display the updated calibrated camera vehicle trajectory according to the longitude and latitude corresponding to the center pixel of the updated recognized target.
[0125] The camera positioning can be adjusted by adjusting the values of several identification parameters directly through the calibration device tool. The RTK trajectory data of the true value vehicle is used as a reference to adjust the multi-point and multi-directional chessboard positioning.
[0126] Specifically, by using the initial internal parameters, external parameters, and distortion parameters obtained through chessboard calibration, the specific adjustment can be based on Fig. 9 The interface is used to make adjustments and then the adjusted internal parameters, external parameters, and distortion parameters are obtained. Then the recognition parameter adjustment area 62 for calculating the target center pixel is displayed in the interface. The recognition parameters include but are not limited to: yThresh, xThresh, yRatio1, yRatio2, xRatio1. By adjusting the corresponding recognition parameters, the user will affect the center pixel of the recognized target acquired by the camera, and then use the acquired internal parameters, external parameters, and distortion parameters to calculate the longitude and latitude of the center pixel mapping, thereby adjusting the longitude and latitude of each track point in the calibrated camera vehicle track 612, and adjusting the display position of the calibrated camera vehicle track 612 on the high-precision map based on the longitude and latitude of each track point after adjustment. The user can use the true value vehicle track 611 (black track) as a benchmark, and then adjust the recognition parameters to make the calibrated camera vehicle track 612 recognized by the camera close to the true value vehicle track 611.
[0127] In one embodiment, the recognition parameters include a longitudinal adjustment parameter and a lateral adjustment parameter, and updating the central pixel of the recognition target based on the updated recognition parameters includes:
[0128] Obtain the horizontal coordinates of the bottom midpoint pixel of the target box of the identified target, the vertical coordinates of the bottom midpoint pixel, the horizontal width of the target box, and the vertical height of the target box;
[0129] Calculate the horizontal ratio of the center pixel according to the updated horizontal adjustment parameter and the horizontal coordinate of the center pixel of the bottom edge, and calculate the vertical ratio of the center pixel according to the updated vertical adjustment parameter and the vertical coordinate of the midpoint pixel of the bottom edge;
[0130] The horizontal coordinate of the central pixel of the recognized target is calculated according to the horizontal ratio of the central pixel, the horizontal coordinate of the bottom midpoint pixel and the horizontal width of the target frame;
[0131] The vertical coordinate of the central pixel of the identified target is calculated based on the vertical ratio of the central pixel, the vertical coordinate of the bottom midpoint pixel, and the vertical height of the target frame.
[0132] Specifically, yThresh, yRatio1, and yRatio2 are used as longitudinal adjustment parameters, and xThresh and xRatio1 are used as transverse recognition adjustment parameters. The recognition target is identified by a two-dimensional target frame. According to the width and height of the target frame, the longitudinal position of the central pixel point of the recognition target is adjusted based on the longitudinal recognition adjustment parameters. According to the width and height of the target frame, the transverse position of the central pixel point of the recognition target is adjusted based on the transverse recognition adjustment parameters. The longitudinal recognition parameters and the transverse recognition parameters jointly determine the pixel point corresponding to the center of the recognition target.
[0133] As an example, yThresh is the vertical adjustment threshold, yRatio1 and yRatio2 are two different vertical adjustment ratios, xThresh is the horizontal adjustment threshold, and xRatio1 is the horizontal adjustment ratio.
[0134] Get the horizontal coordinate centerX of the bottom midpoint pixel of the target box of the identified target, the vertical coordinate centery of the bottom midpoint pixel, the horizontal width objectWidth of the target box, and the vertical height objectHeight of the target box;
[0135] According to the updated horizontal adjustment parameters and the horizontal coordinates of the bottom center pixel, the horizontal ratio of the center pixel is calculated, specifically:
[0136] Calculate w_ratio = (centerX / xThresh-1)*xRatio1, where w_ratio is the horizontal ratio of the center pixel;
[0137] According to the updated vertical adjustment parameters and the vertical coordinates of the bottom midpoint pixel, the vertical ratio of the center pixel is calculated as follows:
[0138] For the case of yThresh>0:
[0139] If centerY>yThresh, calculate h_ratio=(centerY / yThresh-1)*yRatio1;
[0140] If centerY≤yThresh, calculate h_ratio=(centerY / yThresh-1)*yRatio2;
[0141] For the case of yThresh≤0: calculate h_ratio=centerY / 720*yRatio1;
[0142] Among them, h_ratio is the vertical ratio of the central pixel.
[0143] Finally, the horizontal coordinate of the central pixel of the recognized target is calculated according to the horizontal ratio of the central pixel, the horizontal coordinate of the bottom midpoint pixel, and the horizontal width of the target frame, specifically:
[0144] reflectX=centerX+w_ratio*objectWidth, where reflectX is the horizontal coordinate of the center pixel of the identified target;
[0145] The vertical coordinate of the central pixel of the recognized target is calculated according to the vertical ratio of the central pixel, the vertical coordinate of the bottom midpoint pixel, and the vertical height of the target frame:
[0146] reflectY=centerY-h_ratio*objectHeight, where reflectY is the vertical coordinate of the center pixel of the identified target.
[0147] Then, step S208 is executed to output updated recognition parameters and camera calibration parameters after the user finishes modifying the recognition parameters.
[0148] When the final user stops modifying, a set of parameters will be obtained in the identification parameter adjustment area 62. This set of parameters will be used as the updated identification parameters. Fig. 9 The calibration parameter adjustment area 92 shown can also obtain updated camera calibration parameters. When outputting, the updated recognition parameters and the updated camera calibration parameters are output simultaneously.
[0149] After obtaining the final recognition parameters and camera calibration parameters, in subsequent use, the optimal center pixel of the recognition target is calculated through the final recognition parameters, and the calculated center pixel is converted into accurate longitude and latitude through the final camera calibration parameters, which serves as the basis for subsequent autonomous driving trajectory estimation or perception.
[0150] In addition to executing camera calibration, this embodiment also performs accuracy testing, and can directly perform calibration in different point directions and accuracy testing of true value data through the calibration device tool.
[0151] Execute step S209 to generate a position positioning accuracy trend graph according to the true value vehicle data file and the calibration camera data file; and / or
[0152] A heading angle positioning accuracy trend graph is generated according to the true value vehicle data file and the calibrated camera data file.
[0153] The accuracy test includes a positioning accuracy test and / or a heading angle accuracy test.
[0154] In one embodiment, generating a position positioning accuracy trend graph according to the true value vehicle data file and the calibrated camera data file includes:
[0155] Using the timestamp of each real vehicle data frame in the real value vehicle data file as a reference timestamp;
[0156] For each reference timestamp, the timestamp closest to the reference timestamp in the calibration camera data file is used as the camera timestamp, the longitude and latitude corresponding to the camera timestamp in the calibration camera data file is used as the camera longitude and latitude, the longitude and latitude corresponding to the reference timestamp in the ground truth vehicle data file is used as the real vehicle longitude and latitude, and the position distance difference between the camera longitude and longitude and the real vehicle longitude and latitude is calculated;
[0157] Based on the position distance difference corresponding to each of the reference timestamps, a position positioning accuracy trend graph is generated.
[0158] Specifically, the position accuracy test includes:
[0159] 1) Obtain the latitude and longitude of each real car data frame and the timestamp of each real car data frame in the real car data file and the calibration camera data file.
[0160] 2) Take the timestamp of each real car data frame in the true value car data file as the benchmark data, that is, the benchmark timestamp, and align the timestamp of the calibrated camera data file with the benchmark timestamp, that is, find the timestamp closest to the benchmark timestamp in the calibrated camera data file as the camera timestamp, and find the longitude and latitude corresponding to the camera timestamp in the calibrated camera data file and the longitude and latitude corresponding to the benchmark timestamp in the true value car data file.
[0161] 3) The position distance difference between the frame where the reference timestamp is located and the frame where the camera timestamp is located is calculated through geodesic (truth car dimension, truth car accuracy, original camera dimension, original camera accuracy), that is, the position distance difference between the longitude and latitude corresponding to the camera timestamp and the longitude and latitude corresponding to the reference timestamp is calculated. By calculating the position distance differences of multiple reference timestamps, a position positioning accuracy trend graph related to the position error of the truth car and the original camera aligned by timestamps is generated.
[0162] The position positioning accuracy trend graph uses time as the horizontal axis and the position distance difference as the vertical axis. The position distance differences corresponding to multiple reference timestamps are connected to obtain the position positioning accuracy trend graph.
[0163] In one embodiment, generating a heading angle positioning accuracy trend graph according to the true value vehicle data file and the calibration camera data file includes:
[0164] Using the timestamp of each real vehicle data frame in the real value vehicle data file as a reference timestamp;
[0165] For each reference timestamp, the timestamp closest to the reference timestamp in the calibration camera data file is used as the camera timestamp, the heading angle corresponding to the camera timestamp in the calibration camera data file is used as the camera heading angle, the heading angle corresponding to the reference timestamp in the ground truth vehicle data file is used as the real vehicle heading angle, and the heading angle difference between the camera heading angle and the real vehicle heading angle is calculated;
[0166] Based on the heading angle difference corresponding to each of the reference timestamps, a heading angle positioning accuracy trend graph is generated.
[0167] Heading angle accuracy test, including:
[0168] 1) Obtain the heading angle and timestamp of each real vehicle data frame in the real vehicle data file and the calibration camera data file.
[0169] 2) Take the timestamp of each real car data frame in the true value car data file as the benchmark data, that is, the benchmark timestamp, and align the timestamp of the calibrated camera data file with the benchmark timestamp, that is, find the timestamp closest to the benchmark timestamp in the calibrated camera data file as the camera timestamp, and find the heading angle difference corresponding to the camera timestamp in the calibrated camera data file and the heading angle difference corresponding to the benchmark timestamp in the true value car data file.
[0170] 3) Calculate the heading angle difference between the frame containing the reference timestamp and the frame containing the camera timestamp, that is, calculate the heading angle difference between the heading angle corresponding to the camera timestamp and the heading angle corresponding to the reference timestamp. By calculating the heading angle differences of multiple reference timestamps, generate a heading angle positioning accuracy trend graph related to the heading angle error of the true value vehicle and the original camera aligned by timestamps.
[0171] The heading angle positioning accuracy trend graph takes time as the horizontal axis and the heading angle difference as the vertical axis. The heading angle difference values corresponding to multiple reference timestamps are connected to obtain the heading angle positioning accuracy trend graph.
[0172] In view of the complexity of camera calibration in the prior art, the low calibration efficiency, and the inability to combine camera calibration and precision testing, this embodiment combines camera calibration and precision testing after calibration through an automated calibration device tool and a test method, which can not only visually adjust the calibration parameters, but also visually observe the comparison results of the calibration trajectory data and the true value vehicle trajectory data while identifying the parameter adjustment. This embodiment also combines high-precision maps and the entire process of camera calibration precision testing. After the calibration is completed, the calibration precision test of the position and heading angle can be directly performed. Through the form of a visual interface, checkerboard calibration and precision testing can be performed more efficiently and intuitively. This automated method replaces the code engineering method and solves the problem that it can only be oriented to the developer himself, and greatly improves efficiency and reduces the human resource cost in multiple calibration tests in multiple scenarios. When faced with a large number of scenes that require camera calibration, camera calibration and testing can be performed more efficiently and conveniently. At the same time, the present invention covers the entire process from camera calibration to calibration precision testing, thereby greatly reducing human resource costs.
[0173] like Figure 7 The flowchart of a camera calibration method according to the best embodiment of the present invention is shown, comprising:
[0174] Step S701: import the real vehicle RTK structured data, camera original structured data and high-precision map into the calibration device tool.
[0175] Step S702, perform chessboard calibration, visualize and compare RTK and camera original trajectory data, and finally output the chessboard calibration parameter results;
[0176] Step S703, perform a positioning accuracy test, output a position positioning accuracy trend graph, a heading angle positioning accuracy trend graph, and output a summary of the accuracy test analysis results.
[0177] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0178] like Figure 8 The figure shows a hardware structure diagram of an electronic device of the present invention, including:
[0179] at least one processor 801; and,
[0180] A memory 802 is communicatively connected to at least one of the processors 801; wherein,
[0181] The memory 802 stores instructions that can be executed by at least one of the processors. The instructions are executed by at least one of the processors so that the at least one of the processors can perform the camera calibration method as described above.
[0182] Figure 8 A processor 801 is taken as an example.
[0183] The electronic device may further include: an input device 803 and a display device 804 .
[0184] The processor 801, the memory 802, the input device 803 and the display device 804 may be connected via a bus or other means, and the figure takes the connection via a bus as an example.
[0185] The memory 802 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions / modules corresponding to the camera calibration method in the embodiment of the present application, for example, Figure 1 , Figure 2 The processor 801 executes various functional applications and data processing by running the non-volatile software programs, instructions and modules stored in the memory 802, that is, the camera calibration method in the above embodiment is implemented.
[0186] The memory 802 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required by at least one function; the data storage area may store data created according to the use of the camera calibration method, etc. In addition, the memory 802 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 802 may optionally include a memory remotely arranged relative to the processor 801, and these remote memories may be connected to the device for executing the camera calibration method via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0187] The input device 803 can receive user clicks and generate signal inputs related to user settings and function control of the camera calibration method. The display device 804 can include display devices such as a display screen.
[0188] The one or more modules are stored in the memory 802 , and when executed by the one or more processors 801 , the camera calibration method in any of the above method embodiments is executed.
[0189] The present invention displays the true value vehicle trajectory generated according to the true value vehicle data file, and the calibrated camera vehicle trajectory generated based on the calibrated camera data file, and generates and displays the updated calibrated camera vehicle trajectory by obtaining the user's modification of the recognition parameters, so that the recognition parameters can be adjusted visually. The present invention allows users to intuitively understand the changes in vehicle trajectories caused by changes in recognition parameters in a visual manner, and through a visual form, camera calibration can be performed more efficiently and intuitively. The present invention greatly improves efficiency and reduces human resource costs in the case of multiple calibration tests in multiple scenarios.
[0190] An embodiment of the present invention provides a storage medium, wherein the storage medium stores computer instructions. When a computer executes the computer instructions, the storage medium is used to execute all steps of the camera calibration method as described above.
[0191] In the context of the present disclosure, a storage medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or apparatus. The storage medium may be a machine-readable signal medium or a machine-readable storage medium. Alternatively, the storage medium may be a non-temporary computer-readable storage medium, for example, a non-temporary computer-readable storage medium may be a ROM, a random access memory (Random Access Memory, RAM), a compact disc read-only memory (Compact Disc ROM, CD-ROM), a magnetic tape, a floppy disk, and an optical data storage device, etc.
[0192] An embodiment of the present invention provides a computer program product, including a computer program / instruction, which implements the camera calibration method as described above when executed by a processor.
[0193] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A camera calibration method, characterized in that: include: Calibrate the camera to obtain camera calibration parameters, and establish a correspondence between pixels and longitude and latitude based on the camera calibration parameters; Acquire a true value vehicle data file and a calibrated camera data file, wherein the true value vehicle data file includes multiple frames of true value vehicle data frames, each frame of the true value vehicle data frame includes at least the longitude and latitude of the true value vehicle when it is running, and the calibrated camera data file includes multiple frames of camera data frames, each frame of the camera data frame includes at least the longitude and latitude corresponding to the central pixel of the recognition target obtained by the camera recognizing the true value vehicle; Displaying a true value vehicle trajectory generated according to the true value vehicle data file and a calibrated camera vehicle trajectory generated according to the calibrated camera data file; Obtaining a modification of a recognition parameter by a user, updating the recognition parameter, the recognition parameter being used to determine a central pixel of a target recognized by a camera, updating the central pixel of the recognized target based on the updated recognition parameter, and generating and displaying an updated calibrated camera vehicle trajectory according to the longitude and latitude corresponding to the central pixel of the updated recognized target; After the user finishes modifying the recognition parameters, the updated recognition parameters and camera calibration parameters are output.
2. The camera calibration method according to claim 1, characterized in that: The presenting of the true value vehicle trajectory generated according to the true value vehicle data file and the calibrated camera vehicle trajectory generated according to the calibrated camera data file includes: The first layer of the display area displays the true value vehicle trajectory generated according to the true value vehicle data file, and the second layer of the display area displays the calibrated camera vehicle trajectory generated according to the calibrated camera data file.
3. The camera calibration method according to claim 1, characterized in that: The recognition parameters include a longitudinal adjustment parameter and a lateral adjustment parameter, and updating the central pixel of the recognition target based on the updated recognition parameters includes: Obtain the horizontal coordinates of the bottom midpoint pixel of the target box of the identified target, the vertical coordinates of the bottom midpoint pixel, the horizontal width of the target box, and the vertical height of the target box; Calculate the horizontal ratio of the center pixel according to the updated horizontal adjustment parameter and the horizontal coordinate of the center pixel of the bottom edge, and calculate the vertical ratio of the center pixel according to the updated vertical adjustment parameter and the vertical coordinate of the midpoint pixel of the bottom edge; The horizontal coordinate of the central pixel of the recognized target is calculated according to the horizontal ratio of the central pixel, the horizontal coordinate of the bottom midpoint pixel and the horizontal width of the target frame; The vertical coordinate of the central pixel of the identified target is calculated based on the vertical ratio of the central pixel, the vertical coordinate of the bottom midpoint pixel, and the vertical height of the target frame.
4. The camera calibration method according to claim 1, characterized in that: Also includes: Generate a position positioning accuracy trend graph according to the true value vehicle data file and the calibrated camera data file; and / or A heading angle positioning accuracy trend graph is generated according to the true value vehicle data file and the calibrated camera data file.
5. The camera calibration method according to claim 3, characterized in that: The generating of a position positioning accuracy trend graph according to the true value vehicle data file and the calibration camera data file comprises: Using the timestamp of each real vehicle data frame in the real value vehicle data file as a reference timestamp; For each reference timestamp, the timestamp closest to the reference timestamp in the calibration camera data file is used as the camera timestamp, the longitude and latitude corresponding to the camera timestamp in the calibration camera data file is used as the camera longitude and latitude, the longitude and latitude corresponding to the reference timestamp in the ground truth vehicle data file is used as the real vehicle longitude and latitude, and the position distance difference between the camera longitude and longitude and the real vehicle longitude and latitude is calculated; Based on the position distance difference corresponding to each of the reference timestamps, a position positioning accuracy trend graph is generated.
6. The camera calibration method according to claim 3, characterized in that: The step of generating a heading angle positioning accuracy trend graph according to the true value vehicle data file and the calibration camera data file includes: Using the timestamp of each real vehicle data frame in the real value vehicle data file as a reference timestamp; For each reference timestamp, the timestamp closest to the reference timestamp in the calibration camera data file is used as the camera timestamp, the heading angle corresponding to the camera timestamp in the calibration camera data file is used as the camera heading angle, the heading angle corresponding to the reference timestamp in the ground truth vehicle data file is used as the real vehicle heading angle, and the heading angle difference between the camera heading angle and the real vehicle heading angle is calculated; Based on the heading angle difference corresponding to each of the reference timestamps, a heading angle positioning accuracy trend graph is generated.
7. The camera calibration method according to any one of claims 1 to 6, characterized in that: The camera is calibrated to obtain camera calibration parameters, and a corresponding relationship between pixels and longitude and latitude is established based on the camera calibration parameters, including: Generating initial camera calibration parameters based on chessboard calibration, wherein the camera calibration parameters are used to represent the correspondence between pixels and longitude and latitude; Displaying a road surface picture taken by a camera including one or more road surface markings; Displaying pixels of the road surface marking determined based on initial camera calibration parameters in the road surface feature image; The modification of the camera calibration parameters by the user is obtained, the camera calibration parameters are updated, and the pixels of the road surface mark determined based on the updated camera calibration parameters are displayed in the road surface picture.
8. An electronic device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to at least one of the processors; wherein, The memory stores instructions that can be executed by at least one of the processors, and the instructions are executed by at least one of the processors to enable at least one of the processors to execute the camera calibration method according to any one of claims 1 to 7.
9. A storage medium, characterized in that: The storage medium stores computer instructions, and when a computer executes the computer instructions, it is used to execute all steps of the camera calibration method according to any one of claims 1 to 7.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the camera calibration method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Debugging method, device and system used for automatic parking system
CN109591808A
Calibration method and device
CN117141359A
Calibration method and system for camera extrinsic parameters of road end sensing equipment in vehicle-road cooperation
CN117830424A
Radar calibration result verification method and device, storage medium and equipment
CN118444266A
Calibration method and related apparatus, device, storage medium and computer program product
WO2023060964A1