Sensor calibration method, system, device, electronic equipment and medium

Through the multi-sensor joint calibration method, the neural network model is used for coarse and fine calibration of lidar and cameras, which solves the cumbersome problem of lidar and camera calibration in the field of autonomous driving and achieves high-accuracy coordinate conversion and adaptive calibration. .

CN115236643BActive Publication Date: 2024-09-03CHINA TELECOM CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210734948.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-27
Publication Date
2024-09-03
Estimated Expiration
2042-06-27

AI Technical Summary

Technical Problem

In the existing technology, the calibration process of lidar and cameras is cumbersome, difficult to adapt to the complex environment in the field of autonomous driving, and specific calibration objects need to be set up.

Method used

Using a multi-sensor joint calibration method, by acquiring the target point clouds and images collected by the lidar and the camera, using the pre-trained neural network model for rough calibration, and then refining the calibration matrix through matching degree optimization, the system realizes the connection between the lidar and camera coordinate systems. precise coordinate conversion between

Benefits of technology

It simplifies the calibration process of lidar and cameras, improves calibration accuracy, and adapts to the complex environmental requirements of the autonomous driving field without the need to set up specific calibration objects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115236643B
    Figure CN115236643B
Patent Text Reader

Abstract

The embodiments of the present disclosure provide a sensor calibration method, system, device, electronic device and medium, which relate to the field of calibration technology. The technical solution of the embodiments of the present disclosure includes: obtaining a target point cloud and a target image, and then inputting the target point cloud and the target image into a calibration model to obtain a coarse calibration transformation matrix. Then determine the matching degree corresponding to the coarse calibration transformation matrix, where the matching degree is the matching degree between the projected target point cloud and the target image when the target point cloud is projected onto the coordinate system of the target image using the coarse calibration transformation matrix. Then, perform a first specified transformation on the coarse calibration transformation matrix to obtain a first transformation matrix. If the matching degree corresponding to the first transformation matrix is ​​greater than the matching degree corresponding to the coarse calibration transformation matrix, the first transformation matrix is ​​used as the calibration result; otherwise, the coarse calibration transformation matrix is ​​used as the calibration result. This simplifies the calibration process of lidar and cameras to adapt to the calibration of sensors in the field of autonomous driving.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of calibration technology, and in particular to a sensor calibration method, system, device, electronic equipment and medium. Background Art

[0002] At present, there are two technical routes in the field of autonomous driving: single-vehicle intelligent autonomous driving and vehicle-road collaborative autonomous driving. Among them, vehicle-road collaborative autonomous driving, as one of the main development directions of unmanned driving and smart transportation, plays an important role in production and life.

[0003] Since the autonomous driving environment is relatively complex, it is difficult to achieve accurate environmental perception by relying on a single sensor, so multiple sensors are needed to perceive the surrounding environment. For example, in a single-vehicle intelligent autonomous driving scenario, sensors such as lidar and cameras are installed on the vehicle; in a vehicle-road cooperative autonomous driving scenario, sensors such as main lidar, blind spot radar and cameras are installed on the roadside. In order to combine the data collected by multiple sensors, the data collected by the sensors needs to be unified into the same coordinate system, that is, the sensors need to be calibrated.

[0004] At present, in the calibration method of LiDAR and camera, it is necessary to install a three-dimensional object of a specific size such as a checkerboard in front of the LiDAR and camera as a calibration target, use the LiDAR to scan the calibration target to obtain a point cloud, and use the camera to shoot the calibration target to obtain an image. The coordinate conversion relationship between the coordinate system of the point cloud and the image coordinate system is determined by using the laser points corresponding to the calibration target in the point cloud and the corresponding pixel points in the image, thereby realizing the calibration of LiDAR and camera. However, this process is relatively cumbersome and requires the setting of specific calibration objects, which is difficult to adapt to the calibration of sensors in the field of autonomous driving. Summary of the invention

[0005] The purpose of the embodiments of the present disclosure is to provide a sensor calibration method, system, device, electronic device and medium to simplify the calibration process of laser radar and camera, so as to adapt to the calibration of sensors in the field of autonomous driving. The specific technical solution is as follows:

[0006] In a first aspect, an embodiment of the present disclosure provides a multi-sensor joint calibration method, the method comprising:

[0007] Acquire a target point cloud collected by a laser radar and a target image collected by a camera, wherein the time difference between the collection time of the target point cloud and the collection time of the target image is less than a preset time difference;

[0008] Inputting the target point cloud and the target image into a pre-trained calibration model to obtain a rough calibration transformation matrix output by the calibration model, wherein the calibration model is a model obtained by training a neural network model based on the sample point cloud and the sample image;

[0009] Determine a matching degree corresponding to the rough calibration transformation matrix, wherein the matching degree is a matching degree between the projected target point cloud and the target image by projecting the target point cloud onto a coordinate system of the target image using the rough calibration transformation matrix;

[0010] Performing a first specified transformation on the coarse calibration transformation matrix to obtain a first transformation matrix, and calculating a matching degree corresponding to the first transformation matrix, if the matching degree corresponding to the first transformation matrix is ​​greater than the matching degree corresponding to the coarse calibration transformation matrix, taking the first transformation matrix as the calibration result; otherwise, taking the coarse calibration transformation matrix as the calibration result;

[0011] Among them, the transformation matrix is ​​used to represent the coordinate conversion relationship between the coordinate system of the point cloud collected by the laser radar and the coordinate system of the camera.

[0012] In some embodiments of the present disclosure, determining the matching degree corresponding to the coarse calibration transformation matrix includes:

[0013] The target image is converted into a grayscale image, and for each pixel in the grayscale image, a pixel value of the pixel is set to the maximum value of pixel differences between the pixel and a plurality of adjacent pixels, to obtain an edge image;

[0014] Performing image interpolation processing on the edge image;

[0015] For each laser point in the target point cloud, the product of the depth value of the laser point and the pixel value of the target pixel point is calculated; the target pixel point is a pixel point in the edge image after interpolation processing, which is the same as the position of the laser point projected to the coordinate system of the target image using the coarse calibration matrix;

[0016] The calculated products are summed to obtain the matching degree corresponding to the rough calibration transformation matrix.

[0017] In some embodiments of the present disclosure, before calculating the product between the depth value of each laser point in the target point cloud and the pixel value of the target pixel point, the method further includes:

[0018] For a plurality of laser points in the target point cloud obtained by scanning with the same laser beam, the distances between adjacent laser points are determined, and laser points whose distances to adjacent laser points exceed a preset threshold are deleted to obtain a screened target point cloud;

[0019] The step of calculating the product of the depth value of each laser point in the target point cloud and the pixel value of the target pixel point includes:

[0020] For each laser point in the filtered target point cloud, the product between the depth value of the laser point and the pixel value of the target pixel point is calculated.

[0021] In some embodiments of the present disclosure, the transformation matrix includes a rotation matrix and a translation matrix; performing a first specified transformation on the coarse calibration transformation matrix to obtain a first transformation matrix, and calculating a matching degree corresponding to the first transformation matrix, if the matching degree corresponding to the first transformation matrix is ​​greater than the matching degree corresponding to the coarse calibration transformation matrix, then taking the first transformation matrix as a calibration result, includes:

[0022] Adding a plurality of disturbance parameters to the rotation matrix and the translation matrix of the rough calibration transformation matrix respectively, and taking each combination of the rotation matrix and the translation matrix after adding the disturbance parameters as a first transformation matrix;

[0023] Determine a matching degree corresponding to each first transformation matrix, and determine a maximum matching degree among the matching degrees corresponding to the first transformation matrices;

[0024] If the maximum matching degree is greater than the matching degree corresponding to the coarse calibration transformation matrix, the first transformation matrix with the maximum matching degree is used as the calibration result.

[0025] In some embodiments of the present disclosure, before inputting the target point cloud and the target image into a pre-trained calibration model, the method further includes:

[0026] Determine whether there is a calibration result;

[0027] If yes, perform a first specified transformation on the calibration result to obtain a second transformation matrix, and calculate the matching degree corresponding to the calibration result and the matching degree corresponding to the second transformation matrix based on the target point cloud and the target image, respectively; if the matching degree corresponding to the second transformation matrix is ​​greater than the matching degree corresponding to the calibration result, use the second transformation matrix as the updated calibration result;

[0028] If not, the step of inputting the target point cloud and the target image into a pre-trained calibration model is performed.

[0029] In some embodiments of the present disclosure, before inputting the target point cloud and the target image into a pre-trained calibration model, the method further includes:

[0030] Identifying a foreground area in the target point cloud, deleting laser points included in a background area in the target point cloud, and obtaining a processed target point cloud;

[0031] Identify the foreground area in the target image, delete the pixels included in the background difference in the target image, and obtain a processed target image;

[0032] The step of inputting the target point cloud and the target image into a pre-trained calibration model comprises:

[0033] The processed target point cloud and the processed target image are input into the calibration model.

[0034] In some embodiments of the present disclosure, the calibration model is obtained by training through the following steps:

[0035] Taking the sample point clouds and sample images whose acquisition time difference is less than the preset threshold as a group of training samples, and taking the standard transformation matrix of the group of training samples as the label of the group of training samples;

[0036] For each group of training samples, a standard transformation matrix of the group of training samples is subjected to a second specified transformation, and a sample point cloud of the group of training samples is subjected to the second specified transformation, the transformed sample point cloud and the sample images included in the group of training samples are used as a group of training samples, and the transformation matrix after the second specified transformation is used as a label of the group of training samples;

[0037] The neural network model is trained using each group of training samples and the labels of each group of training samples to obtain the calibration model.

[0038] In a second aspect, an embodiment of the present disclosure provides a sensor calibration system, the system comprising:

[0039] LiDAR, used to collect point clouds;

[0040] A camera, used to capture images;

[0041] An electronic device, used to execute the method described in any one of the first aspects above.

[0042] In a third aspect, an embodiment of the present disclosure provides a multi-sensor joint calibration device, the device comprising:

[0043] An acquisition module, used to acquire a target point cloud acquired by a laser radar and a target image acquired by a camera, wherein the time difference between the acquisition time of the target point cloud and the acquisition time of the target image is less than a preset time difference;

[0044] A coarse calibration module, used for inputting the target point cloud and the target image acquired by the acquisition module into a pre-trained calibration model to obtain a coarse calibration transformation matrix output by the calibration model, wherein the calibration model is a model obtained by training a neural network model based on a sample point cloud and a sample image;

[0045] A determination module, used to determine the matching degree corresponding to the rough calibration transformation matrix obtained by the rough calibration module, wherein the matching degree is the matching degree between the projected target point cloud and the target image after the target point cloud is projected onto the coordinate system of the target image using the rough calibration transformation matrix;

[0046] A fine calibration module, used for performing a first specified transformation on the coarse calibration transformation matrix obtained by the coarse calibration module to obtain a first transformation matrix, and calculating a matching degree corresponding to the first transformation matrix, if the matching degree corresponding to the first transformation matrix is ​​greater than the matching degree corresponding to the coarse calibration transformation matrix determined by the determination module, then taking the first transformation matrix as the calibration result; otherwise, taking the coarse calibration transformation matrix as the calibration result;

[0047] Among them, the transformation matrix is ​​used to represent the coordinate conversion relationship between the coordinate system of the point cloud collected by the laser radar and the coordinate system of the camera.

[0048] In some embodiments of the present disclosure, the determining module is specifically configured to:

[0049] The target image is converted into a grayscale image, and for each pixel in the grayscale image, a pixel value of the pixel is set to the maximum value of pixel differences between the pixel and a plurality of adjacent pixels, to obtain an edge image;

[0050] Performing image interpolation processing on the edge image;

[0051] For each laser point in the target point cloud, the product of the depth value of the laser point and the pixel value of the target pixel point is calculated; the target pixel point is a pixel point in the edge image after interpolation processing, which is the same as the position of the laser point projected to the coordinate system of the target image using the coarse calibration matrix;

[0052] The calculated products are summed to obtain the matching degree corresponding to the rough calibration transformation matrix.

[0053] In some embodiments of the present disclosure, the device further comprises:

[0054] A screening module is used for determining the distance between adjacent laser points for a plurality of laser points scanned by the same laser beam in the target point cloud before calculating the product between the depth value of the laser point and the pixel value of the target pixel point for each laser point in the target point cloud, and deleting laser points whose distances to adjacent laser points exceed a preset threshold value, so as to obtain a screened target point cloud;

[0055] The determination module is specifically used for:

[0056] For each laser point in the filtered target point cloud, the product between the depth value of the laser point and the pixel value of the target pixel point is calculated.

[0057] In some embodiments of the present disclosure, the transformation matrix includes a rotation matrix and a translation matrix; the fine calibration module is specifically used to:

[0058] Adding a plurality of disturbance parameters to the rotation matrix and the translation matrix of the rough calibration transformation matrix respectively, and using each combination of the rotation matrix and the translation matrix after adding the disturbance parameters as a first transformation matrix;

[0059] Determine a matching degree corresponding to each first transformation matrix, and determine a maximum matching degree among the matching degrees corresponding to the first transformation matrices;

[0060] If the maximum matching degree is greater than the matching degree corresponding to the coarse calibration transformation matrix, the first transformation matrix with the maximum matching degree is used as the calibration result.

[0061] In some embodiments of the present disclosure, the device further comprises:

[0062] A judgment module, used for judging whether there is a calibration result before inputting the target point cloud and the target image into the pre-trained calibration model;

[0063] The fine calibration module is further configured to, if the judgment result of the judgment module is yes, perform a first specified transformation on the calibration result to obtain a second transformation matrix, and respectively calculate a matching degree corresponding to the calibration result and a matching degree corresponding to the second transformation matrix based on the target point cloud and the target image, and if the matching degree corresponding to the second transformation matrix is ​​greater than the matching degree corresponding to the calibration result, use the second transformation matrix as an updated calibration result;

[0064] The calling module is used to call the rough calibration module to execute the step of inputting the target point cloud and the target image into the pre-trained calibration model if the judgment result of the judgment module is no.

[0065] In some embodiments of the present disclosure, the device further comprises:

[0066] A foreground recognition module is used to identify the foreground area in the target point cloud and delete the laser points included in the background area in the target point cloud to obtain a processed target point cloud before inputting the target point cloud and the target image into the pre-trained calibration model; identify the foreground area in the target image and delete the pixel points included in the background area in the target image to obtain a processed target image;

[0067] The rough calibration module is specifically used for:

[0068] The processed target point cloud and the processed target image are input into the calibration model.

[0069] In some embodiments of the present disclosure, the apparatus further comprises a training module, wherein the training module is configured to:

[0070] Taking the sample point clouds and sample images whose acquisition time difference is less than the preset threshold as a group of training samples, and taking the standard transformation matrix of the group of training samples as the label of the group of training samples;

[0071] For each group of training samples, a standard transformation matrix of the group of training samples is subjected to a second specified transformation, and a sample point cloud of the group of training samples is subjected to the second specified transformation, the transformed sample point cloud and the sample images included in the group of training samples are used as a group of training samples, and the transformation matrix after the second specified transformation is used as a label of the group of training samples;

[0072] The neural network model is trained using each group of training samples and the labels of each group of training samples to obtain the calibration model.

[0073] In a fourth aspect, an embodiment of the present disclosure provides an electronic device, characterized in that it includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus;

[0074] Memory, used to store computer programs;

[0075] The processor is used to implement any step of the sensor calibration method described in the first aspect when executing the program stored in the memory.

[0076] In a fifth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the sensor calibration method described in any one of the first aspects are implemented.

[0077] In a sixth aspect, an embodiment of the present disclosure further provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute any of the sensor calibration methods described above.

[0078] Beneficial effects of the embodiments of the present disclosure:

[0079] The sensor calibration method, system, device, electronic device and medium provided by the embodiment of the present disclosure can obtain the target point cloud and target image whose acquisition time difference is less than the preset threshold, and use the calibration model to perform rough calibration on the target point cloud and target image to obtain a rough calibration transformation matrix. Then determine the matching degree corresponding to the rough calibration transformation matrix, perform a first specified transformation on the rough calibration transformation matrix, and obtain a first transformation matrix. When the matching degree corresponding to the first transformation matrix is ​​greater than the matching degree corresponding to the rough calibration transformation matrix, the first transformation matrix is ​​used as the calibration result; otherwise, the rough calibration transformation matrix is ​​used as the calibration result, thereby realizing the fine calibration of the transformation matrix. It can be seen that in the embodiment of the present disclosure, the rough calibration is completed by the calibration model, and the rough calibration matrix is ​​transformed, and then the fine calibration is completed by the matching degree of the transformation matrix. Compared with the calibration result obtained by a single calibration method, the calibration result obtained by combining the rough calibration and the fine calibration has a higher accuracy. Moreover, the embodiment of the present disclosure does not need to set the calibration object, so the calibration process is simplified, and it can adapt to the calibration of sensors in the field of autonomous driving. That is, the embodiment of the present disclosure can improve the calibration accuracy of sensors in the field of autonomous driving.

