Sensor calibration method and device, electronic equipment, storage medium and program

Through the iterative closest point algorithm and nonlinear optimization algorithm based on the calibration plate, the problem of tedious sensor calibration steps and complex calculations is solved, precise coordinate system conversion and calibration between multiple sensors is achieved, and calibration accuracy and speed are improved.

CN118623926APending Publication Date: 2024-09-10TONGJI UNIV +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410649274.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-24
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

The existing multi-sensor calibration technology has tedious steps and complex calculations, resulting in insufficient calibration accuracy and difficulty in achieving accurate matching and calibration between different modal sensor data.

Method used

Using a method based on the calibration plate, through the iterative nearest neighbor algorithm and nonlinear optimization algorithm, combined with image data and point cloud data, the external parameters between sensors are determined, and the coordinate system conversion between lidar, millimeter wave radar and camera is realized. , reduce the reprojection error to complete the calibration.

Benefits of technology

It simplifies the sensor calibration process, improves the calibration speed and accuracy, avoids iteration non-convergence caused by improper initial values, reduces the amount of calculation, and enables the determination of fine position relationship parameters between multiple sensors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118623926A
    Figure CN118623926A
Patent Text Reader

Abstract

The invention provides a sensor calibration method and device, electronic equipment, a storage medium and a program. The calibration method is based on a calibration board. The sensor comprises a camera, a laser radar and a millimeter wave radar. The sensor collects at least two groups of image data, first point cloud data and second point cloud data; calculating a rotation transformation matrix and a translation vector from a laser radar coordinate system to a camera coordinate system according to the data; calculating a rotation transformation matrix and a translation vector from the millimeter wave radar coordinate system to the camera coordinate system; and constructing a re-projection error, and under the condition that the re-projection error is the minimum value, determining a final calibration parameter according to the external parameters among the sensors at the moment, thereby completing the calibration of the sensors. The step number and the calculation amount of an iterative algorithm can be reduced, so that the calibration speed of multiple sensors is accelerated. And finer position relation parameters among the sensors are obtained by minimizing the re-projection error.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of autonomous driving, and in particular to a sensor calibration method, device, electronic device, storage medium and program. Background Art

[0002] In recent years, the intelligent driving technology of automobiles has been developing continuously. As a complex system, intelligent driving vehicles require many modules to work together. Different sensors (lidar, visual camera, millimeter wave radar) have their own advantages and disadvantages. The fusion of sensor data can achieve accurate environmental perception and positioning, and the calibration of the internal parameters of the sensor and the external relative spatial position parameters is an important basis for achieving accurate data fusion. With the development of sensor technology, the types of sensors carried by intelligent driving cars are constantly enriched, and the data volume is constantly increasing. The difficulty of achieving accurate matching and calibration between sensor data of different modalities has also increased accordingly.

[0003] Existing multiple sensor calibration technologies often have cumbersome calibration steps, and the calculation process of the coordinate conversion of the external parameters of different sensors is complex, which will lead to insufficient calibration accuracy. Summary of the invention

[0004] The technical problem to be solved by the present disclosure is to provide a sensor calibration method, device, electronic device, storage medium and program in order to overcome the problem that the calibration steps of multiple sensors in the prior art are cumbersome and the calculations are complicated.

[0005] The present invention solves the above technical problems through the following technical solutions:

[0006] In a first aspect, a sensor calibration method is provided, the calibration method is based on a calibration plate, the calibration plate includes a first target point and a second target point; the sensor includes a camera, a laser radar and a millimeter wave radar, wherein the laser radar can be a solid-state laser radar, and the millimeter wave radar can be a 4D millimeter wave radar. The calibration method includes:

[0007] At least two sets of image data, first point cloud data and second point cloud data are collected respectively; at least two sets of image data are obtained by respectively photographing calibration plates at different positions by a camera; at least two sets of first point cloud data are obtained by respectively scanning calibration plates at different positions by a laser radar; at least two sets of second point cloud data are obtained by respectively scanning calibration plates at different positions by a millimeter wave radar;

[0008] Determine the first target point coordinates of the first target point on the calibration plate in the laser radar coordinate system according to the first point cloud data;

[0009] Determine the coordinates of a second target point on the calibration plate in a millimeter-wave radar coordinate system according to the second point cloud data;

[0010] Determine, according to the image data, third target point coordinates and fourth target point coordinates of the first target point and the second target point in the camera space coordinate system, as well as fifth target point coordinates and sixth target point coordinates of the first target point and the second target point in the image coordinate system corresponding to the image data;

[0011] The first target point coordinates and the third target point coordinates are processed by an iterative nearest neighbor algorithm to obtain a first rotation matrix and a first translation vector from the laser radar coordinate system to the camera space coordinate system, and the second target point coordinates and the fourth target point coordinates are processed to obtain a second rotation matrix and a second translation vector from the millimeter wave radar coordinate system to the camera space coordinate system;

[0012] Construct a first reprojection error of the first target point corresponding to the image coordinate system according to the first rotation matrix, the first translation vector and the fifth target point coordinates, and construct a second reprojection error of the second target point corresponding to the image coordinate system according to the second rotation matrix, the second translation vector and the sixth target point coordinates;

[0013] When the total reprojection error is the minimum value, the final calibration parameters are determined according to the external parameters between the sensors at this time to complete the calibration of the sensor; the total reprojection error is determined according to the first reprojection error and the second reprojection error.

[0014] Optionally, the calibration plate includes a checkerboard area; the total reprojection error is determined according to the first reprojection error, the second reprojection error and the third reprojection error; the third reprojection error is obtained by the following steps:

[0015] Filtering the first point cloud data by reflection intensity, and retaining the point cloud of the black sub-area in the checkerboard area;

[0016] The point cloud of the black sub-area is calculated based on a clustering algorithm of Euclidean distance to obtain the first corner point coordinates of the corner points of the checkerboard area in the laser radar coordinate system;

[0017] A third reprojection error is constructed according to the first corner point coordinates and the second corner point coordinates of the corner points of the checkerboard area in the image coordinate system.

