Laser radar calibration device and method
Technical Field
The invention belongs to the technical field of optical imaging, and particularly relates to a laser radar calibration device and method.
Background
The laser radar is widely applied to the related fields of artificial intelligence such as machine vision, unmanned driving and the like, and the area array laser radar has the advantages of high precision, stable performance, low manufacturing cost and the like. The precise calibration of the area array laser radar is the premise of high-precision measurement.
Among the existing calibration methods, the method for automatically calibrating the parameters of the laser radar, as provided in patent application publication No. CN 107179534a, includes: setting a first marker in a calibration field, wherein the first marker is provided with a first marker point, and performing laser scanning on the calibration field by using a laser radar to obtain scanning data: fitting the scanning data of the position of the first marker to obtain a fitting space coordinate of the first marker point; and resolving laser radar parameters by using errors between the fitting space coordinate and the measurement space coordinate of the first mark point, and automatically calibrating by using the resolved laser radar parameters. And the laser radar calibration device provided by the patent application with the publication number of CN 111337911A, which comprises a base used for placing the laser radar; the target is arranged opposite to the laser radar and can reflect laser emitted by the laser radar back to the laser radar.
The automation degree and the simplicity of the calibration method determine the efficiency of large-scale generation, so whether the area array laser radar can be accurately and efficiently calibrated in practical application becomes a work with profound significance.
Disclosure of Invention
Aiming at the problems in the prior art, the invention provides a laser radar calibration device and method, which mainly solve the problems of strict perpendicularity of an optical axis and a calibration surface of a laser sensor, calibration of converting ToF (time of flight) data into an accurate distance value d, and automation of the whole calibration process.
In order to achieve the purpose, the specific technical scheme of the invention is as follows:
an apparatus for lidar calibration, comprising:
the track is provided with a track which is provided with a plurality of tracks,
the area array laser radar to be calibrated is arranged on the track and comprises a laser projector and a laser sensor;
a servo motor for driving the area array laser radar to move along a track;
the steering engine is used for controlling the rotation angle of the area array laser radar;
the calibration plate is arranged at the tail end of the track;
and the computer is used for carrying out calibration calculation by controlling the servo motor and the steering engine according to the flight time data of the laser emitted by the area array laser radar.
According to the calibration device, the invention also provides a laser radar calibration method, which comprises the following steps:
(1) the area array laser radar projects laser to the calibration plate, collects the flight time data of the area array laser, and converts the flight time ToF of each pixel point into a predicted value L of the flight path distance of the laser0;
(2) According to the predicted value L0Calculating the vertical distance d from the object point to the sensor by using the pixel coordinates (u, v) of the pixel point, the central coordinates (cx, cy) of the pixel surface and the focal length f of the laser sensor;
(3) according to the obtained 3d coordinate point cloud set P0 of the calibration plate, fitting a plane pi by using a least square method;
(4) controlling a steering engine to rotate according to an included angle alpha between the plane pi and an x axis of a radar camera coordinate system and a y axis included angle beta to enable an optical axis of a laser sensor to be perpendicular to a calibration plate;
(5) repeating the step (1-2), and calculating the flying distance L0 and the vertical distance d from each pixel point of the area array laser sensor to the calibration board;
(6) calculating the real flying distance L of each pixel according to the real vertical distance data D from the laser radar to the calibration plate;
(7) calculating the deviation bias of the laser flying distance L0 and the real distance L between the laser radar and the calibration board;
(8) and (5) changing the distance between the laser radar and the calibration board, repeating the step (5-6) to obtain a plurality of groups of L0 and L values, and calculating the real flying distance L corresponding to each pixel according to the calibrated deviation bias.
Preferably, in step (1), the value L is predicted0The calculation formula of (a) is as follows:
L0=ToF*c/2
in the formula, c represents the speed of light.
Preferably, the vertical distance d of the object point to the sensor can be calculated by solving the similar triangles:
wherein f is the focal length, L0Is a predicted value.
Preferably, a 3d coordinate point cloud set P0 of the calibration plate is generated according to all pixel data of the 6-plane array laser radar calculated in the steps (1) and (2).
Preferably, in step (4), by calculating an included angle α between the plane Π and an x axis of a coordinate system of the radar camera and an included angle β between y axes, the steering engine is controlled to rotate by an angle β around the x axis of the coordinate system of the camera and an angle α around the y axis of the coordinate system of the camera until absolute values of α and β are less than 0.1 degree.
Preferably, the calculation formula of the real flying distance L in the step (6) is as follows:
in the formula, (u, v) is the pixel coordinate of the pixel point, and (cx, cy) is the center coordinate of the pixel plane.
Preferably, in step (7), the calculated laser flying distance L0 has a deviation bias L from the true distance L between the laser radar and the calibration board due to an error in the time of flight recorded by the laser radar0L as a function of the laser flight distance L0.
The invention has the following beneficial effects:
(1) the invention provides a method for ensuring verticality through an algorithm, which avoids errors and low efficiency of a mechanical mode. The precision of the true value of the calibration surface distance is greatly improved.
(2) According to the invention, a set of efficient automatic area array laser radar calibration system is constructed through the programmable steering engine and the servo motor, and the generation efficiency is improved.
Drawings
FIG. 1 is a diagram of an automatic calibration device for a point array laser radar according to the present invention;
FIG. 2 is a diagram of a laser radar imaging model;
FIG. 3 is a schematic diagram of an angle between a point cloud fitting plane and x and y axes of a camera coordinate system
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention, however, the present invention may be practiced in other ways than those specifically described herein, and thus the present invention is not limited to the specific embodiments disclosed below.
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative and intended to be illustrative of the invention and are not to be construed as limiting the invention.
The main components of the calibration device shown in fig. 1 include: the device comprises a calibration plate 100, a track 101, a servo motor 102, a controller, a programmable steering engine 103, an area array laser radar 104 to be calibrated and a computer 105.
The calibration plate 100, the track 101 and the programmable steering engine 103 form a calibrated mechanical system, the laser radar 104 is fixed on the steering engine, the steering engine 103 is arranged at one end of the track 101 and can move on the track 101 under the driving of the servo motor 102, the calibration plate 100 is arranged at the other end of the track, and the included angle between the laser projection surface and the plane of the calibration plate 100 is adjusted through the rotation of the steering engine 103.
The servo motor 102, the controller, the programmable steering engine 103, the area array laser radar 104 to be calibrated and the computer 105 form a calibrated data automatic acquisition and processing system, the area array laser radar 104 to be calibrated transmits the flight time data of laser to the computer 105, and the computer 105 completes the automatic calibration calculation process by controlling the servo motor and the steering engine.
According to the above device, the calibration method of the area array laser radar in this embodiment includes the following specific steps:
(1) the laser radar transmits the area array laser flight time data to the computer when the calibration is started, and the computer converts the flight time ToF of each pixel point into a predicted value of the laser flight path distanceL0Let the speed of light be c.
L0=ToF*c/2 (1)
(2) According to the pixel coordinates (u, v) of the pixel point, the center coordinates (cx, cy) of the pixel plane and the focal length f of the laser sensor, the vertical distance d from the object point to the sensor can be calculated by solving the similar triangle, as shown in fig. 2.
(3) And (3) calculating and correcting all pixel data of the area array laser radar in the step (1-2) to obtain a 3d coordinate point cloud set P0 of the calibration board. Plane Π can be fitted using a least squares method.
(4) And calculating an included angle alpha between the plane pi and the x axis of the radar camera coordinate system and an included angle beta between the y axis and the plane pi, and controlling the steering engine to rotate by an angle beta around the x axis of the camera coordinate system and an angle alpha around the y axis of the camera coordinate system as shown in fig. 3. And (4) repeating the steps (1-4) until the absolute values of alpha and beta are less than 0.1 degree. The optical axis of the laser sensor is perpendicular to the calibration plate.
(5) And (3) calculating the flying distance L from each pixel point of the area array laser sensor to the calibration board by reusing the method in the step (1-2)0And the vertical distance d is recorded.
(6) And (3) acquiring real vertical distance data D from the laser radar to the calibration plate from a controller of the track servo motor, and substituting the data into a formula (2) to calculate the real flying distance L of each pixel.
(7) The laser flying distance L calculated in the step (1) is due to the fact that the laser radar has errors in the recorded flying time0And the actual distance L between the laser radar and the calibration board has deviation bias. This deviation can be regarded as the laser flight distance L0As a function of (c).
bias=L0-L
(8) Servo motor for controlling trackChanging the distance between the laser radar and the calibration plate, and repeating the step (7) to obtain a plurality of groups of L0And the L value, then the deviation bias can be calibrated by using methods including but not limited to function fitting, machine learning, deep learning and the like, and finally the real flying distance L corresponding to each pixel is calculated.
The above description is only exemplary of the preferred embodiments of the present invention, and is not intended to limit the present invention, and any modifications, equivalents, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.