[0080] 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 disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0081] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present disclosure, and for ordinary technicians in this field, other embodiments can also be obtained based on these drawings.

[0082] Figure 1 A schematic diagram of the structure of a sensor calibration system provided in an embodiment of the present disclosure;

[0083] Figure 2 A flow chart of a sensor calibration method provided in an embodiment of the present disclosure;

[0084] Figure 3 A flow chart of another sensor calibration method provided by an embodiment of the present disclosure;

[0085] Figure 4 An exemplary schematic diagram of a sensor calibration scenario provided by an embodiment of the present disclosure;

[0086] Figure 5 A flow chart of another sensor calibration method provided by an embodiment of the present disclosure;

[0087] Figure 6 A schematic diagram of the structure of a sensor calibration device provided in an embodiment of the present disclosure;

[0088] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0089] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field based on the present disclosure belong to the scope of protection of the present disclosure.

[0090] In order to simplify the calibration process of laser radar and camera, so as to adapt to the calibration of sensors in the field of autonomous driving, the present disclosure provides a sensor calibration method, which is applied in a sensor calibration system, such as Figure 1 As shown, the system includes: a laser radar 101, a camera 102 and an electronic device 103. The electronic device 103 may be a roadside computing unit installed beside the road or a device with data processing capability such as a vehicle computer in a vehicle.

[0091] LiDAR 101, used to collect point clouds.

[0092] The camera 102 is used to capture images.

[0093] The electronic device 103 is used to calibrate the laser radar 101 and the camera 102. The specific calibration method can be referred to the following description.

[0094] Figure 1 Only two laser radars 101 and one camera 102 are shown as examples. In actual application scenarios, the number of devices included in the sensor calibration system is not limited to Figure 1 Quantity shown.

[0095] Combination Figure 1 The sensor calibration method provided in the embodiment of the present disclosure can be applied in electronic devices, such as Figure 2 As shown, the method comprises the following steps:

[0096] S201, obtaining a target point cloud collected by a laser radar and a target image collected by a camera, wherein the time difference between the collection time of the target point cloud and the collection time of the target image is less than a preset time difference.

[0097] In an embodiment of the present disclosure, the electronic device may include a time synchronization device, and the electronic device can use the time synchronization device to unify the moment when the laser radar scans to obtain the point cloud and the moment when the camera captures the image into the same time domain, thereby determining the acquisition time difference between the point cloud and the image, and grouping the point clouds and images whose acquisition time difference is less than a preset threshold, and taking the group closest to the current moment as the target point cloud and target image.

[0098] For example, whenever the electronic device receives a frame of point cloud, it unifies the acquisition time of the point cloud into the specified time domain, and whenever it receives an image, it unifies the acquisition time of the image into the specified time domain.

[0099] In addition, after each unified point cloud acquisition moment, the image with the closest acquisition time difference to the point cloud can be determined, and it can be calculated whether the acquisition time difference between the point cloud and the image is less than a preset threshold. If so, the image is used as the target image and the point cloud is used as the target point cloud.

[0100] Alternatively, at regular intervals, the point cloud closest to the current moment is taken as the target point cloud, and the image with the smallest acquisition time difference with the target point cloud is determined, and it is calculated whether the acquisition time difference between the image and the target point cloud is less than a preset threshold. If so, the image is taken as the target image.

[0101] S202, input the target point cloud and the target image into a pre-trained calibration model to obtain a rough calibration transformation matrix output by the calibration model, wherein the calibration model is a model obtained by training a neural network model based on the sample point cloud and the sample image.

[0102] Each transformation matrix in the embodiments of the present disclosure, such as the coarse calibration transformation matrix, the first transformation matrix, and the second transformation matrix described below, is used to represent the coordinate conversion relationship between the coordinate system of the point cloud collected by the lidar and the coordinate system of the camera.

[0103] S203: Determine the matching degree corresponding to the coarse calibration transformation matrix.

[0104] Among them, the matching degree corresponding to the coarse calibration transformation matrix is: the matching degree between the projected target point cloud and the target image after the target point cloud is projected to the coordinate system of the target image using the coarse calibration transformation matrix. In other words, the matching degree indicates the degree of alignment between the position of the object represented by multiple laser points in the projected target point cloud and the position of the object in the target image after the target point cloud is projected to the coordinate system of the target image using the coarse calibration matrix. That is, the matching degree can indicate the accuracy of the coarse calibration matrix.

[0105] S204, perform a first specified transformation on the coarse calibration transformation matrix to obtain a first transformation matrix, and calculate the matching degree corresponding to the first transformation matrix, and determine whether the matching degree corresponding to the first transformation matrix is ​​greater than the matching degree corresponding to the coarse calibration transformation matrix. If yes, execute S205; otherwise, execute S206.

[0106] The transformation matrix in the embodiment of the present disclosure includes a translation matrix and a rotation matrix, and the first specified transformation may be a translation transformation and / or a rotation transformation. The translation transformation of the transformation matrix may be adding a preset perturbation parameter to the translation matrix, and the rotation transformation of the transformation matrix may be adding a preset perturbation parameter to the rotation matrix.

[0107] The method for calculating the matching degree corresponding to the first transformation matrix is ​​the same as the method for calculating the matching degree corresponding to the rough calibration transformation matrix. Accordingly, the matching degree corresponding to the first transformation matrix is: the matching degree between the projected target point cloud and the target image after projecting the target point cloud to the coordinate system of the target image using the first transformation matrix; the matching degree corresponding to the first transformation matrix can represent the accuracy of the first transformation matrix.

[0108] S205: Use the first transformation matrix as a calibration result.

[0109] When the matching degree corresponding to the first transformation matrix is ​​greater than the matching degree corresponding to the coarse calibration transformation matrix, it means that the first transformation matrix has higher accuracy, so the first transformation matrix is ​​used as the calibration result.

[0110] S206: Use the coarse calibration transformation matrix as the calibration result.

[0111] When the matching degree corresponding to the first transformation matrix is ​​less than or equal to the matching degree corresponding to the coarse calibration transformation matrix, it means that the coarse calibration transformation matrix has higher accuracy, so the coarse calibration transformation matrix is ​​used as the calibration result.

[0112] After obtaining the calibration results, you can use the calibration results to project the point cloud to the camera's coordinate system, and then use the camera's intrinsic parameter matrix to project the point cloud in the camera's coordinate system to the image's coordinate system. Alternatively, use the camera's intrinsic parameter matrix to project the pixels in the image to the camera's coordinate system, and then use the calibration results to project the pixels in the camera's coordinate system to the laser radar's coordinate system. This allows the point cloud and image to be combined to achieve functions such as target recognition and target tracking.

[0113] The sensor calibration method provided by the embodiment of the present disclosure can obtain the target point cloud and target image whose acquisition time difference is less than the preset threshold, and use the calibration model to perform rough calibration on the target point cloud and target image to obtain a rough calibration transformation matrix. Then determine the matching degree corresponding to the rough calibration transformation matrix, perform a first specified transformation on the rough calibration transformation matrix, and obtain a first transformation matrix. When the matching degree corresponding to the first transformation matrix is ​​greater than the matching degree corresponding to the rough calibration transformation matrix, the first transformation matrix is ​​used as the calibration result; otherwise, the rough calibration transformation matrix is ​​used as the calibration result, thereby realizing the fine calibration of the transformation matrix. It can be seen that in the embodiment of the present disclosure, the rough calibration is completed by the calibration model, and the rough calibration matrix is ​​transformed, and then the fine calibration is completed by the matching degree of the transformation matrix. Compared with the calibration result obtained by a single calibration method, the calibration result obtained by combining the rough calibration and the fine calibration has a higher accuracy. Moreover, the embodiment of the present disclosure does not need to set the calibration object, so the calibration process is simplified, and it can adapt to the calibration of sensors in the field of autonomous driving. That is, the embodiment of the present disclosure can improve the calibration accuracy of sensors in the field of autonomous driving.

[0114] In some embodiments of the present disclosure, after acquiring the target point cloud and the target image, the electronic device may further perform filtering processing on the target point cloud and the target image respectively.

