CN114140507A - Depth estimation method, device and device for fusion of lidar and binocular camera - Google Patents

Depth estimation method, device and device for fusion of lidar and binocular camera Download PDF

Info

Publication number
CN114140507A
CN114140507A CN202111261395.7A CN202111261395A CN114140507A CN 114140507 A CN114140507 A CN 114140507A CN 202111261395 A CN202111261395 A CN 202111261395A CN 114140507 A CN114140507 A CN 114140507A
Authority
CN
China
Prior art keywords
radar
disparity map
binocular camera
image information
lidar
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111261395.7A
Other languages
Chinese (zh)
Other versions
CN114140507B (en
Inventor
李恩
徐光耀
杨国栋
梁自泽
景奉水
龙晓宇
陈铭浩
田雨农
郭锐
李勇
刘海波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Institute of Automation of Chinese Academy of Science
State Grid Shandong Electric Power Co Ltd
Original Assignee
Institute of Automation of Chinese Academy of Science
State Grid Shandong Electric Power Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Institute of Automation of Chinese Academy of Science, State Grid Shandong Electric Power Co Ltd filed Critical Institute of Automation of Chinese Academy of Science
Priority to CN202111261395.7A priority Critical patent/CN114140507B/en
Publication of CN114140507A publication Critical patent/CN114140507A/en
Application granted granted Critical
Publication of CN114140507B publication Critical patent/CN114140507B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/50Depth or shape recovery
    • G06T7/55Depth or shape recovery from multiple images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/06Topological mapping of higher dimensional structures onto lower dimensional surfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4007Scaling of whole images or parts thereof, e.g. expanding or contracting based on interpolation, e.g. bilinear interpolation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/97Determining parameters from multiple pictures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10028Range image; Depth image; 3D point clouds
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10032Satellite or aerial image; Remote sensing
    • G06T2207/10044Radar image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20228Disparity calculation for image-based rendering

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Processing (AREA)
  • Length Measuring Devices By Optical Means (AREA)
  • Optical Radar Systems And Details Thereof (AREA)

Abstract

The invention provides a depth estimation method, a device and equipment for fusing a laser radar and a binocular camera, wherein the method comprises the following steps: acquiring scene depth information and image information through a radar camera, wherein the radar camera comprises a laser radar and a binocular camera; calibrating the scene depth information and the image information to obtain a pose transformation matrix of the laser radar and the binocular camera; projecting the scene depth information to an image plane of the image information according to the pose transformation matrix to obtain a radar disparity map; carrying out bilinear interpolation on the radar disparity map to obtain an up-sampling radar disparity map; and fusing the up-sampling radar disparity map and the image information to obtain a target disparity map, so that the method can effectively adapt to scenes with difficult control of conditions such as outdoor illumination, object textures and the like, and can effectively improve matching accuracy.

Description

融合激光雷达和双目相机的深度估计方法、装置及设备Depth estimation method, device and device for fusion of lidar and binocular camera

技术领域technical field

本发明涉及三维重建技术领域,尤其涉及一种融合激光雷达和双目相机的深度估计方法、装置及设备。The present invention relates to the technical field of three-dimensional reconstruction, and in particular, to a depth estimation method, device and device integrating laser radar and binocular camera.

背景技术Background technique

许多任务需要获取环境的深度信息,尤其是移动机器人和电脑视觉应用,例如三维重建、SLAM、自动驾驶和机器人路径规划。深度信息测量是三维视觉中的一个基本问题。在近年来,越来越多的学者开始关注这一领域并提出了几种新方法。这些方法主要分为两类:传统方法和深度学习方法。深度学习方法可以也分为有监督的方法和无监督的方法。监督的方法需要大量真实的深度数据作为ground truth。这些ground truth需要高精度结构光传感器或者激光雷达来获取,成本非常高。然而,无监督方法不需要这些ground truth,其基本思想是利用光度误差用于指导训练的左右图像神经网络。Many tasks require obtaining depth information of the environment, especially mobile robotics and computer vision applications such as 3D reconstruction, SLAM, autonomous driving, and robotic path planning. Depth information measurement is a fundamental problem in 3D vision. In recent years, more and more scholars have begun to pay attention to this field and proposed several new methods. These methods are mainly divided into two categories: traditional methods and deep learning methods. Deep learning methods can also be divided into supervised methods and unsupervised methods. Supervised methods require a large amount of real depth data as ground truth. These ground truths require high-precision structured light sensors or lidars to obtain, and the cost is very high. However, unsupervised methods do not require these ground truths, and the basic idea is to use the photometric error to guide the training of left and right image neural networks.

但无监督方法也需要大量的高质量立体图像来训练参数。另一方面,存在一些实现深度估计的传统技术,但它们通常具有一些限制。例如,RGB-D相机可以快速得到视差图,而视图差的质量取决于户外环境。因为阳光会影响RGB-D相机的结构光传感器。同时,光线也对立体算法有影响。例如,由于一些原因,部分图像可能会过度曝光。另外,立体算法有对图片中场景也有一定的要求。例如,场景需要有丰富的纹理和合适的照明状况。But unsupervised methods also require a large number of high-quality stereo images to train parameters. On the other hand, there are some conventional techniques for implementing depth estimation, but they usually have some limitations. For example, an RGB-D camera can quickly get a disparity map, and the quality of the disparity depends on the outdoor environment. Because sunlight affects the structured light sensor of an RGB-D camera. At the same time, light also has an impact on the stereo algorithm. For example, parts of the image may be overexposed for a number of reasons. In addition, the stereo algorithm has certain requirements for the scene in the picture. For example, the scene needs to have rich textures and suitable lighting conditions.

因此,对于具有挑战性户外的照明和物体的纹理等条件难以控制的场景中,双目立体匹配方法匹配精确度相对较低。Therefore, the matching accuracy of the binocular stereo matching method is relatively low for challenging outdoor scenes where conditions such as lighting and object texture are difficult to control.

发明内容SUMMARY OF THE INVENTION

本发明提供一种融合激光雷达和双目相机的深度估计方法、装置及设备,用以解决现有技术中双目立体匹配方法对目标纹理的依赖和光照变化等因素的缺陷,有效提高匹配精确度。The present invention provides a depth estimation method, device and equipment integrating laser radar and binocular camera, which are used to solve the defects of the binocular stereo matching method in the prior art, such as dependence on target texture and illumination changes, and effectively improve the matching accuracy. Spend.

本发明提供一种融合激光雷达和双目相机的深度估计方法,包括:The present invention provides a depth estimation method that integrates lidar and binocular cameras, including:

通过雷达相机采集场景深度信息和图像信息,所述雷达相机包括激光雷达和双目相机;Collect scene depth information and image information through a radar camera, the radar camera includes a lidar and a binocular camera;

对所述场景深度信息和所述图像信息进行标定,得到所述激光雷达和所述双目相机的位姿变换矩阵;calibrating the scene depth information and the image information to obtain the pose transformation matrix of the lidar and the binocular camera;

根据所述位姿变换矩阵,投影所述场景深度信息至所述图像信息的图像平面上,得到雷达视差图;According to the pose transformation matrix, project the scene depth information onto the image plane of the image information to obtain a radar disparity map;

对所述雷达视差图进行双线性插值,得到上采样雷达视差图;performing bilinear interpolation on the radar disparity map to obtain an up-sampled radar disparity map;

将所述上采样雷达视差图与所述图像信息进行融合,得到目标视差图。The up-sampled radar disparity map is fused with the image information to obtain a target disparity map.

根据本发明提供的一种融合激光雷达和双目相机的深度估计方法,所述对所述雷达视差图进行双线性插值,得到上采样雷达视差图之前,还包括:According to a depth estimation method for fusion of lidar and binocular camera provided by the present invention, before performing bilinear interpolation on the radar disparity map to obtain the up-sampled radar disparity map, the method further includes:

识别所述雷达视差图中的异常投影点,并将所述异常投影点进行清除。Identify abnormal projection points in the radar disparity map, and remove the abnormal projection points.

根据本发明提供的一种融合激光雷达和双目相机的深度估计方法,所述识别所述雷达视差图中的异常投影点,包括:According to a depth estimation method that integrates lidar and binocular cameras provided by the present invention, the identifying abnormal projection points in the radar disparity map includes:

补全所述激光雷达的扫描线;Completing the scan lines of the lidar;

当目标扫描线的雷达深度均大于与所述扫描线相邻的第一扫描线的第一雷达深度和第二扫描线的第二雷达深度时,确定所述目标扫描线为异常投影点组成。When the radar depth of the target scan line is greater than the first radar depth of the first scan line and the second radar depth of the second scan line adjacent to the scan line, it is determined that the target scan line is composed of abnormal projection points.

根据本发明提供的一种融合激光雷达和双目相机的深度估计方法,所述对所述场景深度信息和所述图像信息进行标定,得到所述激光雷达和所述双目相机的位姿变换矩阵,包括:According to a depth estimation method for fusion of lidar and binocular camera provided by the present invention, the scene depth information and the image information are calibrated to obtain the pose transformation of the lidar and the binocular camera matrix, including:

根据所述图像信息,标定所述双目相机的第一相机和第二相机的第一空间相对位置关系;According to the image information, calibrating the first relative positional relationship in space between the first camera and the second camera of the binocular camera;

根据所述场景深度信息和所述图像信息,标定所述激光雷达与所述双目相机的第二空间相对位置关系;According to the scene depth information and the image information, calibrating the second spatial relative position relationship between the lidar and the binocular camera;

根据所述第一空间相对位置关系和所述第二空间相对位置关系,构建所述激光雷达和所述双目相机的位姿变换矩阵。According to the first spatial relative position relationship and the second spatial relative position relationship, a pose transformation matrix of the lidar and the binocular camera is constructed.

根据本发明提供的一种融合激光雷达和双目相机的深度估计方法,所述将所述上采样雷达视差图与所述图像信息进行融合,得到目标视差图,包括:According to a depth estimation method for fusing a lidar and a binocular camera provided by the present invention, the upsampling radar disparity map and the image information are fused to obtain a target disparity map, including:

根据所述上采样雷达视差图与所述图像信息,确定倾斜窗口模型参数;determining the oblique window model parameters according to the up-sampled radar disparity map and the image information;

根据所述倾斜窗口模型参数,确定倾斜平面,并确定所述倾斜平面中任一像素的匹配代价确定规则;Determine an inclined plane according to the inclined window model parameters, and determine a matching cost determination rule for any pixel in the inclined plane;

根据所述匹配代价确定规则,确定最小化代价的视差图作为目标视差图。According to the matching cost determination rule, the disparity map that minimizes the cost is determined as the target disparity map.

根据本发明提供的一种融合激光雷达和双目相机的深度估计方法,所述根据所述匹配代价确定规则,确定最小化代价的视差图作为目标视差图,包括:According to a depth estimation method for fusion of lidar and binocular camera provided by the present invention, determining the disparity map that minimizes the cost as the target disparity map according to the matching cost determination rule, including:

对所述倾斜平面进行随机初始化,得到初始化平面模型;Perform random initialization on the inclined plane to obtain an initialization plane model;

基于所述初始化平面模型,进行视差传播,确定所述视差传播达到预设次数时匹配代价最小的平面对应的视差图作为目标视差图。Based on the initialized plane model, disparity propagation is performed, and when the disparity propagation reaches a preset number of times, the disparity map corresponding to the plane with the smallest matching cost is determined as the target disparity map.

根据本发明提供的一种融合激光雷达和双目相机的深度估计方法,所述进行视差传播之后,还包括:According to a depth estimation method for fusion of lidar and binocular camera provided by the present invention, after the parallax propagation is performed, the method further includes:

基于预先确定的最大视差和法向量变化范围,对所述视差传播达到预设次数时匹配代价最小的平面进行优化。Based on the predetermined maximum disparity and normal vector variation ranges, the plane with the smallest matching cost is optimized when the disparity propagation reaches a preset number of times.

本发明还提供一种融合激光雷达和双目相机的深度估计装置,包括:The present invention also provides a depth estimation device integrating lidar and binocular camera, including:

采集模块,用于通过雷达相机采集场景深度信息和图像信息,所述雷达相机包括激光雷达和双目相机;an acquisition module, used for acquiring scene depth information and image information through a radar camera, where the radar camera includes a lidar and a binocular camera;

标定模块,用于对所述场景深度信息和所述图像信息进行标定,得到所述激光雷达和所述双目相机的位姿变换矩阵;a calibration module, configured to calibrate the scene depth information and the image information to obtain the pose transformation matrix of the lidar and the binocular camera;

投影模块,用于根据所述位姿变换矩阵,投影所述场景深度信息至所述图像信息的图像平面上,得到雷达视差图;a projection module, configured to project the scene depth information onto the image plane of the image information according to the pose transformation matrix to obtain a radar disparity map;

上采样模块,用于对所述雷达视差图进行双线性插值,得到上采样雷达视差图;an up-sampling module for performing bilinear interpolation on the radar disparity map to obtain an up-sampling radar disparity map;

融合模块,用于将所述上采样雷达视差图与所述图像信息进行融合,得到目标视差图。A fusion module, configured to fuse the up-sampled radar disparity map with the image information to obtain a target disparity map.

本发明还提供一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现如上述任一种所述融合激光雷达和双目相机的深度估计方法的步骤。The present invention also provides an electronic device, including a memory, a processor and a computer program stored in the memory and running on the processor, the processor implements the fusion lidar as described in any one of the above when the processor executes the program and steps of the depth estimation method for binocular cameras.

本发明还提供一种非暂态计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现如上述任一种所述融合激光雷达和双目相机的深度估计方法的步骤。The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, realizes the depth estimation method of fusion laser radar and binocular camera as described in any one of the above. step.

本发明还提供一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现如上述任一种所述融合激光雷达和双目相机的深度估计方法的步骤。The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of any of the above-mentioned depth estimation methods for fusion of lidar and binocular cameras.

本发明提供的一种融合激光雷达和双目相机的深度估计方法、装置及设备,方法包括:通过雷达相机采集场景深度信息和图像信息,所述雷达相机包括激光雷达和双目相机;对所述场景深度信息和所述图像信息进行标定,得到所述激光雷达和所述双目相机的位姿变换矩阵;根据所述位姿变换矩阵,投影所述场景深度信息至所述图像信息的图像平面上,得到雷达视差图;对所述雷达视差图进行双线性插值,得到上采样雷达视差图;将所述上采样雷达视差图与所述图像信息进行融合,得到目标视差图,可以有效地适应户外照明和物体的纹理等条件难以控制的场景,能够有效地提高匹配的精确度,并且能够快速并且鲁棒地估计复杂环境下的深度值,具有较强实用性和工程价值。The present invention provides a depth estimation method, device and device for fusing a laser radar and a binocular camera. The method includes: collecting scene depth information and image information through a radar camera, the radar camera including a laser radar and a binocular camera; The scene depth information and the image information are calibrated to obtain the pose transformation matrix of the lidar and the binocular camera; according to the pose transformation matrix, the scene depth information is projected to the image of the image information On the plane, a radar disparity map is obtained; bilinear interpolation is performed on the radar disparity map to obtain an up-sampled radar disparity map; the up-sampled radar disparity map is fused with the image information to obtain a target disparity map, which can effectively It can effectively improve the matching accuracy, and can quickly and robustly estimate the depth value in complex environments, which has strong practicability and engineering value.

附图说明Description of drawings

为了更清楚地说明本发明或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the present invention or the technical solutions in the prior art more clearly, the following will briefly introduce the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are the For some embodiments of the invention, for those of ordinary skill in the art, other drawings can also be obtained according to these drawings without any creative effort.

图1是本发明实施例提供的融合激光雷达和双目相机的深度估计方法的流程示意图;1 is a schematic flowchart of a depth estimation method for fusing a lidar and a binocular camera provided by an embodiment of the present invention;

图2是本发明实施例提供的雷达相机的安装位置关系示意图;2 is a schematic diagram of an installation position relationship of a radar camera provided by an embodiment of the present invention;

图3是本发明实施例提供的对雷达扫描线和扫描线之间的点的定义示意图;3 is a schematic diagram of the definition of a radar scan line and a point between the scan lines provided by an embodiment of the present invention;

图4是本发明实施例提供的倾斜窗口和平行窗口的示意图;4 is a schematic diagram of an inclined window and a parallel window provided by an embodiment of the present invention;

图5是本发明实施例提供的融合激光雷达和双目相机的深度估计装置的结构示意图;5 is a schematic structural diagram of a depth estimation device for fusing a lidar and a binocular camera provided by an embodiment of the present invention;

图6是本发明实施例提供的电子设备的结构示意图。FIG. 6 is a schematic structural diagram of an electronic device provided by an embodiment of the present invention.

具体实施方式Detailed ways

为使本发明的目的、技术方案和优点更加清楚,下面将结合本发明中的附图,对本发明中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the objectives, technical solutions and advantages of the present invention clearer, the technical solutions in the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention. , not all examples. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

下面结合图1-图6描述本发明的一种融合激光雷达和双目相机的深度估计方法、装置及设备。The following describes a depth estimation method, apparatus, and device for integrating lidar and binocular cameras of the present invention with reference to FIGS. 1-6 .

图1是本发明实施例提供的融合激光雷达和双目相机的深度估计方法的流程示意图;图2是本发明实施例提供的雷达相机的安装位置关系示意图;图3是本发明实施例提供的对雷达扫描线和扫描线之间的点的定义示意图;图4是本发明实施例提供的倾斜窗口和平行窗口的示意图。1 is a schematic flowchart of a depth estimation method for fusing a lidar and a binocular camera provided by an embodiment of the present invention; FIG. 2 is a schematic diagram of an installation position relationship of a radar camera provided by an embodiment of the present invention; FIG. 3 is provided by an embodiment of the present invention. A schematic diagram of the definition of a radar scan line and a point between the scan lines; FIG. 4 is a schematic diagram of an inclined window and a parallel window provided by an embodiment of the present invention.

如图1所示,本发明实施例提供的一种融合激光雷达和双目相机的深度估计方法,包括以下步骤:As shown in FIG. 1 , a depth estimation method for fusing a lidar and a binocular camera provided by an embodiment of the present invention includes the following steps:

101、通过雷达相机采集场景深度信息和图像信息,雷达相机包括激光雷达和双目相机。101. Collect scene depth information and image information through a radar camera, where the radar camera includes a lidar and a binocular camera.

具体的,雷达相机是指激光雷达与双目相机,其中,激光雷达可以是机械旋转式多线激光雷达,也可以使用固态多线激光雷达,也可以使用单线激光雷达通过配准生成多条扫描线。如图2所示为本实施例提供的激光雷达与双目相机的安装位置关系示意图,LiDAR表示激光雷达,Zed表示双目相机,其中,双目相机和激光雷达的相对位置可以变化,根据双目相机的不同视角,位置变化范围也不同,只要雷达数据可以投影到所需位置即可。具体的采集场景深度信息的方式则可以是,激光雷达通过对被测物体发射激光光束,并接收该激光光束的反射波,记录该时间差,来确定被测物体与测试点的距离。双目相机是由两个普通相机组成,利用光学原理,三角测量原理获取场景深度。Specifically, a radar camera refers to a lidar and a binocular camera. The lidar can be a mechanical rotating multi-line lidar, a solid-state multi-line lidar, or a single-line lidar to generate multiple scans through registration. Wire. Figure 2 shows a schematic diagram of the installation position relationship between the lidar and the binocular camera provided in this embodiment. LiDAR represents the lidar, and Zed represents the binocular camera. The relative positions of the binocular camera and the lidar can be changed. Depending on the angle of view of the camera, the range of position variation is also different, as long as the radar data can be projected to the desired position. The specific way to collect scene depth information may be that the lidar transmits a laser beam to the measured object, receives the reflected wave of the laser beam, and records the time difference to determine the distance between the measured object and the test point. The binocular camera is composed of two ordinary cameras, and uses the principle of optics and triangulation to obtain the depth of the scene.

102、对场景深度信息和图像信息进行标定,得到激光雷达和双目相机的位姿变换矩阵。102. Calibrate the scene depth information and image information to obtain the pose transformation matrix of the lidar and the binocular camera.

具体的,对场景深度信息和图像信息进行标定,得到激光雷达和双目相机的位姿变换矩阵,则可以分为两部分,一部分是双目相机的标定,一部分是雷达相机的标定。双目相机的标定则可以是根据图像信息,标定双目相机的第一相机和第二相机的第一空间相对位置关系,也就是获取双目相机的两个相机的图像信息,然后通过标定算法计算双目相机的内部参数、镜头畸变参数和两个相机的空间相对位置关系。而标定雷达相机的过程则可以是,根据场景深度信息和图像信息,标定激光雷达与双目相机的第二空间相对位置关系,也就是根据场景深度信息和图像信息,通过算法获取激光雷达和左(右)相机即第一相机和第二相机的空间相对位置关系。然后根据第一空间相对位置关系和第二空间相对位置关系,构建激光雷达和双目相机的位姿变换矩阵。Specifically, the scene depth information and image information are calibrated to obtain the pose transformation matrix of the lidar and the binocular camera, which can be divided into two parts, one is the calibration of the binocular camera, and the other is the calibration of the radar camera. The calibration of the binocular camera can be based on the image information, calibrating the first relative positional relationship between the first camera and the second camera of the binocular camera, that is, to obtain the image information of the two cameras of the binocular camera, and then through the calibration algorithm Calculate the internal parameters of the binocular camera, the lens distortion parameters and the relative spatial relationship between the two cameras. The process of calibrating the radar camera can be, according to the scene depth information and image information, calibrating the second space relative position relationship between the lidar and the binocular camera, that is, according to the scene depth information and image information, obtain the lidar and left by algorithm through the algorithm. (Right) The spatial relative positional relationship between the cameras, namely the first camera and the second camera. Then, according to the first spatial relative position relationship and the second spatial relative position relationship, the pose transformation matrix of the lidar and the binocular camera is constructed.

103、根据位姿变换矩阵,投影场景深度信息至图像信息的图像平面上,得到雷达视差图。103. Project the scene depth information onto the image plane of the image information according to the pose transformation matrix to obtain a radar disparity map.

具体的,可以是基于位姿变换矩阵,通过将雷达点通过雷达相机相对位置关系、相机的内部参数和畸变参数投影到相机的图像信息的图像平面上,得到雷达视差图。Specifically, based on the pose transformation matrix, the radar disparity map can be obtained by projecting the radar points onto the image plane of the image information of the camera through the relative position relationship of the radar camera, the internal parameters of the camera and the distortion parameters.

104、对雷达视差图进行双线性插值,得到上采样雷达视差图。104. Perform bilinear interpolation on the radar disparity map to obtain an up-sampled radar disparity map.

在获取到雷达视差图以后,对雷达视差图进行双线性插值填补扫描线之间的空隙,得到上采样雷达视差图。其中,双线性插值的公式如式(1)所示:After the radar disparity map is obtained, bilinear interpolation is performed on the radar disparity map to fill the gap between the scan lines, and the up-sampled radar disparity map is obtained. Among them, the formula of bilinear interpolation is shown in formula (1):

Figure BDA0003325859290000071
Figure BDA0003325859290000071

其中,π(x,y)是坐标在(x,y)处的视差值。ydown和yup是(x,y)在y轴方向上的雷达扫描线上的点。如图3所示,ydown是在点(x,y)下方的扫描线上的y轴坐标。同理,yup是在点(x,y)上方的扫描线上的y轴坐标。如果存在一个像素的上方或者下方不存在雷达扫描线,则赋予该像素一个全局最大值。where π(x, y) is the disparity value at the coordinates (x, y). y down and y up are (x, y) points on the radar scan line in the y-axis direction. As shown in Figure 3, y down is the y-axis coordinate on the scan line below the point (x,y). Similarly, y up is the y-axis coordinate on the scan line above the point (x,y). If there is no radar scan line above or below a pixel, the pixel is assigned a global maximum value.

105、将上采样雷达视差图与图像信息进行融合,得到目标视差图。105. Fusion of the up-sampled radar disparity map and image information to obtain a target disparity map.

在进行上采样得到上采样雷达视差图之后,将上采样雷达视差图和图像的RGB信息进行融合得到最优视差图,也就是目标视差图。具体的方式则可以是,根据上采样雷达视差图与图像信息,确定倾斜窗口模型参数;根据倾斜窗口模型参数,确定倾斜平面,倾斜窗口由像素坐标(x,y),视差d和该点的法向量n=(nx,ny,nz)确定唯一的倾斜平面

Figure BDA0003325859290000081
如果法向量n为0,则倾斜窗口退化为平行窗口;平面可以被表示为公式(2)After up-sampling to obtain the up-sampled radar disparity map, the up-sampled radar disparity map and the RGB information of the image are fused to obtain the optimal disparity map, that is, the target disparity map. The specific method may be: according to the up-sampled radar disparity map and image information, determine the parameters of the oblique window model; according to the parameters of the oblique window model, determine the oblique plane, and the oblique window is composed of pixel coordinates (x, y), disparity d and the point The normal vector n=(n x , ny ,n z ) determines the unique inclined plane
Figure BDA0003325859290000081
If the normal vector n is 0, the slanted window degenerates into a parallel window; the plane can be expressed as Equation (2)

Figure BDA0003325859290000082
Figure BDA0003325859290000082

其中,(x,y,d)是视差平面上的一点,

Figure BDA0003325859290000083
Figure BDA0003325859290000084
是倾斜平面的三个参数;这三个参数被下面的公式(3)(4)(5)确定:where (x, y, d) is a point on the parallax plane,
Figure BDA0003325859290000083
and
Figure BDA0003325859290000084
are the three parameters of the inclined plane; these three parameters are determined by the following equations (3)(4)(5):

Figure BDA0003325859290000085
Figure BDA0003325859290000085

Figure BDA0003325859290000086
Figure BDA0003325859290000086

Figure BDA0003325859290000087
Figure BDA0003325859290000087

如图4所示,为倾斜窗口和平行窗口的比较,通过图4可以清晰的了解到倾斜窗口对倾斜平面具有更好地适应效果。其中,slanted support window表示倾斜窗口,front-parallel window表示平行窗口。As shown in FIG. 4 , for the comparison between the inclined window and the parallel window, it can be clearly understood from FIG. 4 that the inclined window has a better adaptation effect to the inclined plane. Among them, the slanted support window represents a slanted window, and the front-parallel window represents a parallel window.

在所有的倾斜平面的参数被确定好之后,确定倾斜平面中任一像素的匹配代价确定规则,可以定义平面中像素p的匹配代价,公式如(6)所示:After all the parameters of the inclined plane are determined, the matching cost determination rule of any pixel in the inclined plane is determined, and the matching cost of the pixel p in the plane can be defined. The formula is shown in (6):

Figure BDA0003325859290000088
Figure BDA0003325859290000088

其中,

Figure BDA0003325859290000089
是像素p所在平面,wp是以像素p为中心的一个方形窗口,(p′,d′)是像素p窗口内的像素和视差。in,
Figure BDA0003325859290000089
is the plane where the pixel p is located, w p is a square window centered on the pixel p, and (p', d') is the pixel and disparity within the window of the pixel p.

公式ω(p,p′)可以表示为式(7):The formula ω(p, p′) can be expressed as formula (7):

Figure BDA0003325859290000091
Figure BDA0003325859290000091

其中,‖Ip-Ip′‖是像素p和像素p′在RGB空间的L1距离,γ是一个自定义参数,在该算法中,γ的值设置为10;Among them, ‖I p -I p' ‖ is the L 1 distance between pixel p and pixel p' in RGB space, γ is a custom parameter, in this algorithm, the value of γ is set to 10;

公式

Figure BDA0003325859290000092
表示为式(8):formula
Figure BDA0003325859290000092
Expressed as formula (8):

ρ(p′,q)=α·min(‖Ip′-Iq‖,τcol)+β·min(|πp′-d′|,τdisp) (8)ρ(p′,q)=α·min(‖I p′ -I q ‖,τ col )+β·min(|π p′ -d′|,τ disp ) (8)

其中,q代表

Figure BDA0003325859290000093
表示在另一幅视图中同名点;min()表示在两个值中去最小值;α和β是颜色和视差所占比例的大小,它们的和是1;τcol和τdisp分别是颜色和视差的截断代价;当存在遮挡时,截断代价防止匹配代价过大;‖Ip′-Iq‖表示像素p′和像素q在RGB空间的L1距离;|πp′-d′|表示像素p′在上采样视差图中的视差和像素p′在平面
Figure BDA0003325859290000094
中视差的绝对差值。Among them, q represents
Figure BDA0003325859290000093
Indicates the point with the same name in another view; min() indicates the minimum value among the two values; α and β are the proportions of color and disparity, and their sum is 1; τ col and τ disp are color, respectively and the truncation cost of disparity; when there is occlusion, the truncation cost prevents the matching cost from being too large; ‖I p' -I q ‖ represents the L 1 distance between pixel p' and pixel q in RGB space; |π p' -d'| represents the disparity of pixel p' in the upsampled disparity map and the pixel p' in the plane
Figure BDA0003325859290000094
The absolute difference in parallax.

然后,便可以根据匹配代价确定规则,确定最小化代价的视差图作为目标视差图。Then, according to the matching cost determination rule, the disparity map that minimizes the cost can be determined as the target disparity map.

其中,根据匹配代价确定规则,确定最小化代价的视差图作为目标视差图,包括:对倾斜平面进行随机初始化,得到初始化平面模型,也就是在倾斜平面模型被确定后,模型的参数x,y,d,nx,ny,nz需要被确定;如果像素p′(x,y)在上采样视差图中存在视差d′,则将d′的值赋值给d;如果不存在这样的值,则将最大和最小视差之间的值赋值给d;同时选择一个随机的单位法向量赋值给nx,ny,nzAmong them, according to the matching cost determination rule, the disparity map that minimizes the cost is determined as the target disparity map, including: randomly initializing the oblique plane to obtain an initialization plane model, that is, after the oblique plane model is determined, the parameters of the model x, y ,d,n x , ny ,n z need to be determined; if pixel p′(x,y) has disparity d′ in the upsampled disparity map, assign the value of d′ to d; if there is no such value, the value between the maximum and minimum disparity is assigned to d; at the same time, a random unit normal vector is selected and assigned to n x , n y , and n z .

然后,基于初始化平面模型,进行视差传播,每一个像素都被分配一个平面,然后寻找每个像素上匹配代价最小的平面;相邻的像素可能有相似的平面,通过对相邻像素的平面展开,可以找到匹配代价较低的平面;传播的方式有很多,比如从左到右、从上到下、从左上到右下等等;本发明使用传播方式可以表示为:在奇数次传播过程中,传播方向从左上方传播到右下方,在偶数次传播过程中,传播方向从右下方传播到左上方。并且在奇数次过程中,如果

Figure BDA0003325859290000101
Figure BDA0003325859290000102
Figure BDA0003325859290000103
Figure BDA0003325859290000104
在偶数次过程中,像素p则需要与pup和pleft进行比较;如果已经完成指定的次数,则整个过程结束,即确定视差传播达到预设次数时匹配代价最小的平面对应的视差图作为目标视差图。Then, based on the initialized plane model, disparity propagation is performed, each pixel is assigned a plane, and then the plane with the least matching cost on each pixel is found; adjacent pixels may have similar planes, by expanding the planes of adjacent pixels , a plane with a lower matching cost can be found; there are many ways of propagation, such as from left to right, from top to bottom, from top left to bottom right, etc. The present invention uses the propagation mode can be expressed as: in the process of odd number of propagation , the propagation direction propagates from the upper left to the lower right, and in the even-numbered propagation process, the propagation direction propagates from the lower right to the upper left. and during odd number of times, if
Figure BDA0003325859290000101
Figure BDA0003325859290000102
but
Figure BDA0003325859290000103
Figure BDA0003325859290000104
In the even-numbered process, the pixel p needs to be compared with p up and p left ; if the specified number of times has been completed, the whole process ends, that is, the disparity map corresponding to the plane with the least matching cost when the disparity propagation reaches the preset number of times is determined as Object disparity map.

而为了保证视差图的最优化,在进行视差传播之后,还包括:基于预先确定的最大视差和法向量变化范围,对视差传播达到预设次数时匹配代价最小的平面进行优化。具体,则可以是在进行视差传播过程后,为了进一步降低匹配代价,需要进行平面的优化;优化平面位于两个传播过程之间,尽可能为传播过程提供一个聚合成本更低的新平面;在这个过程中平面需要用一点(x,y,d)和一个法向量(nx,ny,nz)表示;同时

Figure BDA0003325859290000105
Figure BDA0003325859290000106
被定义为最大的视差和法向量的变化范围;若像素位于两条雷达扫描线之间,则
Figure BDA0003325859290000107
如果不是,则
Figure BDA0003325859290000108
为图像的最大视差;相似的,
Figure BDA0003325859290000109
也是向量的最大允许范围;从
Figure BDA00033258592900001010
中随机选取Δd,计算出d′=d+Δd
Figure BDA00033258592900001011
也是在
Figure BDA00033258592900001012
范围内的一个随机值,并且
Figure BDA00033258592900001013
可以表示为
Figure BDA00033258592900001014
其中unit()的作用是单位化;现在一个新的平面
Figure BDA00033258592900001015
的所有参数都被确定,如果
Figure BDA00033258592900001016
则平面
Figure BDA00033258592900001017
被用来代替
Figure BDA00033258592900001018
这是一个迭代的过程,在第一次计算过程中,
Figure BDA00033258592900001019
被设置成
Figure BDA0003325859290000111
并且
Figure BDA0003325859290000112
在每次的迭代过程中,
Figure BDA0003325859290000113
被更新为
Figure BDA0003325859290000114
并且
Figure BDA0003325859290000115
如果
Figure BDA0003325859290000116
优化平面
Figure BDA0003325859290000117
则表示已经完成;然后继续进行视差传播处理,得到最终的目标视差图。In order to ensure the optimization of the disparity map, after the disparity propagation is performed, the method further includes: based on the predetermined maximum disparity and normal vector variation ranges, optimizing the plane with the least matching cost when the disparity propagation reaches a preset number of times. Specifically, after the parallax propagation process, in order to further reduce the matching cost, the plane needs to be optimized; the optimized plane is located between the two propagation processes, and a new plane with lower aggregation cost is provided for the propagation process as much as possible; In this process, the plane needs to be represented by a point (x, y, d) and a normal vector (n x , n y , n z ); at the same time
Figure BDA0003325859290000105
and
Figure BDA0003325859290000106
is defined as the maximum disparity and normal vector variation range; if the pixel lies between two radar scan lines, then
Figure BDA0003325859290000107
If not, then
Figure BDA0003325859290000108
is the maximum disparity of the image; similarly,
Figure BDA0003325859290000109
is also the maximum allowable range for a vector; from
Figure BDA00033258592900001010
Randomly select Δ d from , and calculate d′=d+Δ d ;
Figure BDA00033258592900001011
also in
Figure BDA00033258592900001012
a random value in the range, and
Figure BDA00033258592900001013
It can be expressed as
Figure BDA00033258592900001014
The role of unit() is unitization; now a new plane
Figure BDA00033258592900001015
All parameters of are determined if
Figure BDA00033258592900001016
then plane
Figure BDA00033258592900001017
be used instead
Figure BDA00033258592900001018
This is an iterative process, in the first calculation process,
Figure BDA00033258592900001019
is set to
Figure BDA0003325859290000111
and
Figure BDA0003325859290000112
During each iteration,
Figure BDA0003325859290000113
was updated to
Figure BDA0003325859290000114
and
Figure BDA0003325859290000115
if
Figure BDA0003325859290000116
Optimize plane
Figure BDA0003325859290000117
It means that it has been completed; then continue the disparity propagation processing to obtain the final target disparity map.

本发明提供的一种融合激光雷达和双目相机的深度估计方法,包括:通过雷达相机采集场景深度信息和图像信息,所述雷达相机包括激光雷达和双目相机;对所述场景深度信息和所述图像信息进行标定,得到所述激光雷达和所述双目相机的位姿变换矩阵;根据所述位姿变换矩阵,投影所述场景深度信息至所述图像信息的图像平面上,得到雷达视差图;对所述雷达视差图进行双线性插值,得到上采样雷达视差图;将所述上采样雷达视差图与所述图像信息进行融合,得到目标视差图,可以有效地适应户外照明和物体的纹理等条件难以控制的场景,能够有效地提高匹配的精确度,并且能够快速并且鲁棒地估计复杂环境下的深度值,具有较强实用性和工程价值,还能够克服传统方法对噪声敏感和深度学习方法对数据集比较依赖的弊端,可以适用于室外等大场景下。The present invention provides a depth estimation method integrating lidar and binocular camera, comprising: collecting scene depth information and image information through a radar camera, the radar camera including lidar and a binocular camera; The image information is calibrated to obtain the pose transformation matrix of the lidar and the binocular camera; according to the pose transformation matrix, the scene depth information is projected onto the image plane of the image information to obtain the radar disparity map; perform bilinear interpolation on the radar disparity map to obtain an up-sampled radar disparity map; fuse the up-sampled radar disparity map with the image information to obtain a target disparity map, which can effectively adapt to outdoor lighting and For scenes where the texture of objects and other conditions are difficult to control, it can effectively improve the accuracy of matching, and can quickly and robustly estimate the depth value in complex environments, which has strong practicability and engineering value, and can also overcome the noise caused by traditional methods. The disadvantages of sensitive and deep learning methods relying on data sets can be applied to large scenes such as outdoor.

进一步的,本实施例中对雷达视差图进行双线性插值,得到上采样雷达视差图之前,还可以包括:识别雷达视差图中的异常投影点,并将异常投影点进行清除。在雷达投影过程中,由于相机和雷达相对位置关系可能造成错误投影点,因此需要异常值清除模块进行清除。其中,识别雷达视差图中的异常投影点,具体可以是,由于雷达的扫描线上雷达点是不连续的,因此首先补全激光雷达的扫描线;当目标扫描线的雷达深度均大于与扫描线相邻的第一扫描线的第一雷达深度和第二扫描线的第二雷达深度时,确定目标扫描线为异常投影点组成,也就是当两条雷达深度较浅的扫描线中间出现一条深度值比较大的雷达扫描线时,则认为这条扫描线由异常投影点组成,清除这条扫描线,从而可以有效的将雷达投影的视差图中的异常值剔除。Further, in this embodiment, before obtaining the up-sampled radar disparity map by performing bilinear interpolation on the radar disparity map, the method may further include: identifying abnormal projection points in the radar disparity map, and removing the abnormal projection points. In the process of radar projection, due to the relative positional relationship between the camera and the radar, wrong projection points may be caused, so an outlier removal module is required to remove them. Among them, the abnormal projection points in the radar disparity map are identified. Specifically, since the radar points on the radar scan line are discontinuous, the scan line of the lidar is first completed; when the radar depth of the target scan line is greater than and scan line When the first radar depth of the first scan line and the second radar depth of the second scan line are adjacent to the line, it is determined that the target scan line is composed of abnormal projection points, that is, when a scan line with a shallower radar depth appears in the middle When a radar scan line with a large depth value is found, the scan line is considered to be composed of abnormal projection points, and the scan line is cleared, so that the abnormal values in the disparity map of the radar projection can be effectively eliminated.

基于同一总的发明构思,本申请还保护一种融合激光雷达和双目相机的深度估计装置,下面对本发明提供的融合激光雷达和双目相机的深度估计装置进行描述,下文描述的融合激光雷达和双目相机的深度估计装置与上文描述的融合激光雷达和双目相机的深度估计方法可相互对应参照。Based on the same general inventive concept, the present application also protects a depth estimation device that fuses lidar and binocular camera. The depth estimation device that fuses lidar and binocular camera provided by the present invention is described below. The depth estimation device of the binocular camera and the depth estimation method of the fusion lidar and the binocular camera described above can be referred to each other correspondingly.

图5是本发明实施例提供的融合激光雷达和双目相机的深度估计装置的结构示意图。FIG. 5 is a schematic structural diagram of a depth estimation apparatus integrating a lidar and a binocular camera provided by an embodiment of the present invention.

如图5所示,本发明实施例提供的一种融合激光雷达和双目相机的深度估计装置,包括:As shown in FIG. 5, an embodiment of the present invention provides a depth estimation device that integrates a lidar and a binocular camera, including:

采集模块51,用于通过雷达相机采集场景深度信息和图像信息,所述雷达相机包括激光雷达和双目相机;an acquisition module 51, configured to acquire scene depth information and image information through a radar camera, where the radar camera includes a lidar and a binocular camera;

标定模块52,用于对所述场景深度信息和所述图像信息进行标定,得到所述激光雷达和所述双目相机的位姿变换矩阵;A calibration module 52, configured to calibrate the scene depth information and the image information to obtain the pose transformation matrix of the lidar and the binocular camera;

投影模块53,用于根据所述位姿变换矩阵,投影所述场景深度信息至所述图像信息的图像平面上,得到雷达视差图;a projection module 53, configured to project the scene depth information onto the image plane of the image information according to the pose transformation matrix, to obtain a radar disparity map;

上采样模块54,用于对所述雷达视差图进行双线性插值,得到上采样雷达视差图;an up-sampling module 54, configured to perform bilinear interpolation on the radar disparity map to obtain an up-sampled radar disparity map;

融合模块55,用于将所述上采样雷达视差图与所述图像信息进行融合,得到目标视差图。The fusion module 55 is configured to fuse the up-sampled radar disparity map with the image information to obtain a target disparity map.

本发明实施例提供的一种融合激光雷达和双目相机的深度估计装置,包括:通过雷达相机采集场景深度信息和图像信息,所述雷达相机包括激光雷达和双目相机;对所述场景深度信息和所述图像信息进行标定,得到所述激光雷达和所述双目相机的位姿变换矩阵;根据所述位姿变换矩阵,投影所述场景深度信息至所述图像信息的图像平面上,得到雷达视差图;对所述雷达视差图进行双线性插值,得到上采样雷达视差图;将所述上采样雷达视差图与所述图像信息进行融合,得到目标视差图,可以有效地适应户外照明和物体的纹理等条件难以控制的场景,能够有效地提高匹配的精确度,并且能够快速并且鲁棒地估计复杂环境下的深度值,具有较强实用性和工程价值。An embodiment of the present invention provides a depth estimation device integrating a lidar and a binocular camera, including: collecting scene depth information and image information through a radar camera, the radar camera including a lidar and a binocular camera; The information and the image information are calibrated to obtain the pose transformation matrix of the lidar and the binocular camera; according to the pose transformation matrix, the scene depth information is projected onto the image plane of the image information, Obtain a radar disparity map; perform bilinear interpolation on the radar disparity map to obtain an up-sampled radar disparity map; fuse the up-sampled radar disparity map with the image information to obtain a target disparity map, which can effectively adapt to outdoor For scenes with difficult-to-control conditions such as lighting and object texture, it can effectively improve the matching accuracy, and can quickly and robustly estimate the depth value in complex environments, which has strong practical and engineering value.

进一步的,本实施例中还包括异常处理模块,用于:Further, this embodiment also includes an exception handling module for:

识别所述雷达视差图中的异常投影点,并将所述异常投影点进行清除。Identify abnormal projection points in the radar disparity map, and remove the abnormal projection points.

进一步的,本实施例中还包括异常处理模块,具体用于:Further, this embodiment also includes an exception handling module, which is specifically used for:

补全所述激光雷达的扫描线;Completing the scan lines of the lidar;

当目标扫描线的雷达深度均大于与所述扫描线相邻的第一扫描线的第一雷达深度和第二扫描线的第二雷达深度时,确定所述目标扫描线为异常投影点组成。When the radar depth of the target scan line is greater than the first radar depth of the first scan line and the second radar depth of the second scan line adjacent to the scan line, it is determined that the target scan line is composed of abnormal projection points.

进一步的,本实施例中的标定模块52,具体用于:Further, the calibration module 52 in this embodiment is specifically used for:

根据所述图像信息,标定所述双目相机的第一相机和第二相机的第一空间相对位置关系;According to the image information, calibrating the first relative positional relationship in space between the first camera and the second camera of the binocular camera;

根据所述场景深度信息和所述图像信息,标定所述激光雷达与所述双目相机的第二空间相对位置关系;According to the scene depth information and the image information, calibrating the second spatial relative position relationship between the lidar and the binocular camera;

根据所述第一空间相对位置关系和所述第二空间相对位置关系,构建所述激光雷达和所述双目相机的位姿变换矩阵。According to the first spatial relative position relationship and the second spatial relative position relationship, a pose transformation matrix of the lidar and the binocular camera is constructed.

进一步的,本实施例中的融合模块55,具体用于:Further, the fusion module 55 in this embodiment is specifically used for:

根据所述上采样雷达视差图与所述图像信息,确定倾斜窗口模型参数;determining the oblique window model parameters according to the up-sampled radar disparity map and the image information;

根据所述倾斜窗口模型参数,确定倾斜平面,并确定所述倾斜平面中任一像素的匹配代价确定规则;Determine an inclined plane according to the inclined window model parameters, and determine a matching cost determination rule for any pixel in the inclined plane;

根据所述匹配代价确定规则,确定最小化代价的视差图作为目标视差图。According to the matching cost determination rule, the disparity map that minimizes the cost is determined as the target disparity map.

进一步的,本实施例中的融合模块55,具体还用于:Further, the fusion module 55 in this embodiment is specifically also used for:

对所述倾斜平面进行随机初始化,得到初始化平面模型;Perform random initialization on the inclined plane to obtain an initialization plane model;

基于所述初始化平面模型,进行视差传播,确定所述视差传播达到预设次数时匹配代价最小的平面对应的视差图作为目标视差图。Based on the initialized plane model, disparity propagation is performed, and when the disparity propagation reaches a preset number of times, the disparity map corresponding to the plane with the smallest matching cost is determined as the target disparity map.

进一步的,本实施例中的融合模块55,具体还用于:Further, the fusion module 55 in this embodiment is specifically also used for:

基于预先确定的最大视差和法向量变化范围,对所述视差传播达到预设次数时匹配代价最小的平面进行优化。Based on the predetermined maximum disparity and normal vector variation ranges, the plane with the smallest matching cost is optimized when the disparity propagation reaches a preset number of times.

图6是本发明实施例提供的电子设备的结构示意图。FIG. 6 is a schematic structural diagram of an electronic device provided by an embodiment of the present invention.

如图6所示,该电子设备可以包括:处理器(processor)610、通信接口(Communications Interface)620、存储器(memory)630和通信总线640,其中,处理器610,通信接口620,存储器630通过通信总线640完成相互间的通信。处理器610可以调用存储器630中的逻辑指令,以执行融合激光雷达和双目相机的深度估计方法,该方法包括:通过雷达相机采集场景深度信息和图像信息,所述雷达相机包括激光雷达和双目相机;对所述场景深度信息和所述图像信息进行标定,得到所述激光雷达和所述双目相机的位姿变换矩阵;根据所述位姿变换矩阵,投影所述场景深度信息至所述图像信息的图像平面上,得到雷达视差图;对所述雷达视差图进行双线性插值,得到上采样雷达视差图;将所述上采样雷达视差图与所述图像信息进行融合,得到目标视差图。As shown in FIG. 6 , the electronic device may include: a processor (processor) 610, a communication interface (Communications Interface) 620, a memory (memory) 630 and a communication bus 640, wherein the processor 610, the communication interface 620, and the memory 630 pass through The communication bus 640 accomplishes the mutual communication. The processor 610 can invoke the logic instructions in the memory 630 to execute a depth estimation method fused with a lidar and a binocular camera, the method comprising: collecting scene depth information and image information through a radar camera, the radar camera including a lidar and a binocular camera. camera; calibrate the scene depth information and the image information to obtain the pose transformation matrix of the lidar and the binocular camera; according to the pose transformation matrix, project the scene depth information to the On the image plane of the image information, a radar disparity map is obtained; bilinear interpolation is performed on the radar disparity map to obtain an up-sampling radar disparity map; the up-sampling radar disparity map is fused with the image information to obtain a target Parallax map.

此外,上述的存储器630中的逻辑指令可以通过软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。In addition, the above-mentioned logic instructions in the memory 630 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes .

另一方面,本发明还提供一种计算机程序产品,所述计算机程序产品包括计算机程序,计算机程序可存储在非暂态计算机可读存储介质上,所述计算机程序被处理器执行时,计算机能够执行上述各方法所提供的融合激光雷达和双目相机的深度估计方法,该方法包括:通过雷达相机采集场景深度信息和图像信息,所述雷达相机包括激光雷达和双目相机;对所述场景深度信息和所述图像信息进行标定,得到所述激光雷达和所述双目相机的位姿变换矩阵;根据所述位姿变换矩阵,投影所述场景深度信息至所述图像信息的图像平面上,得到雷达视差图;对所述雷达视差图进行双线性插值,得到上采样雷达视差图;将所述上采样雷达视差图与所述图像信息进行融合,得到目标视差图。In another aspect, the present invention also provides a computer program product, the computer program product includes a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, and when the computer program is executed by a processor, the computer can Execute the depth estimation method for fusion of lidar and binocular camera provided by the above methods, the method includes: collecting scene depth information and image information through a radar camera, the radar camera includes lidar and a binocular camera; The depth information and the image information are calibrated to obtain the pose transformation matrix of the lidar and the binocular camera; according to the pose transformation matrix, the scene depth information is projected onto the image plane of the image information to obtain a radar disparity map; perform bilinear interpolation on the radar disparity map to obtain an up-sampled radar disparity map; and fuse the up-sampled radar disparity map with the image information to obtain a target disparity map.

又一方面,本发明还提供一种非暂态计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现以执行上述各方法提供的融合激光雷达和双目相机的深度估计方法,该方法包括:通过雷达相机采集场景深度信息和图像信息,所述雷达相机包括激光雷达和双目相机;对所述场景深度信息和所述图像信息进行标定,得到所述激光雷达和所述双目相机的位姿变换矩阵;根据所述位姿变换矩阵,投影所述场景深度信息至所述图像信息的图像平面上,得到雷达视差图;对所述雷达视差图进行双线性插值,得到上采样雷达视差图;将所述上采样雷达视差图与所述图像信息进行融合,得到目标视差图。In yet another aspect, the present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored, and the computer program is implemented by a processor to execute the fusion laser radar and binocular camera provided by the above methods when the computer program is executed. A depth estimation method, comprising: collecting scene depth information and image information through a radar camera, wherein the radar camera includes a lidar and a binocular camera; calibrating the scene depth information and the image information to obtain the lidar and the pose transformation matrix of the binocular camera; according to the pose transformation matrix, project the scene depth information on the image plane of the image information to obtain a radar disparity map; perform a bi-line on the radar disparity map interpolate to obtain an up-sampled radar disparity map; and fuse the up-sampled radar disparity map with the image information to obtain a target disparity map.

以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。The device embodiments described above are only illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in One place, or it can be distributed over multiple network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment. Those of ordinary skill in the art can understand and implement it without creative effort.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and certainly can also be implemented by hardware. Based on this understanding, the above-mentioned technical solutions can be embodied in the form of software products in essence or the parts that make contributions to the prior art, and the computer software products can be stored in computer-readable storage media, such as ROM/RAM, magnetic A disc, an optical disc, etc., includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform the methods described in various embodiments or some parts of the embodiments.

最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, but not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that it can still be The technical solutions described in the foregoing embodiments are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A depth estimation method fusing a laser radar and a binocular camera is characterized by comprising the following steps:
acquiring scene depth information and image information through a radar camera, wherein the radar camera comprises a laser radar and a binocular camera;
calibrating the scene depth information and the image information to obtain a pose transformation matrix of the laser radar and the binocular camera;
projecting the scene depth information to an image plane of the image information according to the pose transformation matrix to obtain a radar disparity map;
carrying out bilinear interpolation on the radar disparity map to obtain an up-sampling radar disparity map;
and fusing the up-sampling radar disparity map with the image information to obtain a target disparity map.
2. The method for estimating depth by fusing lidar and a binocular camera according to claim 1, wherein before the bilinear interpolation is performed on the radar disparity map to obtain the up-sampled radar disparity map, the method further comprises:
and identifying abnormal projection points in the radar disparity map, and clearing the abnormal projection points.
3. The method for depth estimation by fusing a lidar and a binocular camera according to claim 2, wherein the identifying the abnormal projection point in the radar disparity map comprises:
completing the scanning line of the laser radar;
and when the radar depth of a target scanning line is greater than the first radar depth of a first scanning line and the second radar depth of a second scanning line which are adjacent to the scanning line, determining that the target scanning line is composed of abnormal projection points.
4. The depth estimation method fusing a lidar and a binocular camera according to claim 1, wherein the calibrating the scene depth information and the image information to obtain a pose transformation matrix of the lidar and the binocular camera comprises:
calibrating a first spatial relative position relation of a first camera and a second camera of the binocular camera according to the image information;
calibrating a second spatial relative position relation between the laser radar and the binocular camera according to the scene depth information and the image information;
and constructing a pose transformation matrix of the laser radar and the binocular camera according to the first spatial relative position relation and the second spatial relative position relation.
5. The method for depth estimation by fusing a lidar and a binocular camera according to claim 1, wherein the fusing the up-sampling radar disparity map with the image information to obtain a target disparity map comprises:
determining a tilt window model parameter according to the up-sampling radar disparity map and the image information;
determining an inclined plane according to the inclined window model parameters, and determining a matching cost determination rule of any pixel in the inclined plane;
and determining the disparity map with the minimized cost as a target disparity map according to the matching cost determination rule.
6. The method for depth estimation by fusing a lidar and a binocular camera according to claim 5, wherein the determining the disparity map with the minimized cost as the target disparity map according to the matching cost determination rule comprises:
carrying out random initialization on the inclined plane to obtain an initialized plane model;
and performing parallax transmission based on the initialized plane model, and determining a parallax image corresponding to the plane with the minimum matching cost when the parallax transmission reaches a preset number as a target parallax image.
7. The depth estimation method combining a lidar and a binocular camera according to claim 6, wherein after the performing the disparity propagation, further comprising:
and optimizing the plane with the minimum matching cost when the parallax transmission reaches the preset times based on the predetermined maximum parallax and normal vector change range.
8. A depth estimation device fusing a laser radar and a binocular camera, comprising:
the system comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring scene depth information and image information through a radar camera, and the radar camera comprises a laser radar and a binocular camera;
the calibration module is used for calibrating the scene depth information and the image information to obtain a pose transformation matrix of the laser radar and the binocular camera;
the projection module is used for projecting the scene depth information to an image plane of the image information according to the pose transformation matrix to obtain a radar disparity map;
the up-sampling module is used for carrying out bilinear interpolation on the radar disparity map to obtain an up-sampling radar disparity map;
and the fusion module is used for fusing the up-sampling radar disparity map with the image information to obtain a target disparity map.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the program implements the steps of the method of depth estimation fusing a lidar and a binocular camera according to any of claims 1 to 7.
10. A non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor, performs the steps of the method for depth estimation fusing a lidar and a binocular camera according to any one of claims 1 to 7.
CN202111261395.7A 2021-10-28 2021-10-28 Depth estimation method, device and equipment integrating laser radar and binocular camera Active CN114140507B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111261395.7A CN114140507B (en) 2021-10-28 2021-10-28 Depth estimation method, device and equipment integrating laser radar and binocular camera

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111261395.7A CN114140507B (en) 2021-10-28 2021-10-28 Depth estimation method, device and equipment integrating laser radar and binocular camera

Publications (2)

Publication Number Publication Date
CN114140507A true CN114140507A (en) 2022-03-04
CN114140507B CN114140507B (en) 2025-03-28

Family

ID=80395652

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111261395.7A Active CN114140507B (en) 2021-10-28 2021-10-28 Depth estimation method, device and equipment integrating laser radar and binocular camera

Country Status (1)

Country Link
CN (1) CN114140507B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115131432A (en) * 2022-06-06 2022-09-30 国家电网有限公司 A 3D reconstruction method of computer room based on binocular vision and deep image fusion
CN118776572A (en) * 2023-04-10 2024-10-15 中车株洲电力机车研究所有限公司 A global semantic map construction and updating method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130278631A1 (en) * 2010-02-28 2013-10-24 Osterhout Group, Inc. 3d positioning of augmented reality information
CN109035309A (en) * 2018-07-20 2018-12-18 清华大学苏州汽车研究院(吴江) Pose method for registering between binocular camera and laser radar based on stereoscopic vision
CN111325794A (en) * 2020-02-23 2020-06-23 哈尔滨工业大学 A Visual Simultaneous Localization and Map Construction Method Based on Deep Convolutional Autoencoders
CN112233163A (en) * 2020-12-14 2021-01-15 中山大学 Depth estimation method and device for laser radar stereo camera fusion and medium thereof
CN112902874A (en) * 2021-01-19 2021-06-04 中国汽车工程研究院股份有限公司 Image acquisition device and method, image processing method and device and image processing system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130278631A1 (en) * 2010-02-28 2013-10-24 Osterhout Group, Inc. 3d positioning of augmented reality information
CN109035309A (en) * 2018-07-20 2018-12-18 清华大学苏州汽车研究院(吴江) Pose method for registering between binocular camera and laser radar based on stereoscopic vision
CN111325794A (en) * 2020-02-23 2020-06-23 哈尔滨工业大学 A Visual Simultaneous Localization and Map Construction Method Based on Deep Convolutional Autoencoders
CN112233163A (en) * 2020-12-14 2021-01-15 中山大学 Depth estimation method and device for laser radar stereo camera fusion and medium thereof
CN112902874A (en) * 2021-01-19 2021-06-04 中国汽车工程研究院股份有限公司 Image acquisition device and method, image processing method and device and image processing system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李海标;时君;田春月;: "一种基于深度特征的室外环境下激光地图辅助视觉定位方法", 科学技术与工程, no. 13, 8 May 2020 (2020-05-08) *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115131432A (en) * 2022-06-06 2022-09-30 国家电网有限公司 A 3D reconstruction method of computer room based on binocular vision and deep image fusion
CN118776572A (en) * 2023-04-10 2024-10-15 中车株洲电力机车研究所有限公司 A global semantic map construction and updating method

Also Published As

Publication number Publication date
CN114140507B (en) 2025-03-28

Similar Documents

Publication Publication Date Title
CN113034568B (en) Machine vision depth estimation method, device and system
CN109660783B (en) Virtual reality parallax correction
CN110996082B (en) Projection adjusting method and device, projector and readable storage medium
CN116188558B (en) Stereo photogrammetry method based on binocular vision
CN111123242B (en) Combined calibration method based on laser radar and camera and computer readable storage medium
CN110648274A (en) Fisheye image generation method and device
WO2023093824A1 (en) Point cloud quality evaluation method, and device and storage medium
CN114140507B (en) Depth estimation method, device and equipment integrating laser radar and binocular camera
CN110619660A (en) Object positioning method and device, computer readable storage medium and robot
EP3189493B1 (en) Depth map based perspective correction in digital photos
US8340399B2 (en) Method for determining a depth map from images, device for determining a depth map
US12112457B2 (en) Selective extended depth-of-field correction for image reconstruction
JP2009530701A5 (en)
CN114648458A (en) Fisheye image correction method and device, electronic equipment and storage medium
JP6991700B2 (en) Information processing equipment, information processing method, program
US20230410368A1 (en) Method for learning network parameter of neural network, method for calculating camera parameter, and computer-readable recording medium recording a program
CN111915741A (en) VR generater based on three-dimensional reconstruction
CN114399553A (en) Virtual viewpoint generation method and device based on camera posture
CN113048899A (en) Thickness measuring method and system based on line structured light
CN116258759B (en) Stereo matching method, device and equipment
CN113192208B (en) Three-dimensional roaming method and device
JP6604934B2 (en) Point cloud pixel position determination device, method, and program
WO2021195940A1 (en) Image processing method and movable platform
Ponrani et al. Enhancing UAV Communication Performance Through GCN-Driven Channel Adaptation
WO2024101429A1 (en) Camera parameter calculation device, camera parameter calculation method, and camera parameter calculation program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant