A method for calibrating a laser radar, an electronic device, and a storage medium

CN118052887BActive Publication Date: 2026-10-30GUOGUANG SHUNENG (SHANGHAI) ENERGY TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410273844.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-11
Publication Date
2026-10-30
Estimated Expiration
2044-03-11

AI Technical Summary

Technical Problem

[0002]无人驾驶是一种需要传感器收集数据、决策层处理数据、执行层控制运动的多功能综合系统;对于一个优秀的无人驾驶系统来说,获取高精度的环境信息是必不可少的;想要获取到准确的环境信息,传感器标定是必不可少的;目前,单目(双目)相机与激光雷达联合的标定方法,大多是需要获取相机拍摄的图像的坐标以及激光雷达采集到的点云的坐标,然后通过大量的计算对激光雷达进行标定;通过该方法对激光雷达进行标定,精度较低,且耗费时间较长

Benefits of technology

[0015]本发明的激光雷达的标定方法,将移动储能设备上的激光雷达采集到的初始点云图像和单目摄像头拍摄的摄像头图像显示在同一显示界面内;若初始点云图像中物体的点云轮廓与摄像头图像中对应物体的图像轮廓不满足预设的重合条件,则获取目标物体在初始点云图像中对应的每一点在激光雷达坐标系内的第一坐标,以得到目标物体对应的初始点云坐标矩阵A;移动和/或旋转所述初始点云图像,得到目标点云图像,使得目标点云图像中物体的点云轮廓与所述摄像头图像中对应的物体的图像轮廓重合;进而得到目标物体在目标点云图像中对应的每一点当前在激光雷达坐标系内的第二坐标,以得到目标物体对应的目标点云坐标矩阵B;根据A和B,确定初始点云图像转换为目标点云图像对应的三轴转角参数M以及坐标移动参数W,根据M和W,对激光雷达坐标系的原点进行标定;本发明中,在对激光雷达坐标系的原点进行标定的过程中,仅仅获取激光雷达采集的点云图像中的部分点的坐标,摄像头图像中的像素点的坐标不做处理,因此,标定的过程中计算量较小,精度较高且耗时较短。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118052887B_ABST
    Figure CN118052887B_ABST
Patent Text Reader

Abstract

The application provides a kind of calibration method of laser radar, electronic equipment and storage medium, it is related to laser radar calibration technical field, the method comprises: the initial point cloud image and camera image are displayed in the same display interface;If the point cloud profile of object in initial point cloud image and the image profile of corresponding object in camera image do not satisfy the coincidence condition of pre-set;Then the first coordinate of each point corresponding to target object in initial point cloud image in laser radar coordinate system is obtained, to obtain the initial point cloud coordinate matrix A corresponding to target object;Move and / or rotate the initial point cloud image, obtain target point cloud image;The second coordinate of each point corresponding to target object in target point cloud image in laser radar coordinate system is obtained at present, to obtain the target point cloud coordinate matrix B corresponding to target object;According to A and B, laser radar is calibrated;The present application has smaller amount of calculation when calibrating laser radar, higher precision and shorter time consumption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of lidar calibration technology, and in particular to a lidar calibration method, electronic device, and storage medium. Background Technology

[0002] Autonomous driving is a multi-functional integrated system that requires sensors to collect data, a decision-making layer to process data, and an execution layer to control motion. For an excellent autonomous driving system, obtaining high-precision environmental information is essential. To obtain accurate environmental information, sensor calibration is indispensable. Currently, most calibration methods that combine monocular (binocular) cameras and LiDAR require obtaining the coordinates of the images captured by the camera and the coordinates of the point cloud collected by the LiDAR, and then calibrating the LiDAR through a large amount of calculation. This method of LiDAR calibration has low accuracy and is time-consuming. Summary of the Invention

[0003] To address the aforementioned technical problems, the technical solution adopted by this invention is as follows:

[0004] According to a first aspect of this application, a calibration method for a lidar is provided, the method comprising the following steps:

[0005] S100 displays the initial point cloud image and the camera image on the same display interface; the initial point cloud image is acquired by LiDAR, and the camera image is captured by a monocular camera; both the LiDAR and the monocular camera are fixedly installed on the same mobile energy storage device; the monocular camera has been calibrated.

[0006] S200, determine whether the point cloud contour of the object in the initial point cloud image and the image contour of the corresponding object in the camera image meet the preset overlap condition.