[0115] The filtering process of the target point cloud includes: using a statistical filtering algorithm to remove outliers in the target point cloud. And using a conditional filtering algorithm, by setting the filtering conditions as the physical position represented by the laser point exceeds the horizontal field of view of the camera, and the distance between the physical position represented by the laser point and the laser radar exceeds the specified distance, the laser points that exceed the horizontal field of view of the camera and the laser points that are far away from the laser radar are filtered out. This reduces the environmental noise in the target point cloud, reduces the number of laser points included in the target point cloud, and thus reduces the time consumed by calibration and improves the calibration efficiency.

[0116] The filtering process of the target image includes: modeling using the pinhole model according to the camera's intrinsic parameter matrix and distortion parameters, and correcting the target image using the modeling results, thereby removing the image distortion caused by the radial distortion and tangential distortion of the camera, that is, reducing the camera noise and improving the accuracy of calibration. Among them, the pinhole model refers to the object's light passing through the center of the camera to form an inverted image on the imaging plane, and the object and the image satisfy the relationship of similar triangles.

[0117] Alternatively, the embodiment of the present disclosure may also adopt other methods to filter the target point cloud and the target image, and the embodiment of the present disclosure does not specifically limit this.

[0118] The disclosed embodiment can filter the target point cloud and the target image, thereby reducing the interference of environmental noise on the calibration result, and reduces the number of laser points included in the point cloud, which can reduce the amount of calibration calculation, thereby improving the accuracy and speed of calibration.

[0119] In some embodiments of the present disclosure, before the above-mentioned S202 uses the calibration model to perform coarse calibration, the electronic device may also perform foreground segmentation on the target point cloud and the target image, thereby segmenting the foreground in the target point cloud and the foreground in the target image, thereby reducing the impact of interference factors in the background area on the calibration.

[0120] The foreground segmentation method includes: identifying the foreground area in the target point cloud, deleting the laser points included in the background area in the target point cloud, and obtaining a processed target point cloud; and identifying the foreground area in the target image, deleting the pixel points included in the background difference in the target image, and obtaining a processed target image. Correspondingly, the method of performing rough calibration in S202 can be implemented as follows: inputting the processed target point cloud and the processed target image into the calibration model.

[0121] Optionally, the foreground segmentation of the target point cloud can be implemented as follows: pre-acquire one or more frames of point cloud, and establish a grid map for each frame of point cloud by using the grid map method, and record the number of laser points included in each grid in the grid map. Among them, the pre-acquired point cloud is a point cloud obtained by scanning a static environment with a laser radar, that is, the environment does not contain moving objects. Afterwards, a grid map can be established for the target point cloud, and for each grid, it is determined whether the difference between the number of laser points included in the grid and the number of laser points included in the grid in the pre-acquired point cloud is greater than a preset difference. If so, it means that the possibility of including a moving object in the current grid is low, so the laser points included in the grid in the current point cloud are deleted; if not, it means that the possibility of including a moving object in the current grid is high, so the laser points included in the grid in the target point cloud are retained. Thereby, the foreground area in the target point cloud is extracted.

[0122] The method of performing foreground segmentation on the target image can be implemented as follows: using the Gaussian Mixture Model (GMM) algorithm to perform foreground segmentation on the current image. The principle of the GMM algorithm is: using the GMM algorithm to model multiple consecutive images, that is, to establish a GMM model for the pixels at the same position in multiple images, and the GMM model includes multiple single models. For each pixel in the target image, it is determined whether the pixel meets the GMM model corresponding to the position of the pixel, that is, it is determined whether there is a single model matching the pixel in the GMM model corresponding to the position of the pixel. If it meets, the weight, expectation and variance of the single model matching the pixel are updated according to the pixel value of the pixel; if it does not meet, the weight of the GMM model is updated according to the pixel value of the pixel. When there is a matching single model for the pixel, sort the single models included in the GMM model in descending order according to the ratio of weight to variance, and determine whether the ratio of weight to variance of the single model corresponding to the pixel is greater than the model threshold; if so, determine that the pixel belongs to the background, if not, determine that the pixel belongs to the foreground. The value range of the model threshold is [0,1]. Multiple thresholds can be set in multiple different environments, and the foreground segmentation effect under different thresholds in each environment is determined. The threshold with the best foreground segmentation effect in each environment is taken, and the average of these optimal thresholds is taken as the model threshold.

[0123] When an object tends to be stationary, it has the same position in continuous images, and the pixel value at that position changes less, so the variance of the corresponding Gaussian distribution is smaller and the corresponding weight is larger. For moving objects, generally no single model is matched, so the variance of the Gaussian model corresponding to the position of the moving object in the image is larger and the weight is lower. Therefore, the GMM algorithm can determine the moving objects in the image through the variance and weight of the model, thereby achieving foreground segmentation.

[0124] Alternatively, the embodiment of the present disclosure may also adopt other methods to perform foreground segmentation on the target point cloud and the target image, and the embodiment of the present disclosure does not make any specific limitation to this.

[0125] The disclosed embodiment performs foreground segmentation on the target point cloud and the target image, thereby reducing the interference of environmental noise in the background area on the calibration result and improving the calibration accuracy.

[0126] In some embodiments of the present disclosure, see Figure 3 The above S203 determines the matching degree corresponding to the rough calibration transformation matrix, including the following steps:

[0127] S2031, converting the target image into a grayscale image, and for each pixel in the grayscale image, setting the pixel value of the pixel to the maximum value of the pixel difference between the pixel and a plurality of adjacent pixels, to obtain an edge image.

[0128] In the disclosed embodiment, for each pixel in the grayscale image, the absolute value of the difference between the pixel value of the pixel and the pixel values ​​of the eight adjacent pixels is calculated to obtain eight absolute values, and the maximum absolute value of the eight absolute values ​​is used as the pixel value of the pixel.

[0129] By processing the target image in this way, the edges of objects in the target image can be made more obvious and other parts more blurred, so that the contrast between the edges and non-edges of objects in the image is more obvious. Therefore, the processed image is called an edge image.

[0130] S2032: Perform image interpolation processing on the edge image.

[0131] Optionally, a bilinear difference algorithm, a nearest neighbor difference algorithm or an inverse distance transform algorithm may be used to perform image interpolation processing on the edge image, thereby augmenting the edge of the object in the edge image, thereby increasing the possibility that the laser points included in the target point cloud coincide with the edge of the object in the edge image after the target point cloud is projected onto the edge image, thereby reducing the situation where the calibration result obtained by calibration is a local optimal solution.

[0132] For example, the edge image may be subjected to inverse distance transformation using formula (1), thereby achieving image interpolation of the edge image.

[0133]

[0134] Among them, D i,j is the pixel value of the pixel point in the i-th row and j-th column in the edge image after the inverse distance transformation. α and γ are both preset transformation parameters, and their value ranges are both [0, 1]. i,j is the pixel value of the pixel in the i-th row and j-th column in the edge image, E x,y is the pixel value of the pixel at the xth row and yth column in the edge image, and the pixel value of the pixel at the xth row and yth column is the maximum value of all pixel values ​​in the edge image, that is, the pixel is the brightest pixel in the edge image.

[0135] S2033. For each laser point in the target point cloud, calculate the product of the depth value of the laser point and the pixel value of the target pixel point.

[0136] The target pixel is the pixel in the interpolated edge image that is the same as the position of the laser point projected to the coordinate system of the target image using the coarse calibration matrix. During projection, the coarse calibration matrix can be used to project the laser point to the camera's coordinate system, and then the camera's intrinsic parameter matrix can be used to project the laser point in the camera's coordinate system to the target image's coordinate system.

[0137] Each laser point is a three-dimensional coordinate point, and the three-dimensional coordinates include horizontal value, height value and depth value. The horizontal value represents the horizontal distance between the physical position corresponding to the laser point and the laser radar, the height value represents the height distance between the physical position corresponding to the laser point and the laser radar, and the depth value represents the depth distance between the physical position corresponding to the laser point and the laser radar.

[0138] In one embodiment, before S2033, the distance between adjacent laser points can be determined for multiple laser points obtained by scanning the same laser beam in the target point cloud, and the laser points whose distances to adjacent laser points exceed a preset threshold are deleted to obtain a screened target point cloud.

