A multi-sensor calibration method and device for autonomous driving vehicles
Calculate the multi-sensor internal and external parameters of autonomous vehicles through camera image synchronization and scene reconstruction, and optimize the external parameters by combining wheel speed encoder and lidar data, solving the problem of multi-sensor calibration accuracy and convenience, and achieving efficient and accurate Automatic calibration and data processing.
Patent Information
- Application Number
- CN202010896379.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-31
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2040-08-31
AI Technical Summary
The accuracy of multi-sensor calibration of autonomous vehicles is poor. Existing methods require manual operation and rely on calibration sites, which are costly and inconvenient.
By acquiring camera images, performing synchronization and feature matching, scene reconstruction is used to calculate the internal and external parameters of the camera, and the wheel speed encoder and lidar data are used to optimize the external parameters to achieve automatic calibration and reduce manual participation and calibration field requirements.
It improves the accuracy and convenience of multi-sensor calibration, reduces costs, enables real-time calibration during the driving of autonomous vehicles, and ensures the accuracy and safety of data processing.
Smart Images

Figure CN114219852B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of autonomous driving technology, and in particular to a multi-sensor calibration method and device for an autonomous driving vehicle. Background Art
[0002] In the multi-sensor solution of autonomous driving, how to conveniently and accurately calibrate the intrinsic parameters of the sensors and the extrinsic parameters between sensors has always been a challenging problem.
[0003] Known multi-sensor calibration methods usually require manual operation. For example, when calibrating multiple cameras of an autonomous vehicle, a calibration plate needs to be manually held so that the calibrated camera can capture the calibration plate at various viewing angles. However, such operations often require experienced technicians to operate, and the accuracy is poor. Therefore, in order to improve the accuracy of multi-sensor calibration, a multi-sensor calibration method is urgently needed. Summary of the invention
[0004] The present invention provides a multi-sensor calibration method and device for an autonomous driving vehicle to improve the accuracy of multi-sensor calibration. The specific technical solution is as follows.
[0005] In a first aspect, an embodiment of the present invention provides a multi-sensor calibration method for an autonomous driving vehicle, wherein the autonomous driving vehicle is equipped with multiple cameras, and the method comprises:
[0006] Acquire the camera images captured by each camera and the acquisition time corresponding to each camera image; synchronize each camera image according to the acquisition time of each camera image to obtain each image set; each image set contains a camera image captured by each camera, and the difference between the acquisition times of any two camera images in each image set is less than a preset time threshold;
[0007] Extracting feature points from each of the camera images, and performing feature matching on every two camera images according to the extracted feature points to obtain image matching pairs;
[0008] Reconstructing the scene according to each image matching pair to obtain the pose of each camera image and the 3D point coordinates of the world system corresponding to the feature points included in each camera image;
[0009] Determine a main camera among the cameras, and calculate the main camera coordinate system corresponding to each image set according to the pose of the camera image collected by the main camera in each image set; for each other camera, calculate the restored pose of the camera in each main camera coordinate system according to the pose of the camera image collected by the camera in each image set and the main camera coordinate system corresponding to each image set, and calculate the initial extrinsic parameters of the camera relative to the main camera according to each restored pose;
[0010] According to the coordinate system of the main camera, the initial external parameters of each other camera relative to the main camera, and the 3D point coordinates of the world system corresponding to each feature point, the preset optimization function is optimized to obtain the intrinsic parameters of each camera and the external parameters of each other camera relative to the main camera.
[0011] Optionally, the steps of calculating the main camera coordinate system corresponding to each image set according to the pose of the main camera image captured by the main camera in each image set; for each other camera, calculating the restored pose of the camera in each main camera coordinate system according to the pose of the camera image captured by the camera in each image set and the main camera coordinate system corresponding to each image set, and calculating the initial external parameters of the camera relative to the main camera according to each restored pose include:
[0012] For each image set, determining a main camera coordinate system corresponding to the image set as the position and posture of the camera image captured by the main camera in the image set;
[0013] For each other camera, the restored pose of the camera in any main camera coordinate system is determined as the product of the pose of the camera image captured by the camera in the image set corresponding to the main camera coordinate system and the inverse of the main camera coordinate system; the initial external parameter of the camera relative to the main camera is determined as the average value of the restored poses of the camera in each main camera coordinate system.
[0014] Optionally, the step of optimizing a preset optimization function according to the coordinate system of the main camera, the initial external parameters of each other camera relative to the main camera, and the 3D point coordinates of the world system corresponding to each feature point to obtain the intrinsic parameters of each camera and the external parameters of each other camera relative to the main camera includes:
[0015] The intrinsic parameters of each camera and the extrinsic parameters of each camera relative to the main camera are optimized according to the following formula:
[0016]
[0017] represents the coordinate system of the main camera h at time j, represents the external parameter of camera i relative to the main camera h, θ i represents the internal parameter of camera i, I represents the set of all cameras, J represents the set of all acquisition moments, and p w is the coordinate of the 3D point in the world system, u is the coordinate of the pixel in the camera image that matches the 3D point, is the camera internal parameter θ i Determines the projection model of the camera.
[0018] Optionally, the method further includes:
[0019] Calculate the relative pose between adjacent main camera images according to the camera images, the intrinsic parameters of the cameras, and the extrinsic parameters of the other cameras relative to the main camera;
[0020] For each frame of the main camera image, determine the time from the acquisition time of the main camera image to the acquisition time of the previous frame of the main camera image as the integration time;
[0021] Acquire pulses output by a wheel speed encoder, and sequentially integrate the pulses for each integration time according to an input wheel radius to obtain the inter-frame pose of the unmanned vehicle;
[0022] According to the relative poses between the adjacent main camera images and the poses between the frames, the initial values of the external parameters of the multi-camera module composed of the multiple cameras relative to the wheel speed are estimated; the initial values of the external parameters include: pitch angle, roll angle, yaw angle, scale, lateral translation and longitudinal translation;
[0023] Optimizing the wheel radius to obtain an optimized wheel radius;
[0024] The pulses are integrated for each integration time in sequence according to the optimized wheel radius to obtain the optimized inter-frame posture of the wheel of the unmanned vehicle; the external parameters of the multi-camera module relative to the wheel speed are calculated according to the relative posture between adjacent main camera images and the optimized inter-frame posture.
[0025] Optionally, the step of estimating the initial value of the external parameter of the multi-camera module composed of the multiple cameras relative to the wheel speed according to the relative poses between the adjacent main camera images and the poses between the frames includes:
[0026] Identify a rotation component in each of the inter-frame poses, obtain a yaw angle corresponding to the inter-frame pose by Euler angle decomposition according to the rotation component, and calculate an angular velocity according to the yaw angle;
[0027] The inter-frame pose with an angular velocity greater than a preset threshold is used as the target inter-frame pose, and the relative pose at the time corresponding to the inter-frame pose is used as the target relative pose;
[0028] Solve the pitch angle and roll angle, and based on the target inter-frame pose and target relative pose, obtain the preliminary results of the external parameters from the camera system to the wheel speed system through singular value decomposition SVD Multiply the relative position of each target by As the updated target relative pose, SVD decomposition is performed again to obtain the external parameters from the camera system to the wheel speed system. When the change value of the external parameter result is less than the preset change threshold, the yaw angle, scale, lateral translation and longitudinal translation are obtained.
[0029] Optionally, the step of solving the pitch angle and the roll angle includes:
[0030] Obtain the Lidar point cloud within the time range of each main camera image acquisition, and perform plane fitting on the Lidar point cloud to obtain the ground plane normal vector v in the Lidar system l , obtain the external parameters of the Lidar system and the camera system, and calculate the v according to the external parameters of the Lidar system and the camera system l The ground plane normal vector v in the camera frame c , calculate v c The ground plane normal vector v in the wheel speed system o angles to obtain the pitch and roll angles; or
[0031] Perform plane fitting on the positions of each main camera image relative to the first frame main camera image to obtain the ground plane normal vector v in the camera system c , calculate v c The ground plane normal vector v in the wheel speed system o angles to obtain the pitch and roll angles; or
[0032] In the relative pose between the adjacent main camera images and the pose between each frame, a rotation component is identified, a relationship including a pitch angle and a roll angle is constructed based on the identified rotation component, and the relationship is subjected to SVD decomposition to obtain the pitch angle and the roll angle.
[0033] Optionally, the step of optimizing the wheel radius to obtain an optimized wheel radius includes:
[0034] The wheel radius r is optimized using the following formula:
[0035]
[0036] represents the external parameters of the multi-camera module relative to the wheel speed, express The rotation component of express The translation component of Represents the translation component of the pose matrix between frames, Represents the translation component of each relative pose matrix, s represents the scale, and I represents the identity matrix.
[0037] Optionally, the method further includes:
[0038] For each of the other cameras, the product of the external parameters of the camera relative to the main camera and the inverse matrix of the external parameters of the multi-camera module relative to the wheel speed is determined as the external parameters of the camera in the wheel speed system.
[0039] In a second aspect, an embodiment of the present invention provides a multi-sensor calibration device for an autonomous driving vehicle, wherein the autonomous driving vehicle is equipped with multiple cameras, and the device comprises:
[0040] A camera image acquisition module, used to acquire the camera images acquired by each of the cameras and the acquisition time corresponding to each of the camera images; synchronize the camera images according to the acquisition time of each of the camera images to obtain each image set; each image set contains a camera image acquired by each of the cameras, and the difference between the acquisition times of any two camera images in each image set is less than a preset time threshold;
[0041] A camera image matching module, used to extract feature points from each of the camera images, and perform feature matching on every two camera images based on the extracted feature points to obtain image matching pairs;
[0042] A scene reconstruction module, used to reconstruct the scene according to each image matching pair, and obtain the pose of each camera image and the 3D point coordinates of the world system corresponding to the feature points included in each camera image;
[0043] An initial external parameter determination module is used to determine a main camera among the cameras, and calculate the main camera coordinate system corresponding to each image set according to the pose of the camera image collected by the main camera in each image set; for each other camera, calculate the restored pose of the camera in each main camera coordinate system according to the pose of the camera image collected by the camera in each image set and the main camera coordinate system corresponding to each image set, and calculate the initial external parameter of the camera relative to the main camera according to each restored pose;
[0044] The external parameter optimization module is used to optimize the preset optimization function according to the coordinate system of the main camera, the initial external parameters of each other camera relative to the main camera, and the 3D point coordinates of the world system corresponding to each feature point, so as to obtain the internal parameters of each camera and the external parameters of each other camera relative to the main camera.
[0045] Optionally, the initial external parameter determination module is specifically used to:
[0046] For each image set, determining a main camera coordinate system corresponding to the image set as the position and posture of the camera image captured by the main camera in the image set;
[0047] For each other camera, the restored pose of the camera in any main camera coordinate system is determined as the product of the pose of the camera image captured by the camera in the image set corresponding to the main camera coordinate system and the inverse of the main camera coordinate system; the initial external parameter of the camera relative to the main camera is determined as the average value of the restored poses of the camera in each main camera coordinate system.
[0048] Optionally, the external parameter optimization module is specifically used to:
[0049] The intrinsic parameters of each camera and the extrinsic parameters of each camera relative to the main camera are optimized according to the following formula:
[0050]
[0051] represents the coordinate system of the main camera h at time j, represents the external parameter of camera i relative to the main camera h, θ i represents the internal parameter of camera i, I represents the set of all cameras, J represents the set of all acquisition moments, and p w is the coordinate of the 3D point in the world system, u is the coordinate of the pixel in the camera image that matches the 3D point, is the camera internal parameter θ i Determines the projection model of the camera.
[0052] Optionally, the device further comprises:
[0053] A relative pose calculation module, used to calculate the relative pose between each adjacent main camera image based on each camera image, the intrinsic parameters of each camera, and the extrinsic parameters of each other camera relative to the main camera;
[0054] An integration time determination module, used for determining, for each frame of the main camera image, the time between the acquisition time of the main camera image and the acquisition time of the previous frame of the main camera image as the integration time;
[0055] An inter-frame pose calculation module is used to obtain pulses output by a wheel speed encoder, and to integrate the pulses for each integration time in sequence according to an input wheel radius to obtain each inter-frame pose of the unmanned vehicle;
[0056] An external parameter initial value estimation module is used to estimate the initial external parameter values of the multi-camera module composed of the multiple cameras relative to the wheel speed according to the relative postures between the adjacent main camera images and the postures between the frames; the initial external parameter values include: pitch angle, roll angle, yaw angle, scale, lateral translation and longitudinal translation;
[0057] A wheel radius optimization module, used for optimizing the wheel radius to obtain an optimized wheel radius;
[0058] The wheel speed extrinsic parameter calculation module is used to integrate the pulses for each integration time in sequence according to the optimized wheel radius to obtain the optimized inter-frame posture of the unmanned vehicle; according to the relative posture between adjacent main camera images and the optimized inter-frame posture, the extrinsic parameters of the multi-camera module relative to the wheel speed are calculated.
[0059] Optionally, the external parameter initial value estimation module includes:
[0060] An angular velocity calculation submodule, used for identifying a rotation component in each of the inter-frame postures, obtaining a yaw angle corresponding to the inter-frame posture by Euler angle decomposition according to the rotation component, and calculating an angular velocity according to the yaw angle;
[0061] A target posture determination submodule is used to take the inter-frame posture with an angular velocity greater than a preset threshold as the target inter-frame posture, and the relative posture at the moment corresponding to the inter-frame posture as the target relative posture;
[0062] The external parameter estimation submodule is used to solve the pitch angle and roll angle, and based on the target inter-frame pose and target relative pose, obtain the preliminary results of the camera-to-wheel speed system external parameters through singular value decomposition SVD Multiply the relative position of each target by As the updated target relative pose, SVD decomposition is performed again to obtain the external parameters from the camera system to the wheel speed system. When the change value of the external parameter result is less than the preset change threshold, the yaw angle, scale, lateral translation and longitudinal translation are obtained.
[0063] Optionally, the extrinsic parameter estimation submodule is specifically used to:
[0064] Obtain the Lidar point cloud within the time range of each main camera image acquisition, and perform plane fitting on the Lidar point cloud to obtain the ground plane normal vector v in the Lidar system l , obtain the external parameters of the Lidar system and the camera system, and calculate the v according to the external parameters of the Lidar system and the camera system l The ground plane normal vector v in the camera frame c , calculate v c The ground plane normal vector v in the wheel speed system o angles to obtain the pitch and roll angles; or
[0065] Perform plane fitting on the positions of each main camera image relative to the first frame main camera image to obtain the ground plane normal vector v in the camera system c , calculate v c The ground plane normal vector v in the wheel speed system o angles to obtain the pitch and roll angles; or
[0066] In the relative pose between the adjacent main camera images and the pose between each frame, a rotation component is identified, a relationship including a pitch angle and a roll angle is constructed based on the identified rotation component, and the relationship is subjected to SVD decomposition to obtain the pitch angle and the roll angle.
[0067] Optionally, the wheel radius optimization module is specifically used to:
[0068] The wheel radius r is optimized using the following formula:
[0069]
[0070] represents the external parameters of the multi-camera module relative to the wheel speed, express The rotation component of express The translation component of Represents the translation component of the pose matrix between frames, Represents the translation component of each relative pose matrix, s represents the scale, and I represents the identity matrix.
[0071] Optionally, the device further comprises:
[0072] The coordinate conversion module is used to determine, for each of the other cameras, the product of the external parameters of the camera relative to the main camera and the inverse matrix of the external parameters of the multi-camera module relative to the wheel speed as the external parameters of the camera in the wheel speed system.
[0073] From the above content, it can be seen that the multi-sensor calibration method and device for autonomous driving vehicles provided by the embodiment of the present invention can reconstruct the scene according to the camera images collected by each camera, obtain the pose of each camera image and the 3D point coordinates corresponding to the feature points included in each camera image, and the scene reconstruction result can reflect the positional relationship between the cameras, so that the internal parameters of each camera and the external parameters of each camera relative to the main camera can be calculated according to the scene reconstruction result. The entire calibration method does not require manual participation and does not require the assistance of any external objects. The results are objective and accurate, thereby improving the accuracy of camera calibration. In addition, the camera calibration process in this embodiment does not require the construction of a fixed site such as a calibration field, thereby reducing capital investment and saving the cost of camera calibration. In addition, compared with the construction of a calibration field for camera calibration, the solution of the embodiment of the present invention can perform camera calibration when the autonomous driving vehicle travels to any area, thereby improving the convenience of camera calibration. Of course, it is not necessary to achieve all the advantages described above at the same time to implement any product or method of the present invention.
[0074] The innovative features of the embodiments of the present invention include:
[0075] 1. It is possible to reconstruct the scene based on the camera images collected by each camera, obtain the pose of each camera image and the 3D point coordinates corresponding to the feature points included in each camera image, and the scene reconstruction result can reflect the positional relationship between the cameras, so that the internal parameters of each camera and the external parameters of each camera relative to the main camera can be calculated based on the scene reconstruction result. The entire calibration method does not require human participation or the assistance of any external objects, and the results are objective and accurate, thereby improving the accuracy of camera calibration. Moreover, the camera calibration process in this embodiment does not require the construction of a fixed site such as a calibration field, thereby reducing capital investment and saving the cost of camera calibration. In addition, compared with the construction of a calibration field for camera calibration, the solution of the embodiment of the present invention can perform camera calibration when the autonomous driving vehicle travels to any area, thereby improving the convenience of camera calibration.
[0076] 2. After calibrating the multi-camera module, the wheel speed can also be calibrated based on the camera intrinsic and extrinsic parameters obtained by the calibration to obtain the external parameters of the multi-camera module relative to the wheel speed. In this way, during the driving of the autonomous driving vehicle, the data collected by each sensor can be accurately processed, thereby ensuring the safety of the autonomous driving vehicle.
[0077] 3. In the inter-frame pose, a larger angular velocity indicates sufficient excitation. In the wheel speed calibration process, the inter-frame pose with a larger angular velocity is selected, and the relative pose at the corresponding moment to the selected inter-frame pose is used to calculate the external parameters of the multi-camera module relative to the wheel speed, which can improve the accuracy of the external parameter calibration.
[0078] 4. When calibrating the wheel speed, the manually measured wheel radius will have errors, which will affect the accuracy of the inter-frame pose. Therefore, after obtaining the initial value of the extrinsic parameter, the wheel radius is optimized, and the extrinsic parameter of the multi-camera module relative to the wheel speed is calculated based on the optimized wheel radius, which can improve the accuracy of the extrinsic parameter calculation.
[0079] 5. When calibrating the camera, the calculated camera extrinsics are all based on the main camera as the reference system. In the unmanned vehicle system, we need to use the vehicle system, that is, the wheel speed system, as the reference system. Therefore, the extrinsic parameters of each camera in the main camera reference system can be converted to the wheel speed system, which can improve the accuracy of data processing when processing the data collected by each sensor in the subsequent process. BRIEF DESCRIPTION OF THE DRAWINGS
[0080] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative work.
[0081] Figure 1 A schematic diagram of a flow chart of a multi-sensor calibration method for an autonomous driving vehicle provided by an embodiment of the present invention;
[0082] Figure 2 Another schematic diagram of a multi-sensor calibration method for an autonomous driving vehicle provided by an embodiment of the present invention;
[0083] Figure 3 A schematic diagram of the structure of a multi-sensor calibration device for an autonomous driving vehicle provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0084] The following will be combined with the accompanying drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0085] It should be noted that the terms "including" and "having" and any variations thereof in the embodiments of the present invention and the accompanying drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.
[0086] The embodiment of the present invention discloses a multi-sensor calibration method and device for an autonomous driving vehicle, which can improve the accuracy of multi-sensor calibration. The embodiment of the present invention is described in detail below.
[0087] Figure 1 A schematic flow chart of a multi-sensor calibration method for an autonomous driving vehicle provided in an embodiment of the present invention. The method is applied to an autonomous driving vehicle. The method specifically includes the following steps.
[0088] S110: Obtain camera images captured by each camera and the corresponding acquisition time of each camera image; synchronize the camera images according to the acquisition time of each camera image to obtain each image set; each image set contains a camera image captured by each camera, and the difference between the acquisition times of any two camera images in each image set is less than a preset time threshold.
[0089] In the embodiment of the present invention, when calibrating a multi-camera module, the data input is the camera image captured by each camera, wherein each camera image is marked with a corresponding timestamp, that is, the time when each camera image was captured. The data output is the internal parameters of each camera and the external parameters between cameras.
[0090] In the embodiment of the present invention, each camera can be synchronized in advance, and each camera can be set to have the same image acquisition cycle to ensure that each camera acquires images at the same time. However, in practical applications, due to differences in the clock crystals of each camera, the time when each camera acquires the camera image is not exactly the same. In addition, when calibrating the camera, it is necessary to compare the camera images acquired by each camera at the same time to determine the positional relationship between the cameras, and then calibrate the internal parameters of each camera and the external parameters between the cameras.
[0091] Therefore, after acquiring each camera image, each camera image can be synchronized to obtain each image set. In other words, the camera images acquired at the same time can be determined to accurately perform camera calibration.
[0092] For example, when cameras A, B, C, D, and E are installed in an autonomous driving vehicle, and camera images 1, 2, 3, 4, 5, and 6 are acquired by camera A; camera images 7, 8, 9, 10, 11, and 12 are acquired by camera B; camera images 13, 14, 15, 16, 17, and 18 are acquired by camera C; camera images 19, 20, 21, 22, 23, and 24 are acquired by camera D; and camera images 25, 26, 27, 28, 29, and 30 are acquired by camera E, after synchronizing the camera images, the following image sets can be obtained respectively:
[0093] 1. {1, 7, 13, 19, 25}
[0094] II. {2, 8, 14, 20, 26}
[0095] III. {3, 9, 15, 21, 27}
[0096] IV. {4, 10, 16, 22, 28}
[0097] 5. {5, 11, 17, 23, 29}
[0098] VI. {6, 12, 18, 24, 30}.
[0099] S120: extracting feature points from each camera image, and performing feature matching on every two camera images according to the extracted feature points to obtain image matching pairs.
[0100] For example, the SIFT (Scale-invariant feature transform) algorithm can be used to extract feature points in each camera image. When performing feature matching on each pair of camera images, the epipolar geometry can be calculated for each image matching pair, the fundamental matrix or essential matrix can be estimated, and the matching pair can be optimized and improved through the Random Sample Consensus (RANSAC) algorithm.
[0101] S130: Reconstruct the scene according to each image matching pair to obtain the position and posture of each camera image and the 3D point coordinates of the world system corresponding to the feature points included in each camera image.
[0102] For example, you can first initialize and select two frames of camera images for the first bundle adjustment (Bundle Adjustment, BA), then cyclically add new camera images for new BA optimization, and finally until all camera images are added to the BA optimization, at this time you will get the poses of all camera images and the visual point cloud map of the scene, that is, the 3D point coordinates of the world system corresponding to the feature points included in each camera image.
[0103] S140: Determine a main camera among the cameras, and calculate the main camera coordinate system corresponding to each image set according to the pose of the camera image collected by the main camera in each image set; for each other camera, calculate the restored pose of the camera in each main camera coordinate system according to the pose of the camera image collected by the camera in each image set and the main camera coordinate system corresponding to each image set, and calculate the initial extrinsic parameters of the camera relative to the main camera according to each restored pose.
[0104] In one implementation, any camera may be determined as the main camera. After the main camera is determined, for each image set, the main camera coordinate system corresponding to the image set may be determined as the pose of the camera image captured by the main camera in the image set; for each other camera, the restored pose of the camera in any main camera coordinate system may be determined as the product of the pose of the camera image captured by the camera in the image set corresponding to the main camera coordinate system and the inverse of the main camera coordinate system.
[0105] For example, when the camera image captured by the i-th camera in any image set is obtained through the locator, the pose is The 0th camera is the main camera, and the coordinate system of the main camera is: The restored pose of the i-th camera in the main camera coordinate system
[0106] After determining the main camera coordinate system corresponding to each image set and the restored pose of each other camera in the main camera coordinate system, the initial external parameter of each other camera relative to the main camera can be determined as the average value of the restored pose of the camera in each main camera coordinate system. Calculating the external parameter estimation of each other camera relative to the main camera through multiple image sets can improve the accuracy of the calculation results.
[0107] S150: Optimize the preset optimization function according to the coordinate system of the main camera, the initial external parameters of each other camera relative to the main camera, and the 3D point coordinates of each feature point in the world system to obtain the intrinsic parameters of each camera and the external parameters of each other camera relative to the main camera.
[0108] In one implementation, the intrinsic parameters of each camera and the extrinsic parameters of each camera relative to the main camera may be optimized according to the following formula:
[0109]
[0110] represents the coordinate system of the main camera h at time j, represents the external parameter of camera i relative to the main camera h, θ i represents the internal parameter of camera i, I represents the set of all cameras, J represents the set of all acquisition moments, and p w is the coordinate of the 3D point in the world system, u is the coordinate of the pixel in the camera image that matches the 3D point, is the camera internal parameter θ i Determines the projection model of the camera.
[0111] When optimizing using the above formula, what is optimized are the intrinsic parameters of all cameras, the extrinsic parameters of each camera relative to the main camera, and the coordinate system of the main camera at time j. And the coordinates of each 3D point p w .
[0112] In practical applications, the intrinsic parameters of each camera and the external parameters of each camera relative to the main camera can be continuously optimized during the driving process of the autonomous driving vehicle. Specifically, during the driving process of the autonomous driving vehicle, each camera continuously acquires camera images, and the intrinsic parameters of each camera and the external parameters of each camera relative to the main camera are continuously optimized based on the camera images acquired by each camera. When the number of logarithms of the simultaneously restored poses of each camera and the main camera reaches a threshold, data acquisition ends, and optimization is performed based on the acquired data.
[0113] As can be seen from the above content, this embodiment can reconstruct the scene based on the camera images collected by each camera, obtain the pose of each camera image and the 3D point coordinates corresponding to the feature points included in each camera image, and the scene reconstruction result can reflect the positional relationship between the cameras, so that the internal parameters of each camera and the external parameters of each camera relative to the main camera can be calculated based on the scene reconstruction result. The entire calibration method does not require human participation or the assistance of any external objects, and the results are objective and accurate, thereby improving the accuracy of camera calibration. In addition, the camera calibration process in this embodiment does not require the construction of a fixed site such as a calibration field, thereby reducing capital investment and saving the cost of camera calibration. In addition, compared with the construction of a calibration field for camera calibration, the solution of the embodiment of the present invention can perform camera calibration when the autonomous driving vehicle travels to any area, thereby improving the convenience of camera calibration.
[0114] As an implementation manner of the embodiment of the present invention, after the camera is calibrated, the wheel speed may be calibrated based on the camera intrinsic parameters obtained through the calibration and the extrinsic parameters of each camera relative to the main camera.
[0115] The input data of wheel speed calibration includes the relative pose output by the odometer and the inter-frame estimation of the wheel speed pulse output. Among them, the odometer input is a multi-camera image, and the odometer obtains the pose of each camera image relative to the first frame camera image, thereby calculating the relative pose between each frame. The wheel speed encoder outputs the number of pulses, and the inter-frame pose of the wheel is obtained by integration.
[0116] Specifically, Figure 2 As shown, the process of wheel speed calibration includes the following steps:
[0117] S210: Calculate the relative pose between adjacent main camera images based on the camera images, the intrinsic parameters of each camera, and the extrinsic parameters of each other camera relative to the main camera.
[0118] When calibrating the wheel speed, the entire multi-camera module can be regarded as a rigid body to estimate the position and posture of the entire multi-camera module at different times.
[0119] Specifically, each camera image, the intrinsic parameters of each camera, and the extrinsic parameters of each other camera relative to the main camera can be input into the odometer, and the odometer obtains the pose of each camera image relative to the first frame camera image, thereby calculating the relative pose between adjacent main camera images.
[0120] S220: For each frame of the main camera image, determine the time between the acquisition time of the main camera image and the acquisition time of the previous frame of the main camera image as the integration time.
[0121] For example, when the acquisition time of any frame of the main camera image is 2020.3.20.12:31, and the acquisition time of the previous frame of the main camera image is 2020.3.20.12:33, it can be determined that the integration time determined according to the main camera image is 2020.3.20.12:31-2020.3.20.12:33.
[0122] After performing the above calculation for each main camera image, n-1 integration times can be obtained, where n is the total number of main camera images. For example, when there are 5 main camera images 0, 1, 2, 3, and 4, the integration times obtained are 0-1, 1-2, 2-3, and 3-4, for a total of 4 integration times.
[0123] S230: Obtain pulses output by the wheel speed encoder, and integrate the pulses at each integration time in sequence according to the input wheel radius to obtain the inter-frame posture of the unmanned vehicle.
[0124] The wheel radius may be a factory wheel radius obtained by manual measurement.
[0125] S240: Estimate the initial values of external parameters of the multi-camera module composed of multiple cameras relative to the wheel speed according to the relative postures between adjacent main camera images and the postures between frames; the initial values of the external parameters include: pitch angle, roll angle, yaw angle, scale, lateral translation and longitudinal translation.
[0126] In the embodiment of the present invention, the x-axis direction can be defined as the lateral direction of the vehicle, and the rotation of the vehicle body around the x-axis is the pitch angle pitch; the y-axis direction is the longitudinal direction of the vehicle, and the rotation around the y-axis is the roll angle roll; the z-axis is the height, and the rotation around the z-axis is the yaw angle yaw.
[0127] In an embodiment of the present invention, the wheel speed can be calibrated based on the hand-eye calibration algorithm. The hand-eye calibration algorithm is an algorithm that aligns two trajectories and solves the conversion relationship between the two. In the wheel speed calibration, the two trajectories are the camera trajectory and the wheel speed trajectory. The camera trajectory is output by the odometer and is the posture at each moment. The wheel speed trajectory is obtained by pulse integration. By calculating the difference between the postures of each frame, the relative posture we need is obtained.
[0128] In one implementation, a rotation component can be identified in each inter-frame pose, and the yaw angle corresponding to the inter-frame pose can be obtained by decomposing the rotation component through Euler angles, and the angular velocity can be calculated based on the yaw angle; the inter-frame pose with an angular velocity greater than a preset threshold is taken as the target inter-frame pose, and the relative pose at the moment corresponding to the inter-frame pose is taken as the target relative pose; the pitch angle and the roll angle are solved, and based on the target inter-frame pose and the target relative pose, the preliminary result of the external parameters from the camera system to the wheel speed system is obtained through singular value decomposition SVD. Multiply the relative position of each target by As the updated target relative pose, SVD decomposition is performed again to obtain the external parameters from the camera system to the wheel speed system. When the change value of the external parameter result is less than the preset change threshold, the yaw angle, scale, lateral translation and longitudinal translation are obtained.
[0129] For example, is the external parameter to be estimated, i.e., the conversion of the multi-camera module relative to the wheel speed, is the wheel frame-to-frame pose, is the relative position of the odometer, and the three satisfy Through two trajectories, many groups can be obtained To construct a healthy problem to solve, take out The rotation part of the wheel is decomposed by Euler angle to get the yaw angle yaw of the wheel during this period, divided by the time interval to get the angular velocity. The angular velocity is considered to be sufficient for excitation and is used to solve the external parameters. So far, multiple groups are screened out. In order to ensure the calibration effect, the vehicle is required to turn as much as possible during the calibration process to ensure sufficient motion excitation. Due to the unobservability of the wheels to the height, the vehicle should avoid going up and down slopes during calibration.
[0130] Different algorithms can be used to calculate the pitch angle and roll angle. In one implementation, the Lidar point cloud within the image acquisition time range of each main camera can be obtained, and the Lidar point cloud can be plane-fitted to obtain the ground plane normal vector v in the Lidar system. l , obtain the external parameters of the Lidar system and the camera system, and calculate v based on the external parameters of the Lidar system and the camera system l The ground plane normal vector v in the camera frame c , calculate v c The ground plane normal vector v in the wheel speed system o angles to obtain the pitch and roll angles.
[0131] In another implementation, the posture of each main camera image relative to the first frame main camera image can be plane fitted to obtain the ground plane normal vector calculation v in the camera system. c , calculate v c The ground plane normal vector v in the wheel speed system o angles to obtain the pitch and roll angles.
[0132] In another implementation, the rotation component can be identified in the relative pose between each adjacent main camera image and the pose between each frame, and a relationship including the pitch angle and the roll angle is constructed based on the identified rotation component, and the relationship is decomposed by SVD to obtain the pitch angle and the roll angle. The above relationship can be:
[0133] S250: Optimizing the wheel radius to obtain an optimized wheel radius.
[0134] In the process of solving the initial value of the extrinsic parameter, part of the error comes from the wheel radius. Therefore, after the linear solution, a nonlinear optimization problem is constructed. The optimization variables are the extrinsic parameters of the multi-camera module relative to the wheel speed and the wheel radius.
[0135] For example, the wheel radius r can be optimized by the following formula:
[0136]
[0137] Represents the external parameters of the multi-camera module relative to the wheel speed, express The rotation component of express The translation component of Represents the translation component of the pose matrix between frames, Represents the translation component of each relative pose matrix, s represents the scale, and I represents the identity matrix.
[0138] S260: Integrate the pulses at each integration time in sequence according to the optimized wheel radius to obtain the optimized posture of the unmanned vehicle between each frame; calculate the external parameters of the multi-camera module relative to the wheel speed according to the relative posture between each adjacent main camera image and the optimized posture between each frame.
[0139] After optimizing the wheel radius, re-integrate the wheel speed pulse and repeat the above steps to calculate the external parameters of the multi-camera module relative to the wheel speed.
[0140] In this embodiment, after the multi-camera module is calibrated, the wheel speed can also be calibrated based on the camera internal parameters and external parameters obtained by the calibration to obtain the external parameters of the multi-camera module relative to the wheel speed, so that during the driving process of the autonomous driving vehicle, the data collected by each sensor can be accurately processed, thereby ensuring the safety of the autonomous driving vehicle. In the inter-frame pose, a larger angular velocity indicates sufficient excitation. In the wheel speed calibration process, the inter-frame pose with a larger angular velocity and the relative pose at the corresponding moment of the selected inter-frame pose are selected to calculate the external parameters of the multi-camera module relative to the wheel speed, which can improve the accuracy of the external parameter calibration. When calibrating the wheel speed, the wheel radius measured manually will have errors, thereby affecting the accuracy of the inter-frame pose. Therefore, after obtaining the initial value of the external parameter, the wheel radius is optimized, and the external parameters of the multi-camera module relative to the wheel speed are calculated based on the optimized wheel radius, which can improve the accuracy of the external parameter calculation.
[0141] As an implementation method of an embodiment of the present invention, after the camera and the wheel speed are calibrated, for each other camera, the product of the external parameters of the camera relative to the main camera and the inverse matrix of the external parameters of the multi-camera module relative to the wheel speed can be determined as the external parameters of the camera in the wheel speed system.
[0142] When calibrating the camera, the calculated camera extrinsics are all based on the main camera as the reference system. In the unmanned vehicle system, we need to use the vehicle system, that is, the wheel speed system, as the reference system. Therefore, the extrinsic parameters of each camera in the main camera reference system can be converted to the wheel speed system. This can improve the accuracy of data processing when processing the data collected by each sensor in the subsequent process.
[0143] Specifically, feature points of each camera image can be detected and matched according to the intrinsic parameters of each camera and the extrinsic parameters of each other camera relative to the main camera to obtain the target pose of each camera image; for the target camera image captured by each camera, the distance and angle interval between each target camera image and the target camera image of the previous frame are determined according to the acquisition time and target pose of each target camera image, and when the distance between any target camera image and the target camera image of the previous frame is greater than a preset distance threshold and the angle interval is greater than a preset angle threshold, the camera images captured by each camera at the target camera image acquisition time are determined as key frames; for each key frame, the gradient points in the key frame whose gradient values are greater than the preset gradient threshold are determined, and the depth of each gradient point in the key frame is estimated according to the target pose of the key frame. The local three-dimensional point information corresponding to the key frame is obtained; according to the acquisition time of each key frame and the local three-dimensional point information corresponding to each key frame, the three-dimensional point set corresponding to each acquisition time is statistically obtained; the lidar point cloud data is obtained, and the key lidar point cloud data corresponding to the timestamp and the acquisition time of each key frame are identified in the lidar point cloud data; according to the lidar measurement model, the key lidar point cloud data is projected into a two-dimensional space, and bilinear interpolation is performed to obtain each lidar depth map; according to the three-dimensional point set corresponding to each acquisition time and each lidar depth map, a nonlinear least squares optimization function of the external parameters of the multi-camera module composed of multiple cameras to the lidar is constructed, and the optimization function is optimized to obtain the external parameters of the multi-camera module to the lidar.
[0144] When processing each camera image, for example, each camera image can be input into a multi-camera visual odometer system. This system calculates the pose of each camera image frame by detecting and matching visual feature points, and selects frames with sufficiently large distance and angle intervals in all camera images as key frames. Then, the pose of the key frame and the camera image are input into a visual real-time dense reconstruction system. This system selects points with gradients in the image for depth estimation and outputs the visual 3D point information of each frame. The set of visual 3D points of the i-th frame can be called {Vi}.
[0145] For Lidar data, the processing method is to find the key Lidar data corresponding to the above visual keyframes in time through the timestamp information. At the same time, the Lidar measurement model π l (·):R 3 →R 2 It is known that this mapping can project the point cloud data in the three-dimensional space into the two-dimensional space, and then through bilinear interpolation, finally obtain the Lidar depth map. The i-th frame Lidar depth map can be called {I i}.
[0146] After completing the above preprocessing of the camera image and Lidar data, the visual and Lidar data corresponding to each frame are determined: {V i} and {I i}, and the parameters to be calibrated are the external parameters from the multi-camera module to the Lidar By {V i} and {I i} Perform association based on distance information and build a The nonlinear least squares problem can be optimized to obtain the external parameters of the multi-camera module to Lidar
[0147] Among them, the external parameters of multiple camera modules to Lidar can be calculated according to the following formula To optimize:
[0148]
[0149] π l (·) represents the Lidar measurement model, I i (x) represents the value of the Lidar depth map corresponding to time i at the two-dimensional coordinate x(u,v), p c represents the three-dimensional point coordinates under the camera system, Vi represents the three-dimensional point set corresponding to time i, ‖p c ‖ represents a three-dimensional point p c The modulus of (x,y,z).
[0150] After calibrating the multi-camera module, the Lidar can also be calibrated based on the camera intrinsic and extrinsic parameters obtained by the calibration to obtain the extrinsic parameters from the multi-camera module to the Lidar. In this way, during the driving of the autonomous vehicle, the data collected by each sensor can be accurately processed, thereby ensuring the safety of the autonomous vehicle.
[0151] like Figure 3As shown, it shows that an embodiment of the present invention provides a multi-sensor calibration device for an autonomous driving vehicle, wherein the autonomous driving vehicle is equipped with multiple cameras, and the device includes:
[0152] The camera image acquisition module 310 is used to acquire the camera images acquired by each camera and the acquisition time corresponding to each camera image; synchronize each camera image according to the acquisition time of each camera image to obtain each image set; each image set contains a camera image acquired by each camera, and the difference between the acquisition times of any two camera images in each image set is less than a preset time threshold;
[0153] The camera image matching module 320 is used to extract feature points from each of the camera images, and perform feature matching on every two camera images according to the extracted feature points to obtain image matching pairs;
[0154] A scene reconstruction module 330 is used to reconstruct the scene according to each image matching pair, and obtain the pose of each camera image and the 3D point coordinates of the world system corresponding to the feature points included in each camera image;
[0155] The initial external parameter determination module 340 is used to determine the main camera among the cameras, and calculate the main camera coordinate system corresponding to each image set according to the pose of the camera image collected by the main camera in each image set; for each other camera, according to the pose of the camera image collected by the camera in each image set and the main camera coordinate system corresponding to each image set, calculate the restored pose of the camera in each main camera coordinate system, and calculate the initial external parameter of the camera relative to the main camera according to each restored pose;
[0156] The external parameter optimization module 350 is used to optimize the preset optimization function according to the coordinate system of the main camera, the initial external parameters of each other camera relative to the main camera, and the 3D point coordinates of the world system corresponding to each feature point, so as to obtain the internal parameters of each camera and the external parameters of each other camera relative to the main camera.
[0157] Optionally, the initial external parameter determination module 340 is specifically used to:
[0158] For each image set, determining a main camera coordinate system corresponding to the image set as the position and posture of the camera image captured by the main camera in the image set;
[0159] For each other camera, the restored pose of the camera in any main camera coordinate system is determined as the product of the pose of the camera image captured by the camera in the image set corresponding to the main camera coordinate system and the inverse of the main camera coordinate system; the initial external parameter of the camera relative to the main camera is determined as the average value of the restored poses of the camera in each main camera coordinate system.
[0160] Optionally, the external parameter optimization module 350 is specifically used to:
[0161] The intrinsic parameters of each camera and the extrinsic parameters of each camera relative to the main camera are optimized according to the following formula:
[0162]
[0163] represents the coordinate system of the main camera h at time j, represents the external parameter of camera i relative to the main camera h, θ i represents the internal parameter of camera i, I represents the set of all cameras, J represents the set of all acquisition moments, and p w is the coordinate of the 3D point in the world system, u is the coordinate of the pixel in the camera image that matches the 3D point, is the camera internal parameter θ i Determines the projection model of the camera.
[0164] Optionally, the device further comprises:
[0165] A relative pose calculation module, used to calculate the relative pose between each adjacent main camera image based on each camera image, the intrinsic parameters of each camera, and the extrinsic parameters of each other camera relative to the main camera;
[0166] An integration time determination module, used for determining, for each frame of the main camera image, the time between the acquisition time of the main camera image and the acquisition time of the previous frame of the main camera image as the integration time;
[0167] An inter-frame pose calculation module is used to obtain pulses output by a wheel speed encoder, and to integrate the pulses for each integration time in sequence according to an input wheel radius to obtain each inter-frame pose of the unmanned vehicle;
[0168] An external parameter initial value estimation module is used to estimate the initial external parameter values of the multi-camera module composed of the multiple cameras relative to the wheel speed according to the relative postures between the adjacent main camera images and the postures between the frames; the initial external parameter values include: pitch angle, roll angle, yaw angle, scale, lateral translation and longitudinal translation;
[0169] A wheel radius optimization module, used for optimizing the wheel radius to obtain an optimized wheel radius;
[0170] The wheel speed extrinsic parameter calculation module is used to integrate the pulses for each integration time in sequence according to the optimized wheel radius to obtain the optimized inter-frame posture of the unmanned vehicle; according to the relative posture between adjacent main camera images and the optimized inter-frame posture, the extrinsic parameters of the multi-camera module relative to the wheel speed are calculated.
[0171] Optionally, the external parameter initial value estimation module includes:
[0172] An angular velocity calculation submodule, used for identifying a rotation component in each of the inter-frame postures, obtaining a yaw angle corresponding to the inter-frame posture by Euler angle decomposition according to the rotation component, and calculating an angular velocity according to the yaw angle;
[0173] A target posture determination submodule is used to take the inter-frame posture with an angular velocity greater than a preset threshold as the target inter-frame posture, and the relative posture at the moment corresponding to the inter-frame posture as the target relative posture;
[0174] The external parameter estimation submodule is used to solve the pitch angle and roll angle, and based on the target inter-frame pose and target relative pose, obtain the preliminary results of the camera-to-wheel speed system external parameters through singular value decomposition SVD Multiply the relative position of each target by As the updated target relative pose, SVD decomposition is performed again to obtain the external parameters from the camera system to the wheel speed system. When the change value of the external parameter result is less than the preset change threshold, the yaw angle, scale, lateral translation and longitudinal translation are obtained.
[0175] Optionally, the extrinsic parameter estimation submodule is specifically used to:
[0176] Obtain the Lidar point cloud within the time range of each main camera image acquisition, and perform plane fitting on the Lidar point cloud to obtain the ground plane normal vector v in the Lidar system l , obtain the external parameters of the Lidar system and the camera system, and calculate the v according to the external parameters of the Lidar system and the camera system l The ground plane normal vector v in the camera frame c , calculate v c The ground plane normal vector v in the wheel speed system o angles to obtain the pitch and roll angles; or
[0177] Perform plane fitting on the positions of each main camera image relative to the first frame main camera image to obtain the ground plane normal vector v in the camera system c , calculate v c The ground plane normal vector v in the wheel speed system o angles to obtain the pitch and roll angles; or
[0178] In the relative pose between the adjacent main camera images and the pose between each frame, a rotation component is identified, a relationship including a pitch angle and a roll angle is constructed based on the identified rotation component, and the relationship is subjected to SVD decomposition to obtain the pitch angle and the roll angle.
[0179] Optionally, the wheel radius optimization module is specifically used to:
[0180] The wheel radius r is optimized using the following formula:
[0181]
[0182] represents the external parameters of the multi-camera module relative to the wheel speed, express The rotation component of express The translation component of Represents the translation component of the pose matrix between frames, Represents the translation component of each relative pose matrix, s represents the scale, and I represents the identity matrix.
[0183] Optionally, the device further comprises:
[0184] The coordinate conversion module is used to determine, for each of the other cameras, the product of the external parameters of the camera relative to the main camera and the inverse matrix of the external parameters of the multi-camera module relative to the wheel speed as the external parameters of the camera in the wheel speed system.
[0185] The multi-sensor calibration device for an autonomous driving vehicle provided in an embodiment of the present invention can reconstruct a scene based on the camera images collected by each camera, obtain the pose of each camera image and the 3D point coordinates corresponding to the feature points included in each camera image, and the scene reconstruction result can reflect the positional relationship between the cameras, so that the internal parameters of each camera and the external parameters of each camera relative to the main camera can be calculated based on the scene reconstruction result. The entire calibration method does not require human participation or the assistance of any external objects, and the results are objective and accurate, thereby improving the accuracy of camera calibration. In addition, the camera calibration process in this embodiment does not require the construction of a fixed site such as a calibration field, thereby reducing capital investment and saving the cost of camera calibration. In addition, compared with the construction of a calibration field for camera calibration, the solution of the embodiment of the present invention can perform camera calibration when the autonomous driving vehicle travels to any area, thereby improving the convenience of camera calibration.
[0186] The above device embodiment corresponds to the method embodiment and has the same technical effect as the method embodiment. For specific description, please refer to the method embodiment. The device embodiment is obtained based on the method embodiment. For specific description, please refer to the method embodiment part, which will not be repeated here.
[0187] Those skilled in the art can understand that the accompanying drawings are only schematic diagrams of an embodiment, and the modules or processes in the accompanying drawings are not necessarily required to implement the present invention.
[0188] Those skilled in the art can understand that the modules in the device in the embodiment can be distributed in the device in the embodiment according to the description of the embodiment, or can be changed accordingly and located in one or more devices different from the embodiment. The modules in the above embodiment can be combined into one module, or can be further divided into multiple sub-modules.
[0189] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A multi-sensor calibration method for an autonomous driving vehicle, characterized in that: The autonomous driving vehicle is equipped with a plurality of cameras, and the method comprises: Acquire the camera images captured by each camera and the acquisition time corresponding to each camera image; synchronize each camera image according to the acquisition time of each camera image to obtain each image set; each image set contains a camera image captured by each camera, and the difference between the acquisition times of any two camera images in each image set is less than a preset time threshold; Extracting feature points from each of the camera images, and performing feature matching on every two camera images according to the extracted feature points to obtain image matching pairs; Reconstructing the scene according to each image matching pair to obtain the pose of each camera image and the 3D point coordinates of the world system corresponding to the feature points included in each camera image; Determine a main camera among the cameras, and calculate the main camera coordinate system corresponding to each image set according to the pose of the camera image collected by the main camera in each image set; for each other camera, calculate the restored pose of the camera in each main camera coordinate system according to the pose of the camera image collected by the camera in each image set and the main camera coordinate system corresponding to each image set, and calculate the initial extrinsic parameters of the camera relative to the main camera according to each restored pose; Optimizing a preset optimization function according to the coordinate system of the main camera, the initial external parameters of each other camera relative to the main camera, and the 3D point coordinates of the world system corresponding to each feature point, to obtain the intrinsic parameters of each camera and the external parameters of each other camera relative to the main camera; The steps of calculating the main camera coordinate system corresponding to each image set according to the pose of the main camera image collected by the main camera in each image set; for each other camera, calculating the restored pose of the camera in each main camera coordinate system according to the pose of the camera image collected by the camera in each image set and the main camera coordinate system corresponding to each image set, and calculating the initial external parameters of the camera relative to the main camera according to each restored pose include: For each image set, determining a main camera coordinate system corresponding to the image set as the position and posture of the camera image captured by the main camera in the image set; For each other camera, determine the restored pose of the camera in any main camera coordinate system as the product of the pose of the camera image collected by the camera in the image set corresponding to the main camera coordinate system and the inverse of the main camera coordinate system; determine the initial extrinsic parameter of the camera relative to the main camera as the average value of the restored poses of the camera in each main camera coordinate system; The step of optimizing a preset optimization function according to the coordinate system of the main camera, the initial external parameters of each other camera relative to the main camera, and the 3D point coordinates of the world system corresponding to each feature point to obtain the internal parameters of each camera and the external parameters of each other camera relative to the main camera includes: The intrinsic parameters of each camera and the extrinsic parameters of each camera relative to the main camera are optimized according to the following formula: represents the coordinate system of the main camera h at time j, represents the external parameter of camera i relative to the main camera h, θ i represents the internal parameter of camera i, I represents the set of all cameras, J represents the set of all acquisition moments, and p w is the coordinate of the 3D point in the world system, u is the coordinate of the pixel in the camera image that matches the 3D point, is the camera internal parameter θ i Determines the projection model of the camera.
2. The method according to claim 1, characterized in that: The method further comprises: Calculate the relative pose between adjacent main camera images according to the camera images, the intrinsic parameters of the cameras, and the extrinsic parameters of the other cameras relative to the main camera; For each frame of the main camera image, determine the time from the acquisition time of the main camera image to the acquisition time of the previous frame of the main camera image as the integration time; Obtaining pulses output by a wheel speed encoder, and integrating the pulses for each integration time in sequence according to an input wheel radius to obtain the inter-frame pose of the autonomous driving vehicle; According to the relative poses between the adjacent main camera images and the poses between the frames, the initial values of the external parameters of the multi-camera module composed of the multiple cameras relative to the wheel speed are estimated; the initial values of the external parameters include: pitch angle, roll angle, yaw angle, scale, lateral translation and longitudinal translation; Optimizing the wheel radius to obtain an optimized wheel radius; The pulses are integrated for each integration time in sequence according to the optimized wheel radius to obtain the optimized inter-frame pose of the wheel of the autonomous driving vehicle; the external parameters of the multi-camera module relative to the wheel speed are calculated according to the relative pose between adjacent main camera images and the optimized inter-frame pose.
3. The method according to claim 2, characterized in that The step of estimating the initial value of the external parameter of the multi-camera module composed of the multiple cameras relative to the wheel speed according to the relative poses between the adjacent main camera images and the poses between the frames comprises: Identify a rotation component in each of the inter-frame poses, obtain a yaw angle corresponding to the inter-frame pose by Euler angle decomposition according to the rotation component, and calculate an angular velocity according to the yaw angle; The inter-frame pose with an angular velocity greater than a preset threshold is used as the target inter-frame pose, and the relative pose at the time corresponding to the inter-frame pose is used as the target relative pose; Solve the pitch angle and roll angle, and based on the target inter-frame pose and target relative pose, obtain the preliminary results of the external parameters from the camera system to the wheel speed system through singular value decomposition SVD Multiply the relative position of each target by As the updated target relative pose, SVD decomposition is performed again to obtain the external parameters from the camera system to the wheel speed system. When the change value of the external parameter result is less than the preset change threshold, the yaw angle, scale, lateral translation and longitudinal translation are obtained.
4. The method according to claim 3, characterized in that The step of solving the pitch angle and the roll angle comprises: Obtain the Lidar point cloud within the time range of each main camera image acquisition, and perform plane fitting on the Lidar point cloud to obtain the ground plane normal vector v in the Lidar system l , obtain the external parameters of the Lidar system and the camera system, and calculate the v according to the external parameters of the Lidar system and the camera system l The ground plane normal vector v in the camera frame c , calculate v c The ground plane normal vector v in the wheel speed system o angles to obtain the pitch and roll angles; or Perform plane fitting on the positions of each main camera image relative to the first frame main camera image to obtain the ground plane normal vector v in the camera system c , calculate v c The ground plane normal vector v in the wheel speed system o angles to obtain the pitch and roll angles; or In the relative pose between the adjacent main camera images and the pose between each frame, a rotation component is identified, a relationship including a pitch angle and a roll angle is constructed based on the identified rotation component, and the relationship is subjected to SVD decomposition to obtain the pitch angle and the roll angle.
5. The method according to claim 2, characterized in that: The step of optimizing the wheel radius to obtain an optimized wheel radius comprises: The wheel radius r is optimized using the following formula: represents the external parameters of the multi-camera module relative to the wheel speed, express The rotation component of express The translation component of Represents the translation component of the pose matrix between frames, Represents the translation component of each relative pose matrix, s represents the scale, and I represents the identity matrix.
6. The method according to claim 2, characterized in that The method further comprises: For each of the other cameras, the product of the external parameters of the camera relative to the main camera and the inverse matrix of the external parameters of the multi-camera module relative to the wheel speed is determined as the external parameters of the camera in the wheel speed system.
7. A multi-sensor calibration device for an autonomous driving vehicle, used to implement the multi-sensor calibration method as claimed in claim 1, characterized in that: The autonomous driving vehicle is equipped with a plurality of cameras, and the device comprises: A camera image acquisition module, used to acquire the camera images acquired by each of the cameras and the acquisition time corresponding to each of the camera images; synchronize the camera images according to the acquisition time of each of the camera images to obtain each image set; each image set contains a camera image acquired by each of the cameras, and the difference between the acquisition times of any two camera images in each image set is less than a preset time threshold; A camera image matching module, used to extract feature points from each of the camera images, and perform feature matching on every two camera images based on the extracted feature points to obtain image matching pairs; A scene reconstruction module, used to reconstruct the scene according to each image matching pair, and obtain the pose of each camera image and the 3D point coordinates of the world system corresponding to the feature points included in each camera image; An initial external parameter determination module is used to determine a main camera among the cameras, and calculate the main camera coordinate system corresponding to each image set according to the pose of the camera image collected by the main camera in each image set; for each other camera, calculate the restored pose of the camera in each main camera coordinate system according to the pose of the camera image collected by the camera in each image set and the main camera coordinate system corresponding to each image set, and calculate the initial external parameter of the camera relative to the main camera according to each restored pose; The external parameter optimization module is used to optimize the preset optimization function according to the coordinate system of the main camera, the initial external parameters of each other camera relative to the main camera, and the 3D point coordinates of the world system corresponding to each feature point, so as to obtain the internal parameters of each camera and the external parameters of each other camera relative to the main camera.
8. The device according to claim 7, characterized in that The device also includes: A relative pose calculation module, used to calculate the relative pose between each adjacent main camera image based on each camera image, the intrinsic parameters of each camera, and the extrinsic parameters of each other camera relative to the main camera; An integration time determination module, used for determining, for each frame of the main camera image, the time between the acquisition time of the main camera image and the acquisition time of the previous frame of the main camera image as the integration time; An inter-frame pose calculation module is used to obtain pulses output by a wheel speed encoder, and integrate the pulses for each integration time in sequence according to an input wheel radius to obtain each inter-frame pose of the autonomous driving vehicle; An external parameter initial value estimation module is used to estimate the initial external parameter values of the multi-camera module composed of the multiple cameras relative to the wheel speed according to the relative postures between the adjacent main camera images and the postures between the frames; the initial external parameter values include: pitch angle, roll angle, yaw angle, scale, lateral translation and longitudinal translation; A wheel radius optimization module, used for optimizing the wheel radius to obtain an optimized wheel radius; The wheel speed extrinsic parameter calculation module is used to integrate the pulses for each integration time in sequence according to the optimized wheel radius to obtain the optimized posture between each frame of the autonomous driving vehicle; according to the relative posture between each adjacent main camera image and the optimized posture between each frame, the extrinsic parameter of the multi-camera module relative to the wheel speed is calculated.