[0007] S300, if the preset overlap condition is not met, the first coordinate of each point corresponding to the target object in the initial point cloud image in the lidar coordinate system is obtained to obtain the initial point cloud coordinate matrix A corresponding to the target object; where A includes n rows, each row corresponding to the current first coordinate of a point; the target object is any object among all objects corresponding to the initial point cloud image.

[0008] S400, move and / or rotate the initial point cloud image to obtain a target point cloud image; wherein, the point cloud outline of the object in the target point cloud image coincides with the image outline of the corresponding object in the camera image.

[0009] S500, obtain the second coordinates of each point in the target point cloud image of the target object in the lidar coordinate system to obtain the target point cloud coordinate matrix B corresponding to the target object; wherein, B includes several rows, and each row corresponds to the second coordinates of a point.

[0010] S600, based on A and B, determine the three-axis rotation parameters M = (α, β, γ) and coordinate translation parameters W = (ΔX, ΔY, ΔZ) corresponding to the conversion of the initial point cloud image into the target point cloud image; where α is the angle of rotation of the initial point cloud image around the Z-axis, β is the angle of rotation of the initial point cloud image around the Y-axis, and γ is the angle of rotation of the initial point cloud image around the X-axis; the rotation order is Z-axis, Y-axis, X-axis; ΔX is the change of the initial point cloud image along the X-axis, ΔY is the change of the initial point cloud image along the Y-axis, and ΔZ is the change of the initial point cloud image along the Z-axis.

[0011] S700, based on M and W, calibrates the origin of the lidar coordinate system.

[0012] According to another aspect of this application, a non-transitory computer-readable storage medium is also provided, wherein at least one instruction or at least one program is stored in the storage medium, and the at least one instruction or at least one program is loaded and executed by a processor to implement the above-described calibration method for lidar.

[0013] According to another aspect of this application, an electronic device is also provided, including a processor and the aforementioned non-transitory computer-readable storage medium.

[0014] The present invention has at least the following beneficial effects:

[0015] The calibration method for a lidar in this invention displays an initial point cloud image acquired by the lidar on a mobile energy storage device and a camera image captured by a monocular camera on the same display interface. If the point cloud contour of an object in the initial point cloud image does not meet a preset overlap condition with the image contour of the corresponding object in the camera image, the first coordinates of each point corresponding to the target object in the initial point cloud image in the lidar coordinate system are obtained to obtain the initial point cloud coordinate matrix A corresponding to the target object. The initial point cloud image is moved and / or rotated to obtain a target point cloud image, such that the point cloud contour of the object in the target point cloud image matches the image contour of the corresponding object in the camera image. The coordinates of each point in the target point cloud image are then overlapped to obtain the second coordinates of each point in the lidar coordinate system, thus obtaining the target point cloud coordinate matrix B corresponding to the target object. Based on A and B, the three-axis rotation parameter M and coordinate movement parameter W corresponding to the target point cloud image are determined. Based on M and W, the origin of the lidar coordinate system is calibrated. In this invention, during the calibration of the origin of the lidar coordinate system, only the coordinates of some points in the point cloud image acquired by the lidar are obtained, and the coordinates of the pixels in the camera image are not processed. Therefore, the computational load is small, the accuracy is high, and the time consumption is short.

[0016] Furthermore, in this invention, the camera is calibrated and fixedly installed on the mobile energy storage device; the relative positions of objects in the camera image are accurate, and the point cloud image acquired by the lidar is based on the camera image when moving and / or rotating. Therefore, the accuracy of the origin calibration of the lidar coordinate system can be further ensured. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 A flowchart illustrating the calibration method for a lidar provided in an embodiment of the present invention. Detailed Implementation

[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0020] It should be noted that various aspects of embodiments within the scope of the appended claims are described below. It will be apparent that the aspects described herein can be embodied in a wide variety of forms, and any particular structure and / or function described herein is merely illustrative. Based on this disclosure, those skilled in the art will understand that one aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number of aspects set forth herein can be used to implement the device and / or practice the method. Additionally, this device and / or method can be implemented using structures and / or functionalities other than one or more of the aspects set forth herein.

[0021] The following will refer to Figure 1 The flowchart shown illustrates a calibration method for a lidar, which includes the following steps:

