CN113219475A - Method and system for correcting monocular distance measurement by using single line laser radar - Google Patents
Method and system for correcting monocular distance measurement by using single line laser radar Download PDFInfo
- Publication number
- CN113219475A CN113219475A CN202110763071.7A CN202110763071A CN113219475A CN 113219475 A CN113219475 A CN 113219475A CN 202110763071 A CN202110763071 A CN 202110763071A CN 113219475 A CN113219475 A CN 113219475A
- Authority
- CN
- China
- Prior art keywords
- ranging
- image
- monocular camera
- monocular
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01S—RADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
- G01S17/00—Systems using the reflection or reradiation of electromagnetic waves other than radio waves, e.g. lidar systems
- G01S17/02—Systems using the reflection of electromagnetic waves other than radio waves
- G01S17/06—Systems determining position data of a target
- G01S17/08—Systems determining position data of a target for measuring distance only
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01S—RADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
- G01S11/00—Systems for determining distance or velocity not using reflection or reradiation
- G01S11/12—Systems for determining distance or velocity not using reflection or reradiation using electromagnetic waves other than radio waves
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01S—RADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
- G01S17/00—Systems using the reflection or reradiation of electromagnetic waves other than radio waves, e.g. lidar systems
- G01S17/86—Combinations of lidar systems with systems other than lidar, radar or sonar, e.g. with direction finders
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Electromagnetism (AREA)
- General Physics & Mathematics (AREA)
- Radar, Positioning & Navigation (AREA)
- Remote Sensing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Theoretical Computer Science (AREA)
- Biomedical Technology (AREA)
- General Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- Artificial Intelligence (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Health & Medical Sciences (AREA)
- Measurement Of Optical Distance (AREA)
Abstract
本发明提供了一种利用单线激光雷达校正单目测距的方法及系统,该方法包括:获取所述单目摄像头采集的图像;将所述图像输入预先训练的测距神经网络模型,得到所述图像中目标的距离信息;所述测距神经网络模型由训练数据集、所述多个激光雷达测距确定的全局参考误差矩阵训练得到,所述训练数据集包括多张图像及各张所述图像中像素的实际距离。本发明采用激光雷达与单目摄像头相结合的方式,利用多个激光雷达提供多点的精确距离信息以校正单目测距全局误差,能够简化测距的算法难度,同时提高精度,降低成本,且与各种单目测距算法的融合性好。
The present invention provides a method and system for correcting monocular ranging by using a single-line laser radar. The method includes: acquiring an image collected by the monocular camera; inputting the image into a pre-trained ranging neural network model to obtain the The distance information of the target in the image; the ranging neural network model is obtained by training the training data set and the global reference error matrix determined by the multiple lidar ranging, and the training data set includes multiple images and each the actual distance of the pixels in the image. The invention adopts the combination of laser radar and monocular camera, and uses multiple laser radars to provide multi-point accurate distance information to correct the global error of monocular ranging, which can simplify the algorithm difficulty of ranging, and at the same time improve the accuracy and reduce the cost. And the integration with various monocular ranging algorithms is good.
Description
技术领域technical field
本发明涉及测距技术领域,具体而言,涉及一种利用单线激光雷达校正单目测距的方法及系统。The present invention relates to the technical field of ranging, and in particular, to a method and system for correcting monocular ranging by using a single-line laser radar.
背景技术Background technique
目前常用的无人车测距方案是将目标从二维图像映射到三维点云,从而画出目标在三维空间的位置及边界,即深度信息主要由不断旋转的激光雷达获取,这对激光雷达的转速、线束提出了更高的要求,虽然激光雷达精度较好,但成本也大大增加。如果只使用单目测距,现有单目测距的精度不足。At present, the commonly used ranging solution for unmanned vehicles is to map the target from a two-dimensional image to a three-dimensional point cloud, so as to draw the position and boundary of the target in three-dimensional space, that is, the depth information is mainly obtained by the continuously rotating lidar. The speed and wiring harness put forward higher requirements. Although the accuracy of lidar is better, the cost is also greatly increased. If only monocular ranging is used, the accuracy of existing monocular ranging is insufficient.
发明内容SUMMARY OF THE INVENTION
本发明解决的是测距方案无法兼顾精度和成本的问题。The invention solves the problem that the ranging scheme cannot take into account the accuracy and the cost.
为解决上述问题,本发明提供一种利用单线激光雷达校正单目测距的方法,应用于包括单目摄像头及多个激光雷达的测距系统,所述单目摄像头与所述多个激光雷达按预设位置布置,所述方法包括:获取所述单目摄像头采集的图像;将所述图像输入预先训练的测距神经网络模型,得到所述图像中目标的距离信息;所述测距神经网络模型由训练数据集、所述多个激光雷达测距确定的全局参考误差矩阵训练得到,所述训练数据集包括多张图像及各张所述图像中像素的实际距离。In order to solve the above problems, the present invention provides a method for correcting monocular ranging by using a single-line lidar, which is applied to a ranging system including a monocular camera and a plurality of lidars, the monocular camera and the plurality of lidars. Arranged at a preset position, the method includes: acquiring an image collected by the monocular camera; inputting the image into a pre-trained ranging neural network model to obtain distance information of the target in the image; The network model is obtained by training a training data set and a global reference error matrix determined by the plurality of lidar ranging, and the training data set includes a plurality of images and the actual distances of pixels in each of the images.
可选地,所述测距神经网络模型的训练过程如下:提取所述训练数据集中的各图像的像素特征;将所述像素特征对应矩阵、所述图像的全局参考误差矩阵耦合后输入测距神经网络模型进行训练,直至损失函数满足预设终止条件。Optionally, the training process of the ranging neural network model is as follows: extracting pixel features of each image in the training data set; coupling the pixel feature corresponding matrix and the global reference error matrix of the image and then inputting the ranging. The neural network model is trained until the loss function satisfies the preset termination condition.
可选地,所述单目摄像头的光轴与各所述激光雷达的射线方向平行布置;至少一个所述激光雷达贴近所述单目摄像头布置,其余所述激光雷达围绕所述单目摄像头均匀布置。Optionally, the optical axis of the monocular camera is arranged parallel to the ray direction of each of the lidars; at least one of the lidars is arranged close to the monocular camera, and the rest of the lidars are evenly arranged around the monocular camera. layout.
可选地,所述像素特征对应矩阵、所述图像的全局参考误差矩阵耦合公式如下:Optionally, the coupling formula of the pixel feature corresponding matrix and the global reference error matrix of the image is as follows:
其中,L n 为耦合后的距离误差矩阵,γ为修正系数,L 0为所述多个激光雷达测距确定的全局参考误差矩阵,S n 为图像中全部像素与图像中心点的距离组成的矩阵,O n 为图像中任意模糊圆相对于图像中心点的模糊圆或者接近图像中心点的模糊圆的比值组成的矩阵,k1、k2为预先标定的次数,⨀表示元素积运算。Wherein, L n is the distance error matrix after coupling, γ is the correction coefficient, L 0 is the global reference error matrix determined by the multiple lidar ranging, and S n is the distance between all pixels in the image and the center point of the image. matrix, O n is the matrix composed of the ratio of any fuzzy circle in the image to the fuzzy circle at the center of the image or the fuzzy circle close to the center of the image,
可选地,将贴近所述单目摄像头的激光雷达的测距结果与所述单目摄像头测距结果的误差作为全局参考误差L 0 ',将围绕所述单目摄像头均匀布置的激光雷达的测距结果与所述单目摄像头测距结果的误差作为局部参考误差L 1,L 0如下:Optionally, the error between the ranging result of the lidar close to the monocular camera and the ranging result of the monocular camera is used as the global reference error L 0 ′ , and the uniformly arranged lidar around the monocular camera is used. The error between the ranging result and the monocular camera ranging result is taken as the local reference error L 1 , L 0 is as follows:
其中,λ为全局参考误差与局部参考误差的影响系数。Among them, λ is the influence coefficient of global reference error and local reference error.
可选地,所述方法还包括:将沿径向的一条直线测量得到的不同位置的误差进行多项式拟合,确定相对位置的次数k1;将沿轴向的一条直线测量得到的不同位置的误差进行多形式拟合,确定模糊圆的次数k2。Optionally, the method further includes: performing polynomial fitting on errors at different positions measured along a straight line in the radial direction to determine the relative
可选地,围绕所述单目摄像头均匀布置的所述激光雷达的测距点均落在图像的对角线上,且各所述测距点在所述对角线上均匀分布。Optionally, the ranging points of the lidar evenly arranged around the monocular camera all fall on the diagonal of the image, and the ranging points are evenly distributed on the diagonal.
可选地,围绕所述单目摄像头均匀布置的所述激光雷达的测距点均落在图像的中线上,且各所述测距点在所述中线上均匀分布。Optionally, the ranging points of the lidar evenly arranged around the monocular camera all fall on the center line of the image, and the ranging points are evenly distributed on the center line.
本发明提供一种利用单线激光雷达校正单目测距的系统,包括测距神经网络模型、单目摄像头及多个激光雷达;所述单目摄像头的光轴与各所述激光雷达的射线方向平行布置;至少一个所述激光雷达贴近所述单目摄像头布置,其余所述激光雷达围绕所述单目摄像头均匀布置;所述测距神经网络模型用于确定输入的所述单目摄像头采集图像中目标的距离信息,所述测距神经网络模型由训练数据集、所述多个激光雷达测距确定的全局参考误差矩阵训练得到,所述训练数据集包括多张图像及各张所述图像中像素的实际距离。The present invention provides a system for correcting monocular ranging by using a single-line laser radar, including a ranging neural network model, a monocular camera and a plurality of laser radars; the optical axis of the monocular camera and the ray direction of each of the laser radars arranged in parallel; at least one of the lidars is arranged close to the monocular camera, and the rest of the lidars are evenly arranged around the monocular camera; the ranging neural network model is used to determine the inputted monocular camera to collect images The distance information of the target in the distance measurement neural network model is obtained by training the training data set and the global reference error matrix determined by the plurality of lidar ranging, and the training data set includes a plurality of images and each of the images. The actual distance in pixels.
可选地,围绕所述单目摄像头均匀布置的所述激光雷达的测距点均落在图像的对角线上,且各所述测距点在所述对角线上均匀分布;或者,围绕所述单目摄像头均匀布置的所述激光雷达的测距点均落在图像的中线上,且各所述测距点在所述中线上均匀分布。Optionally, the ranging points of the lidar evenly arranged around the monocular camera all fall on the diagonal of the image, and the ranging points are evenly distributed on the diagonal; or, The ranging points of the lidar evenly arranged around the monocular camera all fall on the center line of the image, and the ranging points are evenly distributed on the center line.
本发明采用激光雷达与单目摄像头相结合的方式,利用多个激光雷达提供多点的精确距离信息以校正单目测距全局误差,能够简化测距的算法难度,同时提高精度,降低成本,且与各种单目测距算法的融合性好。The invention adopts the combination of laser radar and monocular camera, and uses multiple laser radars to provide multi-point accurate distance information to correct the global error of monocular ranging, which can simplify the algorithm difficulty of ranging, and at the same time improve the accuracy and reduce the cost. And the integration with various monocular ranging algorithms is good.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces 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 only It is an embodiment of the present invention. For those of ordinary skill in the art, other drawings can also be obtained according to the provided drawings without creative work.
图1为本发明实施例提供的散焦测距算法的原理示意图;1 is a schematic diagram of the principle of a defocus ranging algorithm provided by an embodiment of the present invention;
图2为本发明实施例提供的一种利用单线激光雷达校正单目测距的方法的流程示意图;2 is a schematic flowchart of a method for correcting monocular ranging by using a single-line laser radar according to an embodiment of the present invention;
图3为本发明实施例提供的单目测距校正神经网络模型的训练流程示意图。FIG. 3 is a schematic diagram of a training process of a monocular ranging correction neural network model provided by an embodiment of the present invention.
具体实施方式Detailed ways
为使本发明的上述目的、特征和优点能够更为明显易懂,下面结合附图对本发明的具体实施例做详细的说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the above objects, features and advantages of the present invention more clearly understood, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention.
本发明实施例中目标的距离信息主要由单目摄像头获取。目前单目测距算法的精度普遍不高,本发明实施例采用单线激光雷达校正单目摄像头采集二维图像中特定像素点的深度值,然后将单个像素点的校正信息用于校正整个图像,从而提高单目测距精度。In the embodiment of the present invention, the distance information of the target is mainly obtained by a monocular camera. At present, the accuracy of the monocular ranging algorithm is generally not high. In the embodiment of the present invention, a single-line laser radar is used to correct the monocular camera to collect the depth value of a specific pixel point in a two-dimensional image, and then the correction information of a single pixel point is used to correct the entire image. Thereby, the accuracy of monocular ranging is improved.
需要说明的是,在单目测距算法中各点的测距误差是存在内部联系的。以散焦测距算法为例:散焦三维测量直接利用物体深度、摄像镜头参数、图像模糊度之间的关系来测量物体的深度。It should be noted that the ranging error of each point in the monocular ranging algorithm is internally related. Taking the defocus ranging algorithm as an example: the defocus 3D measurement directly uses the relationship between the depth of the object, the parameters of the camera lens, and the blurriness of the image to measure the depth of the object.
图1示出了散焦测距算法的原理示意图。当像点和摄像面c不重合时,物点a在摄像平面c形成的不是清晰的像点,而是与孔径光栏形状形同的模糊光斑,对一般的散焦测距系统,孔径光栏具有圆对称性,所以这个模糊光斑是一个圆形光斑。如图1所示,上述模糊光斑的半径R1、R2与光学系统的光学参数(例如透镜孔径D、摄像面c距透镜b的距离s1、s2)及物点a的物距u之间有如下关系:FIG. 1 shows a schematic diagram of the principle of the defocus ranging algorithm. When the image point and the imaging plane c do not coincide, the object point a on the imaging plane c does not form a clear image point, but a blurred light spot with the same shape as the aperture diaphragm. For a general defocus ranging system, the aperture light The column has circular symmetry, so this blurred spot is a circular spot. As shown in Fig. 1, the radii R 1 and R 2 of the above-mentioned blurred light spot are related to the optical parameters of the optical system (such as the lens aperture D, the distances s 1 and s 2 from the imaging surface c to the lens b) and the object distance u of the object point a. There is the following relationship between:
(1) (1)
(2) (2)
(3) (3)
在已知系统的光学参数的情况下,只要测量出物体上某点模糊光斑的半径,就能计算出该点的物距u。因此,可以认为此时单目测距为一个确定的函数:When the optical parameters of the system are known, as long as the radius of the blurred light spot at a certain point on the object is measured, the object distance u of the point can be calculated. Therefore, it can be considered that the monocular ranging is a definite function at this time:
(4) (4)
其中,L为光学参数。where L is an optical parameter.
但是光学参数会对R1,R2产生某种确定但是复杂的影响:But the optical parameters have some definite but complex effect on R 1 , R 2 :
(5) (5)
τ为根据摄像头图像求解模糊半径的算法: τ is the algorithm for solving the blur radius based on the camera image:
(6) (6)
即该算法会受到实际物距及一些不确定因素的影响。That is, the algorithm will be affected by the actual object distance and some uncertain factors.
因此,每次的测距误差应该与实际物距、光学参数等有一确定的关系,但是十分复杂,难以求出其解析式。正是由于各点距离由同样的关系求出,这样求出的各点误差之间也必然存在内部相关性。如果可以利用这种相关关系,则可以由一点的误差,反推其他点的误差,从而提高单目测距的精确度。Therefore, each ranging error should have a definite relationship with the actual object distance, optical parameters, etc., but it is very complicated and it is difficult to obtain its analytical formula. It is precisely because the distances of each point are obtained from the same relationship, there must be an internal correlation between the errors of each point obtained in this way. If this correlation can be used, the error of one point can be reversed from the error of other points, thereby improving the accuracy of monocular ranging.
神经网络恰好可以建立不易求得的相关关系。为了说明这种神经网络是如何起作用的,首先说明各个数据以及它们的获取方式:一个简单的情况是单目摄像头的主光轴和单线激光雷达在同一直线上,这样激光雷达测量的距离总是摄像头图像中心的像素点的距离。利用散焦测距算法,可以求出图中物体的预测距离矩阵S1:Neural networks happen to be able to establish correlations that are not easy to find. To illustrate how this neural network works, first describe the individual data and how they are acquired: a simple case is that the main optical axis of the monocular camera and the single-line lidar are on the same line, so that the distance measured by the lidar is always is the distance of the pixel from the center of the camera image. Using the defocus ranging algorithm, the predicted distance matrix S 1 of the object in the picture can be obtained:
S1=[ [s11,s12,s13,…]S 1 =[ [s 11 ,s 12 ,s 13 ,…]
[s21,s22,s23,…][s 21 ,s 22 ,s 23 ,…]
… … … ] […]
为了得到训练集的标签,还需要将图像中物体距离摄像头的真实距离测出,形成标签矩阵Y,然后可以建立神经网络模型并进行训练。训练完毕后即可利用该模型对单目摄像头采集的图像进行目标测距。In order to get the label of the training set, it is also necessary to measure the real distance of the object in the image from the camera to form a label matrix Y, and then a neural network model can be established and trained. After the training is completed, the model can be used to perform target ranging on the images collected by the monocular camera.
参见图2所示的一种利用单线激光雷达校正单目测距的方法的流程示意图,应用于包括单目摄像头及多个激光雷达的测距系统,单目摄像头与多个激光雷达按预设位置布置,该方法包括以下步骤:Referring to the schematic flowchart of a method for correcting monocular ranging by using a single-line lidar shown in FIG. 2 , it is applied to a ranging system including a monocular camera and multiple lidars. The monocular camera and multiple lidars are preset Location arrangement, the method includes the following steps:
S202,获取单目摄像头采集的图像。S202, an image collected by a monocular camera is acquired.
S204,将图像输入预先训练的测距神经网络模型,得到图像中目标的距离信息。S204, input the image into a pre-trained ranging neural network model to obtain distance information of the target in the image.
该测距神经网络模型由训练数据集、多个激光雷达测距确定的全局参考误差矩阵训练得到,该训练数据集包括多张图像及各张图像中像素的实际距离。The ranging neural network model is obtained by training a training data set, a global reference error matrix determined by multiple lidar ranging, and the training data set includes multiple images and the actual distances of pixels in each image.
单目摄像头与多个激光雷达需按预设位置布置,以便于通过激光雷达的测距结果对单目摄像头的测距结果进行修正。为提高校正效果及兼顾成本考虑,本实施例提供了具体的布置方式如下:单目摄像头的光轴与各激光雷达的射线方向平行布置;至少一个激光雷达贴近单目摄像头布置,其余激光雷达围绕单目摄像头均匀布置。The monocular camera and multiple lidars need to be arranged in preset positions, so that the ranging results of the monocular camera can be corrected by the ranging results of the lidars. In order to improve the correction effect and take into account the consideration of cost, this embodiment provides a specific arrangement as follows: the optical axis of the monocular camera is arranged in parallel with the ray direction of each lidar; at least one lidar is arranged close to the monocular camera, and the rest of the lidars are arranged around the monocular camera. The monocular cameras are evenly arranged.
其中,贴近单目摄像头布置的激光雷达的测距点尽量靠近单目摄像头获取的散焦图像的中心点。可选地,围绕单目摄像头均匀布置的激光雷达的测距点均落在图像的对角线上,且各测距点在对角线上均匀分布;或者,围绕单目摄像头均匀布置的激光雷达的测距点均落在图像的中线上,且各测距点在中线上均匀分布。Among them, the ranging point of the lidar arranged close to the monocular camera is as close as possible to the center point of the defocused image obtained by the monocular camera. Optionally, the ranging points of the lidar evenly arranged around the monocular camera all fall on the diagonal of the image, and the ranging points are evenly distributed on the diagonal; or, the lasers evenly arranged around the monocular camera The ranging points of the radar all fall on the center line of the image, and the ranging points are evenly distributed on the center line.
通过多个激光雷达测距确定单目摄像头测距的全局参考误差矩阵,将该矩阵与图像的像素特征矩阵耦合后输入距离神经网络模型进行训练,可以对实际物距、光学参数等特征参数与误差的关系进行回归拟合,得到能够准确测距的距离神经网络模型。The global reference error matrix of the monocular camera ranging is determined through multiple lidar ranging, and the matrix is coupled with the pixel feature matrix of the image and then input to the distance neural network model for training, which can compare the actual object distance, optical parameters and other characteristic parameters with The relationship between the errors is regressed and fitted, and a distance neural network model capable of accurate ranging is obtained.
本发明实施例提供的利用单线激光雷达校正单目测距的方法,采用激光雷达与单目摄像头相结合的方式,利用多个激光雷达提供多点的精确距离信息以校正单目测距全局误差,能够简化测距的算法难度,同时提高精度,降低成本,且与各种单目测距算法的融合性好。The method for correcting monocular ranging by using a single-line laser radar provided by the embodiment of the present invention adopts a combination of laser radar and a monocular camera, and uses multiple laser radars to provide accurate distance information of multiple points to correct the global error of monocular ranging , which can simplify the difficulty of the ranging algorithm, improve the accuracy, reduce the cost, and has good integration with various monocular ranging algorithms.
可选地,测距神经网络模型的训练过程如下:Optionally, the training process of the ranging neural network model is as follows:
首先,提取训练数据集中的各图像的像素特征;然后,将像素特征对应矩阵、图像的全局参考误差矩阵耦合后输入测距神经网络模型进行训练,直至损失函数满足预设终止条件。First, the pixel features of each image in the training data set are extracted; then, the pixel feature correspondence matrix and the global reference error matrix of the image are coupled and input into the ranging neural network model for training until the loss function satisfies the preset termination condition.
图像的像素特征包括各像素的位置矩阵及模糊圆大小矩阵,位置矩阵表示各像素与中心点的距离,该模糊圆大小矩阵表示各模糊圆相对于中心点的模糊圆或者接近中心点的模糊圆的比值,该损失函数为模型预测距离与实际距离的差值。The pixel features of the image include the position matrix of each pixel and the fuzzy circle size matrix. The position matrix represents the distance between each pixel and the center point. The fuzzy circle size matrix represents the fuzzy circle of each fuzzy circle relative to the center point or the fuzzy circle close to the center point. The ratio of the loss function is the difference between the model predicted distance and the actual distance.
测距神经网络模型的输入包括:原图像、单目摄像头距离预测矩阵A1、原始校正矩阵B;输出为:距离的最终预测矩阵A'。The input of the ranging neural network model includes: the original image, the monocular camera distance prediction matrix A 1 , and the original correction matrix B; the output is: the final distance prediction matrix A'.
其中,原图提供的信息包括像素点的位置、模糊圆大小、目标整体等,相对位置、模糊圆相对大小等作为修正校正矩阵B的依据,即修正后的校正矩阵:Among them, the information provided by the original image includes the position of the pixel point, the size of the fuzzy circle, the overall target, etc. The relative position, the relative size of the fuzzy circle, etc. are used as the basis for correcting the correction matrix B, that is, the corrected correction matrix:
B'=f(位置,模糊圆,B) (7)B'=f(position, fuzzy circle, B) (7)
上述输入输出的关系为:The relationship between the above input and output is:
A'=A1+B' (8)A'=A 1 +B' (8)
如果通过实际测量得到一个真实的距离矩阵A,那么B'=A-A1即为希望得到的优化后的校正矩阵,因此,可以使用B'-B作为目标函数。If a real distance matrix A is obtained by actual measurement, then B'=AA 1 is the desired optimized correction matrix. Therefore, B'-B can be used as the objective function.
具体地,上述像素特征对应矩阵、图像的全局参考误差矩阵耦合公式如下:Specifically, the coupling formula of the above-mentioned pixel feature corresponding matrix and the global reference error matrix of the image is as follows:
(9) (9)
其中,L n 为耦合后的距离误差矩阵,γ为修正系数,L 0为多个激光雷达测距确定的全局参考误差矩阵,S n 为图像中全部像素与图像中心点的距离组成的矩阵,O n 为图像中任意模糊圆相对于图像中心点的模糊圆或者接近图像中心点的模糊圆的比值组成的矩阵,k1、k2为预先标定的次数,⨀表示元素积运算。耦合公式中模糊圆大小矩阵的次数k2、相对位置矩阵的次数k1通过标定获得。Among them, L n is the distance error matrix after coupling, γ is the correction coefficient, L 0 is the global reference error matrix determined by multiple lidar ranging, S n is the matrix composed of the distance between all pixels in the image and the center point of the image, On is a matrix composed of the ratio of any fuzzy circle in the image to the fuzzy circle at the center of the image or the fuzzy circle close to the center of the image,
若只考虑相对位置与测距误差之间的关系,设L 0为激光测距点测出的单目测距误差(为了简单叙述,这里只考虑激光测距点为摄像头像素中心点的情况),由先验知识可以知道,任意像素点与其距离中心点的距离S n有如下关系:If only the relationship between the relative position and the ranging error is considered, let L 0 be the monocular ranging error measured by the laser ranging point (for the sake of simplicity, only the case where the laser ranging point is the center of the camera pixel is considered) , from the prior knowledge, it can be known that any pixel point has the following relationship with the distance Sn from the center point:
(10) (10)
其中,L n为Sn对应的像素点;α为修正系数;因为认为中心点在减去激光雷达测距的误差后误差为0,所以没有偏置,⨀表示元素积运算。Among them, L n is the pixel point corresponding to Sn ; α is the correction coefficient; because it is considered that the error of the center point is 0 after subtracting the error of the lidar ranging, so there is no offset, and ⨀ represents the element product operation.
同理,设任意模糊圆相对于中心或接近中心的模糊圆的大小为O n =该点模糊圆/中心点附近模糊圆,则若只考虑模糊圆大小时,有:In the same way, let the size of any fuzzy circle relative to the center or the fuzzy circle close to the center be O n = fuzzy circle at this point/fuzzy circle near the center point, then if only the size of the fuzzy circle is considered, there are:
(11) (11)
其中,L n为Sn对应的像素点;β为修正系数。Among them, L n is the pixel point corresponding to Sn ; β is the correction coefficient.
假设模糊圆与像素位置是相互独立的关系,则有:Assuming that the fuzzy circle and the pixel position are independent of each other, there are:
将这3个矩阵按上述公式相乘,放入全连接神经网络进行训练,用实验测得的实际误差优化,使最终结果收敛于实际距离矩阵,就得到了训练好的单目测距校正神经网络模型。Multiply these three matrices according to the above formula, put them into the fully connected neural network for training, and optimize the actual error measured by the experiment, so that the final result converges to the actual distance matrix, and the trained monocular ranging correction neural network is obtained. network model.
参见图3所示的单目测距校正神经网络模型的训练流程示意图,将单目摄像头拍摄的图像经过相关光学公式得到模糊圆大小矩阵,耦合后的原始校正矩阵与位置矩阵,一起作为全连接神经网络的输入,神经网络的输出为校正后的深度图,将校正后的深度图与实际测得的深度图进行比较,作为损失函数通过梯度下降算法改变神经网络的权重,直至损失函数结果可接受。Referring to the schematic diagram of the training process of the monocular ranging correction neural network model shown in Figure 3, the fuzzy circle size matrix is obtained by applying the image captured by the monocular camera to the relevant optical formula , the coupled original correction matrix and position matrix , together as the input of the fully connected neural network, the output of the neural network is the corrected depth map, the corrected depth map is compared with the actual measured depth map, and the weight of the neural network is changed as a loss function through the gradient descent algorithm, until the loss function result is acceptable.
在实际应用中,为了进一步提高校正效果以及考虑到成本等因素,示例性地,本实施例提出一种用1个摄像头和5个激光雷达的布置形式及耦合公式的改进方法。In practical applications, in order to further improve the correction effect and consider factors such as cost, this embodiment exemplarily proposes an improved method using an arrangement of one camera and five lidars and a coupling formula.
单目摄像头主光轴与5个单线激光雷达射线方向平行布置,保证激光雷达测距点在单目摄像头获取图像的像素位置基本固定。其中1个激光雷达贴近单目相机固定,使激光测距点尽量靠近相机获取的散焦图像的中心点,其他4个激光雷达稍微远离单目摄像头并围绕相机均匀布置,例如4个激光测距点分别3等分图像的2条对角线。激光测距点所对应的摄像头图像的像素点的位置,基本位于整张图的中心以及2个对角线的三等分点处。The main optical axis of the monocular camera is arranged in parallel with the ray directions of the five single-line lidars, ensuring that the pixel positions of the lidar ranging points in the images obtained by the monocular camera are basically fixed. One of the lidars is fixed close to the monocular camera, so that the laser ranging point is as close as possible to the center point of the defocused image obtained by the camera, and the other four lidars are slightly away from the monocular camera and evenly arranged around the camera, for example, four laser ranging Points 3 equally divide the 2 diagonals of the image. The position of the pixel point of the camera image corresponding to the laser ranging point is basically located at the center of the entire image and at the third point of the two diagonal lines.
对于耦合公式的改进,将贴近中心点的激光雷达的测距与单目测距计算得到的误差作为全局的参考误差L 0',将图像按像素位置分为左上、右上、左下、右下,四个距离相机较远的激光雷达测距计算出的单目测距的误差作为上述四个局部的局部参考误差L 11、L 12、L 21、L 22。将L 11、L 12、L 21、L 22按照像素数量填充到误差矩阵的对应位置,得到局部误差矩阵L 1,即:For the improvement of the coupling formula, the error calculated by the distance measurement of the lidar close to the center point and the monocular distance measurement is used as the global reference error L 0 ', and the image is divided into upper left, upper right, lower left and lower right according to the pixel position. The errors of the monocular ranging calculated by the Lidar ranging from the four distances far from the camera are used as the local reference errors L 11 , L 12 , L 21 , and L 22 for the above four parts. Fill L 11 , L 12 , L 21 , and L 22 to the corresponding positions of the error matrix according to the number of pixels to obtain the local error matrix L 1 , namely:
L 1=[[L 11 L 12] L 1 =[[ L 11 L 12 ]
[L 21 L 22]][ L 21 L 22 ]]
具体地,将贴近单目摄像头的激光雷达的测距结果与单目摄像头测距结果的误差作为全局参考误差L 0 ',将围绕单目摄像头均匀布置的激光雷达的测距结果与单目摄像头测距结果的误差作为局部参考误差L 1,L 0如下:Specifically, the error between the ranging result of the lidar close to the monocular camera and the ranging result of the monocular camera is taken as the global reference error L 0 ′ , and the ranging result of the lidar evenly arranged around the monocular camera is compared with the monocular camera. The error of the ranging result is taken as the local reference error L 1 , L 0 is as follows:
L 0=L 0'+λ∙L 1 L 0 = L 0 '+ λ∙L 1
其中,λ为全局参考误差与局部参考误差的影响系数。Among them, λ is the influence coefficient of global reference error and local reference error.
可选地,上述方法还包括模糊圆大小矩阵的次数k2、相对位置矩阵的次数k1的标定步骤,因为摄像机不同,模糊圆、位置等的次数也应该有所差异,可以用如下方法标定该次数:Optionally, the above method also includes a calibration step of the
将沿径向的一条直线测量得到的不同位置的误差进行多项式拟合,确定相对位置的次数k1;将沿轴向的一条直线测量得到的不同位置的误差进行多形式拟合,确定模糊圆的次数k2。Perform polynomial fitting on the errors at different positions measured by a straight line along the radial direction to determine the relative
在摄像头轴向和径向的不同位置放置测试目标物体分别获取误差与模糊圆和像素位置的关系数据,通过多项式拟合模糊圆大小、位置与误差的关系,单独标定模糊圆大小O n 和像素位置S n 的次数。Place the test object at different positions in the axial and radial directions of the camera to obtain the relationship data between the error and the fuzzy circle and the pixel position, fit the relationship between the size, position and error of the fuzzy circle by a polynomial, and separately calibrate the size of the fuzzy circle O n and the pixel Number of times for position Sn .
本实施例中的校核误差的方式同样适用于其他单目测距算法,如果采用激光雷达与摄像头成一定角度的布置方式,则应进行激光测距点与摄像头像素点的匹配。The method of checking errors in this embodiment is also applicable to other monocular ranging algorithms. If the laser radar and the camera are arranged at a certain angle, the matching of the laser ranging points and the camera pixels should be performed.
本发明实施例还提供了一种利用单线激光雷达校正单目测距的系统,可以执行上述实施例提供的利用单线激光雷达校正单目测距的方法,具体可以包括测距神经网络模型、单目摄像头及多个激光雷达。The embodiment of the present invention also provides a system for correcting monocular ranging by using a single-line laser radar, which can implement the method for correcting monocular ranging by using a single-line laser radar provided in the above-mentioned embodiments, which may specifically include a ranging neural network model, a single-lens camera and multiple lidars.
其中,单目摄像头的光轴与各激光雷达的射线方向平行布置;至少一个激光雷达贴近单目摄像头布置,其余激光雷达围绕单目摄像头均匀布置;测距神经网络模型用于确定输入的单目摄像头采集图像中目标的距离信息,测距神经网络模型由训练数据集、多个激光雷达测距确定的全局参考误差矩阵训练得到,训练数据集包括多张图像及各张图像中像素的实际距离。Among them, the optical axis of the monocular camera is arranged parallel to the ray direction of each lidar; at least one lidar is arranged close to the monocular camera, and the rest of the lidars are evenly arranged around the monocular camera; the ranging neural network model is used to determine the input monocular The camera collects the distance information of the target in the image, and the ranging neural network model is trained from the training data set and the global reference error matrix determined by multiple lidar ranging. The training data set includes multiple images and the actual distance of the pixels in each image. .
本发明实施例提供的利用单线激光雷达校正单目测距的系统,采用激光雷达与单目摄像头相结合的方式,利用多个激光雷达提供多点的精确距离信息以校正单目测距全局误差,能够简化测距的算法难度,同时提高精度,降低成本。The system for correcting monocular ranging by using a single-line laser radar provided by the embodiment of the present invention adopts a combination of laser radar and a monocular camera, and uses multiple laser radars to provide accurate distance information of multiple points to correct the global error of monocular ranging , which can simplify the algorithm difficulty of ranging, while improving the accuracy and reducing the cost.
可选地,围绕单目摄像头均匀布置的激光雷达的测距点均落在图像的对角线上,且各测距点在对角线上均匀分布;或者,围绕单目摄像头均匀布置的激光雷达的测距点均落在图像的中线上,且各测距点在中线上均匀分布。Optionally, the ranging points of the lidar evenly arranged around the monocular camera all fall on the diagonal of the image, and the ranging points are evenly distributed on the diagonal; or, the lasers evenly arranged around the monocular camera The ranging points of the radar all fall on the center line of the image, and the ranging points are evenly distributed on the center line.
本领域技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程度来指令控制装置来完成,所述的程序可存储于一计算机可读取的存储介质中,所述程序在执行时可包括如上述各方法实施例的流程,其中所述的存储介质可为存储器、磁盘、光盘等。Those skilled in the art can understand that the realization of all or part of the processes in the methods of the above embodiments can be accomplished by instructing the control device through a computer level, and the program can be stored in a computer-readable storage medium. During execution, the processes of the above-mentioned method embodiments may be included, wherein the storage medium may be a memory, a magnetic disk, an optical disk, or the like.
在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。In this document, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such existence between these entities or operations. The actual relationship or sequence. Moreover, the terms "comprising", "comprising" or any other variation thereof are intended to encompass a non-exclusive inclusion such that a process, method, article or device that includes a list of elements includes not only those elements, but also includes not explicitly listed or other elements inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element.
本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same and similar parts between the various embodiments can be referred to each other.
对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本发明。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本发明的精神或范围的情况下,在其它实施例中实现。因此,本发明将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。The above description of the disclosed embodiments enables any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110763071.7A CN113219475B (en) | 2021-07-06 | 2021-07-06 | Method and system for correcting monocular ranging by using single-line lidar |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110763071.7A CN113219475B (en) | 2021-07-06 | 2021-07-06 | Method and system for correcting monocular ranging by using single-line lidar |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN113219475A true CN113219475A (en) | 2021-08-06 |
| CN113219475B CN113219475B (en) | 2021-10-22 |
Family
ID=77081050
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202110763071.7A Active CN113219475B (en) | 2021-07-06 | 2021-07-06 | Method and system for correcting monocular ranging by using single-line lidar |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN113219475B (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113655499A (en) * | 2021-08-16 | 2021-11-16 | 合肥芯福传感器技术有限公司 | Automatic driving method and system based on single photon image sensor |
| CN118942038A (en) * | 2024-07-30 | 2024-11-12 | 江苏濠汉信息技术有限公司 | Method and system for measuring distance of hazardous sources at construction sites based on error correction model |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106780588A (en) * | 2016-12-09 | 2017-05-31 | 浙江大学 | A kind of image depth estimation method based on sparse laser observations |
| US20190004535A1 (en) * | 2017-07-03 | 2019-01-03 | Baidu Usa Llc | High resolution 3d point clouds generation based on cnn and crf models |
| CN112070659A (en) * | 2020-09-08 | 2020-12-11 | 苏州易航远智智能科技有限公司 | A method for 3D information correction using deep convolutional neural networks |
| CN112241978A (en) * | 2020-10-21 | 2021-01-19 | 广州小鹏自动驾驶科技有限公司 | Data processing method and device |
| CN112484746A (en) * | 2020-11-26 | 2021-03-12 | 上海电力大学 | Monocular vision-assisted laser radar odometer method based on ground plane |
-
2021
- 2021-07-06 CN CN202110763071.7A patent/CN113219475B/en active Active
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106780588A (en) * | 2016-12-09 | 2017-05-31 | 浙江大学 | A kind of image depth estimation method based on sparse laser observations |
| US20190004535A1 (en) * | 2017-07-03 | 2019-01-03 | Baidu Usa Llc | High resolution 3d point clouds generation based on cnn and crf models |
| CN112070659A (en) * | 2020-09-08 | 2020-12-11 | 苏州易航远智智能科技有限公司 | A method for 3D information correction using deep convolutional neural networks |
| CN112241978A (en) * | 2020-10-21 | 2021-01-19 | 广州小鹏自动驾驶科技有限公司 | Data processing method and device |
| CN112484746A (en) * | 2020-11-26 | 2021-03-12 | 上海电力大学 | Monocular vision-assisted laser radar odometer method based on ground plane |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113655499A (en) * | 2021-08-16 | 2021-11-16 | 合肥芯福传感器技术有限公司 | Automatic driving method and system based on single photon image sensor |
| CN118942038A (en) * | 2024-07-30 | 2024-11-12 | 江苏濠汉信息技术有限公司 | Method and system for measuring distance of hazardous sources at construction sites based on error correction model |
Also Published As
| Publication number | Publication date |
|---|---|
| CN113219475B (en) | 2021-10-22 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10664998B2 (en) | Camera calibration method, recording medium, and camera calibration apparatus | |
| CN108961184B (en) | A depth image correction method, device and device | |
| CN111487043B (en) | Method for determining calibration parameters of speckle projector of monocular speckle structured light system | |
| CN107886477B (en) | Fusion correction method for three-dimensional vision and low-beam laser radar in unmanned driving | |
| US10540813B1 (en) | Three-dimensional point data alignment | |
| WO2016106694A1 (en) | System and method for adjusting a baseline of an imaging system with microlens array | |
| CN104089628B (en) | Self-adaption geometric calibration method of light field camera | |
| CN111123242B (en) | Combined calibration method based on laser radar and camera and computer readable storage medium | |
| CN113219475B (en) | Method and system for correcting monocular ranging by using single-line lidar | |
| CN103516979A (en) | Image pickup apparatus and control method of the same | |
| CN115018922B (en) | Distortion parameter calibration method, electronic device and computer-readable storage medium | |
| CN107424195B (en) | Light field distance estimation method | |
| CN114511609A (en) | Unsupervised light field disparity estimation system and method based on occlusion perception | |
| WO2023079565A1 (en) | System and method for stereoscopic image analysis | |
| CN113014899B (en) | Method, device and system for determining parallax of binocular images | |
| CN109064392A (en) | Method and system for determining homography matrix, and image conversion method and system | |
| WO2021077731A1 (en) | Multi-distance calibration method and system based on depth camera | |
| JP7414332B2 (en) | Depth map image generation method and computing device therefor | |
| US10339665B2 (en) | Positional shift amount calculation apparatus and imaging apparatus | |
| CN110470216B (en) | Three-lens high-precision vision measurement method and device | |
| CN115355887B (en) | Two-stage monocular depth measurement method, system and medium based on liquid bionic vision | |
| CN118298033A (en) | Parameter calibration method, device, equipment and storage medium of binocular camera | |
| CN117974803A (en) | A method and related device for multi-sensor fusion calibration | |
| JP2024062190A (en) | Image processing device and method, program, and storage medium | |
| CN116363225A (en) | Calibration external parameter value verification method, equipment and medium of camera |
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 |