Sensor external parameter calibration method, electronic equipment and storage medium
Through the depth image and point cloud data of the sensor system, the external parameter solution formula is constructed and iteratively adjusted, which solves the problem of low sensor external parameter calibration accuracy and improves the effect of multi-sensor fusion and environment perception capabilities.
Patent Information
- Application Number
- CN202410684048.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-29
- Publication Date
- 2024-10-08
AI Technical Summary
In the existing technology, the sensor external parameter calibration accuracy is low, which affects the effect of multi-sensor fusion and makes it difficult to accurately obtain environmental information.
By acquiring the depth image data and point cloud data collected by the sensor system, extract the associated data of the feature points, construct the external parameter solution formula, and execute the external parameter adjustment steps cyclically until the target stop iteration condition is met, thereby improving the external parameter calibration accuracy.
It significantly improves the sensor external parameter calibration accuracy and enhances the reliability of multi-sensor fusion and environment perception capabilities.
Smart Images

Figure CN118747776A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and more specifically, to a sensor external parameter calibration method, electronic equipment, and storage medium. Background Art
[0002] In the fields of intelligent robots, autonomous driving, intelligent manufacturing, etc., in order to accurately obtain environmental information, multiple sensors can be used to perceive relevant information, and the information perceived by multiple sensors can be fused to adapt to different scenarios and improve the reliability of environmental perception.
[0003] In order to fuse the information sensed by multiple sensors, it is necessary to calibrate the external parameters between the multiple sensors. However, in the related art, the accuracy of external parameter calibration is low, which affects the effect of multi-sensor fusion. Summary of the invention
[0004] One objective of the present disclosure is to provide a new technical solution for sensor external parameter calibration.
[0005] According to a first aspect of an embodiment of the present disclosure, a sensor extrinsic parameter calibration method is provided, the method comprising:
[0006] Acquire at least one first data set collected by a sensor system; wherein the sensor system includes a first sensor and a second sensor, data in the same first data set corresponds to the same calibration scene, the calibration scene reflects a calibration object used for calibration and a relative position relationship between the calibration object and the sensor system, the first data set includes depth image data collected by the first sensor based on the corresponding calibration scene, and point cloud data collected by the second sensor based on the corresponding calibration scene, the depth image data includes pixel coordinates and depth values of each pixel, and the point cloud data includes point cloud coordinates of each collection point;
[0007] For each first data set, extract associated data about at least one feature point of the corresponding calibration object from the first data set to obtain at least one second data set; wherein the associated data of the feature point includes the pixel coordinates, depth value and point cloud coordinates of the feature point in the first data set;
[0008] A relative extrinsic parameter between the first sensor and the second sensor is determined based on the second data set.
[0009] Optionally, determining a relative extrinsic parameter between the first sensor and the second sensor according to the second data set includes:
[0010] Obtaining a first external parameter between the first sensor and the second sensor based on the second data set; wherein the first external parameter is an initial value of the relative external parameter;
[0011] The relative extrinsic parameter is determined according to the first extrinsic parameter.
[0012] Optionally, obtaining a first external parameter between the first sensor and the second sensor based on the second data set includes:
[0013] Constructing an external parameter solution formula according to the pixel point coordinates, depth values and point cloud coordinates in the second data set and the internal parameters of the first sensor;
[0014] The first extrinsic parameter is determined based on the extrinsic parameter solution formula.
[0015] Optionally, determining the relative extrinsic parameter according to the first extrinsic parameter includes:
[0016] Using the first external reference as the relative external reference; or,
[0017] The first extrinsic parameter is adjusted according to the first data set to determine the relative extrinsic parameter.
[0018] Optionally, the adjusting the first extrinsic parameter according to the first data set to determine the relative extrinsic parameter includes:
[0019] The external parameter adjustment step is executed cyclically until the target iteration stop condition is met, and the adjusted first external parameter is used as the relative external parameter;
[0020] Wherein, the external parameter adjustment step includes:
[0021] Determine a plurality of nearest neighbor point pair sets of the point cloud data and the depth image data according to the first external parameter; wherein each nearest neighbor point pair set includes a collection point in the point cloud data and a nearest neighbor point corresponding to the collection point in the depth image data;
[0022] Determine a solution matrix between the point cloud data and the depth image data according to the set of nearest neighbor point pairs, and determine a second extrinsic parameter according to the solution matrix;
[0023] The second external reference is used as the new first external reference.
[0024] Optionally, the target iteration stop condition includes at least one of the following:
[0025] The change amount of the first external parameter between two iterations is less than the external parameter change threshold;
[0026] The change amount of the loss value is less than the loss change threshold; the loss value is used to characterize the difference between the temporary point cloud after the point cloud data is changed based on the first external parameter and the depth image data;
[0027] The number of iterative executions of the external parameter adjustment step is greater than the maximum number of iterations.
[0028] Optionally, data in different first data sets correspond to different calibration scenarios;
[0029] The different calibration scenes include different calibration objects, or the different calibration scenes include the same calibration object but the relative position relationship between the calibration object and the sensor system is different.
[0030] Optionally, the method further comprises:
[0031] Transform the depth image data based on the first external parameter to obtain a first point cloud;
[0032] Transforming the depth image data based on the relative extrinsic parameter to obtain a second point cloud;
[0033] Determine a first point-surface residual between the first point cloud and the point cloud data, and a second point-surface residual between the second point cloud and the point cloud data;
[0034] Determine residual difference information between the first point-surface residual and the second point-surface residual; wherein the residual difference information is used to characterize the improvement in calibration accuracy of the relative extrinsic parameter relative to the first extrinsic parameter.
[0035] According to a second aspect of an embodiment of the present disclosure, an electronic device is provided, comprising a memory and a processor, wherein the memory is used to store computer instructions, and the processor is used to call the computer instructions from the memory to execute a method as described in any one of the first aspects.
[0036] According to a third aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method according to any one of the first aspects is implemented.
[0037] By adopting the above method, in the process of extrinsic parameter calibration of the sensor, the depth information collected by the first sensor is used, which can improve the accuracy of the extrinsic parameter calibration.
[0038] Other features and advantages of the present disclosure will become apparent from the following detailed description of exemplary embodiments of the present disclosure with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0040] Figure 1 It is a flow chart of a sensor external parameter calibration method provided in an embodiment of the present disclosure.
[0041] Figure 2 It is a structural schematic diagram of a sensor system provided by an embodiment of the present disclosure.
[0042] Figure 3 is based on Figure 1 The illustrated embodiment shows a flow chart of step S1300.
[0043] Figure 4 It is a flow chart of a method for verifying the calibration accuracy of sensor external parameters provided by an embodiment of the present disclosure.
[0044] Figure 5 It is a schematic diagram of a sensor external parameter calibration device provided in an embodiment of the present disclosure.
[0045] Figure 6 It is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0046] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless otherwise specifically stated.
[0047] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present disclosure, its application, or uses.
[0048] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the above-mentioned technologies, methods, and equipment should be considered as part of the specification.
[0049] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not limiting. Therefore, other examples of the exemplary embodiments may have different values.
[0050] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0051] The embodiments of the present disclosure can be applied to multi-sensor fusion scenarios, especially external parameter calibration scenarios in sensor systems including multiple sensors. External parameter calibration between multiple sensors is the premise and basis of the multi-sensor fusion algorithm. The parameters of the sensor include internal parameters and external parameters, where: the internal parameters of the sensor may include parameters related to the characteristics of the sensor itself. For example, if the sensor is a camera, the internal parameters of the sensor may include: focal length, pixel size, resolution, optical distortion, white balance parameters, etc. The external parameters of the sensor may include the coordinate system conversion relationship between the sensor and other sensors. The external parameter calibration of the sensor is the process of calibrating the external parameters of the sensor.
[0052] Taking the sensor system including a first sensor (such as an RGBD camera) and a second sensor (such as a laser radar, etc.) as an example, in an optional implementation, a least squares problem can be constructed based on the two-dimensional information of the image collected by the first sensor and the three-dimensional information of the point cloud collected by the second sensor to solve the camera position and posture relationship between the two, thereby obtaining the external parameters between the first sensor and the second sensor. However, when extracting two-dimensional information (such as pixel coordinates) from the image and extracting three-dimensional information (such as three-dimensional coordinates) from the point cloud, there will be certain errors, resulting in low accuracy of external parameter calibration.
[0053] Therefore, an embodiment of the present disclosure provides a sensor extrinsic parameter calibration method, which uses depth information collected by a first sensor in the process of determining the extrinsic parameter, thereby improving the accuracy of the extrinsic parameter calibration.
[0054] It should be noted that the external parameter calibration accuracy can reflect the closeness between the calibration result and the true value. The higher the external parameter calibration accuracy, the more accurate the position coordinates can be obtained when the coordinate system is transformed based on the calibrated external parameter.
[0055] Figure 1 is a flow chart of a sensor external parameter calibration method provided by an embodiment of the present disclosure. The method can be executed by an electronic device, and the electronic device can obtain data collected by the sensor system. Figure 1 As shown, the sensor external parameter calibration method of this embodiment may include the following steps S1100 to S1300.
[0056] Step S1100: Acquire at least one first data set collected by the sensor system.
[0057] The sensor system may include a first sensor and a second sensor, and the data in the same first data set corresponds to the same calibration scene, and the calibration scene may reflect the calibration object used for calibration and the relative position relationship between the calibration object and the sensor system. The first data set may include depth image data collected by the first sensor based on the corresponding calibration scene, and point cloud data collected by the second sensor based on the corresponding calibration scene, the depth image data may include the pixel coordinates and depth value of each pixel, and the point cloud data may include the point cloud coordinates of each collection point.
[0058] The calibration object may be any object used to construct a calibration scene, such as a calibration plate, a chessboard, or the like. The calibration object may include one or more feature points. For example, the calibration object may be a calibration plate, and the feature points of the calibration plate may include corner points (such as four corners), or other points with geometric features.
[0059] In the above calibration scene, the calibration object can be within the visual range of the first sensor and the second sensor, and one or more feature points of the calibration object can be clearly captured by the first sensor and the second sensor. That is to say, based on a calibration scene, the first sensor and the second sensor can observe the same calibration object in a stationary state, and the feature points of the calibration object are clear and complete, so that the above depth image data can be acquired by the first sensor, and the above point cloud data can be acquired by the second sensor.
[0060] Step S1200: for each first data set, extract associated data about at least one feature point of the corresponding calibration object from the first data set to obtain at least one second data set.
[0061] The associated data of the feature point may include the image coordinates, depth value and point cloud coordinates of the feature point in the first data set.
[0062] For example, if there is one first data set and the calibration object in the first data set has N feature points, then the above pixel point coordinates, depth value and point cloud coordinates associated with each feature point constitute a second data set, and N second data sets can be obtained.
[0063] For another example, if there are M first data sets, and each calibration object in the first data set has N feature points, then the above pixel point coordinates, depth value, and point cloud coordinates associated with each feature point form a second data set, and M*N second data sets can be obtained. It should be noted that the number of feature points of the calibration objects in different first data sets can be the same or different.
[0064] Optionally, the second data set may also be referred to as a feature point coordinate set or a feature point associated data set.
[0065] Step S1300: determining a relative extrinsic parameter between the first sensor and the second sensor according to the second data set.
[0066] The relative external parameter can be used to characterize the coordinate system conversion relationship between the first sensor and the second sensor.
[0067] For example, through the relative external parameters between the first sensor and the second sensor, a point in the coordinate system of the first sensor can be mapped to the coordinate system of the second sensor after rotation and translation, or a point in the coordinate system of the second sensor can be mapped to the coordinate system of the first sensor after rotation and translation.
[0068] Optionally, the relative extrinsic parameter may include a rotation parameter (also referred to as a rotation matrix) and a translation parameter (also referred to as a translation matrix). The relative extrinsic parameter may also be referred to as a calibration extrinsic parameter, a target extrinsic parameter or an extrinsic parameter, which is not limited in the embodiments of the present disclosure.
[0069] By adopting the above method, in the process of sensor external parameter calibration, the depth information collected by the first sensor is used, and the input information in the external parameter calibration is increased, so that the accuracy of the external parameter calibration can be improved.
[0070] The sensor system involved in the embodiments of the present disclosure may be as follows Figure 2 The sensor system shown in the figure, the sensor system 2000 may include a first sensor 2001 and a second sensor 2002, the first sensor 2001 may be a sensor such as an RGBD camera that can acquire depth image data, and the second sensor 2002 may be a sensor such as a laser radar, a binocular structured light camera, etc. that can acquire point cloud data.
[0071] The relative positions of the first sensor 2001 and the second sensor 2002 can be fixed. For example, the first sensor 2001 and the second sensor 2002 can be fixedly arranged on a target device to sense environmental information around the target device or relevant information of the target device itself. The target device may include a robot, a vehicle or other intelligent device.
[0072] In some embodiments, the first sensor 2001 may be a sensor such as an RGBD camera for acquiring depth image data. Optionally, the depth image data may include a two-dimensional image (e.g., an RGB image) and depth information, and the depth information may include a depth value for each pixel. The pixel coordinates of each pixel in the depth image data may be two-dimensional coordinates, such as two-dimensional coordinates (u, v) constructed based on the u-axis and the v-axis, and the depth value of each pixel may be the depth of the pixel relative to the imaging plane of the first sensor.
[0073] Taking the first sensor as an RGBD camera as an example, in the RGBD camera, in addition to the color sensor that captures RGB information, there can also be a special sensor (such as an infrared sensor) for capturing depth information, that is, the vertical distance from the pixel to the imaging plane, and the imaging plane can be a virtual plane inside the RGBD camera, and the virtual plane can be perpendicular to the optical axis of the RGBD camera lens. The RGBD camera can acquire RGB images and depth information for the above calibration scene.
[0074] Optionally, the above-mentioned depth image data may also be referred to as camera point cloud data or depth point cloud data, and stored in the form of point cloud. For example, the two-dimensional image and depth information may be combined to form a camera point cloud, and the two-dimensional pixel coordinates and depth value of each pixel constitute the three-dimensional coordinates of the pixel in the camera point cloud.
[0075] In an optional implementation, the depth image data may include an RGB image and a frame of camera point cloud acquired by an RGBD camera.
[0076] In some embodiments, the second sensor 2002 may be a sensor such as a laser radar, a binocular structured light camera, etc. for acquiring point cloud data. Optionally, the point cloud data may be three-dimensional data, and the coordinates of each acquisition point in the point cloud data may be three-dimensional coordinates, such as three-dimensional coordinates (x, y, z) constructed based on the x-axis, y-axis, and z-axis.
[0077] In some embodiments, Figure 2 As shown, a calibration scene can be constructed using a calibration object 3000, and the relative external parameters of the first sensor and the second sensor can be calibrated based on the calibration scene. In a specific calibration scene, the calibration object and the relative position of the calibration object and the sensor system are fixed. Different calibration scenes can be constructed by moving the position of the calibration object or the sensor system, or different calibration scenes can be constructed by replacing different calibration objects.
[0078] In some embodiments, data in different first data sets may correspond to different calibration scenarios.
[0079] In one implementation, different calibration scenes may include the same calibration object but the relative position relationship between the calibration object and the sensor system is different. In this way, different first data sets may be collected by the sensor system for the same calibration object at different positions.
[0080] For example, the position of the calibration object in the field of view of the sensor may be adjusted to obtain a plurality of different calibration scenes, thereby collecting and obtaining a plurality of first data sets.
[0081] In another implementation, different calibration scenes may include different calibration objects, so that different first data sets may be collected by the sensor system for different calibration objects.
[0082] For example, the calibration object in the sensor field of view may be changed to obtain a plurality of different calibration scenes, thereby collecting and obtaining a plurality of first data sets.
[0083] In this way, by changing the calibration object and / or changing the position of the calibration object, multiple first data sets can be obtained, which increases the diversity of data used for sensor external parameter calibration and can further improve the accuracy of external parameter calibration.
[0084] In an optional implementation, the same calibration scene can be collected multiple times, and multiple data can be superimposed to obtain clearer feature points. For example, multiple frames of point clouds can be collected and superimposed to obtain point cloud data. In this way, the accuracy of external parameter calibration can be further improved.
[0085] In some embodiments, the depth image data includes an image acquired by the first sensor, and in the above step S1200, the pixel coordinates of the feature points can be obtained according to the image as the pixel coordinates in the second data set. For example: the image in the depth image data can be preprocessed, and the coordinates of the feature points in the preprocessed image are used as the pixel coordinates in the associated data.
[0086] The image preprocessing includes at least one of de-distortion processing, image rotation, and tilt correction.
[0087] For example, the image can be first dedistorted, and then a named window can be created using opencv to display the dedistorted image and set a mouse callback function. The pixel coordinates (u, v) of the pixel where the mouse is located can be obtained through the mouse callback function. Using this method, the pixel coordinates of the feature points of the calibration object can be obtained according to the order of the feature points. The order of the feature points can be preset, for example, from the upper left to the lower right, or from the lower left to the upper right, etc.
[0088] In some embodiments, the depth image data may further include depth information acquired by the first sensor, and the depth value of the feature point may be determined based on the depth information as the depth value in the second data set.
[0089] In some embodiments, the coordinates of the feature points in the point cloud data may be used as the point cloud coordinates in the second data set.
[0090] For example, the point cloud data can be processed using a point cloud library (PCL) or other point cloud processing methods to obtain the point cloud coordinates (x, y, z) of the feature points of the calibration object in the order of the feature points, wherein the order of the feature points can also be pre-set.
[0091] In this way, through the above method, at least one second data set can be determined, so as to use the depth information collected by the first sensor during the external parameter calibration process to improve the accuracy of the external parameter calibration.
[0092] Figure 3 is based on Figure 1 The embodiment shown is a flow chart of step S1300. Figure 3 As shown, the above step S1300 may include the following steps S1310 to S1320.
[0093] Step S1310: obtaining a first external parameter between the first sensor and the second sensor based on the second data set.
[0094] The first external parameter is an initial value of a relative external parameter, and the first external parameter may also be referred to as an initial external parameter or an initial value of an external parameter.
[0095] For example, a first external parameter between the first sensor and the second sensor may be determined based on the second data set and an internal parameter of the first sensor. The internal parameter of the first sensor may be a pre-calibrated internal parameter.
[0096] In one implementation, an extrinsic parameter solving formula may be constructed according to the pixel point coordinates, depth values, and point cloud coordinates in the second data set and the intrinsic parameters of the first sensor, and the first extrinsic parameter may be determined based on the extrinsic parameter solving formula.
[0097] For example, based on the second data set, a PnP (Perspective-n-Point) algorithm or other algorithms may be used to obtain a first extrinsic parameter between the first sensor and the second sensor.
[0098] For example, the above external parameter solution formula can be constructed based on the PnP algorithm, and the external parameter solution formula is shown in the following formula (1):
[0099]
[0100] Among them, (u, v) is the pixel coordinate of the feature point, w represents the above-mentioned depth value, that is, the depth value corresponding to the pixel coordinate (u, v), (x, y, z) is the point cloud coordinate of the feature point, K is the intrinsic parameter of the first sensor, R and t are the first external parameters between the first sensor and the second sensor, R is the rotation parameter in the first external parameter, and t is the translation parameter in the first external parameter.
[0101] Optionally, the method for solving PnP may adopt at least one of direct linear transform (DLT), perspective-three-point (P3P), efficient perspective-n-point (EPnP), constructing a least squares problem, and the like.
[0102] In this way, by adopting the above method, the first external parameter can be accurately obtained.
[0103] Step S1320: determining a relative extrinsic parameter according to the first extrinsic parameter.
[0104] In one implementation, the first extrinsic parameter may be used as a relative extrinsic parameter, so that the relative extrinsic parameter can be efficiently determined without further adjustment or optimization.
[0105] In another implementation, the first external parameter may be adjusted according to the first data set to determine the relative external parameter, thereby further improving the accuracy of external parameter calibration.
[0106] In some embodiments, point cloud registration may be performed based on an iterative closest point (ICP) algorithm, and the relative extrinsic parameter may be obtained after adjusting the first extrinsic parameter.
[0107] ICP point cloud registration can be achieved based on the following formula (2):
[0108]
[0109] Among them, P s represents the point cloud data collected by the second sensor (which may be referred to as the source point cloud), is the i-th acquisition point of the point cloud data (i.e., source point cloud) in the first data set, is the i-th pixel point of the depth image data (i.e., the target point cloud) in the same first data set, wherein the i-th acquisition point and the i-th pixel point are one-to-one corresponding points determined based on the distance, R and t are the rotation parameter and translation parameter of the above-mentioned first external parameter, respectively, R * and t * are the rotation parameters and translation parameters relative to the extrinsic parameters (i.e. the optimal solution of the extrinsic parameters), respectively.
[0110] In some embodiments, the ICP point cloud registration can be performed by finding the nearest corresponding point and solving the optimal transformation and obtaining the optimal solution after multiple iterations as the relative external parameter.
[0111] For example, the extrinsic parameter adjustment step may be executed cyclically until a target iteration stop condition is met, and the adjusted first extrinsic parameter is used as a relative extrinsic parameter.
[0112] The external parameter adjustment step may include the following steps S1321 to S1323:
[0113] Step S1321, determining multiple nearest neighbor point pair sets of point cloud data and depth image data according to the first external parameter.
[0114] Each nearest neighbor point pair set may include a collection point in the point cloud data and a nearest neighbor point corresponding to the collection point in the depth image data.
[0115] In one implementation, the point cloud data in the first data set (which may be called the source point cloud) may be transformed based on the first external parameter to obtain a temporary point cloud. The temporary point cloud is compared with the depth image data (which may be called the target point cloud) to find the nearest neighbor point (that is, the point with the closest distance) of each point in the point cloud data in the depth image data to obtain a set of nearest neighbor point pairs.
[0116] For example, for each acquisition point in the point cloud data, the nearest neighbor point corresponding to the acquisition point is obtained based on the comparison between the temporary point corresponding to the acquisition point in the temporary point cloud and the pixel point in the depth image data, and the acquisition point and the corresponding nearest neighbor point are taken as a nearest neighbor point pair set.
[0117] The nearest neighbor can be determined in any of the following ways:
[0118] Method 1: Set a distance threshold. When the distance between points is less than a certain threshold, it is considered that the corresponding points are found, and a point pair set is obtained without traversing the entire point set. This can improve processing efficiency.
[0119] Method 2: Use the Approximate Nearest Neighbor (ANN) algorithm to quickly find the approximate nearest neighbor points. For example, the approximate nearest neighbor points can be quickly found through K-Dimensional Tree (KD-tree), Local Sensitive Hashing (LSH), Ball Tree, graph-based algorithms, etc., so as to find the corresponding points and obtain a set of point pairs.
[0120] Step S1322: determining a solution matrix between the point cloud data and the depth image data according to the set of nearest neighbor point pairs, and determining a second extrinsic parameter according to the solution matrix.
[0121] For example, the solution matrix can be determined by the following formula (3):
[0122]
[0123] Among them, H represents the solution matrix, P s represents the point cloud data collected by the second sensor (which may be referred to as the source point cloud); is the distance between the i-th acquisition point of the point cloud data (i.e., the source point cloud) in the first data set and the centroid of the point cloud data, for example, Represents the centroid of the point cloud data (i.e., source point cloud), is the i-th acquisition point of the point cloud data (i.e., source point cloud) in the first data set; is the distance between the i-th pixel of the depth image data (ie, the target point cloud) in the same first data set and the centroid of the depth image data, for example, Represents the centroid of the depth image data (i.e., the target point cloud), is the i-th pixel point of the depth image data (ie, the target point cloud) in the same first data set; wherein the i-th acquisition point and the i-th pixel point are one-to-one corresponding points in the same nearest neighbor point pair set.
[0124] In one implementation, the matrix H to be solved may be a 3*3 matrix.
[0125] In one implementation, determining the second extrinsic parameter according to the solution matrix may include: performing matrix decomposition on the solution matrix, and determining the second extrinsic parameter according to the decomposed solution matrix.
[0126] For example, the solution matrix H can be subjected to singular value decomposition (SVD) based on the following formula (4) to obtain three decomposed matrices:
[0127] H=U∑V T (4);
[0128] Where H is the above-mentioned solution matrix, U is a left singular matrix whose column vectors are the left singular vectors of the solution matrix H; ∑ is a diagonal matrix, and the elements on the diagonal are the singular values of the solution matrix H, arranged in descending order; V T is a right singular matrix whose column vectors are the right singular vectors of the solution matrix H.
[0129] Furthermore, the second external parameter may include a rotation parameter and a translation parameter. The method of determining the second external parameter according to the matrix after decomposition may include: the rotation parameter of the second external parameter is R * =VU T , the translation parameter of the second external parameter is
[0130] Step S1323: Use the second external parameter as a new first external parameter.
[0131] In this way, the external parameter adjustment step of the next iteration can be cyclically executed based on the new first external parameter. The current optimal external parameter (i.e., the second external parameter) can be obtained in each iteration, and then the second external parameter is used as the new first external parameter to act on the current source point cloud, and the above steps S11 to S13 are continuously iterated until the target stop iteration condition is met, and the adjusted first external parameter is used as the relative external parameter.
[0132] In one implementation, the target iteration stop condition may include at least one of the following:
[0133] The change of the first external parameter between two iterations is less than the external parameter change threshold;
[0134] The change amount of the loss value loss is less than the loss change threshold; the loss value is used to characterize the difference between the temporary point cloud after the point cloud data is changed based on the first external parameter and the depth image data;
[0135] The number of iterations of the extrinsic parameter adjustment step is greater than the maximum number of iterations.
[0136] Optionally, the above-mentioned external parameter change threshold, loss change threshold and maximum number of iterations can be configured or adjusted, and the above-mentioned loss value loss can be implemented using the loss function in the relevant technology, which will not be elaborated in the embodiments of the present disclosure.
[0137] In this way, on the basis of obtaining the first external parameter by utilizing the depth information collected by the first sensor, the external parameter adjustment step is executed cyclically based on the depth image data collected by the first sensor and the point cloud data collected by the second sensor, and the first external parameter is adjusted to obtain the relative external parameter, thereby further improving the accuracy and robustness of the calibrated relative external parameter. The accuracy of the external parameter calibration can be greatly improved. It has been verified that the accuracy of the adjusted relative external parameter is 70% higher than that of the original first external parameter.
[0138] In some embodiments of the present disclosure, the accuracy of the external parameter may also be verified, that is, the improvement of the calibration accuracy may be verified.
[0139] For example, the first point cloud and the second point cloud after the depth image data collected by the first sensor is transformed by the first extrinsic parameter and the relative extrinsic parameter can be calculated respectively, and the point surface residuals between the two point clouds and the point cloud data collected by the second sensor can be calculated to observe whether the calibration accuracy becomes higher.
[0140] Figure 4 FIG. 1 is a flow chart of a method for verifying the accuracy of sensor external parameter calibration provided by an embodiment of the present disclosure. Figure 4As shown, the method may include the following steps S4100 to S4400.
[0141] Step S4100: transform the depth image data based on the first external parameter to obtain a first point cloud.
[0142] For example, coordinate transformation may be performed on the depth image data based on the first external parameter, and the coordinates of each pixel point may be transformed into first point cloud coordinates to obtain a first point cloud.
[0143] Step S4200: transform the depth image data based on the relative external parameters to obtain a second point cloud.
[0144] For example, coordinate transformation may be performed on the depth image data based on the relative external parameter, and the coordinates of each pixel point may be transformed into the second point cloud coordinates to obtain the second point cloud.
[0145] Step S4300, determining a first point-surface residual between the first point cloud and the point cloud data, and a second point-surface residual between the second point cloud and the point cloud data.
[0146] In some embodiments, the method of calculating the point-surface residual may include the following steps S4301 to S4304:
[0147] Step S4301, using the data of the target point cloud (eg, the first point cloud or the second point cloud) to calculate the normal vector of the target point cloud.
[0148] For example, for each point in the target point cloud, a neighbor search algorithm (such as Kd-tree algorithm) is first used to find the k points closest to the point; the covariance matrix of the k points is calculated, and the eigenvalue decomposition of the covariance matrix is performed to obtain the eigenvector, where the column corresponding to the minimum eigenvalue of the eigenvector is the normal vector of the plane.
[0149] Step S4302: construct a Kd-tree for the point cloud data collected by the second sensor to perform a proximity search.
[0150] Step S4303, for each point in the target point cloud, find its nearest neighbor point in the point cloud data, and use their coordinates and normal vectors to calculate the point-to-surface residual.
[0151] For example, the dot product of the vector difference between each point in the target point cloud and the nearest neighbor point in the point cloud data and the normal vector of the target point cloud can be used as the point surface residual. For example, the point surface residual between each point in the target point cloud and the nearest neighbor point in the point cloud data can be calculated by the following formula:
[0152] Point-to-surface residual = (target point cloud coordinates - point cloud data coordinates)·normal vector of the target point cloud.
[0153] Step S4304, adding the point-surface residuals of all points in the target point cloud to obtain the total residual of the target point cloud and the point cloud data (such as the first point-surface residual or the second point-surface residual).
[0154] In this way, accurate point-surface residuals can be obtained through the above steps S4301 to S4304.
[0155] Step S4400, determining residual difference information between the first point-surface residual and the second point-surface residual.
[0156] The residual difference information may be used to characterize the improvement in calibration accuracy of the relative extrinsic parameter relative to the first extrinsic parameter.
[0157] For example, the residual difference information may include a difference or a ratio between the first point-surface residual and the second point-surface residual.
[0158] For example, if the second point-surface residual is reduced by 70% compared to the first point-surface residual, it can be determined that the calibration accuracy of the relative external reference is improved by 70% compared to the first external reference (ie, the accuracy is improved by 70%).
[0159] Through the above method, the accuracy of external parameter calibration can be verified, that is, the improvement of external parameter calibration accuracy can be verified.
[0160] In some embodiments, whether to use the relative extrinsic parameter as the extrinsic parameter of the first sensor and the second sensor may be determined based on the residual difference information.
[0161] For example, if the calibration accuracy improvement amount of the relative extrinsic parameter relative to the first extrinsic parameter determined based on the residual difference information is a positive value, that is, the relative extrinsic parameter is improved relative to the first extrinsic parameter, then the relative extrinsic parameter can be used as the extrinsic parameter of the first sensor and the second sensor. Conversely, if the calibration accuracy improvement amount of the relative extrinsic parameter relative to the first extrinsic parameter determined based on the residual difference information is a negative value, that is, the relative extrinsic parameter is not improved relative to the first extrinsic parameter, then the first extrinsic parameter can be used as the extrinsic parameter of the first sensor and the second sensor.
[0162] In this way, higher-precision external parameters can be used to improve the reliability of external parameter calibration.
[0163] In some embodiments, whether to re-execute the sensor extrinsic parameter calibration method may be determined based on the residual difference information.
[0164] For example, if the improvement in calibration accuracy of the relative external parameter relative to the first external parameter determined based on the above-mentioned residual difference information is less than an improvement threshold, the above-mentioned sensor external parameter calibration method and the method for verifying the calibration accuracy of the sensor external parameter may be re-executed until the improvement in calibration accuracy of the relative external parameter relative to the first external parameter determined based on the above-mentioned residual difference information is greater than or equal to the improvement threshold, or the number of times the above-mentioned sensor external parameter calibration method and the method for verifying the calibration accuracy of the sensor external parameter are re-executed is greater than the maximum number of executions.
[0165] The maximum number of executions may be a preconfigured number of times, such as 10 times or 50 times. The above-mentioned increase threshold may be a preconfigured threshold, such as 5%, 10%, 20% or 50%.
[0166] In the process of re-executing the above sensor external parameter calibration method, different calibration objects or different positions of calibration objects can be replaced to obtain different first data sets. By increasing the diversity of data, the accuracy of external parameter calibration can be improved.
[0167] In this way, by repeatedly executing the above-mentioned sensor external parameter calibration method and the method for verifying the sensor external parameter calibration accuracy, the external parameter calibration accuracy can be further improved.
[0168] Figure 5 Schematic diagram of a sensor external parameter calibration device provided by an embodiment of the present disclosure. Figure 5 As shown, the device may include:
[0169] The acquisition module 501 is used to acquire at least one first data set collected by the sensor system; wherein the sensor system includes a first sensor and a second sensor, and data in the same first data set corresponds to the same calibration scene, and the calibration scene reflects the calibration object used for calibration and the relative position relationship between the calibration object and the sensor system, and the first data set includes depth image data collected by the first sensor based on the corresponding calibration scene, and point cloud data collected by the second sensor based on the corresponding calibration scene, wherein the depth image data includes pixel coordinates and depth values of each pixel, and the point cloud data includes point cloud coordinates of each acquisition point;
[0170] The advance module 502 is used to extract, for each first data set, associated data about at least one feature point of the corresponding calibration object from the first data set to obtain at least one second data set; wherein the associated data of the feature point includes the pixel coordinates, depth value and point cloud coordinates of the feature point in the first data set;
[0171] The determination module 503 is configured to determine a relative extrinsic parameter between the first sensor and the second sensor according to the second data set.
[0172] In some embodiments, the determination module 503 is used to obtain a first external parameter between the first sensor and the second sensor based on the second data set; wherein the first external parameter is an initial value of the relative external parameter; and the relative external parameter is determined based on the first external parameter.
[0173] In some embodiments, the determination module 503 is used to construct an external parameter solution formula based on the pixel point coordinates, depth values and point cloud coordinates in the second data set and the internal parameters of the first sensor; and determine the first external parameter based on the external parameter solution formula.
[0174] In some embodiments, the determination module 503 is configured to use the first extrinsic parameter as the relative extrinsic parameter; or, adjust the first extrinsic parameter according to the first data set to determine the relative extrinsic parameter.
[0175] In some embodiments, the determining module 503 is used to cyclically execute the extrinsic parameter adjustment step until the target iteration stop condition is met, and use the adjusted first extrinsic parameter as the relative extrinsic parameter;
[0176] Wherein, the external parameter adjustment step includes:
[0177] Determine a plurality of nearest neighbor point pair sets of the point cloud data and the depth image data according to the first external parameter; wherein each nearest neighbor point pair set includes a collection point in the point cloud data and a nearest neighbor point corresponding to the collection point in the depth image data;
[0178] Determine a solution matrix between the point cloud data and the depth image data according to the set of nearest neighbor point pairs, and determine a second extrinsic parameter according to the solution matrix;
[0179] The second external reference is used as the new first external reference.
[0180] In some embodiments, the target stop iteration condition includes at least one of the following:
[0181] The change amount of the first external parameter between two iterations is less than the external parameter change threshold;
[0182] The change amount of the loss value is less than the loss change threshold; the loss value is used to characterize the difference between the temporary point cloud after the point cloud data is changed based on the first external parameter and the depth image data;
[0183] The number of iterative executions of the external parameter adjustment step is greater than the maximum number of iterations.
[0184] In some embodiments, data in different first data sets correspond to different calibration scenarios;
[0185] The different calibration scenes include different calibration objects, or the different calibration scenes include the same calibration object but the relative position relationship between the calibration object and the sensor system is different.
[0186] In some embodiments, Figure 5 As shown, the device further includes a verification module 504;
[0187] The verification module 504 is used to transform the depth image data based on the first external parameter to obtain a first point cloud; transform the depth image data based on the relative external parameter to obtain a second point cloud; determine a first point-surface residual between the first point cloud and the point cloud data, and a second point-surface residual between the second point cloud and the point cloud data; determine residual difference information between the first point-surface residual and the second point-surface residual; wherein the residual difference information is used to characterize the improvement in calibration accuracy of the relative external parameter relative to the first external parameter.
[0188] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0189] Figure 6 Schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Figure 6 As shown, the electronic device 600 may include a memory 601 and a processor 602. The memory 601 may be used to store computer instructions, and the processor 602 may be used to call computer instructions from the memory 601 to execute any method in the aforementioned embodiments of the present disclosure.
[0190] The embodiments of the present disclosure also provide a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, any method in the aforementioned embodiments of the present disclosure is implemented. Optionally, the computer-readable storage medium may be a non-transitory storage medium, but is not limited thereto, and may also be a transient storage medium.
[0191] The embodiments of the present disclosure further provide a computer program product, which may include a computer program. When the computer program is executed by a processor, any method in the aforementioned embodiments of the present disclosure may be implemented.
[0192] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement any method in the foregoing embodiments of the present disclosure.
[0193] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0194] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0195] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, which may include object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0196] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0197] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so as to produce a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device for implementing the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions make the computer, programmable data processing device, and / or other equipment work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0198] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0199] The flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of an instruction, and the module, a program segment or a part of an instruction contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions. It should be noted that implementation by hardware, implementation by software, and implementation by a combination of software and hardware are all equivalent.
[0200] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The choice of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the present disclosure is defined by the appended claims.
Claims
1. A sensor external parameter calibration method, It is characterized in that The method comprises: Acquire at least one first data set collected by a sensor system; wherein the sensor system includes a first sensor and a second sensor, data in the same first data set corresponds to the same calibration scene, the calibration scene reflects a calibration object used for calibration and a relative position relationship between the calibration object and the sensor system, the first data set includes depth image data collected by the first sensor based on the corresponding calibration scene, and point cloud data collected by the second sensor based on the corresponding calibration scene, the depth image data includes pixel coordinates and depth values of each pixel, and the point cloud data includes point cloud coordinates of each collection point; For each first data set, extract associated data about at least one feature point of the corresponding calibration object from the first data set to obtain at least one second data set; wherein the associated data of the feature point includes the pixel coordinates, depth value and point cloud coordinates of the feature point in the first data set; A relative extrinsic parameter between the first sensor and the second sensor is determined based on the second data set.
2. The method according to claim 1, It is characterized in that The determining a relative extrinsic parameter between the first sensor and the second sensor according to the second data set comprises: Obtaining a first external parameter between the first sensor and the second sensor based on the second data set; wherein the first external parameter is an initial value of the relative external parameter; The relative extrinsic parameter is determined according to the first extrinsic parameter.
3. The method according to claim 2, It is characterized in that The obtaining a first external parameter between the first sensor and the second sensor based on the second data set includes: Constructing an external parameter solution formula according to the pixel point coordinates, depth values and point cloud coordinates in the second data set and the internal parameters of the first sensor; The first extrinsic parameter is determined based on the extrinsic parameter solution formula.
4. The method according to claim 2, It is characterized in that The determining the relative extrinsic parameter according to the first extrinsic parameter comprises: Using the first external reference as the relative external reference; or, The first extrinsic parameter is adjusted according to the first data set to determine the relative extrinsic parameter.
5. The method according to claim 4, It is characterized in that The adjusting the first extrinsic parameter according to the first data set to determine the relative extrinsic parameter includes: The external parameter adjustment step is executed cyclically until the target iteration stop condition is met, and the adjusted first external parameter is used as the relative external parameter; Wherein, the external parameter adjustment step includes: Determine a plurality of nearest neighbor point pair sets of the point cloud data and the depth image data according to the first external parameter; wherein each nearest neighbor point pair set includes a collection point in the point cloud data and a nearest neighbor point corresponding to the collection point in the depth image data; Determine a solution matrix between the point cloud data and the depth image data according to the set of nearest neighbor point pairs, and determine a second extrinsic parameter according to the solution matrix; The second external reference is used as the new first external reference.
6. The method according to claim 5, It is characterized in that The target iteration stop condition includes at least one of the following: The change amount of the first external parameter between two iterations is less than the external parameter change threshold; The change amount of the loss value is less than the loss change threshold; the loss value is used to characterize the difference between the temporary point cloud after the point cloud data is changed based on the first external parameter and the depth image data; The number of iterative executions of the external parameter adjustment step is greater than the maximum number of iterations.
7. The method according to any one of claims 1 to 6, It is characterized in that The data in different first data sets correspond to different calibration scenarios; The different calibration scenes include different calibration objects, or the different calibration scenes include the same calibration object but the relative position relationship between the calibration object and the sensor system is different.
8. The method according to claim 2, It is characterized in that The method further comprises: Transform the depth image data based on the first external parameter to obtain a first point cloud; Transforming the depth image data based on the relative extrinsic parameter to obtain a second point cloud; Determine a first point-surface residual between the first point cloud and the point cloud data, and a second point-surface residual between the second point cloud and the point cloud data; Determine residual difference information between the first point-surface residual and the second point-surface residual; wherein the residual difference information is used to characterize the improvement in calibration accuracy of the relative extrinsic parameter relative to the first extrinsic parameter.
9. An electronic device, It is characterized in that The electronic device comprises a memory and a processor, the memory is used to store computer instructions, and the processor is used to call the computer instructions from the memory to execute the sensor extrinsic parameter calibration method as described in any one of claims 1 to 8.
10. A computer-readable storage medium, It is characterized in that A computer program is stored thereon, and when the computer program is executed by a processor, the sensor external parameter calibration method according to any one of claims 1 to 8 is implemented.
Citation Information
Cited By
Sensor external parameter determination method and device, robot, equipment and storage medium
CN120663287A