[0022] S100 displays the initial point cloud image and the camera image on the same display interface; the initial point cloud image is acquired by LiDAR, and the camera image is captured by a monocular camera; both the LiDAR and the monocular camera are fixedly installed on the same mobile energy storage device; the monocular camera has been calibrated.

[0023] In this embodiment, the mobile energy storage device can be a mobile charging vehicle. A monocular camera and a lidar are fixedly installed at the preset positions of the mobile energy storage device. The acquisition time of the initial point cloud image is the same as the shooting time of the camera image. The monocular camera is a calibrated camera, which can be understood as a camera with no error or a small error. The monocular camera and the mobile energy storage device are in the same coordinate system, while the lidar is in the lidar coordinate system.

[0024] Understandably, since the LiDAR is uncalibrated, the initial point cloud image and the camera image, although displayed on the same screen, may be misaligned.

[0025] S200, determine whether the point cloud contour of the object in the initial point cloud image and the image contour of the corresponding object in the camera image meet the preset overlap condition.

[0026] In this embodiment, the first step is to determine whether the initial point cloud image and the camera image overlap. Specifically, this can be determined through the following steps:

[0027] S210, Obtain each point corresponding to each preset type of object in the initial point cloud image to obtain a point set list C = (C1, C2, ..., C...) for the preset type of object. i C n ), i = 1, 2, ..., n; where, Ci Let C be the point set corresponding to the i-th preset type of object, and n be the number of preset type objects in the point cloud image; i =(C i,1 C i,2 C i,j C i,f(i) ), j=1,2,…,f(i);C i,j Let f(i) be the j-th point in the point set corresponding to the i-th preset type of object, and f(i) be the number of points in the point set corresponding to the i-th preset type of object.

[0028] The preset type of object can be a vehicle, pedestrian, or building. The preset type of object can be identified using existing object recognition methods. The preset type of object corresponds to several points in the initial point cloud image. Each point corresponding to each preset type of object can be obtained to get C. It is understood that, since the number of points corresponding to each preset type of object is different in this embodiment, f(i) does not refer to a specific function or function result value, but to a possible value that varies with the specific value of i. For example, when i=1, f(i)=300; when i=2, f(i)=400; when i=3, f(i)=300.

[0029] S220, obtain the number of target points in each point set in C, to obtain a list of target point counts D = (D1, D2, ..., D...). i D n ); where D i C i The number of corresponding target points; C i The corresponding target point is located at C. i Points within the corresponding image contour in the camera image.

[0030] In this embodiment, if the initial point cloud image and the camera image are on the same display interface and do not completely overlap, only a portion of the points corresponding to the same preset type of object are within the corresponding image contour in the camera image. It should be noted that those skilled in the art can determine the target point by using existing methods for judging the relationship between points and contours, which will not be elaborated here.

[0031] S230, Based on C and D, determine the target point weights corresponding to the point sets of each preset type of object in C, so as to obtain the target point weight list θ = (θ1, θ2, ..., θ...). i , …, θ n ); where θ i C i The corresponding target point weight; θ i =D i / f(i).

[0032] S240, based on θ, determine whether the point cloud contour of the object in the initial point cloud image and the image contour of the corresponding object in the camera image meet the preset overlap condition.

[0033] Furthermore, step S240 may include the following steps:

[0034] S241, Based on θ, determine the target point weight volatility ω = 1 / n × ∑ n i=1 (θ i -(1 / n×∑ n i=1 θ i )) 2 .

[0035] S242, if ω≤WE, then based on θ, determine the overlap between the initial point cloud image and the camera image: λ=1 / n×∑ n i=1 θ i Then proceed to step S243; where WE is a preset target point weight volatility threshold; otherwise, determine that the point cloud contour of the object in the initial point cloud image and the image contour of the corresponding object in the camera image do not meet the preset overlap condition.

[0036] In this embodiment, under normal circumstances, the initial point cloud image and the camera image are misaligned as a whole. Therefore, the target point weight fluctuation rate ω corresponding to θ should be small, that is, the offset ratio between the point cloud corresponding to each preset type of object and the corresponding image in the camera image will not differ greatly. If ω > WE, it can be directly determined that the point cloud contour of the object in the initial point cloud image and the image contour of the corresponding object in the camera image do not meet the preset overlap condition. No further judgment is required, thus improving the judgment efficiency.

