A calibration method for a distance error model, a distance measurement method and a related device
By obtaining the distance measurement value and brightness value of the lidar and fitting the distance error model, the problem of complex and large calculation of the lidar distance measurement calibration in the prior art is solved, and fast and efficient distance error model calibration is achieved.
Patent Information
- Application Number
- CN202411060062.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-05
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2044-08-05
AI Technical Summary
Existing lidars require multiple calibration parameters in distance measurement, and the calibration process is complex and the calculation is large, resulting in inefficiency.
By obtaining the distance measurement values and brightness values at the actual distance, fitting the distance error model based on these values, simplifying the calibration process, reducing the calculation amount, and improving calibration efficiency.
The fast calibration of the lidar distance error model is realized, the calibration process is simplified, and the calibration efficiency and accuracy are improved.
Smart Images

Figure CN118642085B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of laser radar technology, and in particular to a distance error model calibration method, a distance measurement method, a laser radar, a storage medium, and a sweeper. Background Art
[0002] With the continuous development of science and technology, laser radar is widely used in the fields of robots, unmanned vehicles and unmanned driving. Laser radar (Laser Detection and Ranging, LADAR) is a radar system that emits laser beams to detect the position, speed and other characteristic quantities of the target. In practical applications, laser radar uses the TOF method (Time of Flight, TOF) for ranging. Laser radar usually includes a transmitter and a receiver. The TOF ranging method measures the distance from the target object to the laser radar through the round-trip flight time of the signal between the transmitter and the receiver. The transmitter transmits a detection signal (laser beam) to the target, and the receiver receives the signal (reflected light) reflected from the target. The laser radar compares the received signal with the transmitted signal, and after appropriate processing, obtains relevant information about the target, such as target distance, direction, height, speed, attitude and even shape parameters.
[0003] Before the LiDAR can work normally, it needs to be calibrated with a calibration target to obtain calibration parameters that can be used to correct the actual distance, so that the original distance value output by the LiDAR is close to the actual distance value. However, the current TOF distance measurement requires many parameters to be calibrated, the calibration process is complex, and the amount of calculation is too large. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a calibration method, a distance measurement method, a laser radar, a storage medium and a sweeper of a distance error model. The method calibrates the parameters of the distance error model by utilizing distance measurement values and brightness values. The process is simple, the amount of calculation is small, and the calibration efficiency is improved.
[0005] To solve the above technical problems, the embodiments of the present invention provide the following technical solutions:
[0006] In a first aspect, an embodiment of the present invention provides a distance error model calibration method, which is applied to a laser radar, and the method includes:
[0007] Obtain the distance measurement values and brightness values corresponding to the calibration targets at several actual distances;
[0008] Parameters of a distance error model are acquired based on the distance measurement value and the brightness value, wherein the distance error model characterizes a relationship between the brightness value and the first distance error, and the first distance error is a difference between the distance measurement value and the actual distance.
[0009] In some embodiments, the laser radar includes a first photosensitive area and a second photosensitive area, the brightness value includes a first brightness value of the first photosensitive area and a second brightness value of the second photosensitive area, the distance error model includes a brightness reference model and a first distance error model, the brightness reference model characterizes the relationship between the brightness reference value and the first brightness value and the second brightness value, and the first distance error model characterizes the relationship between the first distance error and the brightness reference value.
[0010] In some embodiments, the calibration target includes at least two calibration targets of different materials, and obtaining the parameters of the brightness reference model includes:
[0011] Fitting a first intermediate model based on a plurality of first two-dimensional data points of actual distances and brightness averages to obtain parameters of the first intermediate model, wherein the first intermediate model represents the relationship between the actual distance and the brightness average, and the brightness average is the average of first brightness values corresponding to the at least two calibration targets of different materials;
[0012] Obtaining a reference brightness mean value based on the actual distance and the first intermediate model, and using the reference brightness mean value as a first brightness reference value;
[0013] For the calibration target at each actual distance, the brightness reference model is fitted based on multiple first three-dimensional data points to obtain parameters of the brightness reference model, the coordinate values of the first three-dimensional data points are the first brightness reference value, the first brightness value and the second brightness value, and each of the first three-dimensional data points corresponds to one of the actual distances.
[0014] In some embodiments, obtaining the parameters of the first distance error model includes:
[0015] For each material calibration target, perform the following steps:
[0016] Obtaining the brightness reference value based on the first brightness value, the second brightness value and the brightness reference model;
[0017] Subtracting the distance measurement value from the actual distance to obtain the first distance error;
[0018] The first distance error model is fitted based on a plurality of the brightness reference values and second two-dimensional data points of the first distance error to obtain parameters of the first distance error model, wherein each of the second two-dimensional data points corresponds to an actual distance.
[0019] In some embodiments, the distance error model further includes a second distance error model, wherein the second distance error model characterizes a relationship between the first distance error and a corrected brightness reference value;
[0020] Acquiring parameters of the second distance error model includes:
[0021] Obtaining a first difference between brightness reference values corresponding to the same first distance error in the second two-dimensional data point and the first distance error model;
[0022] Fitting a second intermediate model based on a plurality of third two-dimensional data points of the distance measurement values and the first difference value to obtain parameters of the second intermediate model, wherein the second intermediate model represents a relationship between the distance measurement value and the brightness reference error value;
[0023] Obtaining the brightness reference error value based on the distance measurement value and the second intermediate model;
[0024] Subtracting the brightness reference value from the brightness reference error value to obtain the corrected brightness reference value;
[0025] The second distance error model is fitted based on a plurality of the first distance errors and fourth two-dimensional data points of the corrected brightness reference value to obtain parameters of the second distance error model.
[0026] In some embodiments, the calibration target includes a black target, a white target, and a lattice target, the distance error model also includes a third distance error model, the third distance error model characterizes the relationship between the distance difference and the corrected brightness reference value, and the third distance error model includes a first sub-distance error model and a second sub-distance error model;
[0027] For each actual distance, obtaining parameters of the third distance error model, each actual distance corresponding to one third distance error model, including:
[0028] Obtaining a second distance error based on the corrected brightness reference value and the second distance error model;
[0029] Subtracting the first distance error from the second distance error to obtain a distance difference;
[0030] Fitting a first sub-distance error model based on fifth two-dimensional data points corresponding to the black target and the white target at the actual distance to obtain parameters of the first sub-distance error model, wherein the coordinate value of the fifth two-dimensional data point includes the corrected brightness reference value and the distance difference value;
[0031] Fitting a second sub-distance error model based on fifth two-dimensional data points corresponding to the white target and the lattice target at the actual distance to obtain parameters of the second sub-distance error model;
[0032] The first sub-range error model and the second sub-range error model are fused to obtain the third range error model.
[0033] In some embodiments, the third distance error model further includes a distance threshold, and the method further includes:
[0034] The distance measurement value corresponding to the actual distance is subtracted from the second distance error to obtain a distance threshold of the third distance error model corresponding to the actual distance.
[0035] In a second aspect, an embodiment of the present invention provides a ranging method, which is applied to a laser radar, and the method includes:
[0036] Obtain the distance measurement value and brightness value obtained by the laser radar detecting the target object;
[0037] Obtaining a third distance error based on the brightness value and a distance error model, wherein the distance error model characterizes a relationship between the brightness value and the third distance error, and a parameter of the distance error model is obtained by using any distance error model calibration method proposed in the first aspect;
[0038] The target distance value is obtained by subtracting the third distance error from the distance measurement value.
[0039] In some embodiments, the laser radar includes a first photosensitive area and a second photosensitive area, the brightness value includes a first brightness value of the first photosensitive area and a second brightness value of the second photosensitive area, the distance error model includes a brightness reference model and a first distance error model, the brightness reference model represents the relationship between the brightness reference value and the first brightness value and the second brightness value, and the first distance error model represents the relationship between the third distance error and the brightness reference value;
[0040] Obtaining a third distance error based on the brightness value and the distance error model includes:
[0041] Substituting the first brightness value and the second brightness value into the brightness reference model to obtain a brightness reference value;
[0042] Substituting the brightness reference value into the first distance error model, a third distance error is obtained.
[0043] In some embodiments, the distance error model further includes a second distance error model, wherein the second distance error model characterizes the relationship between the third distance error and the corrected brightness reference value;
[0044] Obtaining a third distance error based on the brightness value and the distance error model further includes:
[0045] Substituting the distance measurement value into a second intermediate model to obtain a brightness reference error value, wherein the second intermediate model represents a relationship between the distance measurement value and the brightness reference error value;
[0046] Subtract the brightness reference value from the brightness reference error value to obtain a corrected brightness reference value;
[0047] The corrected brightness reference value is substituted into the second distance error model to obtain a fourth distance error, and the third distance error is updated using the fourth distance error.
[0048] In some embodiments, the distance error model further includes a plurality of third distance error models, each of the third distance error models corresponds to a distance threshold, the distance threshold constitutes a plurality of distance interval segments, the third distance error model characterizes the relationship between the target distance difference and the corrected brightness reference value, and the third distance error model includes a first sub-distance error model and a second sub-distance error model;
[0049] The method further comprises:
[0050] Determine a distance interval in which the target distance value is located, and select a third distance error model based on the distance interval;
[0051] Selecting a first sub-range error model or a second sub-range error model from the third range error model based on the modified brightness reference value and the modified brightness reference threshold;
[0052] Substituting the corrected brightness reference value into the selected distance error model to obtain a target distance difference;
[0053] The target distance value is subtracted from the target distance difference to update the target distance value.
[0054] In some embodiments, each of the distance interval segments is composed of two consecutive distance thresholds, and determining the distance interval segment in which the target distance value is located, and selecting the third distance error model based on the distance interval segment, includes:
[0055] If the target distance value is the first distance threshold or is before the first distance threshold, selecting the third distance error model corresponding to the first distance threshold;
[0056] or,
[0057] If the target distance value is the last distance threshold or is after the last distance threshold, the third distance error model corresponding to the last distance threshold is selected;
[0058] or,
[0059] If the target distance value is located in a first distance interval, two third distance error models corresponding to two endpoints of the first distance interval are selected, and the first distance interval is any one of the multiple distance intervals.
[0060] In some embodiments, the selecting the first sub-range error model or the second sub-range error model from the third range error model based on the modified brightness reference value and the modified brightness reference threshold comprises:
[0061] If the modified brightness reference value is greater than the modified brightness reference threshold, selecting the second sub-distance error model in the third distance error model;
[0062] If the modified brightness reference value is less than or equal to the modified brightness reference threshold, a first sub-distance error model in the third distance error model is selected.
[0063] In some embodiments, substituting the corrected brightness reference value into the selected distance error model to obtain the target distance difference includes:
[0064] If a distance error model is selected and determined, the corrected brightness reference value is substituted into the selected and determined distance error model to obtain the target distance difference;
[0065] If two distance error models are selected and determined, the corrected brightness reference value is substituted into the two distance error models respectively to obtain two distance difference values, and the two distance difference values are weightedly added to obtain the target distance difference value.
[0066] In a third aspect, an embodiment of the present invention provides a laser radar, including:
[0067] A processor and a memory communicatively connected to the processor;
[0068] The memory stores computer program instructions executable by the processor, and when the computer program instructions are called by the processor, the processor executes any distance error model calibration method proposed in the first aspect, or executes any distance measurement method proposed in the second aspect.
[0069] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which is stored computer program instructions executable by a processor, and when the computer program instructions are called by the processor, the processor executes any one of the distance error model calibration methods proposed in the first aspect, or executes any one of the ranging methods proposed in the second aspect.
[0070] In a fifth aspect, an embodiment of the present invention provides a sweeping machine, comprising the laser radar proposed in the third aspect.
[0071] Beneficial effects of the embodiments of the present invention: Different from the prior art, the calibration method of the distance error model provided by the embodiments of the present invention is applied to a laser radar, and the method includes: obtaining distance measurement values and brightness values corresponding to calibration targets at several actual distances; obtaining parameters of the distance error model based on the distance measurement values and the brightness values, the distance error model characterizing the relationship between the brightness value and the first distance error, and the first distance error being the difference between the distance measurement value and the actual distance.
[0072] In this embodiment, the method calibrates the parameters of the distance error model by using the distance measurement value and brightness value output by the laser radar. The process is simple, the amount of calculation is small, and the calibration efficiency is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art description. Obviously, the drawings described below only illustrate certain embodiments of the present invention and should not be regarded as limiting the scope of protection. For those of ordinary skill in the art, other related drawings can also be obtained based on these drawings without creative work.
[0074] Figure 1 is a schematic diagram of an application scenario of a calibration method for a distance error model in some embodiments of the present invention;
[0075] Figure 2 is a schematic diagram of an application scenario of a calibration method for a distance error model in other embodiments of the present invention;
[0076] Figure 3 Schematic diagram of the principle of TOF ranging method in some embodiments of the present invention;
[0077] Figure 4 is a schematic diagram of the structure of a laser radar provided by some embodiments of the present invention;
[0078] Figure 5 is a schematic diagram of the structure of laser radars provided in other embodiments of the present invention;
[0079] Figure 6 is a flow chart of a method for calibrating a distance error model provided in some embodiments of the present invention;
[0080] Figure 7 is a schematic diagram of a distance error model obtained by fitting in some embodiments of the present invention;
[0081] Figure 8 is a schematic diagram of a first intermediate model obtained by fitting in some embodiments of the present invention;
[0082] Fig. 9 is a flowchart of a distance measurement method provided by some embodiments of the present invention;
[0083] Fig.10 It is a schematic diagram of the structure of a sweeping machine provided in some embodiments of the present invention. DETAILED DESCRIPTION
[0084] In order to make the purpose and advantages of the embodiments of the present invention easier to understand, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. The detailed description of the embodiments of the present invention in the drawings below does not limit the scope of protection claimed by the present invention, but only represents the selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0085] It should be noted that, if no conflict is constituted, the various technical features involved in the embodiments of the present invention described below can be combined with each other, and are all within the scope of protection of the present invention. In addition, although the functional modules are divided in the device or structural schematic diagram, and the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in a different order than the module division in the device, or in a different order than in the flow chart. In addition, the "first", "second", "third" and other similar expressions used herein do not limit the data and execution order, but are only for the purpose of convenience of explanation and to distinguish between the same or similar items with basically the same functions and effects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features.
[0086] Unless otherwise defined, the technical terms and scientific terms used in this specification have the same meanings as those generally understood by those of ordinary skill in the art of the present invention. The terms used in this specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. It should be understood that the term "and / or" used in this specification includes any and all combinations of one or more of the related listed items.
[0087] The technical solution provided by the embodiments of the present invention is described in detail below in conjunction with the accompanying drawings.
[0088] See also Figure 1 , Figure 1 A schematic diagram schematically illustrates an application scenario of a distance error model calibration method provided by some embodiments of the present invention.
[0089] like Figure 1As shown, the application scenario includes: a laser radar 100 and a calibration target 200. There are two calibration targets 200, and the two calibration targets 200 are placed on the same horizontal plane, that is, the two calibration targets 200 are at the same height.
[0090] In practical applications, the laser radar 100 uses the TOF method (Time of Flight, TOF) for ranging. The laser radar 100 usually includes a transmitter and a receiver. The TOF ranging method measures the distance from the calibration target 200 to the laser radar 100 by the round-trip flight time of the signal between the transmitter and the receiver.
[0091] The laser radar 100 includes a distance error model. Before the laser radar 100 works normally, it needs to be calibrated using a calibration target 200 to obtain calibration parameters of the distance error model that can be used to correct the measured distance, so that the original distance value output by the laser radar 100 is close to the actual distance value.
[0092] It should be understood that Figure 1 The application scenario shown schematically only shows a situation where the laser radar 100 and the calibration target 200 perform distance calibration in a certain environment to obtain calibration parameters of the distance error model, and does not limit any situation such as the number, type and setting method of the laser radar 100 and the calibration target 200 in other application scenarios. For example, please refer to Figure 2 , Figure 2 The following schematic diagrams show application scenarios of the calibration method of the distance error model in other embodiments of the present invention. Figure 2 In the application scenario shown, the calibration targets 200 are placed on the same vertical plane, that is, the calibration targets 200 are not at the same height. Those skilled in the art can flexibly select and set the laser radar 100 and the calibration target 200 for different application scenarios according to actual needs, and the embodiment of the present invention does not impose any limitation on this.
[0093] In some embodiments, the laser radar 100 includes but is not limited to laser radars such as pulse laser radar and continuous wave laser radar. The laser radar 100 includes: a transmitter, a receiver, a processor, and a rotating mechanism. Among them, the transmitter is a laser emitting device, such as a gas laser, a solid laser, a semiconductor laser, or a free electron laser. The receiver is a laser receiving device, such as a charge coupled device (CCD).
[0094] See also Figure 3 , Figure 3The schematic diagram shows the principle of the TOF ranging method. The TOF ranging method mainly uses the laser radar to emit a very short laser beam to the target object, and directly measures the flight time of the laser emission, hitting the target object and returning to the receiver to calculate the distance from the transmitter to the object being measured. Using the TOF ranging method, the laser radar's photosensitive chip outputs the TOF value, the brightness value (Peak value) related to the material reflectivity, and the background noise value (Noise value).
[0095] The processor is mainly responsible for controlling the transmitter to emit lasers, and processing the laser signals received by the receiver to calculate the distance information of the target object. The processor can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0096] The rotating mechanism is a laser radar mounting frame for adjusting the direction. In some embodiments, the rotating mechanism may include a rotating base driven by a belt. The transmitter, receiver and processor are arranged on the rotating mechanism, and the rotating mechanism rotates at a stable speed, so that the laser radar can scan the surrounding environment and generate real-time point cloud information.
[0097] See also Figure 4 , Figure 4 The structural diagram of the laser radar 100 provided in some embodiments of the present invention is schematically shown.
[0098] like Figure 4 As shown, the laser radar 100 includes: a transmitter 110 and a receiver 120. The receiver 120 includes a photosensitive sheet 121, and the photosensitive sheet 121 includes a first photosensitive area 1211 and a second photosensitive area 1212.
[0099] It should be understood that Figure 4 The structure of the laser radar 100 provided in some embodiments of the present invention is schematically shown. In some other embodiments, the laser radar may also include Figure 1 The laser radar 100 shown may have more or fewer components, or may have the same Figure 1 Different configurations of the lidar 100 are shown.
[0100] In the photosensitive chip of the TOF sensor, areas of the same size are divided, for example: grids of the same size. A grid is also called a pixel (a square composed of multiple photosensitive units), such as 5*5, 6*6, 7*7 and other areas. Each area can receive light signals and generate corresponding data.
[0101] It is understandable that the TOF sensor is a chip used for TOF ranging. The TOF sensor is mounted on the laser radar and can be used to realize the function of measuring distance. Before the TOF sensor measures the distance, it needs to be calibrated. The process of distance calibration is also the process of calibration. That is, before the laser radar works normally, it needs to be calibrated. The purpose of distance calibration is to enable the laser radar to obtain better parameters of the distance error model, so as to obtain more accurate distance measurement values by using the parameters of the distance error model in actual distance measurement.
[0102] In the embodiment of the present invention, the first photosensitive area is a normal area (also called a normal area), the normal area is also called a normal channel, and the second photosensitive area is an attenuation area, the attenuation area is also called an attenuation channel. The normal area is used to generate data of black and white materials, and the attenuation area is used to generate data of high-reflective materials. It can be understood that the normal channel is mainly used for the calibration of black and white targets, and the attenuation channel is mainly used for the calibration of high-reflective materials.
[0103] In the embodiment of the present invention, the number of normal regions is greater than or equal to the number of attenuation regions, which can be understood as adding an attenuation factor to the attenuation region compared to the normal region, so the obtained data, such as brightness value, is smaller than that of the normal region.
[0104] Among them, the setting method of the normal area and the attenuation area can be set according to specific needs, for example, the center of the central area is the normal area, and the four corner areas are attenuation areas; or, the four vertices of the top, bottom, left and right are attenuation areas, and the others are normal areas; or, an interval method is adopted, for example: the previous grid is the normal area, the current grid is the attenuation area, and the next grid is the normal area, so that the normal area and the attenuation area are set at intervals and crosses, and then each normal area grid in the photosensitive film is merged into a normal area, and each attenuation area grid is merged into an attenuation area.
[0105] Before introducing how to calibrate the parameters of the distance error model, the characteristics of TOF value, brightness value Peak1, brightness value Peak2, noise value Noise1, and noise value Noise2 are introduced based on the working principle of the laser radar. In some embodiments, the TOF chip of the laser radar outputs TOF value, brightness value Peak1, brightness value Peak2, noise value Noise1, and noise value Noise2. Therefore, each calibration target can obtain TOF value, brightness value Peak1, and brightness value Peak2.
[0106] The TOF chip uses a single photon avalanche diode (SPAD) as the detection unit of the DTOF lidar sensor. Generally speaking, a DTOF chip contains several SPAD pixel arrays. Each SPAD receives light signals, converts them through TDC (Time to Digit Converter) and accumulates multiple emitted light pulses to form a histogram. The histogram is smoothed and filtered to obtain the TOF value (flight time), the brightness value Peak related to the material reflectivity, and the noise value Noise of the environmental noise. It can be understood that the TOF value is a parameter for calculating the distance and can be converted into a distance measurement value.
[0107] In order to achieve higher precision for materials with different reflectivity, different areas can be divided in several arrays of SPAD chips. For conventional reflectivity materials (such as blackboard materials and whiteboard materials), the normal area can be used to obtain data, while high reflectivity materials (such as lattice materials) can use the attenuation area to obtain data. The division of areas and the corresponding data use can enable different materials to obtain higher precision in distance calibration and actual distance measurement. Since the normal area occupies the main photosensitive part of the chip surface, the TOF value is determined using the normal area of the chip. The brightness value Peak and the noise value Noise can be calculated in each area. The normal area of the chip can calculate the brightness value Peak1 and the noise value Noise1; the attenuation area of the chip can calculate the brightness value Peak2 and the noise value Noise2.
[0108] In the embodiment of the present invention, the calibration target 200 is used to reflect the laser beam emitted by the laser radar 100. In some embodiments, the calibration target 200 includes multiple calibration targets, and the reflectivity of some calibration targets 200 may be different. For example, the multiple calibration targets 200 include white targets, black targets, lattice targets / 3M targets and other calibration targets.
[0109] Multiple calibration targets 200 can be set at different distances from the laser radar 100. For example, calibration targets 200 of various distances are placed within the range that the TOF sensor can measure, such as the measurable range of 40mm-12000mm. Within this distance range, in the range of 40mm-100mm, the calibration targets 200 can be placed in steps of 10mm-30mm (preferably 20mm); in the range of 100mm-1000mm, the calibration targets 200 can be placed in steps of 50mm-150mm (preferably 100mm); in the range of 1000mm-12000mm, the calibration targets 200 can be placed in steps of 500mm-1500mm (preferably 1000mm). At each distance, calibration targets of three materials are placed, namely, materials with low reflectivity, ordinary reflectivity, and high reflectivity, such as black target material, white target material, lattice target material / 3M target material. It can be understood that different reflectivities correspond to different brightness values. The black target has the smallest reflectivity, so the brightness value is the smallest, the white target is second, and the lattice target has the largest reflectivity, so the brightness value is the largest.
[0110] For example, the embodiment of the present invention adopts m*3 targets, m is the number of distances, for example, 19 distances, then m=19, the 19 distances are: 40mm, 60mm, 80mm, 100mm, 200mm, 300mm, 400mm, 500mm, 600mm, 700mm, 800mm, 900mm, 1000mm, 2000mm, 4000mm, 6000mm, 8000mm, 10000mm, 12000mm. Three calibration targets are placed at each distance, and the materials are white, black, and lattice / 3M, that is, white target, black target and lattice target / 3M target.
[0111] Those skilled in the art will appreciate that 40mm, 60mm, 80mm, 100mm, 200mm, 300mm, 400mm, 500mm, 600mm, 700mm, 800mm, 900mm, 1000mm, 2000mm, 4000mm, 6000mm, 8000mm, 10000mm and 12000mm are the actual distances of the three calibration targets.
[0112] Corresponding data are collected for the three calibration targets at the above multiple actual distances, such as the TOF value, brightness value (Peak1 value) and background noise value (Noise1 value) of the normal channel, and the brightness value (Peak2 value) and background noise value (Noise2 value) of the attenuation channel. The above corresponding data are collected for each calibration target. If there are m different distances and each actual distance has 3 different targets, data of m*3 calibration targets will be obtained. For example, if m is 19 distances, data of 19*3=57 calibration targets will be obtained.
[0113] Then, by processing the data of these calibration targets, distance error parameters for laser radar distance calibration, such as the first distance error and brightness reference value, etc., are obtained, and calibration parameters of the distance error model are obtained according to the distance error parameters.
[0114] To facilitate understanding of the calibration method of the distance error model provided in the embodiment of the present invention, the laser radar provided in the embodiment of the present invention is first introduced in detail.
[0115] See also Figure 5 , Figure 5 The structural diagram of the laser radar 300 provided in some other embodiments of the present invention is schematically shown.
[0116] like Figure 5 As shown, the laser radar 300 includes at least one processor 310 and a memory 320 that are communicatively connected. Figure 5 The bus system 330 is used as an example to connect a processor. The various components in the laser radar 300 are coupled together through the bus system 330, and the bus system 330 is used to realize the connection and communication between these components. It is easy to understand that the bus system 330 includes not only a data bus, but also a power bus, a control bus, and a status signal bus. However, for the sake of clarity and brevity, Figure 5 In the figure, various buses are labeled as bus system 330. It can be understood that Figure 5 The structure shown in the embodiment is only for illustration and does not impose any limitation on the structure of the laser radar 300. For example, the laser radar 300 may also include Figure 5 More or fewer components as shown, or with Figure 5 Different configurations shown.
[0117] Specifically, the processor 310 is used to provide computing and control capabilities to control the laser radar 300 to perform corresponding tasks. For example, the laser radar 300 is controlled to perform any calibration method of the distance error model provided in the embodiment of the present invention, or to perform any ranging method provided in the embodiment of the present invention. Those skilled in the art can understand that the processor 310 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0118] The memory 320, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer executable programs, instructions and modules, for example, programs, instructions and modules corresponding to the calibration method and ranging method of the distance error model in the embodiment of the present invention. In some embodiments, the memory 320 may include a storage program area and a storage data area, and the storage program area may store an operating system, an application required by at least one function; the storage data area may store data created according to the use of the processor 310, etc. The processor 310 executes various functional applications and data processing of the laser radar 300 by running the non-transitory software programs, instructions and modules stored in the memory 320 to implement any calibration method of the distance error model provided in the embodiment of the present invention, or to implement any ranging method provided in the embodiment of the present invention. Among them, the memory 320 may include a high-speed random access memory, and may also include a non-transitory memory. For example, at least one disk storage device, a flash memory device or other non-transitory solid-state storage device. In some embodiments, the memory 320 may also include a memory remotely arranged relative to the processor 310, and these remote memories may be connected to the processor 310 via a communication network. It is understandable that examples of the above-mentioned communication network include but are not limited to the Internet, corporate intranet, local area network, mobile communication network and combinations thereof.
[0119] It is easy to understand that the implementation and execution subject of any distance error model calibration method and ranging method provided in the embodiments of the present invention can be any suitable type of laser radar with certain computing and control capabilities. In some possible implementations, the calibration method and ranging method of any distance error model provided in the embodiments of the present invention can be implemented by a processor calling computer program instructions stored in a memory.
[0120] It can be understood from the above that the calibration method and ranging method of the distance error model provided in the embodiment of the present invention can be implemented by various suitable types of laser radars with certain computing and control capabilities, for example, they can be implemented by the above-mentioned laser radar 300. The calibration method and ranging method of the distance error model provided in the embodiment of the present invention are described in detail below in conjunction with the exemplary application and implementation of the laser radar provided in the embodiment of the present invention.
[0121] First, the calibration method of the distance error model provided by the embodiment of the present invention is described in detail.
[0122] See also Figure 6 , Figure 6 The flowchart of the calibration method of the distance error model provided by some embodiments of the present invention is schematically shown.
[0123] Those skilled in the art can understand that the calibration method of the distance error model provided in the embodiment of the present invention can be applied to the above-mentioned laser radar (for example, the laser radar 300). Specifically, the executor of the calibration method of the distance error model is one or at least two processors of the laser radar.
[0124] like Figure 6 As shown, the calibration method of the distance error model includes but is not limited to the following steps S100-S200:
[0125] S100: Obtaining distance measurement values and brightness values corresponding to calibration targets at a plurality of actual distances.
[0126] Specifically, after setting calibration targets of different materials at several different actual distances, the distance of the calibration targets is measured. When the laser radar measures the distance of the calibration target, the TOF chip of the laser radar outputs the TOF value and the brightness value of the photosensitive area. The photosensitive area includes a first photosensitive area and a second photosensitive area. For example, the first photosensitive area is a normal area, and the second photosensitive area is an attenuation area. The first photosensitive area corresponds to the first brightness value Peak1, and the second photosensitive area corresponds to the second brightness value Peak2.
[0127] Among them, the TOF value is a parameter for calculating the distance, which can be converted and calculated to obtain the distance measurement value. Therefore, after the TOF chip of the laser radar outputs the TOF value, the distance measurement value is obtained through conversion and calculation based on the TOF value output by the laser radar.
[0128] For each calibration target at an actual distance, the laser radar will output the corresponding TOF value and the brightness value of the photosensitive area. Therefore, the TOF value and brightness value corresponding to the calibration target at several different actual distances can be obtained, where the TOF value is converted and calculated to obtain the distance measurement value.
[0129] In some embodiments, multiple measurements may be performed on the calibration target at each actual distance to reduce random errors, and the distance measurement value and brightness value of each measurement may be recorded, and the average distance measurement value and the average brightness value may be calculated to obtain the final distance measurement value and brightness value.
[0130] S200: Acquire parameters of a distance error model based on the distance measurement value and the brightness value, where the distance error model represents a relationship between the brightness value and a first distance error, where the first distance error is a difference between the distance measurement value and the actual distance.
[0131] Specifically, for each calibration target at an actual distance, after obtaining the distance measurement value and brightness value outputted by the laser radar, the distance measurement value is subtracted from the actual distance to obtain a first distance error.
[0132] Then, the form of the distance error model is determined. In some embodiments, the distance error model may be a linear model, a polynomial model, or other nonlinear model. The specific form depends on the characteristics of the laser radar and the distribution of experimental test data.
[0133] For example, a simple linear model can be chosen: .in, represents the first distance error, Indicates the brightness value, and Represents the parameters of the distance error model, that is, the calibration parameters of the distance error model that need to be obtained.
[0134] Assuming that there are N measurement data points, namely, the brightness values at different actual distances and the two-dimensional data points corresponding to the first distance error, the distance error model can be expressed as: .in, =1,2,3,…,N, Indicates The first distance error corresponding to the actual distance is Indicates The brightness value corresponding to the actual distance is then fitted into a distance error model by the brightness value corresponding to the two-dimensional data point and the first distance error, and the parameters of the distance error model are fitted using a machine learning method (e.g., least squares method, gradient descent, etc.). After the parameters of the distance error model are fitted, the distance error model is obtained, and the distance error model represents the relationship between the brightness value and the first distance error.
[0135] See also Figure 7 , Figure 7 The schematic diagram shows a distance error model formed by fitting according to brightness values and the first distance error at a plurality of actual distances in some embodiments of the present invention. ) represents the brightness value, the vertical axis Δd_i (dependent variable, i.e. ) represents the first distance error. The brightness value and the first distance error at the same actual distance correspond one to one.
[0136] like Figure 7 As shown, the distance error model includes a plurality of data points, each of which indicates that a brightness value at the actual distance corresponds to a first distance error.
[0137] like Figure 7 As shown, nine data points in the distance error model are schematically indicated, namely A1-A9 from left to right. It should be understood that Figure 7 A distance error model is only schematically shown, and the data points shown in the model are also only schematic. Figure 7 The illustrated embodiment does not limit any situation of other distance error models. For example, the distance error model may also include other data points.
[0138] In some embodiments, the laser radar includes a first photosensitive area and a second photosensitive area, so the brightness values of the photosensitive areas include a first brightness value of the first photosensitive area and a second brightness value of the second photosensitive area.
[0139] Correspondingly, the distance error model includes a brightness reference model and a first distance error model. The brightness reference model represents the relationship between the brightness reference value and the first brightness value and the second brightness value. The first distance error model represents the relationship between the first distance error and the brightness reference value.
[0140] In some embodiments, in order to obtain a brightness reference value, the calibration target set at each actual distance includes at least two different materials. The first brightness values corresponding to the calibration targets of each material at several actual distances are used to obtain the average brightness values corresponding to several actual distances, thereby obtaining the parameters of the brightness reference model.
[0141] In some embodiments, obtaining the parameters of the brightness reference model specifically includes but is not limited to the following steps S201-S203:
[0142] S201: Fitting a first intermediate model based on a plurality of first two-dimensional data points of actual distances and brightness mean values to obtain parameters of the first intermediate model, wherein the first intermediate model represents the relationship between the actual distance and the brightness mean value, and the brightness mean value is the mean of first brightness values corresponding to at least two calibration targets of different materials.
[0143] Specifically, for each actual distance, the first brightness values corresponding to at least two calibration targets of different materials at the actual distance are added together to obtain a first brightness sum value. Then, the first brightness sum value is divided by the number of calibration targets at the actual distance to obtain a brightness mean value corresponding to the actual distance. The brightness mean value is the average of the first brightness values corresponding to at least two calibration targets of different materials.
[0144] For example, in some embodiments, the actual distance is 120 mm, and the calibration targets include a black target, a white target, and a lattice target. Each material has one calibration target, that is, a black target, a white target, and a lattice target. The first brightness values corresponding to the black target, the white target, and the lattice target at the actual distance are added together to obtain a first brightness sum value, and then the first brightness sum value is divided by the number of calibration targets at the actual distance (that is, 3) to obtain the brightness mean value corresponding to the actual distance.
[0145] After obtaining the brightness mean values corresponding to several actual distances, for each actual distance, the actual distance and the brightness mean value corresponding to the actual distance are combined to form a first two-dimensional data point, thereby obtaining the first two-dimensional data points at several actual distances. Then, the first two-dimensional data points at several actual distances are fitted into a first intermediate model, and the parameters of the first intermediate model are fitted using a machine learning method (e.g., least squares method, gradient descent or other methods). Among them, one first two-dimensional data point corresponds to one actual distance and one brightness mean value. It can be understood that after fitting the parameters of the first intermediate model, the first intermediate model is obtained, and the first intermediate model characterizes the relationship between the actual distance and the brightness mean value.
[0146] In some embodiments, the first intermediate model may be fitted and the parameters of the first intermediate model may be obtained in the following manner:
[0147] For each actual distance, substitute the actual distance and the brightness mean corresponding to the actual distance into the first formula: , the parameters of the first intermediate model are obtained by least squares fitting [ , , ].in, Indicates The actual distance, Indicates The average brightness corresponding to the actual distance.
[0148] See also Figure 8 As shown, Figure 8 The first intermediate model obtained by fitting in some embodiments of the present invention is schematically shown, wherein the first intermediate model is obtained by fitting according to a plurality of actual distances and the brightness mean values corresponding to the plurality of actual distances.
[0149] like Figure 8 As shown, the horizontal axis x_i (independent variable, i.e. ) represents the actual distance, the vertical axis y_i (dependent variable, i.e. ) represents the brightness mean. The first intermediate model includes a plurality of data points, each of which represents a correspondence between an actual distance and a brightness mean.
[0150] like Figure 8 As shown, nine data points in the first intermediate model are schematically indicated, namely B1-B9 from left to right. It should be understood that Figure 8 A first intermediate model is only schematically shown, and the data points shown in the model are also only schematic. Figure 8 The illustrated embodiment does not limit any situation of other first intermediate models. For example, the first intermediate model may also include other data points.
[0151] S202: Obtain a reference brightness mean value based on the actual distance and the first intermediate model, and use the reference brightness mean value as a first brightness reference value.
[0152] Specifically, after fitting the first intermediate model, several actual distances are substituted into the first intermediate model respectively, the benchmark brightness mean values corresponding to the several actual distances are calculated, and the benchmark brightness mean values are used as the first brightness reference value, thereby obtaining the first brightness reference values corresponding to the several actual distances.
[0153] S203: For each calibration target at the actual distance, fit a brightness reference model based on a plurality of first three-dimensional data points to obtain parameters of the brightness reference model, wherein the coordinate values of the first three-dimensional data points are respectively a first brightness reference value, a first brightness value, and a second brightness value.
[0154] Specifically, for each actual distance, a calibration target of any material (e.g., a black target) is selected, and the first brightness value and the second brightness value corresponding to the calibration target of the material and the first brightness reference value corresponding to the actual distance are combined to form a first three-dimensional data point. The coordinate values of the first three-dimensional data point are the first brightness reference value, the first brightness value, and the second brightness value, respectively, and each first three-dimensional data point corresponds to an actual distance.
[0155] For example, in some embodiments, the calibration target includes a black target, a white target, and a lattice target. For each black target at an actual distance (for example, the actual distance is: 120 mm), the first brightness value and the second brightness value corresponding to the black target at the actual distance, and the first brightness reference value corresponding to the actual distance (i.e., 120 mm) are combined to form a first three-dimensional data point. It can be understood that if there are multiple first brightness values corresponding to the calibration target (such as the black target) of each material, the multiple first brightness values can be averaged to obtain the first brightness value corresponding to the calibration target of the material. Similarly, if there are multiple second brightness values corresponding to the calibration target (such as the black target) of each material, the multiple second brightness values can also be averaged to obtain the second brightness value corresponding to the calibration target of the material.
[0156] Then, the first three-dimensional data points corresponding to the actual distances are fitted into a brightness reference model, and the parameters of the brightness reference model are fitted using a machine learning method (e.g., least square method, gradient descent, or other methods, etc.). Among them, one first three-dimensional data point corresponds to a first brightness reference value, a first brightness value, and a second brightness value at an actual distance. It can be understood that after fitting the parameters of the brightness reference model, the brightness reference model is obtained, and the brightness reference model represents the relationship between the brightness reference value and the first brightness value and the second brightness value.
[0157] In some embodiments, the brightness reference model may be fitted in the following manner to obtain parameters of the brightness reference model:
[0158] For each material calibration target, substitute the first three-dimensional data point corresponding to each actual distance into the second formula: , and the least squares method is used to fit the parameters of the brightness reference model corresponding to the calibration target of each material [ , ].in, Indicates The first brightness reference value corresponding to the actual distance, Indicates The first brightness value corresponding to the actual distance, Indicates A second brightness value corresponding to an actual distance.
[0159] It can be understood that the brightness reference model obtained by fitting is consistent with Figure 7 The distance error model shown in is similar to that shown in , except that the X-axis and Y-axis (two independent variables) in the brightness reference model represent the first brightness value and the second brightness value respectively, and the Z-axis (dependent variable) represents the first brightness reference value. Each first three-dimensional data point corresponds to an actual distance, and the coordinate values of the first three-dimensional data point are the first brightness reference value, the first brightness value, and the second brightness value respectively.
[0160] In some embodiments, the calibration target includes at least two calibration targets of different materials. The brightness reference values corresponding to the actual distances are obtained by setting the first brightness value and the second brightness value corresponding to the calibration targets of each material at each actual distance, so as to obtain the parameters of the first distance error model.
[0161] In some embodiments, obtaining the parameters of the first distance error model specifically includes but is not limited to the following steps S211-S213:
[0162] S211: Obtain a brightness reference value based on the first brightness value, the second brightness value and a brightness reference model.
[0163] Specifically, after fitting the brightness reference model corresponding to the calibration target of each material, for the calibration target of each material, the first brightness value and the second brightness value corresponding to each actual distance are substituted into the brightness reference model corresponding to the calibration target of the material, and the brightness reference values corresponding to several actual distances are calculated.
[0164] S212: Subtract the distance measurement value from the actual distance to obtain a first distance error.
[0165] Specifically, for the calibration target of each material, a distance measurement value corresponding to each actual distance is subtracted from the actual distance to obtain a first distance error corresponding to the actual distance, thereby obtaining first distance errors corresponding to a plurality of actual distances.
[0166] S213: Fitting a first distance error model based on a plurality of brightness reference values and second two-dimensional data points of the first distance error to obtain parameters of the first distance error model, wherein each second two-dimensional data point corresponds to an actual distance.
[0167] Specifically, for each material calibration target, the brightness reference value and the first distance error corresponding to each actual distance are combined to form a second two-dimensional data point, wherein the coordinate values of the second two-dimensional data point are the brightness reference value and the first distance error, and each second two-dimensional data point corresponds to an actual distance.
[0168] For example, in some embodiments, the calibration targets include black targets, white targets, and lattice targets. For the black target, at each actual distance (eg, the actual distance is 120 mm), the brightness reference value corresponding to the actual distance and the first distance error are combined to form a second two-dimensional data point.
[0169] Then, the second two-dimensional data points corresponding to the actual distances are fitted into a first distance error model, and the parameters of the first distance error model are fitted using a machine learning method (such as least squares method, gradient descent, etc.). Each second two-dimensional data point corresponds to a brightness reference value and a first distance error at an actual distance. It can be understood that after fitting the parameters of the first distance error model, the first distance error model is obtained, and the first distance error model characterizes the relationship between the first distance error and the brightness reference value.
[0170] In some embodiments, the first distance error model may be fitted in the following manner to obtain the parameters of the first distance error model:
[0171] Specifically, for the calibration target of each material, the brightness reference value corresponding to each actual distance and the first distance error are substituted into the third formula: , the parameters of the first distance error model are obtained by fitting using the least squares method [ , , ].in, Indicates The brightness reference value corresponding to the actual distance, Indicates The first distance error corresponding to the actual distance.
[0172] It can be understood that the first distance error model obtained by fitting is consistent with Figure 7 The distance error model shown is similar, except that the horizontal axis (independent variable) in the first distance error model represents the brightness reference value, and the vertical axis (dependent variable) represents the first distance error. Each second two-dimensional data point corresponds to an actual distance, and the coordinate values of the second two-dimensional data point are the brightness reference value and the first distance error, respectively.
[0173] In some embodiments, the distance error model further includes a second distance error model, which characterizes the relationship between the first distance error and the corrected brightness reference value. The second distance error model is used to obtain the corrected brightness reference value through the first distance error, and then obtain a more accurate distance error based on the corrected brightness reference value.
[0174] In some embodiments, obtaining the parameters of the second distance error model specifically includes but is not limited to the following steps S221-S225:
[0175] S221: Obtain a first difference between a brightness reference value corresponding to the same first distance error in the second two-dimensional data point and the first distance error model.
[0176] Specifically, for each material calibration target, obtain a number of second two-dimensional data points corresponding to the actual distances, and arbitrarily select a first distance error, substitute the selected first distance error into the first distance error model corresponding to the number of actual distances, and obtain the brightness reference values corresponding to the first distance error model under the number of actual distances. For each actual distance, under the same first distance error, the brightness reference value corresponding to the second two-dimensional data point is subtracted from the brightness reference value corresponding to the first distance error model to obtain the first difference value corresponding to the first distance error. That is, the first difference value is: under the same first distance error, the difference value between the brightness reference value corresponding to the second two-dimensional data point and the brightness reference value corresponding to the first distance error model.
[0177] For example, in some embodiments, the calibration target includes a black target, a white target, and a lattice target. For the black target, under the same first distance error (for example, the first distance error is 60 mm), the brightness reference value corresponding to the first distance error in the second two-dimensional data point is subtracted from the brightness reference value corresponding to the first distance error model to obtain a first difference value.
[0178] S222: Fitting a second intermediate model based on the third two-dimensional data points of the plurality of distance measurement values and the first difference value to obtain parameters of the second intermediate model, wherein the second intermediate model represents a relationship between the distance measurement value and the brightness reference error value.
[0179] Specifically, for each material calibration target, the distance measurement value and the first difference value corresponding to each actual distance are combined to form a third two-dimensional data point, wherein the coordinate values of the third two-dimensional data point are the distance measurement value and the first difference value, and each third two-dimensional data point corresponds to an actual distance.
[0180] For example, in some embodiments, the calibration targets include black targets, white targets, and lattice targets. For the black target, at each actual distance (eg, the actual distance is 120 mm), the distance measurement value corresponding to the actual distance and the first difference value are combined to form a third two-dimensional data point.
[0181] Then, the third two-dimensional data points corresponding to the actual distances are fitted into a second intermediate model, and the parameters of the second intermediate model are fitted using a machine learning method (e.g., least square method, gradient descent, etc.). Each third two-dimensional data point corresponds to a distance measurement value and a first difference value at an actual distance. It can be understood that after fitting the parameters of the second intermediate model, the second intermediate model is obtained, and the second intermediate model represents the relationship between the distance measurement value and the brightness reference error value.
[0182] In some embodiments, the second intermediate model may be fitted and the parameters of the second intermediate model may be obtained in the following manner:
[0183] For each material of the calibration target, the distance measurement value corresponding to each actual distance and the first difference are substituted into the fourth formula: , and the least squares method was used to fit the parameters of the second intermediate model [ , , ].in, Indicates The first difference corresponding to the actual distance, Indicates The distance measurement value corresponding to the actual distance.
[0184] It can be understood that the second intermediate model obtained by fitting is consistent with Figure 7 The distance error model shown is similar, except that the horizontal axis (independent variable) in the second intermediate model represents the distance measurement value, and the vertical axis (dependent variable) represents the first difference value. In which, each actual distance corresponds to a third two-dimensional data point, and the coordinate values of the third two-dimensional data point are the distance measurement value and the first difference value, respectively.
[0185] S223: Obtain a brightness reference error value based on the distance measurement value and the second intermediate model.
[0186] Specifically, after fitting the second intermediate model corresponding to the calibration target of each material, for the calibration target of each material, the distance measurement value corresponding to each actual distance is substituted into the second intermediate model corresponding to the calibration target of the material, and the brightness reference error values corresponding to several actual distances are calculated.
[0187] S224: Subtract the brightness reference value from the brightness reference error value to obtain a corrected brightness reference value.
[0188] Specifically, for the calibration target of each material, the brightness reference value corresponding to each actual distance is subtracted from the brightness reference error value to obtain a corrected brightness reference value corresponding to the actual distance, thereby obtaining corrected brightness reference values corresponding to several actual distances.
[0189] S225: Fitting a second distance error model based on the plurality of first distance errors and fourth two-dimensional data points of the corrected brightness reference value to obtain parameters of the second distance error model.
[0190] Specifically, for each material calibration target, the first distance error and the corrected brightness reference value corresponding to each actual distance are combined to form a fourth two-dimensional data point, wherein the coordinate values of the fourth two-dimensional data point are the first distance error and the corrected brightness reference value, respectively, and one fourth two-dimensional data point corresponds to one actual distance.
[0191] For example, in some embodiments, the calibration targets include black targets, white targets, and lattice targets. For the black target, at each actual distance (for example, the actual distance is 120 mm), the first distance error corresponding to the actual distance and the corrected brightness reference value are combined to form a fourth two-dimensional data point.
[0192] Then, the fourth two-dimensional data points corresponding to the actual distances are fitted into a second distance error model, and the parameters of the second distance error model are fitted using a machine learning method (such as least squares method, gradient descent, etc.). Among them, one fourth two-dimensional data point corresponds to a first distance error and a corrected brightness reference value under an actual distance. It can be understood that after fitting the parameters of the second distance error model, the second distance error model is obtained, and the second distance error model characterizes the relationship between the first distance error and the brightness reference error value.
[0193] In some embodiments, the second distance error model may be fitted in the following manner to obtain the parameters of the second distance error model:
[0194] For each material calibration target, substitute the first distance error and corrected brightness reference value corresponding to each actual distance into the fifth formula: , the parameters of the second distance error model are obtained by least squares fitting [ , , ].in, Indicates The corrected brightness reference value corresponding to the actual distance, Indicates The first distance error corresponding to the actual distance.
[0195] It can be understood that the second distance error model obtained by fitting is consistent with Figure 7 The distance error model shown is similar, except that the horizontal axis (independent variable) in the second distance error model represents the corrected brightness reference value, and the vertical axis (dependent variable) represents the first distance error. In which, each fourth two-dimensional data point corresponds to each actual distance, and the coordinate values of the fourth two-dimensional data point are the corrected brightness reference value and the first distance error, respectively.
[0196] In some embodiments, the distance error model further includes a third distance error model, the third distance error model characterizes the relationship between the distance difference and the corrected brightness reference value, and obtains a more accurate distance error by correcting the brightness reference value. Wherein, the calibration target includes a black target, a white target and a lattice target, the third distance error model includes a first sub-distance error model and a second sub-distance error model, the first sub-distance error model characterizes the relationship between the distance difference corresponding to the black target and the white target and the corrected brightness reference value, and the second sub-distance error model characterizes the relationship between the distance difference corresponding to the white target and the lattice target and the corrected brightness reference value.
[0197] Exemplarily, in some embodiments, for each actual distance, the parameters of the third distance error model are obtained, and each actual distance corresponds to a third distance error model, which specifically includes but is not limited to the following steps S231-S235:
[0198] S231: Obtain a second distance error based on the corrected brightness reference value and the second distance error model.
[0199] Specifically, after fitting the second distance error model corresponding to the calibration target of each material, for the calibration target of each material, the corrected brightness reference value corresponding to each actual distance is substituted into the second distance error model corresponding to the calibration target of the material, and the second distance errors corresponding to several actual distances are calculated.
[0200] S232: Subtract the first distance error from the second distance error to obtain a distance difference value.
[0201] Specifically, for the calibration target of each material, the first distance error corresponding to each actual distance is subtracted from the second distance error to obtain the distance difference value corresponding to the actual distance, thereby obtaining the distance difference values corresponding to several actual distances.
[0202] S233: Fitting a first sub-range error model based on fifth two-dimensional data points corresponding to the black target and the white target at actual distances to obtain parameters of the first sub-range error model, wherein the coordinate values of the fifth two-dimensional data points include a corrected brightness reference value and a distance difference value.
[0203] Specifically, for each actual distance, the corrected brightness reference value and the distance difference value corresponding to the black target and the white target at the actual distance are combined to form a fifth two-dimensional data point, wherein the coordinate value of the fifth two-dimensional data point includes the corrected brightness reference value and the distance difference value, and one fifth two-dimensional data point corresponds to one actual distance.
[0204] For example, in some embodiments, for each actual distance (eg, 120 mm), the corrected brightness reference values and distance difference values corresponding to the black target and the white target at the actual distance (ie, 120 mm) are combined to form a fifth two-dimensional data point.
[0205] Then, the fifth two-dimensional data points corresponding to the black target and the white target at several actual distances are fitted into the first sub-distance error model, and the parameters of the first sub-distance error model are fitted using a machine learning method (such as least squares method, gradient descent, etc.). Among them, each fifth two-dimensional data point corresponds to a corrected brightness reference value and a distance difference value of the black target and the white target at an actual distance. It can be understood that after fitting the parameters of the first sub-distance error model, the first sub-distance error model is obtained. The first sub-distance error model characterizes the relationship between the distance difference value corresponding to the black target and the white target at each actual distance and the corrected brightness reference value.
[0206] In some embodiments, the first sub-range error model may be fitted in the following manner to obtain parameters of the first sub-range error model:
[0207] Specifically, for the black target and the white target, the corrected brightness reference value and the distance difference corresponding to the black target and the white target at each actual distance are substituted into the sixth formula: , the least squares method is used to fit the parameters of the first sub-range error model [ , , ].in, Indicates that the black and white targets are in the The corrected brightness reference value corresponding to the actual distance is: Indicates that the black and white targets are in the The distance difference corresponding to the actual distance.
[0208] It can be understood that the first sub-distance error model obtained by fitting is consistent with Figure 7 The distance error model shown is similar, except that the horizontal axis (independent variable) in the first sub-distance error model represents the corrected brightness reference value, and the vertical axis (dependent variable) represents the distance difference. Among them, one actual distance corresponds to one fifth two-dimensional data point, and the coordinate values of the fifth two-dimensional data point are the corrected brightness reference value and the distance difference, respectively.
[0209] S234: fitting a second sub-distance error model based on fifth two-dimensional data points corresponding to the white target and the lattice target at the actual distance, and obtaining parameters of the second sub-distance error model.
[0210] Specifically, for each actual distance, the corrected brightness reference value and the distance difference value corresponding to the white target and the lattice target at the actual distance are combined to form a fifth two-dimensional data point, wherein the coordinate value of the fifth two-dimensional data point includes the corrected brightness reference value and the distance difference value, and one fifth two-dimensional data point corresponds to one actual distance.
[0211] For example, in some embodiments, for each actual distance (eg, 120 mm), the corrected brightness reference values and distance differences of the white target and the lattice target at the actual distance (ie, 120 mm) are combined to form a fifth two-dimensional data point.
[0212] Then, the fifth two-dimensional data points corresponding to the white target and the lattice target at several actual distances are fitted into a second sub-distance error model, and the parameters of the second sub-distance error model are fitted using a machine learning method (such as least squares method, gradient descent, etc.). Among them, each fifth two-dimensional data point corresponds to a corrected brightness reference value and a distance difference value of the white target and the lattice target at an actual distance. It can be understood that after fitting the parameters of the second sub-distance error model, the second sub-distance error model is obtained. The second sub-distance error model characterizes the relationship between the distance difference value corresponding to the white target and the lattice target at each actual distance and the corrected brightness reference value.
[0213] In some embodiments, the second sub-range error model may be fitted in the following manner to obtain parameters of the second sub-range error model:
[0214] Specifically, for the white target and the lattice target, the corrected brightness reference value and the distance difference corresponding to the white target and the lattice target at each actual distance are substituted into the seventh formula: , and the least squares method is used to fit the parameters of the second sub-range error model [ , , ].in, Indicates that the white target and the lattice target are The corrected brightness reference value corresponding to the actual distance is: Indicates that the white target and the lattice target are The distance difference corresponding to the actual distance.
[0215] It can be understood that the fitted second sub-range error model is consistent with Figure 7 The distance error model shown is similar, except that the horizontal axis (independent variable) in the second sub-distance error model represents the corrected brightness reference value, and the vertical axis (dependent variable) represents the distance difference. Among them, one actual distance corresponds to one fifth two-dimensional data point, and the coordinate values of the fifth two-dimensional data point are the corrected brightness reference value and the distance difference, respectively.
[0216] S235: Fusing the first sub-range error model and the second sub-range error model to obtain a third range error model.
[0217] Specifically, after obtaining the first sub-distance error model and the second sub-distance error model, the first sub-distance error model and the second sub-distance error model are fused by weighted averaging or other suitable fusion methods, that is, for each actual distance, the first sub-distance error model characterizing the relationship between the distance difference corresponding to the black target and the white target at the actual distance and the corrected brightness reference value and the second sub-distance error model characterizing the relationship between the distance difference corresponding to the white target and the lattice target at the actual distance and the corrected brightness reference value are fused to obtain a third distance error model corresponding to the actual distance. It should be understood that one actual distance corresponds to one third distance error model.
[0218] In some embodiments, the third distance error model includes a distance threshold, which is used to preliminarily determine the distance interval of the target distance value when performing actual distance measurement, so that in the subsequent correction process, the corresponding sub-distance error model in the third distance error model can be used for correction to obtain a more accurate distance measurement value.
[0219] Exemplarily, in some embodiments, for each actual distance, the parameters of the third distance error model are obtained, and each actual distance corresponds to a third distance error model, further including but not limited to the following steps S236:
[0220] S236: Subtract the distance measurement value corresponding to the actual distance from the second distance error to obtain a distance threshold of a third distance error model corresponding to the actual distance.
[0221] Specifically, for each material calibration target, after obtaining the distance measurement values corresponding to several actual distances and the second distance error, the distance measurement value corresponding to each actual distance is subtracted from the second distance error to obtain the distance threshold of the third distance error model corresponding to the actual distance, thereby obtaining the distance threshold of the third distance error model corresponding to several actual distances. Among them, one actual distance corresponds to one distance threshold of the third distance error model.
[0222] To summarize, the calibration method of the distance error model provided in an embodiment of the present invention is applied to a laser radar, and the method includes: obtaining distance measurement values and brightness values corresponding to calibration targets at several actual distances; obtaining parameters of the distance error model based on the distance measurement values and the brightness values, the distance error model characterizing the relationship between the brightness value and the first distance error, and the first distance error is the difference between the distance measurement value and the actual distance.
[0223] In this embodiment, the method uses the distance measurement value and brightness value output by the laser radar to calibrate the parameters of the distance error model. The process is simple, the amount of calculation is small, and the calibration efficiency is improved.
[0224] Next, the distance measurement method provided by the embodiment of the present invention is described in detail.
[0225] See also Fig. 9 , Fig. 9 The flowchart of the distance measurement method provided by some embodiments of the present invention is schematically shown.
[0226] Those skilled in the art can understand that the distance measurement method provided in the embodiment of the present invention can be applied to the above laser radar (for example, the laser radar 300). Specifically, the execution subject of the distance measurement method is one or at least two processors of the laser radar.
[0227] like Fig. 9 As shown, the distance measurement method includes but is not limited to the following steps S500-S700:
[0228] S500: Obtaining a distance measurement value and a brightness value obtained by detecting a target object by a laser radar.
[0229] Specifically, when the laser radar performs actual distance measurement on the target object, the TOF chip of the laser radar outputs the TOF value and the brightness value of the photosensitive area. The photosensitive area includes: a first photosensitive area and a second photosensitive area. For example, the first photosensitive area is a normal area, the second photosensitive area is an attenuation area, the first photosensitive area corresponds to the first brightness value Peak1, and the second photosensitive area corresponds to the second brightness value Peak2.
[0230] Among them, the TOF value is a parameter for calculating the distance, which can be converted and calculated to obtain the distance measurement value. Therefore, after the TOF chip of the laser radar outputs the TOF value, the distance measurement value is obtained through conversion and calculation based on the TOF value output by the laser radar.
[0231] S600: Obtain a third distance error based on the brightness value and the distance error model, wherein the distance error model characterizes the relationship between the brightness value and the third distance error, and the parameters of the distance error model are obtained by using any distance error model calibration method provided in an embodiment of the present invention.
[0232] The distance error model in this embodiment is obtained by using any of the distance error model calibration methods provided in the above embodiments of the present invention, and the distance error model characterizes the relationship between the brightness value and the third distance error. Therefore, the distance error model in this embodiment has the same technical features as the distance error model in the above calibration method embodiment, and will not be described one by one here.
[0233] Specifically, after the distance measurement value and the brightness value are obtained, the brightness value is substituted into a distance error model with pre-calibrated parameters, and the third distance error is outputted after calculation by the distance error model.
[0234] By using the brightness value and a distance error model with pre-calibrated parameters, the third distance error is accurately calculated, thereby correcting the distance measurement value and improving the ranging accuracy.
[0235] In some embodiments, the laser radar includes a first photosensitive area and a second photosensitive area, and the brightness value corresponds to a first brightness value of the first photosensitive area and a second brightness value of the second photosensitive area. The distance error model includes a brightness reference model and a first distance error model, the brightness reference model represents the relationship between the brightness reference value and the first brightness value and the second brightness value, and the first distance error model represents the relationship between the third distance error and the brightness reference value.
[0236] In some embodiments, obtaining the third distance error based on the brightness value and the distance error model specifically includes but is not limited to the following steps S610-S620:
[0237] S610: Substitute the first brightness value and the second brightness value into a brightness reference model to obtain a brightness reference value.
[0238] Specifically, after obtaining the first brightness value of the first photosensitive area and the second brightness value of the second photosensitive area, the first brightness value and the second brightness value are substituted into a brightness reference model, and after calculation by the brightness reference model, a brightness reference value is outputted.
[0239] S620: Substitute the brightness reference value into the first distance error model to obtain a third distance error.
[0240] Specifically, after the brightness reference value is calculated and obtained, the brightness reference value is substituted into the first distance error model, and after calculation by the first distance error model, the third distance error is output and obtained.
[0241] In some embodiments, the distance error model also includes a second distance error model, and the second distance error model characterizes the relationship between the third distance error and the corrected brightness reference value. In this embodiment, based on the corrected brightness reference value corresponding to the laser radar, a more accurate third distance error is obtained through the second distance error model, so as to more accurately correct the distance measurement value and further improve the ranging accuracy.
[0242] In some embodiments, obtaining the third distance error based on the brightness value and the distance error model specifically includes but is not limited to the following steps S630-S650:
[0243] S630: Substitute the distance measurement value into the second intermediate model to obtain a brightness reference error value, wherein the second intermediate model represents the relationship between the distance measurement value and the brightness reference error value.
[0244] The second intermediate model in this embodiment is obtained by using the calibration method of any distance error model provided in the above embodiments of the present invention, and the second intermediate model represents the relationship between the distance measurement value and the brightness reference error value. Therefore, the second intermediate model in this embodiment has the same technical features as the second intermediate model in the above calibration method embodiment, and will not be described one by one here.
[0245] Specifically, the distance measurement value is substituted into the second intermediate model with pre-calibrated parameters, and the brightness reference error value is outputted after calculation by the second intermediate model.
[0246] S640: Subtract the brightness reference value from the brightness reference error value to obtain a corrected brightness reference value.
[0247] Specifically, after the brightness reference error value is calculated, the brightness reference error value is subtracted from the brightness reference value to obtain a corrected brightness reference value.
[0248] S650: Substitute the corrected brightness reference value into the second distance error model to obtain a fourth distance error, and use the fourth distance error to update the third distance error.
[0249] Among them, the second distance error model in this embodiment is obtained by using the calibration method of any distance error model provided in the above embodiments of the present invention, and the second distance error model characterizes the relationship between the third distance error and the corrected brightness reference value. Therefore, the second distance error model in this embodiment has the same technical features as the second distance error model in the above calibration method embodiment, and will not be described one by one here.
[0250] Specifically, after the corrected brightness reference value is calculated, the corrected brightness reference value is substituted into the second distance error model with pre-calibrated parameters, and after calculation by the second distance error model, a more accurate new fourth distance error is output. Then, the original third distance error is updated to the new fourth distance error to obtain an updated third distance error, so that the updated third distance error is used to more accurately correct the distance measurement value, further improving the distance measurement accuracy.
[0251] S700: Subtract the third distance error from the distance measurement value to obtain a target distance value.
[0252] Specifically, after obtaining the third distance error, the third distance error is subtracted from the distance measurement value to obtain the target distance value.
[0253] The ranging method provided in an embodiment of the present invention is applied to a laser radar, and the method includes: obtaining a distance measurement value and a brightness value obtained by the laser radar detecting a target object; obtaining a third distance error based on the brightness value and a distance error model, wherein the distance error model characterizes the relationship between the brightness value and the third distance error, and the parameters of the distance error model are obtained by using a calibration method of any distance error model provided in an embodiment of the present invention; and subtracting the third distance error from the distance measurement value to obtain a target distance value.
[0254] In this embodiment, the method uses the distance error model after calibration parameters to obtain the third distance error, and corrects the distance measurement value output by the laser radar to obtain an accurate target distance value, thereby improving the accuracy of distance measurement.
[0255] In some embodiments, the distance error model further includes a plurality of third distance error models, one third distance error model corresponds to a distance threshold, and the distance threshold constitutes a plurality of distance intervals. The third distance error model characterizes the relationship between the target distance difference and the corrected brightness reference value, and the third distance error model includes a first sub-distance error model and a second sub-distance error model.
[0256] By using the distance threshold, the distance interval of the target distance value is preliminarily determined, so that in the subsequent correction process, the corresponding sub-range error model in the third range error model is used for correction to obtain a more accurate distance measurement value.
[0257] In some embodiments, the ranging method further includes but is not limited to the following steps S810-S840:
[0258] S810: Determine the distance interval in which the target distance value is located, and select a third distance error model based on the distance interval.
[0259] Among them, the third distance error model in this embodiment is obtained by using the calibration method of any distance error model provided in the above embodiments of the present invention, and the third distance error model represents the relationship between the target distance difference and the corrected brightness reference value. Therefore, the third distance error model in this embodiment has the same technical features as the third distance error model in the above calibration method embodiment, and will not be described one by one here.
[0260] It should be understood that one third distance error model corresponds to one distance threshold, multiple distance thresholds constitute multiple distance intervals, and each distance interval consists of two consecutive distance thresholds.
[0261] For example, in some embodiments, the multiple distance thresholds are 60mm, 80mm, 100mm, 120mm, 140mm and 160mm, then the multiple distance intervals formed by the multiple distance thresholds are: [60, 80], [80, 100], [100, 120], [120, 140] and [140, 160].
[0262] Specifically, after the target distance value is obtained, the target distance value is compared with a plurality of distance intervals formed by a plurality of distance thresholds to determine the distance interval in which the target distance value is located.
[0263] After determining the distance interval in which the target distance value is located, a third distance error model corresponding to the distance threshold is selected according to the distance threshold included in the determined distance interval, and the corresponding distance error is calculated according to the selected third distance error model, and then the target distance value is corrected.
[0264] For example, in some embodiments, the target distance value is 95 mm, and the target distance value 95 mm is located in the distance interval [80, 100]. Then, according to the distance thresholds 80 mm and 100 mm included in the distance interval [80, 100], the third distance error model corresponding to the distance thresholds 80 mm and 100 mm is selected, and the corresponding distance error is calculated according to the selected third distance error model.
[0265] In some embodiments, determining the distance interval in which the target distance value is located, and selecting the third distance error model based on the distance interval, specifically includes but is not limited to the following steps S811-S813:
[0266] S811: If the target distance value is the first distance threshold or is before the first distance threshold, select a third distance error model corresponding to the first distance threshold.
[0267] Specifically, if the target distance value is the first distance threshold or the target distance value is before the first distance threshold, a third distance error model corresponding to the first distance threshold is selected.
[0268] As in the above-mentioned embodiment, the multiple distance thresholds are 60mm, 80mm, 100mm, 120mm, 140mm and 160mm, respectively, and the multiple distance intervals formed by the multiple distance thresholds are: [60, 80], [80, 100], [100, 120], [120, 140] and [140, 160] respectively. In some embodiments, the target distance value is 50mm, and the target distance value 50mm is less than the first distance threshold 60mm, that is, the target distance value is before the first distance threshold, and the third distance error model corresponding to the first distance threshold 60mm is selected, and then the corresponding distance error is calculated according to the selected third distance error model.
[0269] S812: If the target distance value is the last distance threshold or is after the last distance threshold, a third distance error model corresponding to the last distance threshold is selected.
[0270] Specifically, if the target distance value is the last distance threshold or the target distance value is located after the last distance threshold, a third distance error model corresponding to the last distance threshold is selected.
[0271] As in the aforementioned embodiment, the multiple distance thresholds are 60 mm, 80 mm, 100 mm, 120 mm, 140 mm and 160 mm, respectively, and the multiple distance intervals formed by the multiple distance thresholds are: [60, 80], [80, 100], [100, 120], [120, 140] and [140, 160], respectively. In some embodiments, the target distance value is 180 mm, and the target distance value 180 mm is greater than the last distance threshold 160 mm, that is, the target distance value is located after the last distance threshold, and the third distance error model corresponding to the last distance threshold 160 mm is selected, and then the corresponding distance error is calculated according to the selected third distance error model.
[0272] S813: If the target distance value is located in a first distance interval, two third distance error models corresponding to two endpoints of the first distance interval are selected, and the first distance interval is any one of the multiple distance intervals.
[0273] Specifically, if the target distance value is in the first distance interval, the third distance error model corresponding to the two endpoints of the first distance interval is selected, the first distance interval is any one of the multiple distance intervals, and the two endpoints of the first distance interval are the two distance thresholds included in the first distance interval.
[0274] For example, in the aforementioned embodiment, the multiple distance thresholds are 60 mm, 80 mm, 100 mm, 120 mm, 140 mm and 160 mm, and the multiple distance intervals formed by the multiple distance thresholds are: [60, 80], [80, 100], [100, 120], [120, 140] and [140, 160]. Then, the first distance interval can be any one of the distance intervals [60, 80], [80, 100], [100, 120], [120, 140] and [140, 160]. For example, the first distance interval can be [100, 120].
[0275] In some embodiments, assuming that the target distance value is 110 mm, the first distance interval segment where the target distance value is 110 mm is located is [100, 120], and two third distance error models corresponding to the two endpoints of the first distance interval segment [100, 120] are selected, that is, two third distance error models corresponding to the two distance thresholds 100 mm and 120 mm included in the first distance interval segment are selected, and then the corresponding distance error is calculated according to the two selected third distance error models.
[0276] S820: Select a first sub-range error model or a second sub-range error model from the third range error model based on the corrected brightness reference value and the corrected brightness reference threshold.
[0277] It can be understood that the third distance error model includes: a first sub-distance error model and a second sub-distance error model, the first sub-distance error model is used to obtain the target distance difference based on the corrected brightness reference value when the corrected brightness reference value is less than or equal to the corrected brightness reference threshold. The second sub-distance error model is used to obtain the target distance difference based on the corrected brightness reference value when the corrected brightness reference value is greater than the corrected brightness reference threshold. Obviously, the corrected brightness reference threshold can be determined according to the actual application scenario and historical experience data settings, and the embodiments of the present invention do not impose any restrictions on this. For example, in some embodiments, the corrected brightness reference threshold can be a corrected brightness reference value corresponding to a white target in a calibration target of at least two materials.
[0278] Specifically, the corrected brightness reference value and the corrected brightness reference threshold are compared to determine the size relationship between the corrected brightness reference value and the corrected brightness reference threshold, and then according to the size relationship between the corrected brightness reference value and the corrected brightness reference threshold, a corresponding sub-range error model is selected from the third distance error model to calculate the target distance difference, that is, the first sub-range error model or the second sub-range error model is selected from the third distance error model to calculate the target distance difference.
[0279] In some embodiments, selecting the first sub-distance error model or the second sub-distance error model from the third distance error model based on the corrected brightness reference value and the corrected brightness reference threshold includes but is not limited to the following steps S821-S822:
[0280] S821: If the corrected brightness reference value is greater than the corrected brightness reference threshold, selecting a second sub-distance error model in the third distance error model.
[0281] S822: If the corrected brightness reference value is less than or equal to the corrected brightness reference threshold, select the first sub-distance error model in the third distance error model.
[0282] Specifically, the corrected brightness reference value is compared with the corrected brightness reference threshold. If the corrected brightness reference value is greater than the corrected brightness reference threshold, the second sub-distance error model in the third distance error model is selected, and the corresponding distance error is calculated according to the selected second sub-distance error model.
[0283] In some embodiments, if the modified brightness reference value is less than or equal to the modified brightness reference threshold, a first sub-distance error model in the third distance error model is selected, and the corresponding distance error is calculated according to the selected first sub-distance error model.
[0284] S830: Substitute the corrected brightness reference value into the selected distance error model to obtain the target distance difference.
[0285] Specifically, after selecting and determining a corresponding sub-range error model from the third range error model, the corrected brightness reference value is substituted into the determined sub-range error model (i.e., the first sub-range error model or the second sub-range error model) with pre-calibrated parameters, and after calculation using the selected first sub-range error model or the second sub-range error model, a target distance difference is output, thereby using the target distance difference to more accurately correct the distance measurement value, thereby further improving the ranging accuracy.
[0286] In some embodiments, substituting the corrected brightness reference value into the selected distance error model to obtain the target distance difference value specifically includes but is not limited to the following steps S831-S832:
[0287] S831: If the selected distance error model is a distance error model, the corrected brightness reference value is substituted into the selected distance error model to obtain the target distance difference.
[0288] Specifically, if the third distance error model selected and determined is one (wherein, the target distance value is the first distance threshold or the target distance value is before the first distance threshold, or the target distance value is the last distance threshold or the target distance value is after the last distance threshold, and the third distance error model selected and determined is a third distance error model), the corrected brightness reference value is substituted into the selected and determined third distance error model, and after calculation of the selected and determined third distance error model, the target distance difference is output.
[0289] S832: If two distance error models are selected and determined, the corrected brightness reference value is substituted into the two distance error models respectively to obtain two distance differences, and the two distance differences are weightedly added to obtain the target distance difference.
[0290] Specifically, if two third distance error models are selected and determined (that is, when the target distance value is located in any one of multiple distance intervals, the third distance error models selected and determined are two third distance error models), the corrected brightness reference value is respectively substituted into the two third distance error models selected and determined, and after calculation of the two third distance error models selected and determined, two distance difference values are output respectively.
[0291] After obtaining the two distance differences, the two distance differences are weighted and added according to the weights of the two distance differences to obtain the target distance difference. In some embodiments, the weight of each distance difference is the difference between the target distance value and the distance threshold corresponding to the selected third distance error model. Of course, the weight of each distance difference can also be other values, for example, it can be the ratio of the reference difference (i.e., the difference between the target distance value and the distance threshold corresponding to the selected third distance error model) to the distance threshold corresponding to the selected third distance error model. Those skilled in the art can determine the weight of each distance difference according to actual needs, and the embodiments of the present invention do not impose any limitation on this.
[0292] It should be understood that different methods are used to determine the weight of each distance difference, and the method of obtaining the target distance difference by weighted addition of two distance differences should correspond to the method used.
[0293] In some embodiments, the target distance difference can be calculated by weighted addition using the following formula (1), where formula (1) is:
[0294]
[0295] In formula (1), Indicates the target distance difference, Represents the first distance difference calculated by the first third distance error model, Represents the second distance difference calculated by the second third distance error model, Represents the weight of the first distance difference, that is, the difference between the target distance value and the distance threshold corresponding to the first third distance error model, Represents the weight of the second distance difference, that is, the difference between the target distance value and the distance threshold corresponding to the second third distance error model.
[0296] For example, in some embodiments, assuming that the target distance value is 107 mm, the first distance interval segment where the target distance value is 110 mm is located is [100, 120], and two third distance error models corresponding to the two distance thresholds 100 mm and 120 mm included in the first distance interval segment [100, 120] are selected, and then the corrected brightness reference value is substituted into the two selected third distance error models respectively. After calculation, the corresponding two distance differences are 5 mm and 8 mm respectively.
[0297] Then the weights of the two distance differences are calculated. The distance difference of 5 mm is calculated by the third distance error model corresponding to the distance threshold of 100 mm. The weight of the distance difference of 5 mm is equal to the difference between the target distance value of 107 mm and the distance threshold of 100 mm, that is, the weight of the distance difference of 5 mm = the target distance value of 107 mm minus the distance threshold of 100 mm = 7 mm.
[0298] Similarly, the distance difference of 8 mm is calculated by the third distance error model corresponding to the distance threshold of 120 mm. The weight of the distance difference of 8 mm is equal to the difference between the target distance value of 107 mm and the distance threshold of 120 mm, that is, the weight of the distance difference of 8 mm = the target distance value of 107 mm minus the distance threshold of 120 mm = -13 mm.
[0299] Substitute the first distance difference of 5mm, the first distance difference of 8mm, the weight of the first distance difference of 5mm of 7mm, and the weight of the second distance difference of 5mm of -13mm into formula (1) to calculate the target distance difference = 5*(-13)+8*7 = -6mm.
[0300] S840: Subtract the target distance difference from the target distance value to update the target distance value.
[0301] Specifically, after obtaining the target distance difference, the target distance value is subtracted from the target distance difference to obtain a more accurate new target distance value, and the original target distance value is updated to the new target distance value, thereby obtaining a more accurate target distance value and further improving the ranging accuracy.
[0302] In summary, the ranging method provided in the embodiment of the present invention is applied to a laser radar, and the method includes: obtaining a distance measurement value and a brightness value obtained by the laser radar to detect a target object; obtaining a third distance error based on the brightness value and a distance error model, the distance error model characterizing the relationship between the brightness value and the third distance error, and the parameters of the distance error model are obtained by using a calibration method of any distance error model provided in the embodiment of the present invention; and subtracting the third distance error from the distance measurement value to obtain a target distance value.
[0303] In this embodiment, the method uses the distance error model after calibration parameters to obtain the third distance error, and corrects the distance measurement value output by the laser radar to obtain an accurate target distance value, thereby improving the accuracy of distance measurement.
[0304] The embodiment of the present invention also provides a sweeping machine. Fig.10 , Fig.10 The structural diagram of the sweeping machine 400 provided in some embodiments of the present invention is schematically shown.
[0305] like Fig.10 As shown, the sweeping machine 400 includes: a laser radar 300 and a controller 410. The laser radar 300 is connected to the controller 410 for communication, and the controller 410 is used to perform mapping or positioning based on the laser point cloud data sent by the laser radar 300, so that the sweeping machine 400 can complete related work tasks (such as cleaning tasks).
[0306] It can be understood that the laser radar 300 is the laser radar in the above embodiment, and has the same structure and function, which will not be described here one by one.
[0307] An embodiment of the present invention provides a computer-readable storage medium, on which computer program instructions executable by a processor are stored. When the computer program instructions are called by the processor, the processor executes any distance error model calibration method provided by the embodiment of the present invention, or executes any distance measurement method provided by the embodiment of the present invention.
[0308] In some embodiments, the storage medium may be a flash memory, a hard disk, an optical disk, a register, a magnetic surface storage, a removable disk, a CD-ROM, a random access memory (RAM), a read-only memory (ROM), an electrically programmable ROM, and an electrically erasable programmable ROM, or any other form of storage medium known in the technical field, or may be various devices including one or any combination of the above storage media.
[0309] In some embodiments, computer program instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0310] As an example, computer program instructions may, but need not, correspond to a file in a file system, may be stored as part of a file storing other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).
[0311] As an example, the computer program instructions may be deployed to be executed on a computing device (including devices such as smart terminals and servers), or on multiple computing devices located at one location, or on multiple computing devices distributed at multiple locations and interconnected by a communication network. It is easy to understand that all or part of the steps of the method described in the embodiments provided by the present invention above can be directly implemented using electronic hardware or processor executable computer program instructions, or a combination of the two.
[0312] Those skilled in the art will appreciate that the embodiments provided by the present invention are only illustrative, and the order of writing the steps in the method of the embodiment does not mean a strict execution order and does not constitute any limitation on the implementation process. The order can be adjusted, merged and deleted according to actual needs, and the modules or sub-modules, units or sub-units in the device or system of the embodiment can be merged, divided and deleted according to actual needs. For example, the division of units is only a logical function division, and there can be other division methods in actual implementation. For another example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed.
[0313] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course can also be implemented by hardware. Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0314] It should be noted that the above embodiments are intended to illustrate the technical concept and features of the present invention, and their purpose is to enable people familiar with this technology to understand the content of the present invention and implement it accordingly, and cannot be used to limit the scope of protection of the present invention. Ordinary technicians in this field can understand that all or part of the processes of the above embodiments can be implemented according to the technical solutions recorded in the embodiments of the present invention, or some of the technical features can be equivalently replaced. It can be understood that these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention, and should be regarded as equal changes and modifications based on the embodiments of the present invention, and should all fall within the scope of the claims of the present invention.
Claims
1. A calibration method for a distance error model, applied to a laser radar, characterized in that: The laser radar includes a first photosensitive area and a second photosensitive area, and the method includes: Acquire distance measurement values and brightness values corresponding to the calibration targets at a plurality of actual distances, wherein the brightness values include a first brightness value of the first photosensitive area and a second brightness value of the second photosensitive area; Acquire parameters of a distance error model based on the distance measurement value and the brightness value, wherein the distance error model includes a brightness reference model and a first distance error model, the brightness reference model represents a relationship between a brightness reference value and the first brightness value and the second brightness value, the first distance error model represents a relationship between the first distance error and the brightness reference value, and the first distance error is a difference between the distance measurement value and the actual distance; The calibration target includes at least two calibration targets of different materials, and obtaining the parameters of the brightness reference model includes: Fitting a first intermediate model based on a plurality of first two-dimensional data points of actual distances and brightness averages to obtain parameters of the first intermediate model, wherein the first intermediate model represents the relationship between the actual distance and the brightness average, and the brightness average is the average of first brightness values corresponding to the at least two calibration targets of different materials; Obtaining a reference brightness mean value based on the actual distance and the first intermediate model, and using the reference brightness mean value as a first brightness reference value; For the calibration target at each actual distance, the brightness reference model is fitted based on multiple first three-dimensional data points to obtain parameters of the brightness reference model, and the coordinate values of the first three-dimensional data points are respectively the first brightness reference value, the first brightness value and the second brightness value.
2. The method according to claim 1, characterized in that Acquiring parameters of the first distance error model includes: For each material calibration target, perform the following steps: Obtaining the brightness reference value based on the first brightness value, the second brightness value and the brightness reference model; Subtracting the distance measurement value from the actual distance to obtain the first distance error; The first distance error model is fitted based on a plurality of the brightness reference values and second two-dimensional data points of the first distance error to obtain parameters of the first distance error model, wherein each of the second two-dimensional data points corresponds to an actual distance.
3. The method according to claim 2, characterized in that The distance error model further includes a second distance error model, wherein the second distance error model represents a relationship between the first distance error and a corrected brightness reference value; Acquiring parameters of the second distance error model includes: Obtaining a first difference between the brightness reference values corresponding to the same first distance error in the second two-dimensional data point and the first distance error model; Fitting a second intermediate model based on a plurality of third two-dimensional data points of the distance measurement values and the first difference value to obtain parameters of the second intermediate model, wherein the second intermediate model represents a relationship between the distance measurement value and the brightness reference error value; Obtaining the brightness reference error value based on the distance measurement value and the second intermediate model; Subtracting the brightness reference value from the brightness reference error value to obtain the corrected brightness reference value; The second distance error model is fitted based on a plurality of the first distance errors and fourth two-dimensional data points of the corrected brightness reference value to obtain parameters of the second distance error model.
4. The method according to claim 3, characterized in that The calibration target includes a black target, a white target and a lattice target, the distance error model also includes a third distance error model, the third distance error model represents the relationship between the distance difference and the corrected brightness reference value, and the third distance error model includes a first sub-distance error model and a second sub-distance error model; For each actual distance, obtaining parameters of the third distance error model, each actual distance corresponding to one third distance error model, including: Obtaining a second distance error based on the corrected brightness reference value and the second distance error model; Subtracting the first distance error from the second distance error to obtain a distance difference; Fitting a first sub-distance error model based on fifth two-dimensional data points corresponding to the black target and the white target at the actual distance to obtain parameters of the first sub-distance error model, wherein the coordinate value of the fifth two-dimensional data point includes the corrected brightness reference value and the distance difference value; Fitting a second sub-distance error model based on fifth two-dimensional data points corresponding to the white target and the lattice target at the actual distance to obtain parameters of the second sub-distance error model; The first sub-range error model and the second sub-range error model are fused to obtain the third range error model.
5. The method according to claim 4, characterized in that The third distance error model further includes a distance threshold, and the method further includes: The distance measurement value corresponding to the actual distance is subtracted from the second distance error to obtain a distance threshold of the third distance error model corresponding to the actual distance.
6. A distance measurement method, applied to laser radar, characterized in that: The laser radar includes a first photosensitive area and a second photosensitive area, and the method includes: Acquire a distance measurement value and a brightness value obtained by detecting a target object by a laser radar, wherein the brightness value includes a first brightness value of the first photosensitive area and a second brightness value of the second photosensitive area; Obtaining a third distance error based on the brightness value and the distance error model, wherein the distance error model includes a brightness reference model and a first distance error model, the brightness reference model characterizes a relationship between a brightness reference value and a first brightness value and a second brightness value, the first distance error model characterizes a relationship between the third distance error and the brightness reference value, and parameters of the brightness reference model and the first distance error model are obtained by using the calibration method of the distance error model according to any one of claims 1 to 5; Obtaining a third distance error based on the brightness value and the distance error model includes: Substituting the first brightness value and the second brightness value into the brightness reference model to obtain a brightness reference value; Substituting the brightness reference value into the first distance error model to obtain a third distance error; The target distance value is obtained by subtracting the third distance error from the distance measurement value.
7. The method according to claim 6, characterized in that The distance error model further includes a second distance error model, wherein the second distance error model represents a relationship between the third distance error and a corrected brightness reference value; Obtaining a third distance error based on the brightness value and the distance error model further includes: Substituting the distance measurement value into a second intermediate model to obtain a brightness reference error value, wherein the second intermediate model represents a relationship between the distance measurement value and the brightness reference error value; Subtract the brightness reference value from the brightness reference error value to obtain a corrected brightness reference value; The corrected brightness reference value is substituted into the second distance error model to obtain a fourth distance error, and the third distance error is updated using the fourth distance error.
8. The method according to claim 7, characterized in that The distance error model further includes a plurality of third distance error models, each of the third distance error models corresponds to a distance threshold, the distance threshold constitutes a plurality of distance interval segments, the third distance error model represents the relationship between the target distance difference and the corrected brightness reference value, and the third distance error model includes a first sub-distance error model and a second sub-distance error model; The method further comprises: Determine a distance interval in which the target distance value is located, and select a third distance error model based on the distance interval; Selecting a first sub-range error model or a second sub-range error model from the third range error model based on the modified brightness reference value and the modified brightness reference threshold; Substituting the corrected brightness reference value into the selected distance error model to obtain a target distance difference; The target distance value is subtracted from the target distance difference to update the target distance value.
9. The method according to claim 8, characterized in that Each of the distance interval segments is composed of two consecutive distance thresholds, and the determining of the distance interval segment in which the target distance value is located, and selecting a third distance error model based on the distance interval segment, includes: If the target distance value is the first distance threshold or is before the first distance threshold, selecting the third distance error model corresponding to the first distance threshold; or, If the target distance value is the last distance threshold or is after the last distance threshold, the third distance error model corresponding to the last distance threshold is selected; or, If the target distance value is located in a first distance interval, two third distance error models corresponding to two endpoints of the first distance interval are selected, and the first distance interval is any one of the multiple distance intervals.
10. The method according to claim 9, characterized in that The selecting the first sub-range error model or the second sub-range error model from the third range error model based on the corrected brightness reference value and the corrected brightness reference threshold comprises: If the modified brightness reference value is greater than the modified brightness reference threshold, selecting the second sub-distance error model in the third distance error model; If the modified brightness reference value is less than or equal to the modified brightness reference threshold, a first sub-distance error model in the third distance error model is selected.
11. The method according to any one of claims 8 to 10, characterized in that: Substituting the corrected brightness reference value into the selected and determined distance error model to obtain the target distance difference includes: If a distance error model is selected and determined, the corrected brightness reference value is substituted into the selected and determined distance error model to obtain the target distance difference; If two distance error models are selected and determined, the corrected brightness reference value is substituted into the two distance error models respectively to obtain two distance difference values, and the two distance difference values are weightedly added to obtain the target distance difference value.
12. A laser radar, characterized in that: include: A processor and a memory communicatively connected to the processor; The memory stores computer program instructions executable by the processor, and when the computer program instructions are called by the processor, the processor executes the calibration method of the distance error model as described in any one of claims 1-5, or executes the ranging method as described in any one of claims 6-11.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions executable by a processor. When the computer program instructions are called by the processor, the processor executes the calibration method of the distance error model as described in any one of claims 1 to 5, or executes the ranging method as described in any one of claims 6 to 11.
14. A sweeping machine, characterized in that: include: The laser radar as claimed in claim 12.