[0018] Optionally, when the total reprojection error is a minimum value, determining the final calibration parameters according to the external parameters between the sensors at this time, and completing the calibration of the sensor includes:

[0019] Convert the first rotation matrix and the second rotation matrix into quaternions;

[0020] The quaternion, the first translation vector and the second translation vector are solved by a nonlinear optimization algorithm, and when the sum of the reprojection errors is the minimum, the final calibration parameters are determined according to the external parameters between the sensors at this time to complete the calibration of the sensor.

[0021] Optionally, the calibration plate includes a point cloud positioning circular hole area, and the point cloud positioning circular hole area serves as the first target point; and determining the first target point coordinates of the laser radar according to the first point cloud data includes:

[0022] Generate virtual point cloud data, wherein the virtual point cloud data represents the size, shape and point cloud positioning circular hole area of ​​the calibration plate;

[0023] Matching the virtual point cloud data and the first point cloud data with a grid-based search algorithm, determining a point cloud representing a boundary of a point cloud positioning circular hole area in the first point cloud data, and determining a first center point position of the point cloud positioning circular hole area;

[0024] The first center point coordinates are determined as the first target point coordinates.

[0025] Optionally, after the grid-based search algorithm matches the virtual point cloud data and the first point cloud data, the method further includes:

[0026] Constructing a minimum error function based on the virtual point cloud data and the first point cloud data;

[0027] When the number of point clouds in the first point cloud data falling in the point cloud positioning circular hole area represented by the virtual point cloud data is a minimum value, the minimum error function is used to solve the relative position parameters of the first point cloud data and the virtual point cloud data at this time;

[0028] The point cloud representing the boundary of the point cloud positioning circular hole area in the first point cloud data is determined by using the relative position parameters, and the first center point position of the boundary is determined.

[0029] Optionally, the calibration plate further includes at least N metal reflectors, and the metal reflectors serve as the second target points; and determining the coordinates of the second target points of the millimeter wave radar according to the second point cloud data includes:

[0030] filtering the second point cloud data according to the reflection intensity distribution to obtain a point cloud filtering result having a reflection intensity higher than an intensity threshold;

[0031] Performing spatial clustering on the point cloud filtering results, removing outliers, and retaining the point cloud corresponding to each metal reflector;

[0032] For each metal reflector, weighted calculation is performed on the point cloud corresponding to each metal reflector based on the signal-to-noise ratio weighted algorithm to obtain the coordinates of the second center point of each reflector in the millimeter-wave radar coordinate system;

[0033] The second center point coordinates are determined as the second target point coordinates.

[0034] Optionally, before determining the first target point coordinates of the first target point on the calibration plate in the laser radar coordinate system according to the first point cloud data, the method further includes:

[0035] Removing outlier noise points in the first point cloud data based on a point cloud smoothing filtering algorithm;

[0036] Optionally, removing noise points in the first point cloud data by using a point cloud statistical filtering algorithm;

[0037] Optionally, point cloud data is extracted from the first point cloud data using a random sampling consistency algorithm.

[0038] In a second aspect, a sensor calibration device is provided, the calibration device comprising a calibration plate and a processor, the calibration plate comprising a checkerboard area, a point cloud positioning circular hole and a metal reflector, and the processor is used to implement any of the calibration methods described above.

[0039] According to a third aspect, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and used to run on the processor, wherein the processor implements any of the calibration methods described above when executing the computer program.

[0040] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the calibration method described in any one of the above items is implemented.

[0041] In a fifth aspect, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the calibration method described in any one of the above items is implemented.

[0042] On the basis of being in accordance with the common sense in the art, the above-mentioned preferred conditions can be arbitrarily combined to obtain the preferred embodiments of the present disclosure.

[0043] The positive progress of the present disclosure is that the initial rotation and translation matrices are estimated based on the iterative nearest neighbor algorithm, so that a good initial value can be obtained at the beginning of the iteration, which can avoid the non-convergence of the iteration caused by improper initial values, reduce the number of steps and calculation amount of the iterative algorithm, and thus speed up the calibration of multiple sensors. On this basis, the reprojection error is minimized to obtain more precise position relationship parameters between sensors. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 A flow chart of a sensor calibration method provided by an exemplary embodiment of the present disclosure;

[0045] Figure 2 A flow chart of a method for calculating a third re-projection error provided by an exemplary embodiment of the present disclosure;

[0046] Figure 3 A flowchart of a method for obtaining the coordinates of the first corner points of a checkerboard area in a laser radar coordinate system provided by an exemplary embodiment of the present disclosure;

[0047] Figure 4 A flowchart for determining the coordinates of a second target point of a millimeter wave radar provided by an exemplary embodiment of the present disclosure;

[0048] Figure 5 A schematic diagram of a module of a calibration device provided by an exemplary embodiment of the present disclosure;

[0049] Figure 6 A schematic diagram of a calibration plate structure provided for an exemplary embodiment of the present disclosure;

[0050] Figure 7 The present invention is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present invention. DETAILED DESCRIPTION

[0051] The present disclosure is further described below by way of examples, but the present disclosure is not limited to the scope of the examples.

[0052] Prefixes such as "first" and "second" are used in the embodiments of the present disclosure only to distinguish different description objects, and have no limiting effect on the position, order, priority, quantity or content of the described objects. The use of prefixes such as ordinal numbers to distinguish description objects in the embodiments of the present disclosure does not constitute a limitation on the described objects. For the statement of the described objects, please refer to the description in the context of the claims or embodiments, and no unnecessary limitation should be constituted due to the use of such prefixes. In addition, in the description of the present embodiment, unless otherwise specified, the meaning of "plurality" is two or more.

[0053] The present disclosure provides a sensor calibration method, which is implemented based on a calibration plate, which includes a first target point and a second target point. Specifically, the calibration includes a substrate; the first target point is a laser radar point cloud positioning hole drilled on the substrate, and the second target point is a metal corner reflector, wherein the calibration plate may include multiple first target points and multiple second target points. Four first target points and four second target points are used in this embodiment.

[0054] The embodiment of the present invention realizes the joint calibration of multiple sensors, including cameras, laser radars, and millimeter-wave radars. Through the joint calibration of cameras, laser radars, and millimeter-wave radars, the conversion relationship of the coordinate systems of the three can be obtained, and then the data of the three can be unified into one coordinate system (such as the camera coordinate system). Figure 1 , the calibration method includes:

[0055] Step 101, respectively collecting at least two sets of image data, first point cloud data, and second point cloud data; at least two sets of image data are obtained by respectively photographing calibration plates at different positions by a camera; at least two sets of first point cloud data are obtained by respectively scanning calibration plates at different positions by a laser radar; at least two sets of second point cloud data are obtained by respectively scanning calibration plates at different positions by a millimeter wave radar;

[0056] The calibration plate is placed in different positions (at least two positions), and the camera, lidar, and millimeter-wave radar collect data on the calibration plate, thereby obtaining multiple sets of image data collected by the camera, as well as the first point cloud data collected by the corresponding lidar and the second point cloud data collected by the millimeter-wave radar.

[0057] Step 102: determine the first target point coordinates of the first target point on the calibration plate in the laser radar coordinate system according to the first point cloud data.

[0058] In step 102, the first target point coordinates of the first target point on the calibration plate in the laser radar coordinate system Lidar are determined according to the first point cloud data. It can be understood that the first target point coordinates are represented by a point cloud, which is a collection of points and can be represented as Wherein, m represents the first point cloud data of the calibration plate collected for the mth time, and n represents the nth first target point corresponding to the first point cloud data. Represents the point cloud coordinates of the nth first target point in the first point cloud data collected by the laser radar for the mth time.

[0059] Step 103: Determine the coordinates of the second target point on the calibration plate in the millimeter wave radar coordinate system according to the second point cloud data.

[0060] In step 103, the coordinates of the second target point on the calibration plate in the millimeter wave radar angular coordinate system Radar are determined according to the second point cloud data. It can be understood that the coordinates of the second target point are represented by a point cloud, which is a collection of points and can be expressed as in, Represents the point cloud coordinates of the nth second target point in the second point cloud data collected for the mth time by the millimeter wave radar.

[0061] It should be noted that the execution order of step 102 and step 103 is not limited to Figure 2In the illustration, the first target point coordinates are determined first, and then the second target point coordinates are determined; in other implementations, the second target point coordinates may be determined first, and then the first target point coordinates may be determined; or, the determination of the first target point coordinates and the second target point coordinates may be performed simultaneously.

[0062] Step 104, determining the third target point coordinates and the fourth target point coordinates of the first target point and the second target point in the camera space coordinate system according to the image data, and the fifth target point coordinates and the sixth target point coordinates of the first target point and the second target point in the image coordinate system corresponding to the image data.

[0063] Specifically, the radial distortion and tangential distortion of the original camera data are first eliminated through the camera intrinsic parameter information and distortion parameter information. The camera intrinsic parameter matrix K and radial distortion parameter [k 1 ,k 2 ,k 3 ] and the tangential distortion parameter [p 1 ,p 2 ]. The camera internal parameter array K is expressed as:

[0064]

[0065] Based on camera imaging distortion model:

[0066]

[0067] Project the distorted point onto the camera image plane through the intrinsic parameter matrix to obtain the correct position [u,v] of the point on the image:

[0068]

[0069] Get the camera image after dedistortion.

[0070] Obtain the external parameters of the calibration plate-camera based on the calibration plate image data

[0071] T(t x ,t y ,t z ,r x ,r y ,r z )

[0072] The positions of the first target point and the second target point relative to the calibration plate are known (the design parameters of the calibration plate itself). The three-dimensional spatial coordinates of the first target point in the camera space coordinate system can be calculated based on the external parameters of the calibration plate-camera. And the three-dimensional space coordinates of the second target in the camera space coordinate system

[0073] Then, the camera internal parameter K and the distortion coefficient are used to convert the three-dimensional space coordinates of the first target point And the three-dimensional coordinates of the second target Projected to the camera image coordinate system. Where K is the camera intrinsic parameter matrix, K() represents the process of projecting a three-dimensional point in space onto a two-dimensional image plane. r is the Euler angle representing the three rotation parameters, and R(r) represents the form of the rotation matrix. The camera image coordinate system position is corrected according to the distortion parameter model. Where D is the camera distortion model. Thus, the two-dimensional coordinates of the first target point and the second target point in the camera image coordinate system are obtained: And the three-dimensional coordinates in the camera space coordinate system

[0074] Step 105: Use an iterative nearest neighbor algorithm to process the first target point coordinates and the third target point coordinates to obtain a first rotation matrix and a first translation vector from the laser radar coordinate system to the camera space coordinate system, and process the second target point coordinates and the fourth target point coordinates to obtain a second rotation matrix and a second translation vector from the millimeter wave radar coordinate system to the camera space coordinate system.

[0075] In step 105, the nearest neighbor optimization problem is constructed according to the matching relationship, and the initial external rotation matrix from the laser radar to the camera is calculated. with translation vector That is, the first rotation matrix and the first translation vector, and the initial external rotation matrix of the millimeter wave radar to the camera with translation vector That is, the second rotation matrix and the second translation vector. It should satisfy:

[0076]

[0077] Among them, |P| is the number of points, p s is the source point set, i.e., the three-dimensional coordinates of the first target point and the second target point in the camera space coordinate system, i.e., the coordinates of the third target point and the fourth target point. t is the target point set, i.e. the coordinates of the first target point and the second target point. The above formula can be solved by the singular value algorithm, let represents the centroid of the point set, are the coordinates of the points in the origin set, It is the coordinates of the point after removing the centroid. are the point coordinates in the target point set, It is the coordinate of the target point after removing the centroid. After singular value decomposition, we can get H = UΣV T, H is the matrix to be decomposed, U is an orthogonal matrix whose column vector is HH T The eigenvectors of V, ∑ is a diagonal matrix whose diagonal elements are the singular values ​​of H (arranged in descending order). T is another orthogonal matrix whose column vectors are H T The eigenvector of H. Then the initial rotation matrix R init =VU T , the initial translation vector

[0078] Step 106, constructing a first reprojection error of the first target point corresponding to the image coordinate system according to the first rotation matrix, the first translation vector and the fifth target point coordinates, and constructing a second reprojection error of the second target point corresponding to the image coordinate system according to the second rotation matrix, the second translation vector and the sixth target point coordinates;

[0079] In step 106, R LC ,t LC is the first rotation matrix and the first translation vector from the laser radar to the camera, R RC ,t RC is the first rotation matrix and the first translation vector from the millimeter wave radar to the camera. The coordinates of each target point are matched to construct the reprojection error.

[0080] Among them, the first reprojection error of the first target point corresponding to the camera image coordinate system is:

[0081]

[0082] The second reprojection error of the second target point corresponding to the camera image coordinate system is:

[0083]

[0084] Step 107, when the total reprojection error is the minimum value, the final calibration parameters are determined according to the external parameters between the sensors at this time to complete the calibration of the sensor; the total reprojection error is determined according to the first reprojection error and the second reprojection error.

[0085] Specifically, the multi-sensor calibration process is a nonlinear optimization problem, and the goal is to minimize the reprojection error. The optimization algorithm searches in the solution space to find the external parameter combination that minimizes the reprojection error. The total reprojection error can be determined by the sum or weighting of the first reprojection error and the second reprojection error. When the total reprojection error is minimized, the external parameters between the sensors at this time can be used to determine the final calibration parameters to complete the calibration.

[0086] In this embodiment, the initial rotation and translation matrices are estimated based on the iterative nearest neighbor algorithm, so that a good initial value can be obtained at the beginning of the iteration, which can avoid the non-convergence of the iteration caused by improper initial values, reduce the number of steps and calculation amount of the iterative algorithm, and thus speed up the calibration of multiple sensors. The reprojection error is constructed to uniformly iteratively optimize the external parameters of all sensors at one time, reducing the accuracy loss caused by error propagation that may be caused during the coordinate transformation process.

[0087] Figure 2 A flow chart of a method for calculating a third reprojection error provided by an exemplary embodiment of the present disclosure, wherein the calibration plate includes a checkerboard area; the reprojection error also includes a third reprojection error; and the third reprojection error includes:

[0088] Step 201: Filter the first point cloud data by reflection intensity, and retain the point cloud of the black sub-area in the checkerboard area;

[0089] Specifically, the process of extracting corner points and constructing reprojection errors based on the intensity information of the LiDAR checkerboard point cloud is as follows: Figure 3 As shown, Figure 3 (a) Checkerboard point cloud, the reflection intensity distribution of the low-reflection point cloud in the black area is N(μ b ,σ n ), the reflection intensity distribution of high reflection points in the white area is N(μ w ,σ w )(μ w >μ b ). Based on the statistical threshold I thd =(μ b +3σ b ) to filter the point cloud and retain the point cloud in the black grid area, such as Figure 3 (b).

[0090] Step 202: Calculate the point cloud of the black sub-area based on the clustering algorithm of Euclidean distance to obtain the first corner point coordinates of the corner points of the checkerboard area in the laser radar coordinate system;

[0091] like Figure 3 (c) The Euclidean distance-based clustering method in PCL (point cloud library) is used to obtain the center point of the black square. The corner points of the chessboard in the lidar coordinate system are determined by the midpoints of the lines connecting the center points of adjacent black squares, and the coordinates of the corner points are obtained.

[0092] Step 203: construct a third reprojection error according to the first corner point coordinates and the second corner point coordinates of the corner points of the checkerboard area in the camera image coordinate system.

[0093] Specifically, according to the coordinates of the checkerboard corner points in the laser radar coordinate system and the pixel coordinates of the checkerboard corner points in the image data Construct the reprojection error:

[0094]

[0095] In this embodiment, the total reprojection error is the sum of the three E RC +E LC +E chess , or a weighted calculation of the three.

[0096] In this embodiment, a third reprojection error constructed by the checkerboard corner coordinates in the laser radar coordinate system and the checkerboard corner pixel coordinates in the image is added to the reprojection error calculation, so that more matching point pair constraints are introduced between the laser point cloud and the image, thereby improving the accuracy of reprojection error optimization.

[0097] In one embodiment, when the total reprojection error is the minimum value, the final calibration parameters are determined according to the external parameters between the sensors at this time, and the calibration of the sensor is completed, including:

[0098] The first rotation matrix and the second rotation matrix are converted into quaternions, and the minimum value of the sum of the reprojection errors is determined by a nonlinear optimization algorithm based on the quaternions, the first translation vector and the second translation vector. When the total reprojection error is the minimum value, the final calibration parameters are determined based on the external parameters between the sensors at this time to complete the calibration of the sensor.

[0099] Specifically, the first rotation matrix and the second rotation matrix are decoupled into quaternions.

[0100] Suppose there is a rotation matrix R, a is the nine elements of the rotation matrix, then the corresponding quaternion can be expressed as:

[0101]

[0102] Among them, tr(R) is the trace of the matrix. The quaternion, the first translation vector and the second translation vector are used through the ceres-solver nonlinear optimization algorithm to solve the external parameters between the sensors when the total reprojection error is the minimum; the external parameters between the sensors at this time are used to determine the final calibration parameters to complete the calibration of the sensor.

[0103] In this embodiment, the rotation matrix, which has nine variables and must be an orthogonal matrix with a determinant of 1, is converted into a quaternion to remove redundant information for optimization, and the convergence speed of numerical optimization is accelerated based on the initial estimated parameters. Since the operation of quaternions is more concise, the representation and calculation of rotations can be achieved with fewer calculation steps and less memory overhead, thereby improving the calculation speed of the algorithm. And since the quaternion method has better mathematical properties and numerical stability, it is more likely to obtain an accurate solution when solving external parameters through nonlinear optimization methods.

[0104] In one embodiment, the calibration plate includes a point cloud positioning circular hole area, and the point cloud positioning circular hole area is used as a first target point; and determining the coordinates of the first target point of the laser radar according to the first point cloud data includes:

[0105] Generate virtual point cloud data, the virtual point cloud data represents the size, shape and point cloud positioning circular hole area of ​​the calibration plate; match the virtual point cloud data and the first point cloud data based on a grid-based search algorithm, determine the point cloud representing the boundary of the point cloud positioning circular hole area in the first point cloud data, and determine the first center point of the point cloud positioning circular hole area; determine the coordinates of the first center point as the first target coordinates.

[0106] Specifically, the corresponding virtual point cloud data is generated according to the size of the calibration plate and the position of the point cloud positioning circular hole. Matching virtual point cloud data using a grid-based search method And the first point cloud data When the minimum number of points in the first point cloud data falls within the point cloud positioning circular hole (ideally 0), the matching of the virtual point cloud data and the calibration plate point cloud can be completed.

[0107] According to the point cloud positioning circular hole area in the virtual point cloud data, the three-dimensional coordinates of the center position of the point cloud positioning circular hole under the first point cloud data are obtained. This three-dimensional coordinate is determined as the first target point coordinate of the laser radar.

[0108] In this embodiment, the extraction of the first target point coordinates of the laser radar is made more accurate by matching the virtual point cloud data with the point cloud data. And the laser radar first target point feature extraction is made more robust by positioning the circular hole through the point cloud, thus avoiding the abnormal point cloud data collection caused by the placement angle and light of the chessboard when the chessboard is used as the first target point, thereby causing the inaccurate coordinates of the first target point.

[0109] In one embodiment, after the grid-based search algorithm matches the virtual point cloud data with the first point cloud data, the method further includes:

[0110] Based on the virtual point cloud data and the first point cloud data, a minimum error function is constructed. When the number of point clouds in the first point cloud data that fall within the point cloud positioning circular hole area represented by the virtual point cloud data is the minimum, the minimum error function is used to solve the relative position parameters of the first point cloud data and the virtual point cloud data at this time. Through the relative position parameters, the point cloud representing the boundary of the point cloud positioning circular hole area in the first point cloud data is determined, and the first center point of the boundary is determined.

[0111] Specifically, since the calibration plate is usually placed perpendicular to the ground and facing the laser radar at different angles, the yaw angle yaw of the z-axis rotation in the laser radar coordinate system is much larger than the roll angle roll of the x-axis and the pitch angle pitch of the y-axis; at the same time, the height difference between the calibration plate and the laser radar center in the z-axis direction in the laser radar coordinate system is much smaller than the translation in the xy plane. Therefore, the minimum error function can be constructed through the yaw angle yaw and the translation in the x and y directions to optimize the relative pose parameters of the virtual point cloud data in the laser radar coordinate system {L}.

[0112]

[0113] Among them, t x,y is the translation of the calibration plate in the x and y directions in the laser radar coordinate system, R yaw is the yaw angle matrix, and the optimal solution is determined when the number of point clouds in the first point cloud data that fall in the point cloud positioning circular hole area represented by the virtual point cloud data is the minimum. The point cloud representing the boundary of the point cloud positioning circular hole area in the first point cloud data is determined through the relative position parameter, and then the first center point is determined based on the point cloud data of the boundary.

[0114] In this embodiment, by further optimizing the relative posture parameters of the virtual point cloud data and the laser radar coordinates, the first center point position of the laser radar can be obtained more accurately.

[0115] Figure 4 A flowchart for determining the coordinates of the second target point of the millimeter wave radar provided for an exemplary embodiment of the present disclosure. The calibration plate further includes at least N metal reflectors, and the metal reflectors are used as the second target point; determining the coordinates of the second target point of the millimeter wave radar according to the second point cloud data includes:

[0116] Step 301: Filter the second point cloud data according to the reflection intensity distribution to obtain a point cloud filtering result whose reflection intensity is higher than an intensity threshold.

[0117] The point cloud intensity filtering threshold σ is set based on the radar cross-sectional area of ​​the metal corner reflector to filter out the millimeter-wave radar reflection points with reflection intensity higher than σ.

[0118] Step 302: spatially cluster the point cloud filtering results, remove outliers, and retain the point clouds corresponding to each metal reflector.

[0119] The point cloud after intensity filtering is spatially clustered to remove outliers and retain the clustered reflection points on the four radar corner reflectors.

[0120] Step 303: For each metal reflector, weighted calculation is performed on the point cloud corresponding to each metal reflector based on the signal-to-noise ratio weighted algorithm to obtain the second center point coordinates of each reflector in the millimeter wave radar coordinate system, and the second center point coordinates are determined as the second target point coordinates.

[0121] In order to reduce the influence of point cloud noise on the calculation of the coordinates of the center point of the corner reflector, the position of the center point of each corner reflector in the millimeter wave radar coordinate system is weighted based on the signal-to-noise ratio weighting method.

[0122]

[0123] Among them, x i ,y i ,z i The three-dimensional spatial coordinates of the reflection point on each corner reflector, The weighted three-dimensional coordinates of the reflection point on each corner reflector, s i The signal-to-noise ratio for each point.

[0124] In this embodiment, the filtered point cloud data is passed through a spatial clustering algorithm to remove outliers, and then a weighted calculation is performed, so that the coordinates of the second target point of the millimeter wave radar can be obtained more accurately.

[0125] In one embodiment, before determining the first target point coordinates of the first target point on the calibration plate in the laser radar coordinate system according to the first point cloud data, the method further includes:

[0126] The outlier noise points in the first point cloud data are removed based on a point cloud smoothing filtering algorithm.

[0127] To perform filtering and denoising operations on the original lidar point cloud data {P}, the point cloud smoothing filtering method can be used. For each point P(i) = (x(i), y(i), z(i)), its coordinates after smoothing and denoising are P′(i) = (x′(i), y′(i), z′(i)).

[0128] The point cloud smoothing filtering method uses the least squares method to fit the surface and replaces the coordinates of the original point with the value on the surface. Given a point P(i), a set of points P(j) in its surrounding neighborhood is selected, where j represents the point in the neighborhood of P(i). Fit a surface function S(x,y) to represent the surface. Optionally, a quadratic polynomial function is used to fit the surface, that is, S(x,y)=ax 2 +by 2 +cxy+dx++ey+f. The coefficients of the surface function can be solved by the least squares method to minimize the fitting error. After solving the coefficients of the surface function, the surface function can be used to calculate the coordinates of the smoothed point P′(i), that is:

[0129] x′(i)=ax(i) 2 +by(i) 2 +cxiyi+dxi+eyi+f

[0130] y′(i)=ax(i) 2 +by(i) 2 +cxiyi+dxi+eyi+f

[0131] z′(i)=az(i) 2 +bz(i) 2 +cziyi+dzi+ezi+f

[0132] In one embodiment, noise points in the first point cloud data are removed by a point cloud statistical filtering algorithm;

[0133] Specifically, the mean μ and standard deviation σ of the points in the neighborhood of each point P(i) are calculated. If the absolute value of the mean value of the distance point P(i) is greater than a certain threshold (for example, 3 times the standard deviation), the point is determined to be a noise point and removed.

[0134] In one embodiment, the point cloud data is extracted from the first point cloud data using a random sampling consensus algorithm.

[0135] Specifically, the RANSAC method (Random Sample Consensus) is used to extract the plane point cloud where the calibration plate is located from the smoothed denoised point cloud.

[0136] Specifically, in order to extract the plane point cloud where the calibration plate is located in the smoothed and denoised point cloud dataset P, for each point P(i) = (x(i), y(i), z(i)), a threshold T is set to define a point as an in-place point when the distance between the point and the fitting plane is less than the threshold. Set the number of iterations N and the threshold K for the number of in-place points. The iterative process is as follows:

[0137] a. Randomly select a group of points from the point cloud dataset P as samples, and these sample points constitute a candidate plane model.

[0138] b. Calculate the parameters of the plane model through the selected sample points. For example, assuming that the equation of the plane model is Ax+By+Cz+D=0, the plane parameters [A, B, C, D] can be fitted by the least squares method.

[0139] c. Traverse the point cloud dataset P, and for each point P(i), calculate the distance from the point to the fitting plane. The distance calculation can be expressed using the plane equation:

[0140]

[0141] d. Count the number of points whose distance is less than the threshold T. If it meets the threshold K of the number of points within the bureau, the model is selected as the best fitting plane model.

[0142] e. Repeat steps ad until the preset number of iterations N is reached.

[0143] f. Output the set of points in the bureau and project the points onto the desired plane. For a three-dimensional point P(x, y, z), the point coordinates P′(x′, y′, z′) after being projected onto the plane Ax+By+Cz+D=0 can be expressed as

[0144]

[0145] All points projected onto the plane are used as the plane point cloud of the calibration plate. This point cloud data is then used in step 102 to determine the first target point coordinates of the first target point on the calibration plate in the laser radar coordinate system.

[0146] In this embodiment, the first point cloud data is subjected to denoising and plane extraction, the outlier noise points of the original point cloud are removed based on the Gaussian filtering method, and smoothing is performed, the plane area position is located from the original point cloud using the random sampling consistency method, and the point cloud in the first point cloud data is further extracted for subsequent target coordinate determination. The quality and availability of the point cloud data are improved, interference and errors are reduced, and subsequent data calibration is better supported.

[0147] Corresponding to the aforementioned calibration method embodiment, the present disclosure also provides an embodiment of a calibration device.

[0148] Figure 5 A schematic diagram of a module of a calibration device provided by an exemplary embodiment of the present disclosure, the system comprising:

[0149] A sensor calibration device, the positioning device includes a calibration plate and a processor, wherein Figure 6As shown, the calibration includes a substrate 21, optionally a polypropylene plastic plate; a checkerboard area 22; a metal reflector 23 and a laser radar point cloud positioning hole 24 drilled on the substrate. The number and position of the checkerboard area, the point cloud positioning holes and the metal reflectors in the calibration plate are not limited. The processor is used to implement the calibration method in any of the above embodiments. The sensor includes a camera, a laser radar and a millimeter wave radar, wherein the processor includes a data acquisition module 1, a target coordinate confirmation module 2, a rotation matrix and translation vector calculation module 3, a reprojection error construction module 4 and a calculation calibration module 5;

[0150] Data acquisition module 1: used to respectively acquire at least two sets of image data, first point cloud data and second point cloud data; at least two sets of image data are obtained by respectively photographing calibration plates at different positions by the camera; at least two sets of first point cloud data are obtained by respectively scanning calibration plates at different positions by the laser radar; at least two sets of second point cloud data are obtained by respectively scanning calibration plates at different positions by the millimeter wave radar;

[0151] Target coordinate confirmation module 2: used to determine the first target coordinates of the first target on the calibration plate in the laser radar coordinate system according to the first point cloud data. Determine the second target coordinates of the second target on the calibration plate in the millimeter wave radar coordinate system according to the second point cloud data. Determine the third target coordinates and the fourth target coordinates of the first target and the second target in the camera space coordinate system according to the image data, as well as the fifth target coordinates and the sixth target coordinates of the first target and the second target in the image coordinate system corresponding to the image data.

[0152] Rotation matrix and translation vector calculation module 3: used to use the iterative nearest neighbor algorithm to process the first target point coordinates and the third target point coordinates to obtain the first rotation matrix and the first translation vector from the laser radar coordinate system to the camera space coordinate system, and to process the second target point coordinates and the fourth target point coordinates to obtain the second rotation matrix and the second translation vector from the millimeter wave radar coordinate system to the camera space coordinate system.

[0153] Reprojection error construction module 4: used to construct a first reprojection error of the first target corresponding to the image coordinate system based on the first rotation matrix, the first translation vector and the fifth target coordinates, and to construct a second reprojection error of the second target corresponding to the image coordinate system based on the second rotation matrix, the second translation vector and the sixth target coordinates.

[0154] Calculation and calibration module 5: used to determine the final calibration parameters according to the external parameters between the sensors at this time to complete the calibration of the sensor when the total reprojection error is the minimum value; the total reprojection error is determined according to the first reprojection error and the second reprojection error.

[0155] Optionally, the reprojection error construction module 4 is also used to filter the first point cloud data by reflection intensity, retaining the point cloud of the black sub-area in the checkerboard area; calculating the point cloud of the black sub-area based on the Euclidean distance clustering algorithm to obtain the first corner point coordinates of the corner point of the checkerboard area in the lidar coordinate system; and constructing a third reprojection error based on the first corner point coordinates and the second corner point coordinates of the corner point of the checkerboard area in the image coordinate system.

[0156] Optionally, the calculation and calibration module 5 is also used to convert the first rotation matrix and the second rotation matrix into quaternions; the quaternions, the first translation vector and the second translation vector are solved by a nonlinear optimization algorithm, and when the sum of the reprojection errors is the minimum, the final calibration parameters are determined according to the external parameters between the sensors at this time to complete the calibration of the sensor.

[0157] Optionally, the target coordinate confirmation module 2 is also used to generate virtual point cloud data, which represents the size, shape and point cloud positioning circular hole area of ​​the calibration plate; matches the virtual point cloud data and the first point cloud data based on a grid search algorithm, determines the point cloud representing the boundary of the point cloud positioning circular hole area in the first point cloud data, and determines the first center point of the point cloud positioning circular hole area; determines the coordinates of the first center point as the first target coordinates.

[0158] Optionally, the target coordinate confirmation module 2 is also used to construct a minimum error function based on the virtual point cloud data and the first point cloud data; when the number of point clouds in the first point cloud data that fall within the point cloud positioning circular hole area represented by the virtual point cloud data is a minimum, the minimum error function is used to solve the relative position parameters of the first point cloud data and the virtual point cloud data at this time; through the relative position parameters, the point cloud representing the boundary of the point cloud positioning circular hole area in the first point cloud data is determined, and the first center point of the boundary is determined.

[0159] Optionally, the target coordinate confirmation module 2 is also used to filter the second point cloud data according to the reflection intensity distribution to obtain a point cloud filtering result with a reflection intensity higher than an intensity threshold; spatially cluster the point cloud filtering results to remove outliers and retain the point cloud corresponding to each metal reflector; for each metal reflector, weighted calculation is performed on the point cloud corresponding to each metal reflector based on a signal-to-noise ratio weighted algorithm to obtain the second center point coordinates of each reflector in the millimeter wave radar coordinate system; and the second center point coordinates are determined as the second target coordinates.

[0160] Optionally, the processor also includes a preprocessing module, which is used to remove outlier noise points in the first point cloud data based on a point cloud smoothing filtering algorithm; remove noise points in the first point cloud data through a point cloud statistical filtering algorithm; and extract point cloud data from the first point cloud data using a random sampling consistency algorithm.

[0161] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only illustrative, wherein the units described as separate components may or may not be physically separated, and the components as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the disclosed solution.

[0162] Figure 7 This is a structural diagram of an electronic device shown in an example embodiment of the present disclosure, the electronic device includes a memory, a processor, and a computer program stored in the memory and used to run on the processor, and the processor implements the calibration method described in any of the above embodiments when executing the computer program. Figure 7 The electronic device 70 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0163] like Figure 7 As shown, the electronic device 70 may be in the form of a general-purpose computing device, for example, it may be a server device. The components of the electronic device 70 may include, but are not limited to: at least one processor 71, at least one memory 72, and a bus 73 connecting different system components (including the memory 72 and the processor 71).

[0164] The bus 73 includes a data bus, an address bus, and a control bus.

[0165] The memory 72 may include a volatile memory, such as a random access memory (RAM) 721 and / or a cache memory 722 , and may further include a read-only memory (ROM) 723 .

[0166] The memory 72 may also include a program tool 725 (or utility) having a set (at least one) of program modules 724, such program modules 724 including but not limited to: an operating system, one or more application programs, other program modules and program data, each of which or some combination may include an implementation of a network environment.

[0167] The processor 71 executes various functional applications and data processing by running the computer program stored in the memory 72, such as the calibration method provided in any of the above embodiments.

[0168] The electronic device 70 may also communicate with one or more external devices 74 (e.g., keyboards, pointing devices, etc.). Such communication may be performed via an input / output (I / O) interface 75. Furthermore, the electronic device 70 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 76. As shown, the network adapter 76 communicates with other modules of the electronic device 70 via a bus 73. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 70, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems, etc.

[0169] It should be noted that although several units / modules or sub-units / modules of the electronic device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided into multiple units / modules to be embodied.

[0170] The embodiments of the present disclosure further provide a computer-readable storage medium having a computer program stored thereon, and when the program is executed by a processor, the calibration method provided by any of the above embodiments is implemented.

[0171] The readable storage medium may include but is not limited to: a portable disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical storage device, a magnetic storage device or any suitable combination of the above.

[0172] The embodiments of the present disclosure further provide a computer program product, including a computer program, which implements the calibration method provided in any of the above embodiments when executed by a processor.

[0173] Among them, the program code for executing the computer program product of the present disclosure can be written in any combination of one or more programming languages, and the program code can be executed completely on the user device, partially on the user device, as an independent software package, partially on the user device and partially on a remote device, or completely on the remote device.

[0174] Although the specific embodiments of the present disclosure are described above, those skilled in the art should understand that this is only an example, and the protection scope of the present disclosure is defined by the appended claims. Those skilled in the art may make various changes or modifications to these embodiments without departing from the principles and essence of the present disclosure, but these changes and modifications all fall within the protection scope of the present disclosure.

Claims