[0037] If ω≤WE, it only means that the offset ratio between the point cloud corresponding to each preset type of object and the corresponding image in the camera image is not much different, but it does not mean that the point cloud outline of the object in the initial point cloud image and the image outline of the corresponding object in the camera image meet the preset overlap condition, and further judgment is required.

[0038] S243, if λ≥TU, then the point cloud contour of the object in the initial point cloud image and the image contour of the corresponding object in the camera image satisfy the preset overlap condition; otherwise, the point cloud contour of the object in the initial point cloud image and the image contour of the corresponding object in the camera image do not satisfy the preset overlap condition; where TU is the preset overlap threshold between the initial point cloud image and the camera image.

[0039] Under the premise that ω≤WE, if λ≥TU, it means that the target point weights corresponding to the point set of each preset type of object are relatively large, that is, most of the points of each preset type of object fall within the corresponding object contour in the corresponding camera image; therefore, it can be determined that the point cloud contour of the object in the initial point cloud image and the image contour of the corresponding object in the camera image satisfy the preset coincidence condition; for example, WE<1, 0.9<TU≤1.

[0040] S300, if the preset overlap condition is not met, the first coordinate of each point corresponding to the target object in the initial point cloud image in the lidar coordinate system is obtained to obtain the initial point cloud coordinate matrix A corresponding to the target object; where A includes n rows, each row corresponding to the current first coordinate of a point; the target object is any object among all objects corresponding to the initial point cloud image.

[0041] In this embodiment, the current first coordinates of a point include the X-axis coordinate, Y-axis coordinate, and Z-axis coordinate of that point; it can be understood that the initial point cloud coordinate matrix A contains some points in the point cloud, rather than all points.

[0042] S400, move and / or rotate the initial point cloud image to obtain a target point cloud image; wherein, the point cloud outline of the object in the target point cloud image coincides with the image outline of the corresponding object in the camera image.

[0043] Step S400 may include the following steps:

[0044] S410, acquire the number of objects of each preset type in the camera image.

[0045] S420: Select the object of the preset type with the largest number as the reference object.

[0046] In this embodiment, the number of objects of each preset type can be obtained. For example, if the number of vehicles is 5 and the number of pedestrians is 3, then vehicles are determined as reference objects.

[0047] S430, obtain the first center point of the image corresponding to each reference object in the camera image, so as to obtain a list of first center points ZX = (ZX1, ZX2, ..., ZX...). p ..., ZX q ), p = 1, 2, ..., q; where ZX p Let q be the first center point of the image corresponding to the p-th reference object in the camera image, and q be the number of reference objects in the camera image.

[0048] In this embodiment, the first center point of the image corresponding to the reference object in the camera image can be the center point of the smallest rectangle of the image corresponding to the reference object; those skilled in the art can use existing center point determination methods to determine the first center point of the image corresponding to each reference object in the camera image according to actual needs, which will not be elaborated here.

[0049] S440, based on the position of each first center point in ZX, connect each first center point in ZX sequentially to generate the first closed polygon.

[0050] In this embodiment, the positions of each first center point in ZX can be connected manually, or the positions of each first center point in ZX can be automatically connected using existing connection methods to obtain the first closed polygon; it should be noted that the connection order is recorded when connecting each first center point in ZX.

[0051] S450, obtain the second center point corresponding to each reference object in the point cloud image to obtain the second center point list ZY = (ZY1, ZY2, ..., ZY...). p , ..., ZY q ); among them, ZY p Let be the second center point corresponding to the p-th reference object in the point cloud image.

[0052] In this embodiment, each reference object also corresponds to a sub-point cloud image in the point cloud image, and the sub-point cloud image corresponds to a center point, namely the second center point; the second center point can be determined in the following way:

[0053] Set the minimum bounding box of the sub-point cloud image and determine the center point of the minimum bounding box of the sub-point cloud image. Then, determine the point of the point cloud that is closest to the center point as the second center point of the sub-point cloud.

[0054] S460, according to the connection order of each first center point in ZX, connect each second center point in ZY in sequence to generate a second closed polygon.

[0055] According to the connection order recorded in step S440, each second center point in ZY is connected sequentially to generate a second closed polygon; that is, the connection order of the vertices of the first closed polygon and the second closed polygon is the same.

[0056] S470, move and / or rotate the initial point cloud image so that the first closed shape and the second closed shape coincide to obtain the target point cloud image.