[0139] Since laser beams can generate laser points when scanning objects, the distance between adjacent laser points generated by laser beams scanning the same object is relatively close. If the distance between a laser point and the adjacent laser points on both sides is relatively far, it means that the laser point and the adjacent laser points on both sides do not belong to the same object, and the laser point may be a laser point obtained by interference from the background area scanned by the laser beam, so the laser point is deleted to reduce the noise in the target point cloud.

[0140] Accordingly, when executing S2033, the product of the depth value of the laser point and the pixel value of the target pixel point can be calculated for each laser point in the filtered target point cloud. Since the target point cloud is filtered by the above method, the number of laser points included in the target point cloud can be reduced, thereby improving the calibration efficiency; and the laser points obtained by scanning the objects in the foreground are also retained, so the calibration accuracy will not be affected.

[0141] In another embodiment, the target point cloud may not be screened before S2033, so that when S2033 is executed, the product between the depth value of each laser point in the target point cloud and the pixel value of the target pixel point is directly calculated, thereby reducing the time consumed in screening the target point cloud and improving the calibration efficiency.

[0142] S2034. Sum the calculated products to obtain a matching degree corresponding to the rough calibration transformation matrix.

[0143] A product is obtained for each laser point through S2033. When S2034 is executed, the products obtained in S2033 are summed to obtain the matching degree corresponding to the rough calibration transformation matrix.

[0144] Through the above method, the embodiment of the present disclosure can process the target image, retain the pixel points at the edge of the object in the target image, and determine the degree of alignment between the target point cloud and the edge of the object in the target image by projecting the target point cloud to the coordinate system of the target image using the coarse calibration matrix, that is, obtain the matching degree corresponding to the coarse calibration matrix, so that the obtained matching degree can represent the accuracy of the coarse calibration matrix.

[0145] In some embodiments of the present disclosure, the above-mentioned method of performing fine calibration in S204-S206 can be implemented as the following steps:

[0146] Step 1: Add a variety of disturbance parameters to the rotation matrix and translation matrix of the rough calibration transformation matrix respectively, and use each combination of the rotation matrix and translation matrix after adding the disturbance parameters as a first transformation matrix.

[0147] In the disclosed embodiment, multiple perturbation parameters are added to the rotation matrix to obtain multiple rotation matrices after the perturbation parameters are added; multiple perturbation parameters are added to the translation matrix to obtain multiple translation matrices after the perturbation parameters are added. For each rotation matrix after the perturbation parameters are added, the combination of the rotation matrix and each translation matrix after the perturbation parameters are added is used as a first transformation matrix.

[0148] The rotation matrix can be expressed as (roll, yaw, pitch), and the translation matrix can be expressed as (x, y, z), where roll is the rotation angle around the Z axis, yaw is the rotation angle around the Y axis, pitch is the rotation angle around the X axis, x is the translation along the X axis, y is the translation along the Y axis, z is the translation along the Z axis, the X axis points to the front of the laser radar, the Y axis points to the left of the laser radar, and the Z axis points to the top of the laser radar.

[0149] In the embodiment of the present disclosure, adding multiple perturbation parameters to the rotation matrix can cause the values ​​of the three dimensions included in the rotation matrix to increase or decrease to different degrees; similarly, adding multiple perturbation parameters to the translation matrix can cause the values ​​of the three dimensions included in the translation matrix to increase or decrease to different degrees.

[0150] For example, the perturbation parameters added to the three dimensions of the rotation matrix each time are the same, and the various perturbation parameters are: -0.5°, -0.4°, -0.3°, -0.2°, -0.1°, 0°, 0.1°, 0.2°, 0.3°, 0.4°, 0.5°. The perturbation parameters added to the three dimensions of the translation matrix each time are the same, and the various perturbation parameters are: -0.2, -0.16, -0.12, -0.08, -0.04, 0, 0.04, 0.08, 0.12, 0.16, 0.2, and the default unit is centimeters.

[0151] Step 2: Determine the matching degree corresponding to each first transformation matrix, and determine the maximum matching degree among the matching degrees corresponding to the first transformation matrices.

[0152] The matching degree corresponding to the first transformation matrix is: the matching degree between the projected target point cloud and the target image after projecting the target point cloud to the coordinate system of the target image using the first transformation matrix. The matching degree corresponding to the first transformation matrix can represent the accuracy of the first transformation matrix.

[0153] The method for determining the matching degree corresponding to the first transformation matrix is ​​the same as the method for determining the matching degree corresponding to the rough calibration matrix, and reference may be made to the above description, which will not be repeated here.

[0154] Step 3: If the maximum matching degree is greater than the matching degree corresponding to the coarse calibration transformation matrix, the first transformation matrix with the maximum matching degree is used as the calibration result. Otherwise, if the maximum matching degree is less than or equal to the matching degree corresponding to the coarse calibration transformation matrix, the calibration result is retained.

[0155] Since the matching degree corresponding to the transformation matrix can represent the accuracy of the transformation matrix, when the maximum matching degree is greater than the matching degree corresponding to the coarse calibration transformation matrix, it means that the accuracy of the first transformation matrix with the maximum matching degree is higher than the accuracy of the coarse calibration matrix. Therefore, the first transformation matrix with the maximum matching degree is used as the calibration result, thereby achieving an optimized coarse calibration result.

[0156] Through the above method, the embodiment of the present disclosure can add disturbance parameters on the basis of the coarse calibration transformation matrix to obtain multiple first transformation matrices, and compare the accuracy of each first transformation matrix with the coarse calibration transformation matrix, and use the one with the highest accuracy as the updated calibration result. That is, the embodiment of the present disclosure can find a calibration result with higher accuracy around the coarse calibration transformation matrix, thereby optimizing the coarse calibration result.

[0157] In some embodiments of the present disclosure, the above-mentioned S202 performs coarse calibration in order to obtain an initial calibration result, so as to optimize the initial calibration result by fine calibration later. Therefore, when the target image and the target point cloud are acquired for the first time, coarse calibration is required to obtain a coarse calibration result and further perform fine calibration. When the target image and the target point cloud are acquired later, since there is already a calibration result with a certain accuracy, it is not necessary to perform coarse calibration again, and fine calibration can be directly performed on the current calibration result, so as to further optimize the current calibration result.

[0158] That is, before inputting the target point cloud and the target image into the pre-trained calibration model in the above S202, the electronic device may also determine whether there is a calibration result.

[0159] If so, perform the first specified transformation on the calibration result to obtain the second transformation matrix. Based on the target point cloud and the target image, calculate the matching degree corresponding to the calibration result and the matching degree corresponding to the second transformation matrix respectively. If the matching degree corresponding to the second transformation matrix is ​​greater than the matching degree corresponding to the calibration result, use the second transformation matrix as the updated calibration result.

[0160] If not, execute the above S202.

[0161] The method for obtaining the second transformation matrix may refer to the method for obtaining the first transformation matrix, which will not be described in detail here.

[0162] The matching degree corresponding to the calibration result is the matching degree between the projected target point cloud and the target image by projecting the target point cloud to the coordinate system of the target image using the calibration result; the matching degree corresponding to the second transformation matrix is ​​the matching degree between the projected target point cloud and the target image by projecting the target point cloud to the coordinate system of the target image using the second transformation matrix. The method for calculating the matching degree corresponding to the calibration result and the matching degree corresponding to the second transformation matrix can refer to the method for calculating the matching degree corresponding to the rough calibration matrix, which will not be repeated here.

[0163] Through the above method, the embodiment of the present disclosure can first perform a rough calibration to obtain a rough calibration transformation matrix as the initial calibration result when there is no calibration result, and then perform a fine calibration to optimize the initial calibration result. After the target point cloud and target image are subsequently acquired again, a fine calibration can be further performed directly on the basis of the calibration result obtained by the most recent optimization, thereby further optimizing the calibration result. This enables the embodiment of the present disclosure to continuously optimize the calibration result, thereby improving the accuracy of the calibration result, so as to adapt to the current scene in real time.

[0164] In some embodiments of the present disclosure, the calibration model in S202 above can be obtained by training through the following steps:

[0165] Step 1: The sample point clouds and sample images whose acquisition time difference is less than a preset threshold are taken as a group of training samples, and the standard transformation matrix of the group of training samples is taken as the label of the group of training samples.

[0166] The standard transformation matrix of a group of training samples is a calibration result obtained by manually or other high-precision methods to calibrate the group of training samples.

[0167] Optionally, sample point clouds and sample images in multiple scenes and a standard transformation matrix of the group of training samples may be obtained to improve the generalization ability of the calibration model.