1. A sensor calibration method, characterized in that: The calibration method is based on a calibration plate, the calibration plate includes a first target point and a second target point; the sensor includes a camera, a laser radar and a millimeter wave radar, and the calibration method includes: At least two sets of image data, first point cloud data and second point cloud data are collected respectively; at least two sets of image data are obtained by respectively photographing calibration plates at different positions by a camera; at least two sets of first point cloud data are obtained by respectively scanning calibration plates at different positions by a laser radar; at least two sets of second point cloud data are obtained by respectively scanning calibration plates at different positions by a millimeter wave radar; Determine the first target point coordinates of the first target point on the calibration plate in the laser radar coordinate system according to the first point cloud data; Determine the coordinates of a second target point on the calibration plate in a millimeter-wave radar coordinate system according to the second point cloud data; Determine, according to the image data, third target point coordinates and fourth target point coordinates of the first target point and the second target point in the camera space coordinate system, as well as fifth target point coordinates and sixth target point coordinates of the first target point and the second target point in the image coordinate system corresponding to the image data; The first target point coordinates and the third target point coordinates are processed by an iterative nearest neighbor algorithm to obtain a first rotation matrix and a first translation vector from the laser radar coordinate system to the camera space coordinate system, and the second target point coordinates and the fourth target point coordinates are processed to obtain a second rotation matrix and a second translation vector from the millimeter wave radar coordinate system to the camera space coordinate system; Construct a first reprojection error of the first target point corresponding to the image coordinate system according to the first rotation matrix, the first translation vector and the fifth target point coordinates, and construct a second reprojection error of the second target point corresponding to the image coordinate system according to the second rotation matrix, the second translation vector and the sixth target point coordinates; When the total reprojection error is the minimum, the final calibration parameters are determined according to the external parameters between the sensors at this time to complete the sensor calibration; The total reprojection error is determined based on the first reprojection error and the second reprojection error.

2. The calibration method according to claim 1, characterized in that: The calibration plate includes a checkerboard area; the total reprojection error is determined according to the first reprojection error, the second reprojection error and the third reprojection error; the third reprojection error is obtained by the following steps: Filtering the first point cloud data by reflection intensity, and retaining the point cloud of the black sub-area in the checkerboard area; The point cloud of the black sub-area is calculated based on a clustering algorithm of Euclidean distance to obtain the first corner point coordinates of the corner points of the checkerboard area in the laser radar coordinate system; A third reprojection error is constructed according to the first corner point coordinates and the second corner point coordinates of the corner points of the checkerboard area in the image coordinate system.

3. The calibration method according to any one of claims 1 or 2, characterized in that: When the total reprojection error is the minimum value, the final calibration parameters are determined according to the external parameters between the sensors at this time, and the calibration of the sensor is completed, including: Convert the first rotation matrix and the second rotation matrix into quaternions; The quaternion, the first translation vector and the second translation vector are solved by a nonlinear optimization algorithm, and when the sum of the reprojection errors is the minimum, the final calibration parameters are determined according to the external parameters between the sensors at this time to complete the calibration of the sensor.

4. The calibration method according to claim 1, characterized in that: The calibration plate includes a point cloud positioning circular hole area, and the point cloud positioning circular hole area is used as the first target point; and determining the first target point coordinates of the laser radar according to the first point cloud data includes: Generate virtual point cloud data, wherein the virtual point cloud data represents the size, shape and point cloud positioning circular hole area of ​​the calibration plate; Matching the virtual point cloud data and the first point cloud data with a grid-based search algorithm, determining a point cloud representing a boundary of a point cloud positioning circular hole area in the first point cloud data, and determining a first center point position of the point cloud positioning circular hole area; The first center point coordinates are determined as the first target point coordinates.

5. The calibration method according to claim 4, characterized in that: After the grid-based search algorithm matches the virtual point cloud data and the first point cloud data, the method further includes: Constructing a minimum error function based on the virtual point cloud data and the first point cloud data; When the number of point clouds in the first point cloud data falling in the point cloud positioning circular hole area represented by the virtual point cloud data is a minimum value, the minimum error function is used to solve the relative position parameters of the first point cloud data and the virtual point cloud data at this time; The point cloud representing the boundary of the point cloud positioning circular hole area in the first point cloud data is determined by using the relative position parameters, and the first center point position of the boundary is determined.

6. The calibration method according to claim 1, characterized in that: The calibration plate further includes at least N metal reflectors, and the metal reflectors serve as the second target points; Determining the coordinates of the second target point of the millimeter wave radar according to the second point cloud data includes: filtering the second point cloud data according to the reflection intensity distribution to obtain a point cloud filtering result having a reflection intensity higher than an intensity threshold; Performing spatial clustering on the point cloud filtering results, removing outliers, and retaining the point cloud corresponding to each metal reflector; For each metal reflector, weighted calculation is performed on the point cloud corresponding to each metal reflector based on the signal-to-noise ratio weighted algorithm to obtain the coordinates of the second center point of each reflector in the millimeter-wave radar coordinate system; The second center point coordinates are determined as the second target point coordinates.

7. The calibration method according to claim 1, characterized in that: Before determining the first target point coordinates of the first target point on the calibration plate in the laser radar coordinate system according to the first point cloud data, the method further includes: Removing outlier noise points in the first point cloud data based on a point cloud smoothing filtering algorithm; and / or removing noise points in the first point cloud data by using a point cloud statistical filtering algorithm; And / or extracting point cloud data from the first point cloud data using a random sampling consistency algorithm.

8. A sensor calibration device, characterized in that: The calibration device comprises a calibration plate and a processor, wherein the calibration plate comprises a checkerboard area, a point cloud positioning circular hole and a metal reflector, and the processor is used to implement the calibration method according to any one of claims 1 to 7.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and used to run on the processor, characterized in that: When the processor executes the computer program, the calibration method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the calibration method according to any one of claims 1 to 7 is implemented.

11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the calibration method according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • External parameter registration and inter-frame loading method based on laser radar and camera

    CN119762594A