[0057] In this embodiment, the initial point cloud image can be moved and rotated by preset movement and rotation commands. At the same time, it is determined whether the first closed shape and the second closed shape completely overlap. If they completely overlap, the movement and / or rotation are stopped to obtain the target point cloud image. It should be noted that those skilled in the art can use existing graphic overlap judgment methods to determine whether the first closed shape and the second closed shape completely overlap according to actual needs, which will not be elaborated here.

[0058] By determining whether the first closed shape and the second closed shape completely overlap, it is possible to determine whether the initial point cloud image and the camera image overlap. Since the closed shape has few features, the computational load is small and the judgment efficiency is high.

[0059] S500, obtain the second coordinates of each point in the target point cloud image of the target object in the lidar coordinate system to obtain the target point cloud coordinate matrix B corresponding to the target object; wherein, B includes several rows, and each row corresponds to the second coordinates of a point.

[0060] After movement and rotation, the coordinates of each point in the target point cloud image of the target object change in the lidar coordinate system. This allows us to obtain the second coordinate of each point in the lidar coordinate system of the target object, thus obtaining the target point cloud coordinate matrix B corresponding to the target object.

[0061] S600, based on A and B, determine the three-axis rotation parameters M = (α, β, γ) and coordinate translation parameters W = (ΔX, ΔY, ΔZ) corresponding to the conversion of the initial point cloud image into the target point cloud image; where α is the angle of rotation of the initial point cloud image around the Z-axis, β is the angle of rotation of the initial point cloud image around the Y-axis, and γ is the angle of rotation of the initial point cloud image around the X-axis; the rotation order is Z-axis, Y-axis, X-axis; ΔX is the change of the initial point cloud image along the X-axis, ΔY is the change of the initial point cloud image along the Y-axis, and ΔZ is the change of the initial point cloud image along the Z-axis.

[0062] In this embodiment, it should be noted that those skilled in the art can calculate M using existing methods for calculating Euler angles and rotation angles, which will not be elaborated here; W can be obtained by subtracting A and B.

[0063] S700, based on M and W, calibrates the origin of the lidar coordinate system.

[0064] Furthermore, step S700 may include the following steps:

[0065] S710 rotates the lidar coordinate system around the origin, rotating it α around the Z-axis, β around the Y-axis, and γ around the X-axis.

[0066] It should be noted that the direction of rotation around the Z-axis is the same as the direction of rotation of the initial point cloud image around the Z-axis, the direction of rotation around the Y-axis is the same as the direction of rotation of the initial point cloud image around the Y-axis, and the direction of rotation around the X-axis is the same as the direction of rotation of the initial point cloud image around the X-axis.

[0067] S720 moves the origin of the lidar coordinate system by ΔX along the X-axis, ΔY along the Y-axis, and ΔZ along the Z-axis.

[0068] In this embodiment, ΔX, ΔY, and ΔZ can be positive or negative values, and positive and negative values ​​are used to distinguish the direction of movement.

[0069] The lidar calibration method in this embodiment displays the initial point cloud image acquired by the lidar on the mobile energy storage device and the camera image captured by the monocular camera on the same display interface. If the point cloud contour of an object in the initial point cloud image does not meet the preset overlap condition with the image contour of the corresponding object in the camera image, the first coordinate of each point corresponding to the target object in the initial point cloud image in the lidar coordinate system is obtained to obtain the initial point cloud coordinate matrix A corresponding to the target object. The initial point cloud image is moved and / or rotated to obtain the target point cloud image, such that the point cloud contour of the object in the target point cloud image matches the image contour of the corresponding object in the camera image. The contours coincide; then, the second coordinates of each point of the target object in the target point cloud image in the lidar coordinate system are obtained, so as to obtain the target point cloud coordinate matrix B corresponding to the target object; according to A and B, the three-axis rotation parameter M and coordinate movement parameter W corresponding to the target point cloud image are determined. According to M and W, the origin of the lidar coordinate system is calibrated; in the process of calibrating the origin of the lidar coordinate system, only the coordinates of some points in the point cloud image acquired by the lidar are obtained, and the coordinates of the pixels in the camera image are not processed. Therefore, the amount of calculation is small, the accuracy is high and the time consumption is short during the calibration process.