[0168] Step 2: For each group of training samples, the standard transformation matrix of the group of training samples is subjected to a second specified transformation, and the sample point cloud of the group of training samples is subjected to a second specified transformation, the transformed sample point cloud and the sample images included in the group of training samples are used as a group of training samples, and the transformation matrix after the second specified transformation is used as the label of the group of training samples.

[0169] The second specified transformation includes a rotation transformation and / or a translation transformation. A plurality of perturbation parameters can be added to the rotation matrix and the translation matrix of the standard transformation matrix, and each combination of the rotation matrix and the translation matrix after the perturbation parameters are added is used as a second transformation matrix.

[0170] For example, the perturbation parameters added to the three dimensions of the rotation matrix are the same each time, and the various perturbation parameters are: -20°, -19.99°, -19.98°, ..., 20°. The perturbation parameters added to the three dimensions of the translation matrix are the same each time, and the various perturbation parameters are: -200, -199.08, -199.06, ..., 200, and the default unit is centimeters.

[0171] The disclosed embodiment performs the same translation and / or rotation transformation on the standard transformation matrix and the sample point cloud, so that the transformed standard transformation matrix can be used as a label for the sample image and the transformed sample point cloud. For example, each dimension of the translation matrix of the standard transformation matrix is ​​increased by 1, and similarly, the coordinates of each laser point in the sample point cloud are increased by 1 on the X-axis, Y-axis, and Z-axis, respectively.

[0172] Step 3: Use each group of training samples and the labels of each group of training samples to train the neural network model and obtain a calibrated model.

[0173] In the embodiment of the present disclosure, the training samples can be input into the neural network model to obtain the transformation matrix output by the neural network model. The error between the output transformation matrix and the label of the input training sample is determined, and the model parameters of the neural network model are adjusted using the error. Then, the step of inputting the training samples into the neural network model is returned until the neural network model converges, and the current neural network model is used as the calibration model. For example, the neural network model can be a convolutional neural network (CNN) or a recurrent neural network (RNN), etc., which is not specifically limited in the embodiment of the present disclosure.

[0174] By adopting the above method, the embodiment of the present disclosure can expand more training sample groups and their corresponding labels based on the training sample groups and the labels of the training sample groups, thereby increasing the number of training sample groups and improving the generalization ability of the calibration model.

[0175] The sensor calibration method provided by the embodiment of the present disclosure is described below in combination with actual application scenarios.

[0176] See also Figure 4 , Figure 4 It shows the road environment at different angles. Figure 4 In the vehicle-road cooperative automatic driving scenario shown, the roadside is provided with: a roadside computing unit 1, a positioning module 2, a synchronization module 3, a laser radar 4, a main camera 5, a blind spot camera 6 and a roadside unit (RSU) module 7. The roadside computing unit 1 can be a mobile edge computing (MEC) module.

[0177] Among them, the laser radar 4 is used to collect 360° full range three-dimensional data in the environment, that is, point cloud.

[0178] The main camera 5 and the blind spot camera 6 are both used to capture two-dimensional data, ie, images, in the environment in which they are located, and the shooting angles of the main camera 5 and the blind spot camera 6 are not completely the same.

[0179] The synchronization module 3 is used to synchronize the point cloud collected by the laser radar 4 and the images taken by the main camera 5 and the blind spot camera 6, that is, to unify the data collected by each sensor into the same time domain.

[0180] The roadside computing unit 1 is used to complete the calibration of the laser radar and the main camera 5, as well as the calibration of the laser radar 4 and the blind spot camera 6 based on the data collected by the laser radar 4, the main camera 5 and the blind spot camera 6; and to identify the targets in the environment and complete target tracking.

[0181] The positioning module 2 is used to receive the latitude and longitude data and timestamp information sent by the satellite, and complete the positioning of the roadside calculation unit 1, the positioning module 2, the synchronization module 3, the laser radar 4, the main camera 5, the blind spot camera 6 and the RSU module 7.

[0182] The RSU module 7 is used to receive the recognition result of the target by the roadside computing unit 1 and send the recognition result to the vehicle end.

[0183] See also Figure 5 The overall process of the sensor calibration method provided by the embodiment of the present disclosure is described below:

[0184] S501, periodically acquiring a target point cloud and a target image.

[0185] S502: Filter the target point cloud and dedistort the target image.

[0186] S503: Determine whether there is a calibration result. If yes, execute S510; if not, execute S504.

[0187] S504, identifying the foreground area in the target point cloud, deleting the laser points included in the background area in the target point cloud, obtaining a processed target point cloud, and identifying the foreground area in the target image, deleting the pixel points included in the background area in the target image, and obtaining a processed target image.

[0188] S505 , input the processed target point cloud and target image into a pre-trained calibration model to obtain a coarse calibration transformation matrix output by the calibration model.

[0189] S506: Determine the matching degree corresponding to the coarse calibration transformation matrix, perform a first specified transformation on the coarse calibration transformation matrix to obtain a first transformation matrix, and calculate the matching degree corresponding to the first transformation matrix.

[0190] S507: Determine whether the matching degree corresponding to the first transformation matrix is ​​greater than the matching degree corresponding to the coarse calibration transformation matrix. If yes, execute S508; if no, execute S509.

[0191] S508: Use the first transformation matrix as a calibration result.

[0192] S509: Use the coarse calibration transformation matrix as the calibration result.

[0193] S510, performing a first specified transformation on the calibration result to obtain a second transformation matrix, and calculating the matching degree corresponding to the calibration result and the matching degree corresponding to the second transformation matrix based on the target point cloud and the target image, respectively. The calibration result is the calibration result obtained by the most recent update.

[0194] S511: Determine whether the matching degree corresponding to the second transformation matrix is ​​greater than the matching degree corresponding to the calibration result. If yes, execute S512; if no, execute S513.

[0195] S512: Use the second transformation matrix as an updated calibration result.

[0196] S513. Keep the calibration result.

[0197] Figure 5 The specific implementation method of each step can refer to the above description and will not be repeated here.

[0198] Traditional sensor calibration methods without specific calibration targets are divided into: traditional feature extraction and registration calibration methods and deep learning-based calibration methods.

[0199] In the traditional feature extraction and registration calibration method, environmental information such as planes, wire bundles, and feature points are extracted from point clouds and images, and the transformation matrix is ​​determined based on the initial calibration results. However, the initial calibration results rely on manual acquisition, so this method consumes a lot of manpower costs.

[0200] In the calibration method based on deep learning, the transformation matrix is ​​identified through the deep learning model. However, in order to ensure the recognition accuracy of the model, this method requires a large amount of accurate calibration data during the model training process, but accurate calibration data is difficult to obtain, so it is difficult to obtain a deep learning model with high recognition accuracy, resulting in poor calibration accuracy of this method.

[0201] The disclosed embodiment combines the coarse calibration and fine calibration, and continuously optimizes the calibration result through iteration of fine calibration, which makes up for the problem of low accuracy of coarse calibration using the calibration model. Moreover, the initial calibration result in the embodiment of the present application is obtained by coarse calibration through the calibration model, so there is no need for manually determined initial calibration results, thereby reducing the workload of manual calibration and reducing labor costs.

[0202] In addition, in the field of autonomous driving, whether it is a roadside sensor or a sensor installed on a vehicle, the natural environment in which it is located is complex, and the relative position and relative angle of the installation are easily affected by severe weather such as strong winds and change, resulting in the failure of the pre-calibration results. However, the disclosed embodiment can continuously optimize the calibration results in real time during the process of sensor data collection, so that the transformation matrix obtained by calibration can adapt to the current environment in real time, realize the monitoring and correction of the calibration results, thereby increasing the robustness of adapting to complex environments, meeting the reliability and accuracy requirements of calibration in autonomous driving scenarios, and thus improving the accuracy and reliability of environmental perception and object tracking in autonomous driving scenarios.

[0203] Based on the same inventive concept, corresponding to the above method embodiment, the embodiment of the present disclosure provides a multi-sensor joint calibration device, such as Figure 6 As shown, the device includes: an acquisition module 601, a rough calibration module 602, a determination module 603 and a fine calibration module 604;

[0204] An acquisition module 601 is used to acquire a target point cloud acquired by a laser radar and a target image acquired by a camera, wherein the time difference between the acquisition time of the target point cloud and the acquisition time of the target image is less than a preset time difference;

