Calibration method, ranging method and laser radar
Patent Information
- Application Number
- CN202310242038.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-06
- Publication Date
- 2026-09-08
- Estimated Expiration
- 2043-03-06
AI Technical Summary
[0004]本申请实施例提供了一种标定方法、测距方法及激光雷达,能够解决量程较大的激光雷达标定不准确的问题
[0020] Compared with the prior art, the beneficial effects of the present invention are as follows: Unlike the prior art, the embodiments of the present invention provide a calibration method, a ranging method, and a lidar. The calibration method first divides the range of the lidar into several regions, and then calibrates it by setting a calibration target in each region to obtain the calibration parameters corresponding to each region. Finally, the calibration parameters corresponding to each region are optimized based on a weight factor to obtain the optimal calibration parameters corresponding to each region. The embodiments of the present invention improve the calibration accuracy of the lidar by dividing the range of the lidar into regions and calibrating them separately, combined with assigning weights to the calibration parameters.
Smart Images

Figure CN116256733B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of lidar technology, and in particular to a calibration method, a ranging method, and a lidar. Background Technology
[0002] LiDAR (Light Detection and Ranging) is a device capable of determining the distance, orientation, altitude, and speed of a target. It is widely used in robotics and typically consists of four core components: a laser, a receiver, a signal processing unit, and a rotating mechanism. Currently, LiDAR primarily uses triangulation and time-of-flight (TOF) ranging methods to determine target distance. The principle of triangulation is as follows: a laser beam is irradiated onto the object at a specific incident angle. The laser is reflected and scattered on the object's surface. A lens at another angle focuses the reflected laser beam into an image, which is then projected onto a charge-coupled device (CCD). When the object moves along the laser direction, the laser spot on the CCD moves accordingly, with the displacement corresponding to the distance the object has moved. Since the incident and reflected light form a triangle, the distance between the object and the LiDAR can be calculated using algorithms that utilize similar triangles. The principle of time-of-flight ranging is to measure the distance between the target object and the LiDAR by utilizing the round-trip flight time of the data signal between the receiver and transmitter.
[0003] In implementing the embodiments of the present invention, the inventors discovered at least the following problems in the above-mentioned related technologies: Before a lidar can operate normally, it usually needs to be calibrated using a calibration target to obtain calibration parameters that can be used to correct the measured distance. Currently, during the calibration process, because the range of the lidar is large and the range is wide, this contradicts the consideration of the minimum overall error range during the calibration parameter fitting process. Therefore, the calibration parameters obtained after calibration are usually difficult to achieve excellent ranging accuracy for all distances within the range, sacrificing some ranging accuracy under the calibration target. Summary of the Invention
[0004] This application provides a calibration method, a ranging method, and a lidar, which can solve the problem of inaccurate calibration of lidar with a large range.
[0005] The objective of this invention is achieved through the following technical solutions:
[0006] To address the aforementioned technical problems, in a first aspect, this invention provides a calibration method applied to a lidar. The method includes: dividing the lidar's range into several regions; calibrating the lidar using calibration targets set in each region to obtain calibration parameters corresponding to each region; and optimizing the calibration parameters corresponding to each region based on weighting factors to obtain optimal calibration parameters corresponding to each region.
[0007] In some embodiments, optimizing the calibration parameters corresponding to each region segment based on weight factors includes: selecting a region segment; setting several different weight factors according to different step intervals; calculating the optimized distance of each calibration target in the selected region segment under several different weight factors based on the calibration parameters corresponding to the selected region segment; calculating the cumulative value of the difference between the optimized distance of each calibration target in the selected region segment and a preset distance under each set of weight factors; and saving the calibration parameters corresponding to the set of weight factors with the smallest cumulative value as the optimal calibration parameters corresponding to the selected region segment and outputting them.
[0008] In some embodiments, calculating the optimized distance of each calibration target in the selected area segment under several different weighting factors based on the calibration parameters corresponding to the selected area segment includes: substituting several different weighting factors into the ranging formula based on the calibration parameters corresponding to the selected area segment to calculate the optimized distance of each calibration target in the selected area segment under each set of weighting factors; calculating the cumulative value of the difference between the optimized distance of each calibration target in the selected area segment and the preset distance under each set of weighting factors includes: for each set of weighting factors, subtracting the calculated optimized distance of each calibration target in the selected area segment from the preset distance to obtain the difference, and summing the differences between the optimized distance of each calibration target in the selected area segment and the preset distance to obtain the cumulative value.
[0009] In some embodiments, before optimizing the calibration parameters corresponding to each of the regions based on weight factors, the method further includes: selecting a region; calculating the actual distance of each calibration target in the selected region based on the calibration parameters corresponding to the selected region; determining whether the offset between the actual distance of each calibration target in the selected region and a preset distance is greater than a preset threshold; if yes, determining that the calibration of the selected region has failed; if no, proceeding to the step of optimizing the calibration parameters corresponding to each of the regions based on weight factors.
[0010] In some embodiments, dividing the range of the lidar into several regions includes: setting the range of each region according to the range of the lidar and the weight of the boundary lines between adjacent regions, wherein the distance between the boundary lines between adjacent regions is expressed by the following formula:
[0011] xD i =minD+ρ i *(maxD-minD)
[0012] Among them, xD i Let ρ represent the distance value of the i-th boundary line, minD represent the minimum range distance of the lidar, maxD represent the maximum range distance of the lidar, and ρ represent the distance of the i-th boundary line. i This represents the weight of the i-th boundary line.
[0013] In some embodiments, the calibration targets in each of the regions are white targets. The calibration is performed using the calibration targets set in each of the regions to obtain the calibration parameters corresponding to each region, including: selecting a region; obtaining a point cloud within a preset range of preset angles corresponding to each of the calibration targets in the selected region; determining the mean distance and mean spot center value corresponding to each of the calibration targets in the selected region based on the point cloud; and obtaining the calibration parameters corresponding to the selected region by fitting the least squares method based on the triangulation method and the mean distance and mean spot center value corresponding to each of the calibration targets in the selected region.
[0014] In some embodiments, the calibration target in each of the regions includes an evenly divided and symmetrical white target portion and a black target portion. The boundary between the white target portion and the black target portion is used to receive a vertically incident laser beam. The calibration is performed using calibration targets set in each of the regions to obtain calibration parameters corresponding to each region, including: selecting a region; determining the detection distance of each calibration target in the selected region based on the time of flight of the laser beam; establishing a system of calibration equations based on the time of flight method and the preset distance, detection distance, and brightness of each calibration target in the selected region; and solving the overdetermined equations of the system of calibration equations using the least squares method to obtain the calibration parameters corresponding to the selected region.
[0015] In some embodiments, the calibration formula is expressed as the following formula:
[0016] d i =A*p i 2 +B*p i +C*lumi i 2 +D*lumi i +E
[0017] Where, d i p represents the preset distance corresponding to the i-th calibration target in the selected region segment. i Lumi represents the detection distance corresponding to the i-th calibration target in the selected region segment. i This represents the brightness corresponding to the i-th calibration target in the selected area segment, and A, B, C, D, and E represent the calibration parameters corresponding to the selected area.
[0018] To address the aforementioned technical problems, in a second aspect, this invention provides a ranging method, comprising: obtaining optimal calibration parameters corresponding to each region segment of a lidar using the calibration method described in the first aspect; collecting spot data using the lidar and calculating the detection distance between the object to be measured and the lidar based on the spot data; determining a specific region segment of the detection distance within the range of the lidar; and correcting the detection distance based on the optimal calibration parameters corresponding to the region segment to obtain the actual distance of the object to be measured.
[0019] To address the aforementioned technical problems, in a third aspect, embodiments of the present invention provide a lidar, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method described in the first aspect above.
[0020] Compared with the prior art, the beneficial effects of the present invention are as follows: Unlike the prior art, the embodiments of the present invention provide a calibration method, a ranging method, and a lidar. The calibration method first divides the range of the lidar into several regions, and then calibrates it by setting a calibration target in each region to obtain the calibration parameters corresponding to each region. Finally, the calibration parameters corresponding to each region are optimized based on a weight factor to obtain the optimal calibration parameters corresponding to each region. The embodiments of the present invention improve the calibration accuracy of the lidar by dividing the range of the lidar into regions and calibrating them separately, combined with assigning weights to the calibration parameters. Attached Figure Description
[0021] One or more embodiments are illustrated by way of example with reference to the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements / modules and steps with the same reference numerals in the drawings are represented as similar elements / modules and steps. Unless otherwise stated, the figures in the drawings do not constitute a limitation on scale.
[0022] Figure 1 This is a schematic diagram of one application environment of the calibration method provided in the embodiments of the present invention;
[0023] Figure 2 This is a schematic flowchart of a calibration method provided in an embodiment of the present invention;
[0024] Figure 3 yes Figure 2 A schematic diagram of a sub-process of step S200 in the calibration method shown;
[0025] Figure 4 yes Figure 2 Another sub-process diagram of step S200 in the calibration method shown;
[0026] Figure 5 This is a flowchart illustrating another calibration method provided in an embodiment of the present invention;
[0027] Figure 6 yes Figure 2 A schematic diagram of a sub-process of step S300 in the calibration method shown;
[0028] Figure 7 This is a flowchart illustrating a ranging method provided in an embodiment of the present invention;
[0029] Figure 8 This is a schematic diagram of the structure of a calibration device provided in an embodiment of the present invention;
[0030] Figure 9 This is a schematic diagram of the structure of a ranging device provided in an embodiment of the present invention;
[0031] Figure 10 This is a schematic diagram of the structure of a lidar provided in an embodiment of the present invention. Detailed Implementation
[0032] The present invention will now be described in detail with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the present invention, but do not limit the invention in any way. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention. These all fall within the scope of protection of the present invention.
[0033] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0034] It should be noted that, unless otherwise specified, the various features in the embodiments of this invention can be combined with each other, all of which are within the protection scope of this application. Furthermore, although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed differently from the module division in the device or the order shown in the flowchart.
[0035] Unless otherwise defined, all technical and scientific terms used in this specification have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention.
[0036] Furthermore, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0037] To address the issue of inaccurate calibration of current lidars when the measurement range is large, this invention provides a calibration method, a ranging method, and a lidar. This method improves the calibration accuracy of the lidar by dividing the lidar's measurement range into regions and calibrating them separately, combined with assigning weights to the calibration parameters. Figure 1 This is a schematic diagram of one application environment of the calibration method provided in the embodiment of the present invention. The application environment includes a lidar 10 and a plurality of calibration targets 20, each calibration target 20 being arranged at a certain angular interval around the lidar 10.
[0038] like Figure 1 As shown, the range of the lidar 10 is divided into three regions according to the distance range, and each region is outlined with a dashed box. Figure 1 The diagram indicates near-range, mid-range, and long-range zones, and each zone contains several calibration targets 20. Figure 1 In the example shown, there are 4 calibration targets 20 in the near-range segment, 4 calibration targets 20 in the mid-range segment, and 5 calibration targets 20 in the far-range segment. The number of calibration targets 20 can be adaptively adjusted. Furthermore, adjacent segments may have overlapping or non-overlapping portions. Figure 1 In the example shown, a preferred method is to use an overlapping scheme, where the overlapping portion shares the same calibration target 20, i.e. Figure 1 The overlapping portions between the near-range and mid-range segments share the same calibration target 20, as do the overlapping portions between the mid-range and far-range segments.
[0039] The present invention provides a further explanation of the calibration method using the above-mentioned application scenario as an example. In actual application scenarios, the settings of the lidar 10 and the calibration target 20, such as the selection of the range of the lidar 10, the setting angle and number of the calibration target 20, and the setting of the area segment, can be set according to actual needs and are not limited to the limitations of the present invention.
[0040] Specifically, the embodiments of the present invention will be further described below with reference to the accompanying drawings.
[0041] This invention provides a calibration method for use with lidar, wherein the lidar can be used in the aforementioned application scenarios and... Figure 1 Please refer to the lidar 10 shown. Figure 2 This illustrates a flowchart of a calibration method provided by an embodiment of the present invention, the method including but not limited to the following steps:
[0042] Step S100: Divide the range of the lidar into several regions;
[0043] In the embodiments of the present invention, please refer to Figure 1 The range of lidar can be divided into, for example... Figure 1 The three regions shown can be represented by distance. Specifically, dividing the range of the lidar into several regions includes: setting the range of each region according to the lidar's range and the weight of the boundary lines between adjacent regions. The regions are defined by boundary lines, and the distance between the boundary lines between adjacent regions is expressed by the following formula:
[0044] xD i =minD+ρ i *(maxD-minD)
[0045] Among them, xD i Let ρ represent the distance value of the i-th boundary line, minD represent the minimum range distance of the lidar, maxD represent the maximum range distance of the lidar, and ρ represent the distance of the i-th boundary line. i This represents the weight of the i-th boundary line.
[0046] For example, in Figure 1In this embodiment, if we define three regions: a near-distance region, a medium-distance region, and a far-distance region, where the weights ρ of the near-distance and medium-distance boundary lines and the medium-distance and far-distance boundary lines can be set to 1.3 and 4.6 respectively, then the near-distance region can be represented as a region with a distance in the range [minD, xD1], the medium-distance region as a region with a distance in the range (xD1, xD2], and the far-distance region as a region with a distance in the range (xD2, maxD]. xD1 represents the distance between the boundary lines of the near-distance and medium-distance regions, and xD2 represents the distance between the boundary lines of the medium-distance and far-distance regions. In other embodiments, the number of regions can be set according to actual needs and is not limited to the examples in this embodiment.
[0047] Step S200: Calibrate using calibration targets set in each of the aforementioned regions to obtain calibration parameters corresponding to each of the aforementioned regions;
[0048] After dividing the area into segments, calibration can be performed using calibration targets within each segment to obtain the calibration parameters of the lidar. The calibration method provided in this embodiment is applicable to both triangulation and time-of-flight (TOF) calibration. Calibration of two types of lidars employing triangulation and TOF methods can be achieved by setting different calibration targets. The calibration targets are as follows: Figure 1 As shown, there is a calibration target that can be used to calibrate two adjacent regions. Setting the calibration target at the boundary of the regions and calibrating them separately in the two regions can improve the accuracy of the calibration. In some other embodiments, the calibration target may not be set at the boundary of the regions. The specific setting can be made according to actual needs and does not need to be limited to the limitations of the embodiments of the present invention.
[0049] In one scenario, when the lidar is a radar system utilizing the triangulation ranging principle, triangulation ranging must be used for calibration. The calibration target in each of the aforementioned regions is a white target, which can also be replaced with a calibration target made of other homogeneous materials. For details, please refer to [link to relevant documentation]. Figure 3 It shows Figure 2 A sub-process of step S200 in the calibration method shown, wherein calibration is performed using calibration targets set in each of the regions to obtain calibration parameters corresponding to each region, includes:
[0050] Step S211: Select a region segment;
[0051] First, this embodiment of the invention requires each region segment to be calibrated separately. Each region segment also has a different calibration weight during calibration. Therefore, it is necessary to select a region segment first, and then perform the calibration step for the selected region segment. Furthermore, after the calibration of the selected region segment is completed, other uncalibrated region segments are selected as the next region segment for calibration, until all region segments are calibrated.
[0052] Step S212: Obtain the point cloud within a preset range of preset angles corresponding to each of the calibration targets in the selected region segment;
[0053] In this embodiment of the invention, the preset angle of the calibration target is the angle between the calibration target and the lidar, representing the orientation of the calibration target. Please refer to [link to relevant documentation]. Figure 1 For each calibration target 20, the laser beam output by lidar 10 is as follows: Figure 1 As shown by the dashed line, the light is reflected back to the lidar after being vertically irradiated onto the calibration target. For all the light spots received from the calibration target 20, only the point cloud light spots within a preset range of the preset angle of the calibration target are selected for the next step of calculation. For example, for a calibration target with a preset angle of 270°, the point cloud with a preset range of ±1° is selected, that is, the lidar acquires all point clouds within 270°±1°.
[0054] Step S213: Based on the point cloud, determine the average distance and average spot center value corresponding to each of the calibration targets in the selected region segment;
[0055] In this embodiment of the invention, based on the ranging principle of triangulation, it is known that the distance is related to the position of the light spot on the image sensor. Therefore, after obtaining the point cloud of each calibration target within a preset range, the mean distance and the mean center value of the light spot in the point cloud within the preset range of the calibration target are calculated to calculate the calibration parameters.
[0056] Step S214: Based on the triangulation method and the mean distance and the mean center of the spot corresponding to each calibration target in the selected area segment, the calibration parameters corresponding to the selected area segment are obtained by fitting using the least squares method.
[0057] It is known that the calibration formula, or distance measurement formula, for the trigonometric distance measurement method can be expressed as follows:
[0058] d = n1 / (n2 + cx)
[0059] Where n1 and n2 are calibration parameters obtained through calibration, and cx is the center value of the light spot.
[0060] The distance measurement formula of the trigonometric method, after being converted into a matrix formula, is as follows:
[0061]
[0062] Let X = [1-d], Y = [d*cx], therefore we can obtain the following:
[0063] XA = Y
[0064] Substituting the mean distance and mean spot center value of the point cloud of each calibration target in each region segment of the selected region obtained in step S213 into the above formula, the calibration parameter A can be determined by least squares fitting:
[0065] A = inv(X′*X)*X′*Y
[0066] In another scenario, when the lidar is a radar based on the time-of-flight ranging principle, calibration using time-of-flight ranging is required. The calibration target in each of the aforementioned regions includes equally divided and symmetrical white and black target portions. The boundary between the white and black target portions is used to receive the vertically incident laser beam; that is, the boundary between the white and black targets is oriented towards the lidar. For details, please refer to [link to relevant documentation]. Figure 4 It shows Figure 2 Another sub-process of step S200 in the calibration method shown, wherein calibration is performed using calibration targets set in each of the regions to obtain calibration parameters corresponding to each region, includes:
[0067] Step S221: Select a region segment;
[0068] First, each region segment needs to be calibrated separately in this embodiment of the invention. Each region segment also has a different calibration weight during calibration. Therefore, it is necessary to select a region segment first, and then perform the calibration step for the selected region segment. After the calibration of the selected region segment is completed, other uncalibrated region segments are selected as the next region segment for calibration, until all region segments are calibrated.
[0069] Step S222: Based on the time of flight of the laser beam, determine the detection distance of each of the calibration targets in the selected area segment;
[0070] As can be seen from the ranging principle of time-of-flight ranging, such as Figure 1 As shown, the laser beam emitted by the lidar 10 reflects back to the lidar 10 after reaching the calibration target. The detection distance of each calibration target can be determined based on the flight time of the laser beam during the round trip.
[0071] Step S223: Based on the time-of-flight method and the preset distance, detection distance, and brightness of each calibration target in the selected area segment, establish a system of equations for the calibration formula;
[0072] The preset distance of the calibration target is a pre-set distance, which is usually also the actual distance of the calibration target. The detection distance of the calibration target is the distance calculated from the time of flight obtained in step S222. The brightness of the calibration target is the brightness of the laser spot received by the lidar. The calibration formula, or ranging formula, of the time-of-flight ranging method can be expressed as follows:
[0073] d i =A*p i 2 +B*p i +C*lumi i 2 +D*lumi i +E
[0074] Where, d i p represents the preset distance corresponding to the i-th calibration target in the selected region segment. i Lumi represents the detection distance corresponding to the i-th calibration target in the selected region segment. i This represents the brightness corresponding to the i-th calibration target in the selected area segment, and A, B, C, D, and E represent the calibration parameters corresponding to the selected area.
[0075] After obtaining the preset distance, detection distance, and brightness of each calibration target, substitute them into the above calibration formula, and combine the calibration formulas of each calibration target with the values substituted to obtain the system of calibration formulas.
[0076] Step S224: Solve the overdetermined equations of the calibration formula system using the least squares method to obtain the calibration parameters corresponding to the selected region segment.
[0077] In this embodiment of the invention, for a large-range lidar, the number of calibration targets is also large; therefore, the number of equations in the equation set obtained in step S223 is also large. Figure 1 For example, since there are 11 calibration targets, there are at least 11 corresponding calibration formula equations. As shown in step S223, the calibration parameters are A, B, C, D, and E. At this time, the number of calibration formulas in the equation system is greater than the number of calibration parameters, that is, the number of equations is greater than the number of unknowns. Therefore, the equation system obtained by combining the calibration formulas is an overdetermined equation system, which can be solved by the least squares method. The least squares solution obtained is the value of each calibration parameter.
[0078] Step S300: Optimize the calibration parameters corresponding to each region segment based on the weighting factor to obtain the optimal calibration parameters corresponding to each region segment.
[0079] In this embodiment of the invention, after obtaining the calibration parameters corresponding to each region segment, the actual distance measurement can be achieved by substituting the calibration parameters into the distance measurement formula in step S214 or the calibration formula in step S223.
[0080] In actual calibration, various situations may arise, such as out-of-focus laser tube and receiver lenses, workpiece assembly errors, and noise in the calibration environment. These issues can lead to discrepancies between the preset distance and the actual distance of the calibration target, resulting in inaccurate calibration parameters. Consequently, the lidar cannot correct the actual measured distance after calibration. Therefore, the calibration parameters can be further optimized based on weighting factors to obtain more accurate calibration parameters.
[0081] First, it is necessary to determine whether the calculated calibration parameters can be corrected. For details, please refer to [link to relevant documentation]. Figure 5 This illustrates the flowchart of another calibration method provided by an embodiment of the present invention. Before optimizing the calibration parameters corresponding to each of the aforementioned regions based on weight factors, the method further includes:
[0082] Step S301: Select a region segment;
[0083] Step S302: Based on the calibration parameters corresponding to the selected area segment, calculate the actual distance of each calibration target in the selected area segment;
[0084] Step S303: Determine whether the offset between the actual distance of each calibration target in the selected area segment and the preset distance is greater than a preset threshold; if not, proceed to step S304; if yes, proceed to step S300.
[0085] Step S304: Determine that the selected region segment calibration has failed;
[0086] In this embodiment of the invention, firstly, since different regions have different calibration parameters and weighting factors, it is necessary to select a region to determine the region that needs to be back-calculated and confirmed as to whether the calibration has failed. Secondly, based on the calibration parameters corresponding to the selected region, the distance of each calibration target in the selected region is back-calculated, and the actual distance of each calibration target is calculated through the calibration parameters. The preset distance is the theoretical distance between the location where the calibration target is placed and the lidar. Then, it is determined whether the offset between the actual distance to the calibration target and the preset distance in the selected area is too large. If the offset is greater than the preset threshold, that is, the offset is too large, the calibration parameter deviation is large and cannot be corrected, and the calibration is determined to be a failure. It is necessary to check whether the problem is with the lidar itself, such as the lidar assembly being unqualified, or the target setting problem. If it is determined to be a target setting problem, the position of the calibration target or the lidar needs to be manually reset and the calibration re-performed. If the offset is less than or equal to the preset threshold, it means that the calibration parameter deviation is small and can be corrected. It can be corrected through steps S310 to S350 as described below. If the actual distance obtained by back calculation is the same as the preset distance, it means that there is no deviation and no correction is required.
[0087] To avoid situations where some calibration target segments have large errors while others have small errors, resulting in higher ranging accuracy in some segments and lower accuracy in others, once it is determined that there are deviations in the calibration parameters that need to be corrected and that can be corrected, the calibration parameters for each segment can be adjusted according to different weights. This balances the calibration accuracy across segments and improves the consistency of ranging accuracy. For details, please refer to [link to relevant documentation]. Figure 6 It shows Figure 2 A sub-process of step S300 in the calibration method shown, wherein optimizing the calibration parameters corresponding to each region segment based on weight factors includes:
[0088] Step S310: Select a region segment;
[0089] First, similarly, since different regions have different calibration parameters and weighting factors, it is necessary to select a region and optimize its calibration parameters to obtain the optimal calibration parameters for that region. Furthermore, after optimizing the calibration parameters of the selected region, other regions whose calibration parameters have not been optimized are selected as the next region for optimization, until the calibration parameters of all regions are optimized.
[0090] Step S320: Set several different weighting factors according to different step size intervals;
[0091] For each calibration parameter, different weighting factors are applied within a certain range, i.e., multiple sets of weighting factors are set to try different optimization directions for the calibration parameters. The weighting factors can be accumulated sequentially with a certain step size to obtain several different sets of weighting factors. For example, if the first set of weighting factors α and β are set to 1.3 and 4.6, with a step size of 0.1, and then set at 0.1 intervals, the second set of weighting factors can be set to 1.4 and 4.7, the third set to 1.5 and 4.8, and so on. Alternatively, different step sizes can be set for different weighting factors. For example, when the first set of weighting factors α and β are set to 1.3 and 4.6, the step sizes can be set to 0.1 and 0.2 respectively, resulting in the second set of weighting factors being set to 1.4 and 4.8, the third set to 1.5 and 5.0, and so on. Specifically, several different sets of weighting factors can be set according to different step size intervals based on the actual situation, without being limited to the examples in this embodiment.
[0092] Step S330: Based on the calibration parameters corresponding to the selected region segment, calculate the optimized distance of each calibration target in the selected region segment under several different weight factors;
[0093] For the selected area segment, after setting several different weight factors, based on the calibration parameters corresponding to the selected area segment and the preset distance of the calibration target calculated in step S200, the set several different weight factors are substituted into the ranging formula to calculate the optimized distance of each calibration target in the selected area segment under each set of weight factors.
[0094] Taking the distance measurement formula of the trigonometric method as an example, after setting a set of weighting factors for the calibration parameters, the distance measurement formula can be expressed as follows:
[0095] dis(k) = n1*α / (n2*β+cx(k))
[0096] Where n1 and n2 are calibration parameters, cx(k) is the center value of the light spot of the kth calibration target, α and β are a set of weighting factors, and dis(k) is the optimized distance calculated at the calibration target at a preset distance of k after setting the weighting factors.
[0097] Step S340: Calculate the cumulative value of the difference between the optimized distance and the preset distance of each calibration target in the selected region segment under each set of weight factors;
[0098] After calculating the optimized distance of each calibration target in the selected region segment under several different weighting factors, for each weighting factor, the calculated optimized distance of each calibration target in the selected region segment is subtracted from the preset distance to obtain the difference value. The differences between the optimized distance and the preset distance of each calibration target in the selected region segment are then summed to obtain the accumulated value. It can be understood that for each calibration target, the difference between the optimized distance and the preset distance is the offset between the optimized distance and the preset distance under that set of weighting factors. Typically, this offset is also less than the preset threshold mentioned in steps S301 to S304.
[0099] Continuing with the triangulation method as an example, the difference between the optimized distance and the preset distance of each calibration target can be expressed by the following formula:
[0100] DiffDis(k)=γ(k)*(dis(k)-D(k))
[0101] Where dis(k) represents the optimized distance of the k-th calibration target, D(k) represents the preset distance of the k-th calibration target, DiffDis(k) is the difference between the optimized distance and the preset distance of the k-th calibration target, and γ(k) is the weight factor of the k-th calibration target. Furthermore, since the offset usually increases with distance, preferably, the weight factor of each calibration target can be gradually decreased from near to far distance, thereby reducing the difference between the offset at close range and the offset at far range. After calculating the difference between the optimized distance and the preset distance of each calibration target, the differences of each calibration target are summed to obtain the summed value Err of the difference between the optimized distance and the preset distance of each calibration target, which can be expressed by the following formula:
[0102]
[0103] By setting several different weight factors as described in step S320 above, different schemes with different differences between the optimized distance and the preset distance of the calibration target can be explored. For each set of weight factors, the difference between the optimized distance and the preset distance of each calibration target and the cumulative value of the difference between each calibration target can be calculated, and different cumulative values Err can be obtained.
[0104] Step S350: Save the calibration parameters corresponding to the set of weight factors with the smallest cumulative value as the optimal calibration parameters corresponding to the selected region segment and output them.
[0105] The calibration parameters corresponding to the set of weight factors with the smallest cumulative value Err calculated based on each set of weight factors, that is, the set of weight factors with the smallest overall difference between the optimized distance and the preset distance of each calibration target, representing the set of weight factors with the optimized distance of the calibration target being closest to the preset distance, are saved as the optimal calibration parameters and output, and recorded in the lidar as the final calibration parameters.
[0106] Similarly, for the time-of-flight ranging method, also known as the TOF ranging method, the steps from S310 to S350 can be used to optimize the calibration parameters corresponding to each area segment and obtain the optimal calibration parameters, which will not be detailed here.
[0107] This invention also provides a ranging method applied to lidar, wherein the lidar can be used in the aforementioned application scenarios and... Figure 1 Please refer to the lidar 10 shown. Figure 7 This illustrates a flow chart of a ranging method provided by an embodiment of the present invention, the ranging method including but not limited to the following steps:
[0108] Step S400: Obtain the optimal calibration parameters corresponding to each region segment of the lidar using the calibration method described above;
[0109] In this embodiment of the invention, firstly, steps S100 to S300 can be used to obtain the area segments set within the range of the lidar and the optimal calibration parameters corresponding to each area segment after optimization based on different weighting factors.
[0110] Step S500: Collect spot data using the lidar, and calculate the detection distance between the object to be tested and the lidar based on the spot data;
[0111] Secondly, a laser can be emitted by a lidar, and the spot data collected by the lidar when the laser beam returns to the lidar can be initially collected. Based on the working principle of the lidar, the detection distance between the object to be measured and the lidar can be calculated by the triangulation method or the time-of-flight method.
[0112] Step S600: Determine the specific region within the range of the lidar for the detection distance;
[0113] Next, based on the detection distance and the range of each region segment pre-stored in the lidar, the specific region segment corresponding to the detection distance is determined, and the weight factor corresponding to the region segment is determined, thereby determining the optimal calibration parameter corresponding to the weight factor.
[0114] Step S700: Based on the optimal calibration parameters corresponding to the region segment, correct the detection distance to obtain the actual distance of the object to be measured.
[0115] After obtaining the optimal calibration parameters, the actual distance of the object to be measured can be calculated by substituting the optimal calibration parameters into the distance measurement formula of step S214 or step S223.
[0116] Furthermore, when there are multiple lidars on the device or system, for each individual lidar, the calibration parameters of each lidar segment are stored, as well as a set of calibration parameters for the entire range of each lidar. When measuring distance, the calibration parameters of the entire range can be used first to calculate the detection distance in step S500 to obtain an approximate distance value. Then, step S600 determines which segment to enter based on the detection distance. Finally, step S700 uses the optimal calibration parameters of that segment to accurately calculate the actual distance of the object to be measured.
[0117] This invention also provides a calibration device for use with lidar, wherein the lidar can be used in the aforementioned application scenarios and Figure 1 Please refer to the lidar 10 shown. Figure 8 The diagram illustrates the structure of a calibration device provided in an embodiment of the present invention. The calibration device 100 includes: a segmentation unit 110, a calibration unit 120, and an optimization unit 130.
[0118] The segmentation unit 110 is used to divide the range of the lidar into several regions. Optionally, the segmentation unit 110 is further used to set the range of each region according to the range of the lidar and the weight of the boundary lines between adjacent regions, and the distance value of the boundary lines between adjacent regions is expressed by the following formula:
[0119] xD i =minD+ρ i *(maxD-minD)
[0120] Among them, xD i Let ρ represent the distance value of the i-th boundary line, minD represent the minimum range distance of the lidar, maxD represent the maximum range distance of the lidar, and ρ represent the distance of the i-th boundary line. i This represents the weight of the i-th boundary line.
[0121] The calibration unit 120 is used to perform calibration using calibration targets set in each of the aforementioned regions to obtain calibration parameters corresponding to each of the aforementioned regions. Optionally, when the calibration targets in each of the aforementioned regions are white targets, the calibration unit 120 is further used to select a region; obtain a point cloud within a preset range of preset angles corresponding to each of the aforementioned calibration targets in the selected region; determine the average distance and average spot center value corresponding to each of the aforementioned calibration targets in the selected region based on the point cloud; and obtain the calibration parameters corresponding to the selected region by fitting the average distance and average spot center value corresponding to each of the aforementioned calibration targets in the selected region using the least squares method based on the triangulation method. Optionally, the calibration target in each of the aforementioned regions includes an evenly divided and symmetrical white target portion and a black target portion. When the boundary between the white target portion and the black target portion is used to receive a vertically incident laser beam, the calibration unit 120 is further configured to select a region; determine the detection distance of each of the calibration targets in the selected region based on the time-of-flight method; establish a system of calibration equations based on the time-of-flight method and the preset distance, detection distance, and brightness of each of the calibration targets in the selected region; solve the overdetermined equations of the system of calibration equations using the least squares method to obtain the calibration parameters corresponding to the selected region; the calibration formula is expressed as follows:
[0122] d i =A*p i 2 +B*p i +C*lumi i 2 +D*lumi i +E
[0123] Where, d i p represents the preset distance corresponding to the i-th calibration target in the selected region segment. i Lumi represents the detection distance corresponding to the i-th calibration target in the selected region segment. i This represents the brightness corresponding to the i-th calibration target in the selected area segment, and A, B, C, D, and E represent the calibration parameters corresponding to the selected area.
[0124] The optimization unit 130 is used to optimize the calibration parameters corresponding to each of the regions based on weight factors to obtain the optimal calibration parameters corresponding to each of the regions. Optionally, the optimization unit 130 is further used to select a region; set several different sets of weight factors according to different step intervals; calculate the optimized distance of each calibration target in the selected region under several different sets of weight factors based on the calibration parameters corresponding to the selected region; calculate the cumulative value of the difference between the optimized distance of each calibration target in the selected region and the preset distance under each set of weight factors; and save the calibration parameters corresponding to the set of weight factors with the smallest cumulative value as the optimal calibration parameters corresponding to the selected region and output them. Optionally, the optimization unit 130 is further configured to, based on the calibration parameters corresponding to the selected region segment, substitute several sets of different weighting factors into the ranging formula to calculate the optimized distance of each calibration target in the selected region segment under each set of weighting factors; for each set of weighting factors, subtract the calculated optimized distance of each calibration target in the selected region segment from the preset distance to obtain the difference value, and accumulate the differences between the optimized distance of each calibration target in the selected region segment and the preset distance to obtain the accumulated value. Optionally, the optimization unit 130 is further configured to select a region segment; based on the calibration parameters corresponding to the selected region segment, back-calculate the actual distance of each calibration target in the selected region segment; determine whether the offset between the actual distance of each calibration target in the selected region segment and the preset distance is greater than a preset threshold; if yes, determine that the calibration of the selected region segment has failed; if no, jump to the step of optimizing the calibration parameters corresponding to each region segment based on the weighting factors.
[0125] This invention also provides a ranging device for use with lidar, wherein the lidar can be used in the aforementioned application scenarios and Figure 1 Please refer to the lidar 10 shown. Figure 9 The diagram illustrates the structure of a ranging device provided in an embodiment of the present invention. The ranging device 200 includes: an acquisition unit 210, a calculation unit 220, a determination unit 230, and a correction unit 240.
[0126] The acquisition unit 210 is used to acquire the optimal calibration parameters corresponding to each region segment of the lidar through the calibration method described above; the calculation unit 220 is used to collect spot data through the lidar and calculate the detection distance between the object to be measured and the lidar based on the spot data; the determination unit 230 is used to determine the specific region segment of the detection distance within the range of the lidar; the correction unit 240 is used to correct the detection distance based on the optimal calibration parameters corresponding to the region segment to obtain the actual distance of the object to be measured.
[0127] This invention also provides a lidar, please refer to [link / reference]. Figure 10 It demonstrates the ability to execute Figures 2 to 6 The calibration method describes the hardware structure of the lidar. The lidar 10 can be... Figure 1 The lidar 10 shown.
[0128] The lidar 10 includes: at least one processor 11; and a memory 12 communicatively connected to the at least one processor 11. Figure 10 Taking a processor 11 as an example, the memory 12 stores instructions that can be executed by the at least one processor 11, which, when executed by the at least one processor 11, enable the at least one processor 11 to perform the aforementioned... Figures 2 to 6 The calibration method described above. The processor 11 and the memory 12 can be connected via a bus or other means. Figure 10 Taking the example of a connection between China and Israel via a bus.
[0129] The memory 12, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions / modules corresponding to the calibration method in the embodiments of this application, for example, Figures 8 to 9 The various modules are shown. The processor 11 executes various server functions and data processing by running non-volatile software programs, instructions, and modules stored in the memory 12, thereby implementing the calibration method described in the above embodiment.
[0130] The memory 12 may include a program storage area and a data storage area, wherein the program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the calibration device, etc. Furthermore, the memory 12 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 12 may optionally include memory remotely located relative to the processor 11, and these remote memories may be connected to the calibration device via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0131] The one or more modules are stored in the memory 12. When executed by the one or more processors 11, they perform the calibration method in any of the above method embodiments, for example, the method described above. Figures 2 to 6 The method and steps to achieve Figures 8 to 9 The functions of each module and unit within it.
[0132] The above-described product can perform the methods provided in the embodiments of this application, and has the corresponding functional modules and beneficial effects for performing the methods. Technical details not described in detail in this embodiment can be found in the methods provided in the embodiments of this application.
[0133] This application also provides a non-volatile computer-readable storage medium storing computer-executable instructions that are executed by one or more processors, for example, executing the instructions described above. Figures 2 to 6 The method and steps to achieve Figures 8 to 9 The functions of each module in the program.
[0134] This application also provides a computer program product, including a computing program stored on a non-volatile computer-readable storage medium. The computer program includes program instructions that, when executed by a computer, cause the computer to perform the calibration method described in any of the above method embodiments, for example, to perform the above-described calibration method. Figures 2 to 6 The method and steps to achieve Figures 8 to 9 The functions of each module in the program.
[0135] This invention provides a calibration method, a ranging method, and a lidar. The calibration method first divides the lidar's range into several regions, then calibrates each region using a calibration target set in each region to obtain calibration parameters for each region. Finally, it optimizes the calibration parameters for each region based on a weighting factor to obtain the optimal calibration parameters for each region. This invention improves the calibration accuracy of the lidar by dividing the lidar's range into regions and calibrating them separately, combined with assigning weights to the calibration parameters.
[0136] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0137] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented using software and a general-purpose hardware platform, or of course, using hardware. Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0138] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; under the concept of the present invention, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of the present invention as described above. For the sake of brevity, they are not provided in detail; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A calibration method, characterized in that, Applied to lidar, the method includes: The range of the lidar is divided into several regions; The calibration is performed using calibration targets set in each of the aforementioned regions to obtain the calibration parameters corresponding to each region. The calibration parameters corresponding to each region segment are optimized based on the weighting factor to obtain the optimal calibration parameters for each region segment.
2. The calibration method according to claim 1, characterized in that, The optimization of the calibration parameters corresponding to each of the aforementioned regions based on weighting factors includes: Select a region segment; Set several different weighting factors according to different step size intervals; Based on the calibration parameters corresponding to the selected region segment, the optimized distance of each calibration target in the selected region segment is calculated under several different weight factors; Calculate the sum of the differences between the optimized distance and the preset distance of each calibration target in the selected region segment under each set of weight factors; Save the calibration parameters corresponding to the set of weight factors with the smallest cumulative value as the optimal calibration parameters for the selected region segment and output them.
3. The calibration method according to claim 2, characterized in that, The calculation of the optimized distance of each calibration target in the selected region segment under several different weighting factors, based on the calibration parameters corresponding to the selected region segment, includes: Based on the calibration parameters corresponding to the selected area segment, several sets of different weight factors are substituted into the ranging formula to calculate the optimized distance of each calibration target in the selected area segment under each set of weight factors. The calculation of the cumulative difference between the optimized distance and the preset distance of each calibration target in the selected region segment under each set of weighting factors includes: For each set of weighting factors, the difference is obtained by subtracting the optimized distance of each calibration target in the selected region from the preset distance, and the accumulated value is obtained by summing the differences between the optimized distance and the preset distance of each calibration target in the selected region.
4. The calibration method according to claim 2, characterized in that, Before optimizing the calibration parameters corresponding to each of the aforementioned regions based on weighting factors, the method further includes: Select a region segment; Based on the calibration parameters corresponding to the selected region segment, the actual distance of each calibration target in the selected region segment is calculated. Determine whether the offset between the actual distance of each calibration target in the selected area segment and the preset distance is greater than a preset threshold. If so, it is determined that the selected region segment calibration has failed; If not, proceed to the step of optimizing the calibration parameters corresponding to each of the aforementioned regions based on weight factors.
5. The calibration method according to any one of claims 1-4, characterized in that, The process of dividing the range of the lidar into several regions includes: The range of each region is set according to the range of the lidar and the weight of the boundary line between adjacent regions. The distance between the boundary line between adjacent regions is expressed by the following formula: xD i <minD+ρ i *(maxD-minD) Among them, xD i Let ρ represent the distance value of the i-th boundary line, minD represent the minimum range distance of the lidar, maxD represent the maximum range distance of the lidar, and ρ represent the distance of the i-th boundary line. i This represents the weight of the i-th boundary line.
6. The calibration method according to any one of claims 1-4, characterized in that, The calibration targets in each of the aforementioned regions are white targets. The calibration is performed using calibration targets set in each of the aforementioned regions to obtain calibration parameters corresponding to each region, including: Select a region segment; Obtain the point cloud within a preset range of preset angles corresponding to each of the calibration targets in the selected region segment; Based on the point cloud, determine the average distance and average spot center of each calibration target in the selected region segment; Based on the triangulation method and the mean distance and the mean spot center value of each calibration target in the selected area, the calibration parameters corresponding to the selected area are obtained by least squares fitting.
7. The calibration method according to any one of claims 1-4, characterized in that, The calibration target in each of the aforementioned regions includes an evenly divided and symmetrical white target portion and a black target portion. The boundary between the white target portion and the black target portion is used to receive a vertically incident laser beam. The calibration is performed using calibration targets set in each of the aforementioned regions to obtain calibration parameters corresponding to each region, including: Select a region segment; Based on the time of flight of the laser beam, the detection distance of each of the calibration targets in the selected area segment is determined; Based on the time-of-flight method and the preset distance, detection distance, and brightness of each calibration target in the selected area segment, a system of equations for the calibration formula is established. The overdetermined equations of the calibration formula system are solved by the least squares method to obtain the calibration parameters corresponding to the selected region segment.
8. The calibration method according to claim 7, characterized in that, The calibration formula is expressed as follows: d i JA*p i 2 +B*p i +C*light i 2 +D*light i +E Where, d i p represents the preset distance corresponding to the i-th calibration target in the selected region segment. i Lumi represents the detection distance corresponding to the i-th calibration target in the selected region segment. i This represents the brightness corresponding to the i-th calibration target in the selected area segment, and A, B, C, D, and E represent the calibration parameters corresponding to the selected area.
9. A distance measurement method, characterized in that, include: The optimal calibration parameters corresponding to each region segment of the lidar are obtained by the calibration method described in any one of claims 1-8. The laser radar collects spot data, and the detection distance between the object to be tested and the laser radar is calculated based on the spot data. Determine the specific region within the range of the lidar that the detection distance is specified; Based on the optimal calibration parameters corresponding to the region segment, the detection distance is corrected to obtain the actual distance of the object to be measured.
10. A lidar, characterized in that, include: At least one processor; as well as, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method as described in any one of claims 1-9.
Citation Information
Patent Citations
Calibration method of laser radar
CN109597054A
Laser ranging method and device, laser radar and storage medium
CN115372983A