[0070] Furthermore, in this embodiment, the camera is calibrated and fixedly installed on the mobile energy storage device; the relative positions of objects in the camera image are accurate, and the point cloud image acquired by the lidar is based on the camera image when moving and / or rotating. Therefore, the accuracy of the origin calibration of the lidar coordinate system can be further ensured.

[0071] Furthermore, although the steps of the method in this disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or a step may be broken down into multiple steps.

[0072] Embodiments of the present invention also provide a non-transitory computer-readable storage medium that can be disposed in an electronic device to store at least one instruction or at least one program related to implementing a method in the method embodiments, wherein the at least one instruction or the at least one program is loaded and executed by the processor to implement the method provided in the above embodiments.

[0073] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0074] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting programs for use by or in conjunction with an instruction execution system, apparatus, or device.

[0075] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0076] Program code for performing the operations of this application can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0077] Embodiments of the present invention also provide an electronic device, including a processor and the aforementioned non-transitory computer-readable storage medium.

[0078] An electronic device according to this embodiment of the present application. The electronic device is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present application.

[0079] Electronic devices are manifested in the form of general-purpose computing devices. Components of an electronic device may include, but are not limited to: at least one processor, at least one memory, and buses connecting different system components (including memory and processor).

[0080] The storage device stores program code that can be executed by the processor to perform the steps described in the "Exemplary Methods" section above, according to various exemplary embodiments of this application.

[0081] The storage may include readable media in the form of volatile storage, such as random access memory (RAM) and / or cache memory, and may further include read-only memory (ROM).

[0082] The storage may also include programs / utilities having a set (at least one) of program modules, including but not limited to: an operating system, one or more applications, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.

[0083] A bus can represent one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus that uses any of the various bus architectures.

[0084] The electronic device can also communicate with one or more external devices (e.g., keyboards, pointing devices, Bluetooth devices, etc.), one or more devices that enable a user to interact with the electronic device, and / or any device that enables the electronic device to communicate with one or more other computing devices (e.g., routers, modems, etc.). This communication can be achieved through input / output (I / O) interfaces. Furthermore, the electronic device can communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter. The network adapter communicates with other modules of the electronic device via a bus. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with the electronic device, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0085] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the methods according to the embodiments of this disclosure.

[0086] Embodiments of the present invention also provide a computer program product including program code, which, when the program product is run on an electronic device, causes the electronic device to perform the steps of the methods described above in various exemplary embodiments of the present invention.

[0087] While specific embodiments of the invention have been described in detail by way of examples, those skilled in the art should understand that the examples are for illustrative purposes only and are not intended to limit the scope of the invention. Those skilled in the art should also understand that various modifications can be made to the embodiments without departing from the scope and spirit of the invention.

Claims