[0205] A coarse calibration module 602 is used to input the target point cloud and target image obtained by the acquisition module 601 into a pre-trained calibration model to obtain a coarse calibration transformation matrix output by the calibration model, where the calibration model is a model obtained by training a neural network model based on the sample point cloud and the sample image;

[0206] The determination module 603 is used to determine the matching degree corresponding to the rough calibration transformation matrix obtained by the rough calibration module 602, where the matching degree is the matching degree between the projected target point cloud and the target image after the target point cloud is projected onto the coordinate system of the target image using the rough calibration transformation matrix;

[0207] The fine calibration module 604 is used to perform a first specified transformation on the coarse calibration transformation matrix obtained by the coarse calibration module 602 to obtain a first transformation matrix, and calculate the matching degree corresponding to the first transformation matrix. If the matching degree corresponding to the first transformation matrix is ​​greater than the matching degree corresponding to the coarse calibration transformation matrix determined by the determination module 603, the first transformation matrix is ​​used as the calibration result; otherwise, the coarse calibration transformation matrix is ​​used as the calibration result;

[0208] Among them, the transformation matrix is ​​used to represent the coordinate conversion relationship between the coordinate system of the point cloud collected by the lidar and the coordinate system of the camera.

[0209] In some embodiments of the present disclosure, the determination module 603 is specifically configured to:

[0210] The target image is converted into a grayscale image, and for each pixel in the grayscale image, the pixel value of the pixel is set to the maximum value of the pixel difference between the pixel and a plurality of adjacent pixels to obtain an edge image;

[0211] Perform image interpolation processing on edge images;

[0212] For each laser point in the target point cloud, the product of the depth value of the laser point and the pixel value of the target pixel point is calculated; the target pixel point is the pixel point in the edge image after interpolation processing, which is the same as the position of the laser point projected to the coordinate system of the target image using the coarse calibration matrix;

[0213] The calculated products are summed to obtain the matching degree corresponding to the rough calibration transformation matrix.

[0214] In some embodiments of the present disclosure, the device further comprises:

[0215] A screening module is used for determining the distance between adjacent laser points for a plurality of laser points scanned by the same laser beam in the target point cloud before calculating the product between the depth value of the laser point and the pixel value of the target pixel point for each laser point in the target point cloud, and deleting the laser points whose distances to the adjacent laser points exceed a preset threshold value, so as to obtain a screened target point cloud;

[0216] The determination module 603 is specifically used for:

[0217] For each laser point in the filtered target point cloud, the product between the depth value of the laser point and the pixel value of the target pixel point is calculated.

[0218] In some embodiments of the present disclosure, the transformation matrix includes a rotation matrix and a translation matrix; the fine calibration module 604 is specifically used to:

[0219] Adding a plurality of disturbance parameters to the rotation matrix and the translation matrix of the rough calibration transformation matrix respectively, and taking each combination of the rotation matrix and the translation matrix after adding the disturbance parameters as a first transformation matrix;

[0220] Determine a matching degree corresponding to each first transformation matrix, and determine a maximum matching degree among the matching degrees corresponding to the first transformation matrices;

[0221] If the maximum matching degree is greater than the matching degree corresponding to the coarse calibration transformation matrix, the first transformation matrix with the maximum matching degree is used as the calibration result.

[0222] In some embodiments of the present disclosure, the device further comprises:

[0223] A judgment module, used to judge whether there is a calibration result before inputting the target point cloud and the target image into the pre-trained calibration model;

[0224] The fine calibration module 604 is further configured to, if the judgment result of the judgment module is yes, perform a first specified transformation on the calibration result to obtain a second transformation matrix, and respectively calculate the matching degree corresponding to the calibration result and the matching degree corresponding to the second transformation matrix based on the target point cloud and the target image, and if the matching degree corresponding to the second transformation matrix is ​​greater than the matching degree corresponding to the calibration result, use the second transformation matrix as the updated calibration result;

[0225] The calling module is used to call the rough calibration module 602 to execute the step of inputting the target point cloud and the target image into the pre-trained calibration model if the judgment result of the judgment module is no.

[0226] In some embodiments of the present disclosure, the device further comprises:

[0227] The foreground recognition module is used to identify the foreground area in the target point cloud and delete the laser points included in the background area in the target point cloud before inputting the target point cloud and the target image into the pre-trained calibration model to obtain the processed target point cloud; identify the foreground area in the target image and delete the pixel points included in the background area in the target image to obtain the processed target image;

[0228] The rough calibration module 602 is specifically used for:

[0229] The processed target point cloud and the processed target image are input into the calibration model.

[0230] In some embodiments of the present disclosure, the device further includes a training module, the training module being configured to:

[0231] The sample point clouds and sample images whose acquisition time difference is less than a preset threshold are taken as a group of training samples, and the standard transformation matrix of the group of training samples is taken as the label of the group of training samples;

[0232] For each group of training samples, the standard transformation matrix of the group of training samples is subjected to a second specified transformation, and the sample point cloud of the group of training samples is subjected to a second specified transformation, the transformed sample point cloud and the sample images included in the group of training samples are used as a group of training samples, and the transformation matrix after the second specified transformation is used as a label of the group of training samples;

[0233] The neural network model is trained using each group of training samples and the labels of each group of training samples to obtain a calibration model.

[0234] The present disclosure also provides an electronic device, such as Figure 7 As shown, it includes a processor 701, a communication interface 702, a memory 703 and a communication bus 704, wherein the processor 701, the communication interface 702, and the memory 703 communicate with each other through the communication bus 704.

[0235] Memory 703, used for storing computer programs;

[0236] The processor 701 is used to implement the method steps in the above method embodiment when executing the program stored in the memory 703.

[0237] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0238] The communication interface is used for communication between the above electronic device and other devices.

[0239] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0240] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0241] In another embodiment provided by the present disclosure, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned sensor calibration methods are implemented.

[0242] In another embodiment provided by the present disclosure, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any sensor calibration method in the above embodiments.

[0243] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present disclosure is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.

[0244] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0245] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system and device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0246] The above description is only a preferred embodiment of the present disclosure and is not intended to limit the protection scope of the present disclosure. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present disclosure are included in the protection scope of the present disclosure.

Claims

1. A multi-sensor joint calibration method, characterized in that: The method comprises: Acquire a target point cloud collected by a laser radar and a target image collected by a camera, wherein the time difference between the collection time of the target point cloud and the collection time of the target image is less than a preset time difference; Inputting the target point cloud and the target image into a pre-trained calibration model to obtain a rough calibration transformation matrix output by the calibration model, wherein the calibration model is a model obtained by training a neural network model based on the sample point cloud and the sample image; Determine a matching degree corresponding to the rough calibration transformation matrix, wherein the matching degree is a matching degree between the projected target point cloud and the target image by projecting the target point cloud onto a coordinate system of the target image using the rough calibration transformation matrix; Performing a first specified transformation on the coarse calibration transformation matrix to obtain a first transformation matrix, and calculating a matching degree corresponding to the first transformation matrix; if the matching degree corresponding to the first transformation matrix is ​​greater than the matching degree corresponding to the coarse calibration transformation matrix, taking the first transformation matrix as the calibration result; otherwise, taking the coarse calibration transformation matrix as the calibration result; the first specified transformation is a translation transformation and / or a rotation transformation; Among them, the transformation matrix is ​​used to represent the coordinate conversion relationship between the coordinate system of the point cloud collected by the laser radar and the coordinate system of the camera.

2. The method according to claim 1, characterized in that The determining the matching degree corresponding to the rough calibration transformation matrix includes: The target image is converted into a grayscale image, and for each pixel in the grayscale image, a pixel value of the pixel is set to the maximum value of pixel differences between the pixel and a plurality of adjacent pixels, to obtain an edge image; Performing image interpolation processing on the edge image; For each laser point in the target point cloud, the product of the depth value of the laser point and the pixel value of the target pixel point is calculated; the target pixel point is the pixel point in the edge image after interpolation processing, which is the same as the position of the laser point projected to the coordinate system of the target image using the coarse calibration transformation matrix; The calculated products are summed to obtain the matching degree corresponding to the rough calibration transformation matrix.

3. The method according to claim 2, characterized in that Before calculating the product between the depth value of each laser point in the target point cloud and the pixel value of the target pixel point, the method further includes: For a plurality of laser points in the target point cloud obtained by scanning with the same laser beam, the distances between adjacent laser points are determined, and laser points whose distances to adjacent laser points exceed a preset threshold are deleted to obtain a screened target point cloud; The step of calculating the product of the depth value of each laser point in the target point cloud and the pixel value of the target pixel point includes: For each laser point in the filtered target point cloud, the product between the depth value of the laser point and the pixel value of the target pixel point is calculated.