1. A calibration method for a lidar, characterized in that, The method includes the following steps: S100 displays the initial point cloud image and the camera image on the same display interface; the initial point cloud image is acquired by LiDAR, and the camera image is captured by a monocular camera; both the LiDAR and the monocular camera are fixedly installed on the same mobile energy storage device; the monocular camera has been calibrated. S210, Obtain each point corresponding to each preset type of object in the initial point cloud image to obtain a point set list C = (C1, C2, ..., C...) for the preset type of object. i C n ), i = 1, 2, ..., n; where C i Let C be the point set corresponding to the i-th preset type of object, and n be the number of preset type objects in the point cloud image; i =(C i,1 C i,2 C i,j C i,f(i) ), j=1,2,…,f(i);C i,j Let f(i) be the j-th point in the point set corresponding to the i-th preset type of object, and f(i) be the number of points in the point set corresponding to the i-th preset type of object. S220, obtain the number of target points in each point set in C, to obtain a list of target point counts D = (D1, D2, ..., D...). i D n ); where D i C i The number of corresponding target points; C i The corresponding target point is located at C. i Points within the corresponding image contour in the camera image; S230, Based on C and D, determine the target point weights corresponding to the point sets of each preset type of object in C, so as to obtain the target point weight list θ = (θ1, θ2, ..., θ...). i , …, θ n ); where θ i C i The corresponding target point weight; θ i =D i / f(i); S241, Based on θ, determine the target point weight volatility ω = 1 / n × ∑ n i=1 (θ i -(1 / n×∑ n i=1 θ i )) 2 ; S242, if ω≤WE, then based on θ, determine the overlap between the initial point cloud image and the camera image: λ=1 / n×∑ n i=1 θ i Then proceed to step S243; where WE is the preset target point weight volatility threshold; otherwise, determine that the point cloud contour of the object in the initial point cloud image and the image contour of the corresponding object in the camera image do not meet the preset overlap condition. S243, if λ≥TU, then the point cloud contour of the object in the initial point cloud image and the image contour of the corresponding object in the camera image satisfy the preset overlap condition; otherwise, the point cloud contour of the object in the initial point cloud image and the image contour of the corresponding object in the camera image do not satisfy the preset overlap condition; where TU is the preset overlap threshold between the initial point cloud image and the camera image. S300, if the preset overlap condition is not met, the first coordinate of each point corresponding to the target object in the initial point cloud image in the lidar coordinate system is obtained to obtain the initial point cloud coordinate matrix A corresponding to the target object; where A includes n rows, each row corresponding to the current first coordinate of a point; the target object is any object among all objects corresponding to the initial point cloud image. S400, move and / or rotate the initial point cloud image to obtain a target point cloud image; wherein, the point cloud outline of the object in the target point cloud image coincides with the image outline of the corresponding object in the camera image; S500, obtain the second coordinates of each point in the target point cloud image of the target object in the lidar coordinate system to obtain the target point cloud coordinate matrix B corresponding to the target object; wherein, B includes several rows, and each row corresponds to the second coordinates of a point; S600, based on A and B, determine the three-axis rotation parameters M = (α, β, γ) and coordinate translation parameters W = (ΔX, ΔY, ΔZ) corresponding to the conversion of the initial point cloud image into the target point cloud image; where α is the angle of rotation of the initial point cloud image around the Z-axis, β is the angle of rotation of the initial point cloud image around the Y-axis, and γ is the angle of rotation of the initial point cloud image around the X-axis; the rotation order is Z-axis, Y-axis, X-axis; ΔX is the change of the initial point cloud image along the X-axis, ΔY is the change of the initial point cloud image along the Y-axis, and ΔZ is the change of the initial point cloud image along the Z-axis. S700, based on M and W, calibrates the origin of the lidar coordinate system.

2. The calibration method for a lidar according to claim 1, characterized in that, Step S400 includes the following steps: S410, acquire the number of objects of each preset type in the camera image; S420, Identify the object of the preset type with the largest number as the reference object; S430, Obtain the first center point of the image corresponding to each reference object in the camera image, so as to obtain a list of first center points ZX = (ZX1, ZX2, ..., ZX...). p ..., ZX q ), p=1,2,…,q; where ZX p Let q be the first center point of the image corresponding to the p-th reference object in the camera image, and q be the number of reference objects in the camera image. S440, Based on the position of each first center point in ZX, connect each first center point in ZX in sequence to generate a first closed polygon; S450, obtain the second center point corresponding to each reference object in the point cloud image to obtain the second center point list ZY = (ZY1, ZY2, ..., ZY...). p , ..., ZY q ); among them, ZY p This is the second center point corresponding to the p-th reference object in the point cloud image; S460, according to the connection order of each first center point in ZX, connect each second center point in ZY in sequence to generate a second closed polygon; S470, move and / or rotate the initial point cloud image so that the first closed shape and the second closed shape coincide to obtain the target point cloud image.

3. The calibration method for a lidar according to claim 1, characterized in that, Step S700 includes the following steps: S710 rotates the lidar coordinate system around the origin, with the origin as the center of rotation, around the Z-axis by α, around the Y-axis by β, and around the X-axis by γ. S720 moves the origin of the lidar coordinate system by ΔX along the X-axis, ΔY along the Y-axis, and ΔZ along the Z-axis.

4. The calibration method for a lidar according to claim 1, characterized in that, WE < 1, 0.9 < TU ≤ 1.

5. The calibration method for a lidar according to claim 2, characterized in that, Preset object types include: vehicles, buildings, and pedestrians.

6. A non-transitory computer-readable storage medium, wherein the storage medium stores at least one instruction or at least one program segment, characterized in that, The at least one instruction or the at least one program segment is loaded and executed by the processor to implement the lidar calibration method as described in any one of claims 1-5.

7. An electronic device, characterized in that, Includes a processor and the non-transitory computer-readable storage medium as described in claim 6.

Citation Information

Patent Citations

  • Laser radar and camera combined calibration method and device, equipment and storage medium

    CN112446927A