4. The method according to claim 1, characterized in that: The transformation matrix includes a rotation matrix and a translation matrix; performing a first specified transformation on the coarse calibration transformation matrix to obtain a first transformation matrix, and calculating a matching degree corresponding to the first transformation matrix, if the matching degree corresponding to the first transformation matrix is ​​greater than the matching degree corresponding to the coarse calibration transformation matrix, then taking the first transformation matrix as a calibration result, including: Adding a plurality of disturbance parameters to the rotation matrix and the translation matrix of the rough calibration transformation matrix respectively, and taking each combination of the rotation matrix and the translation matrix after adding the disturbance parameters as a first transformation matrix; Determine a matching degree corresponding to each first transformation matrix, and determine a maximum matching degree among the matching degrees corresponding to the first transformation matrices; If the maximum matching degree is greater than the matching degree corresponding to the coarse calibration transformation matrix, the first transformation matrix with the maximum matching degree is used as the calibration result.

5. The method according to any one of claims 1 to 4, characterized in that: Before inputting the target point cloud and the target image into a pre-trained calibration model, the method further includes: Determine whether there is a calibration result; If yes, perform a first specified transformation on the calibration result to obtain a second transformation matrix, and calculate the matching degree corresponding to the calibration result and the matching degree corresponding to the second transformation matrix based on the target point cloud and the target image, respectively; if the matching degree corresponding to the second transformation matrix is ​​greater than the matching degree corresponding to the calibration result, use the second transformation matrix as the updated calibration result; If not, the step of inputting the target point cloud and the target image into a pre-trained calibration model is performed.

6. The method according to any one of claims 1 to 4, characterized in that: Before inputting the target point cloud and the target image into a pre-trained calibration model, the method further includes: Identifying a foreground area in the target point cloud, deleting laser points included in a background area in the target point cloud, and obtaining a processed target point cloud; Identify the foreground area in the target image, delete the pixels included in the background difference in the target image, and obtain a processed target image; The step of inputting the target point cloud and the target image into a pre-trained calibration model comprises: The processed target point cloud and the processed target image are input into the calibration model.

7. The method according to any one of claims 1 to 4, characterized in that: The calibration model is trained by the following steps: Taking the sample point clouds and sample images whose acquisition time difference is less than the preset time difference as a group of training samples, and taking the standard transformation matrix of the group of training samples as the label of the group of training samples; For each group of training samples, a standard transformation matrix of the group of training samples is subjected to a second specified transformation, and a sample point cloud of the group of training samples is subjected to the second specified transformation, the transformed sample point cloud and the sample images included in the group of training samples are used as a group of training samples, and the transformation matrix after the second specified transformation is used as a label of the group of training samples; The neural network model is trained using each group of training samples and the labels of each group of training samples to obtain the calibration model.

8. A sensor calibration system, characterized in that: The system comprises: LiDAR, used to collect point clouds; A camera, used to capture images; An electronic device, used to execute the method described in any one of claims 1 to 7.

9. A multi-sensor joint calibration device, characterized in that: The device comprises: An acquisition module, used to acquire a target point cloud acquired by a laser radar and a target image acquired by a camera, wherein the time difference between the acquisition time of the target point cloud and the acquisition time of the target image is less than a preset time difference; A coarse calibration module, used for inputting the target point cloud and the target image acquired by the acquisition module into a pre-trained calibration model to obtain a coarse calibration transformation matrix output by the calibration model, wherein the calibration model is a model obtained by training a neural network model based on a sample point cloud and a sample image; A determination module, used to determine the matching degree corresponding to the rough calibration transformation matrix obtained by the rough calibration module, wherein the matching degree is the matching degree between the projected target point cloud and the target image after the target point cloud is projected onto the coordinate system of the target image using the rough calibration transformation matrix; A fine calibration module, used for performing a first specified transformation on the coarse calibration transformation matrix obtained by the coarse calibration module to obtain a first transformation matrix, and calculating a matching degree corresponding to the first transformation matrix; if the matching degree corresponding to the first transformation matrix is ​​greater than the matching degree corresponding to the coarse calibration transformation matrix determined by the determination module, the first transformation matrix is ​​used as the calibration result; otherwise, the coarse calibration transformation matrix is ​​used as the calibration result; the first specified transformation is a translation transformation and / or a rotation transformation; Among them, the transformation matrix is ​​used to represent the coordinate conversion relationship between the coordinate system of the point cloud collected by the laser radar and the coordinate system of the camera.

10. The device according to claim 9, characterized in that The determination module is specifically used for: The target image is converted into a grayscale image, and for each pixel in the grayscale image, a pixel value of the pixel is set to the maximum value of pixel differences between the pixel and a plurality of adjacent pixels, to obtain an edge image; Performing image interpolation processing on the edge image; For each laser point in the target point cloud, the product of the depth value of the laser point and the pixel value of the target pixel point is calculated; the target pixel point is the pixel point in the edge image after interpolation processing, which is the same as the position of the laser point projected to the coordinate system of the target image using the coarse calibration transformation matrix; The calculated products are summed to obtain the matching degree corresponding to the rough calibration transformation matrix.

11. The device according to claim 10, characterized in that The device also includes: A screening module is used for determining the distance between adjacent laser points for a plurality of laser points scanned by the same laser beam in the target point cloud before calculating the product between the depth value of the laser point and the pixel value of the target pixel point for each laser point in the target point cloud, and deleting laser points whose distances to adjacent laser points exceed a preset threshold value, so as to obtain a screened target point cloud; The determination module is specifically used for: For each laser point in the filtered target point cloud, the product between the depth value of the laser point and the pixel value of the target pixel point is calculated.

12. The device according to claim 9, characterized in that The transformation matrix includes a rotation matrix and a translation matrix; the fine calibration module is specifically used for: Adding a plurality of disturbance parameters to the rotation matrix and the translation matrix of the rough calibration transformation matrix respectively, and taking each combination of the rotation matrix and the translation matrix after adding the disturbance parameters as a first transformation matrix; Determine a matching degree corresponding to each first transformation matrix, and determine a maximum matching degree among the matching degrees corresponding to the first transformation matrices; If the maximum matching degree is greater than the matching degree corresponding to the coarse calibration transformation matrix, the first transformation matrix with the maximum matching degree is used as the calibration result.

13. The device according to any one of claims 9 to 12, characterized in that: The device also includes: A judgment module, used for judging whether there is a calibration result before inputting the target point cloud and the target image into the pre-trained calibration model; The fine calibration module is further configured to, if the judgment result of the judgment module is yes, perform a first specified transformation on the calibration result to obtain a second transformation matrix, and respectively calculate a matching degree corresponding to the calibration result and a matching degree corresponding to the second transformation matrix based on the target point cloud and the target image, and if the matching degree corresponding to the second transformation matrix is ​​greater than the matching degree corresponding to the calibration result, use the second transformation matrix as an updated calibration result; The calling module is used to call the rough calibration module to execute the step of inputting the target point cloud and the target image into the pre-trained calibration model if the judgment result of the judgment module is no.

14. The device according to any one of claims 9 to 12, characterized in that: The device also includes: A foreground recognition module is used to identify the foreground area in the target point cloud and delete the laser points included in the background area in the target point cloud to obtain a processed target point cloud before inputting the target point cloud and the target image into the pre-trained calibration model; identify the foreground area in the target image and delete the pixel points included in the background area in the target image to obtain a processed target image; The rough calibration module is specifically used for: The processed target point cloud and the processed target image are input into the calibration model.

15. The device according to any one of claims 9 to 12, characterized in that: The device also includes a training module, which is used to: Taking the sample point clouds and sample images whose acquisition time difference is less than the preset time difference as a group of training samples, and taking the standard transformation matrix of the group of training samples as the label of the group of training samples; For each group of training samples, a standard transformation matrix of the group of training samples is subjected to a second specified transformation, and a sample point cloud of the group of training samples is subjected to the second specified transformation, the transformed sample point cloud and the sample images included in the group of training samples are used as a group of training samples, and the transformation matrix after the second specified transformation is used as a label of the group of training samples; The neural network model is trained using each group of training samples and the labels of each group of training samples to obtain the calibration model.

16. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 7 when executing a program stored in a memory.

17. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 7 are implemented.