CN114485683B - Local fragment map matching method and device based on Monte Carlo optimization - Google Patents
Local fragment map matching method and device based on Monte Carlo optimization Download PDFInfo
- Publication number
- CN114485683B CN114485683B CN202111667417.XA CN202111667417A CN114485683B CN 114485683 B CN114485683 B CN 114485683B CN 202111667417 A CN202111667417 A CN 202111667417A CN 114485683 B CN114485683 B CN 114485683B
- Authority
- CN
- China
- Prior art keywords
- fragment map
- energy value
- local
- map
- partial fragment
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01C—MEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
- G01C21/00—Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
- G01C21/26—Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network
- G01C21/28—Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network with correlation of data from several navigational instruments
- G01C21/30—Map- or contour-matching
Landscapes
- Engineering & Computer Science (AREA)
- Radar, Positioning & Navigation (AREA)
- Remote Sensing (AREA)
- Automation & Control Theory (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
- Image Analysis (AREA)
Abstract
本发明涉及一种基于蒙特卡洛优化的局部碎片地图匹配方法及装置,所述方法包括:定义用于评估匹配好坏程度的能量函数;计算局部碎片地图A和B的面积及其重叠面积代入所述能量函数中计算初始能量值;对局部碎片地图B进行随机平移或旋转,代入能量函数计算新的能量值,比较新的能量值与初始能量值,若新的能量值较低,则接受局部碎片地图B此次平移或旋转操作,否则拒绝局部碎片地图B此次平移或旋转操作。通过蒙特卡洛采样方法将二维平面上复杂的几何形状之间的匹配问题转化成一个迭代求解的问题,算法实现简单,不依赖具体的匹配规则。
The present invention relates to a local fragment map matching method and device based on Monte Carlo optimization. The method includes: defining an energy function for evaluating the degree of matching; calculating the areas of local fragment maps A and B and their overlapping areas into Calculate the initial energy value in the energy function; perform random translation or rotation on the local fragment map B, substitute into the energy function to calculate a new energy value, compare the new energy value with the initial energy value, if the new energy value is lower, accept The current translation or rotation operation of the local fragment map B, otherwise, the current translation or rotation operation of the partial fragment map B is rejected. The matching problem between complex geometric shapes on a two-dimensional plane is transformed into an iterative solution problem through the Monte Carlo sampling method. The algorithm is simple to implement and does not depend on specific matching rules.
Description
技术领域Technical Field
本发明涉及自动驾驶技术领域,具体涉及自动驾驶车辆自动化建图场景下的一种基于蒙特卡洛优化的局部碎片地图匹配方法及装置。The present invention relates to the field of autonomous driving technology, and in particular to a local fragment map matching method and device based on Monte Carlo optimization in an automated mapping scenario of an autonomous driving vehicle.
背景技术Background Art
自动驾驶车辆的规划能力基于车道级的高精度地图,传统的基于激光雷达和高精度定位传感器的高精度地图采集设备成本非常高昂,很难实现地图的即时更新。采用视觉和惯性导航传感器的方案能够大幅降低地图生产成本,但是车载的单点GPS设备误差通常较大,需要采用SLAM中的优化方法消除或平滑累积误差。在采用基于优化方法时需要确定数据之间的关联关系,以及车辆不同时刻位姿之间的相对关系,为了得到这种对应关系,我们需要将车辆碎片地图数据之间进行匹配。传统的激光雷达点云之间通常采用迭代最近点(ICP)方法进行优化两个点云之间的匹配关系,在特征点丰富、感知错误较少的场景下能够很好地估计点之间的对应关系,但是通过视觉感知得到的语义几何数据通常只由少量点组成的几何形状组成(特征点并不丰富),所以ICP方法通常效果较差,不满足这种应用场景。The planning capability of autonomous vehicles is based on lane-level high-precision maps. Traditional high-precision map acquisition equipment based on lidar and high-precision positioning sensors is very expensive, and it is difficult to achieve real-time map updates. The solution using visual and inertial navigation sensors can greatly reduce the cost of map production, but the error of single-point GPS devices on vehicles is usually large, and optimization methods in SLAM need to be used to eliminate or smooth the accumulated error. When using optimization-based methods, it is necessary to determine the correlation between data and the relative relationship between the vehicle's postures at different times. In order to obtain this correspondence, we need to match the vehicle fragment map data. Traditional lidar point clouds usually use the iterative closest point (ICP) method to optimize the matching relationship between two point clouds. In scenarios with rich feature points and few perception errors, the correspondence between points can be well estimated, but the semantic geometric data obtained through visual perception usually consists of geometric shapes composed of only a small number of points (feature points are not rich), so the ICP method usually has poor results and does not meet this application scenario.
发明内容Summary of the invention
本发明针对现有技术中存在的技术问题,提供一种基于蒙特卡洛优化的局部碎片地图匹配方法及装置,采用增强采样的方式估计两组数据之间的匹配关系,该方法在数据质量较好时较为稳定地对两两之间的碎片地图数据进行匹配,算法实现简单,不依赖具体的匹配规则。In view of the technical problems existing in the prior art, the present invention provides a local fragment map matching method and device based on Monte Carlo optimization, which adopts enhanced sampling to estimate the matching relationship between two sets of data. When the data quality is good, the method can match the fragment map data between each other more stably. The algorithm is simple to implement and does not rely on specific matching rules.
本发明解决上述技术问题的技术方案如下:The technical solution of the present invention to solve the above technical problems is as follows:
第一方面,本发明提供一种基于蒙特卡洛优化的局部碎片地图匹配方法,包括以下步骤:In a first aspect, the present invention provides a local fragment map matching method based on Monte Carlo optimization, comprising the following steps:
S1,定义用于评估匹配好坏程度的能量函数,所述能量函数以参与匹配的两块局部碎片地图的面积及其重叠面积为变量;S1, defining an energy function for evaluating the degree of matching, wherein the energy function takes the areas of the two local fragment maps involved in the matching and their overlapping areas as variables;
S2,针对待匹配的两块局部碎片地图A和B,计算局部碎片地图A和B的面积及其重叠面积代入所述能量函数中计算初始能量值;S2, for the two local fragment maps A and B to be matched, calculating the areas of the local fragment maps A and B and their overlapping areas, and substituting them into the energy function to calculate the initial energy value;
S3,对局部碎片地图B进行随机平移或旋转,代入能量函数计算新的能量值,比较新的能量值与能量阈值的大小,若新的能量值≤能量阈值,则认为平移或旋转后的局部碎片地图B与局部碎片地图A匹配,并输出平移或旋转后的局部碎片地图B,否则执行步骤S4;S3, randomly translate or rotate the local fragment map B, substitute it into the energy function to calculate the new energy value, compare the new energy value with the energy threshold, if the new energy value is less than or equal to the energy threshold, it is considered that the translated or rotated local fragment map B matches the local fragment map A, and output the translated or rotated local fragment map B, otherwise, execute step S4;
S4,比较新的能量值与初始能量值,若新的能量值较低,则接受局部碎片地图B此次平移或旋转操作,并跳转至步骤S3,否则拒绝局部碎片地图B此次平移或旋转操作并执行步骤S5;S4, compare the new energy value with the initial energy value. If the new energy value is lower, accept the translation or rotation operation of the local fragment map B and jump to step S3. Otherwise, reject the translation or rotation operation of the local fragment map B and execute step S5.
S5,判断连续拒绝次数是否达到预设次数,若是则认为能量函数已收敛,输出连续拒绝之前的局部碎片地图B,否则跳转至步骤S3。S5, judging whether the number of consecutive rejections reaches a preset number, if so, it is considered that the energy function has converged, and the local fragment map B before the consecutive rejections is output, otherwise jump to step S3.
进一步的,步骤S2还包括,根据车道线方向确定局部碎片地图B的横向方向和纵向方向,所述横向方向与车道线方向平行。Furthermore, step S2 also includes determining a lateral direction and a longitudinal direction of the local fragment map B according to the lane line direction, wherein the lateral direction is parallel to the lane line direction.
进一步的,所述的对局部碎片地图B进行随机平移或旋转,包括:Furthermore, the random translation or rotation of the local fragment map B includes:
产生一个[0,1]之间的随机数x;Generate a random number x between [0,1];
若0≤x≤0.33,则对局部碎片地图B进行横向平移一个随机距离;If 0≤x≤0.33, the local fragment map B is translated horizontally by a random distance;
若0.33<x≤0.66,则对局部碎片地图B进行纵向平移一个随机距离;If 0.33<x≤0.66, the local fragment map B is translated vertically by a random distance;
若0.66<x≤1,则将局部碎片地图B旋转一个随机角度;If 0.66<x≤1, rotate the local fragment map B by a random angle;
所述随机距离和随机角度均根据匹配精度要求设定取值范围。The random distance and the random angle are both set in a value range according to the matching accuracy requirement.
进一步的,步骤S2还包括,比较初始能量值与能量阈值的大小,若初始能量值≤能量阈值,则认为平移或旋转后的局部碎片地图B与局部碎片地图A匹配,并输出平移或旋转后的局部碎片地图B。Furthermore, step S2 also includes comparing the initial energy value with an energy threshold. If the initial energy value is less than or equal to the energy threshold, it is considered that the translated or rotated local fragment map B matches the local fragment map A, and the translated or rotated local fragment map B is output.
进一步的,所述步骤S4包括:Further, the step S4 includes:
比较新的能量值与初始能量值,若新的能量值较高,则基于能量差值,利用市长算法计算接受概率;Compare the new energy value with the initial energy value. If the new energy value is higher, the acceptance probability is calculated based on the energy difference using the Mayor algorithm.
根据所述接受概率判断是否接受局部碎片地图B此次平移或旋转操作。Whether to accept the translation or rotation operation of the local fragment map B is determined according to the acceptance probability.
进一步的,所述的根据所述接受概率判断是否接受局部碎片地图B此次平移或旋转操作,包括:Furthermore, judging whether to accept the translation or rotation operation of the local fragment map B according to the acceptance probability includes:
产生一个[0,1]之间的随机数y;Generate a random number y between [0,1];
比较随机数y与接收概率之间的大小;Compare the random number y with the received probability;
若随机数y小于接收概率,则接受局部碎片地图B此次平移或旋转操作;If the random number y is less than the acceptance probability, the translation or rotation operation of the local fragment map B is accepted;
否则,拒绝局部碎片地图B此次平移或旋转操作。Otherwise, the translation or rotation operation of the local fragment map B is rejected.
进一步的,所述能量函数如下式所示:Furthermore, the energy function is shown in the following formula:
式中,Ai和Bj分别是局部碎片地图A和B中两个有重叠的几何图形;Overlap函数用来计算两个几何形状之间的重叠面积,Area函数用来计算单个几何形状的面积。Where A i and B j are two overlapping geometric shapes in the local fragment maps A and B, respectively; the Overlap function is used to calculate the overlapping area between two geometric shapes, and the Area function is used to calculate the area of a single geometric shape.
第二方面,本发明提供一种基于蒙特卡洛优化的局部碎片地图匹配装置,包括:In a second aspect, the present invention provides a local fragment map matching device based on Monte Carlo optimization, comprising:
函数定义模块,定义用于评估匹配好坏程度的能量函数,所述能量函数以参与匹配的两块局部碎片地图的面积及其重叠面积为变量;A function definition module, defining an energy function for evaluating the degree of matching, wherein the energy function takes the areas of two local fragment maps involved in the matching and their overlapping areas as variables;
能量值计算模块,用于计算局部碎片地图A和B的面积及其重叠面积代入所述能量函数中计算初始能量值;用于计算平移或旋转后的B与A的能量值;An energy value calculation module, used to calculate the areas of local fragment maps A and B and their overlapping areas, and substitute them into the energy function to calculate the initial energy value; used to calculate the energy values of B and A after translation or rotation;
局部碎片地图姿态调整模块,用于对局部碎片地图B进行随机平移或旋转;A local fragment map posture adjustment module is used to randomly translate or rotate the local fragment map B;
比较判断模块,用于比较新的能量值与初始能量值的大小,用于比较新的能量值与能量阈值的大小,用于根据比较结果判断接受或拒绝局部碎片地图B的平移或旋转操作,用于判断连续拒绝次数是否达到预设次数。A comparison and judgment module is used to compare the new energy value with the initial energy value, to compare the new energy value with the energy threshold, to judge whether to accept or reject the translation or rotation operation of the local fragment map B according to the comparison result, and to judge whether the number of consecutive rejections reaches a preset number.
第三方面,本发明提供一种电子设备,包括:In a third aspect, the present invention provides an electronic device, comprising:
存储器,用于存储计算机软件程序;Memory for storing computer software programs;
处理器,用于读取并执行所述计算机软件程序,进而实现本发明第一方面所述的一种基于蒙特卡洛优化的局部碎片地图匹配方法。The processor is used to read and execute the computer software program, thereby implementing the local fragment map matching method based on Monte Carlo optimization described in the first aspect of the present invention.
第四方面,本发明提供一种非暂态计算机可读存储介质,所述存储介质中存储有用于实现本发明第一方面所述的一种基于蒙特卡洛优化的局部碎片地图匹配方法的计算机软件程序。In a fourth aspect, the present invention provides a non-transitory computer-readable storage medium, wherein the storage medium stores a computer software program for implementing a local fragment map matching method based on Monte Carlo optimization as described in the first aspect of the present invention.
本发明的有益效果是:本发明通过蒙特卡洛采样方法将二维平面上复杂的几何形状之间的匹配问题转化成一个迭代求解的问题,能够避免在算法中编码复杂的规则,通过对虚拟温度因子进行调节,我们可以控制采取保守匹配策略还是激进的匹配策略。在两个局部几何地图相差不远的时候,算法可以自然地搜索到最佳匹配结果。The beneficial effects of the present invention are as follows: the present invention transforms the matching problem between complex geometric shapes on a two-dimensional plane into an iterative solution problem through the Monte Carlo sampling method, which can avoid encoding complex rules in the algorithm. By adjusting the virtual temperature factor, we can control whether to adopt a conservative matching strategy or an aggressive matching strategy. When the two local geometric maps are not far apart, the algorithm can naturally search for the best matching result.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1为本发明实施例提供的一种基于蒙特卡洛优化的局部碎片地图匹配方法流程示意图;FIG1 is a schematic flow chart of a local fragment map matching method based on Monte Carlo optimization provided by an embodiment of the present invention;
图2为本发明实施例提供的一种基于蒙特卡洛优化的局部碎片地图匹配装置结构示意图;FIG2 is a schematic diagram of the structure of a local fragment map matching device based on Monte Carlo optimization provided by an embodiment of the present invention;
图3为本发明实施例提供的电子设备的实施例示意图;FIG3 is a schematic diagram of an embodiment of an electronic device provided by an embodiment of the present invention;
图4为本发明实施例提供的一种计算机可读存储介质的实施例示意图;FIG4 is a schematic diagram of an embodiment of a computer-readable storage medium provided by an embodiment of the present invention;
图5为本发明实施例提供的局部碎片地图A和B的示意图。FIG5 is a schematic diagram of local fragment maps A and B provided by an embodiment of the present invention.
具体实施方式DETAILED DESCRIPTION
以下结合附图对本发明的原理和特征进行描述,所举实例只用于解释本发明,并非用于限定本发明的范围。The principles and features of the present invention are described below in conjunction with the accompanying drawings. The examples given are only used to explain the present invention and are not used to limit the scope of the present invention.
现有车辆采集的两组局部几何碎片数据A,B,如图5所示,它们包含车辆观测到的车道线轮廓、地面箭头、斑马线、停止线和空中标志牌等交通要素,这些交通要素都由多边形组成。由于观测误差,观测到的几何形状可能与现实存在差异,多次观测之间也可能存在一定的不同。车辆测量的时候采用了精度较低的单点GPS,他们的精度通常在2~10米,不足以实现车道级的匹配。而且,在GPS信号较差的位置,其精度会出现较大的退化,所以车辆对同一个位置的多次观测之间存在一定的位置差异,不过,车辆在同一时刻观测到的多个几何特征之间的相对位置较为准确,也就是满足相对精度。现在需要估算A和B之间的对应关系以及它们之间的仿射变换关系。由于我们已经确定了片段数据之间的粗粒化匹配关系,也就是得知了哪些片段数据在同一个路段,所以我们只需要在二维空间来解决这个问题,问题就简化成了寻找两个形状类似的、由多个几何形状组成的刚体之间的变换关系。该问题看似简单,实则存在诸多的不确定性,很难通过确定性的算法得到最优解。The two sets of local geometric fragment data A and B collected by existing vehicles are shown in Figure 5. They contain traffic elements such as lane line contours, ground arrows, zebra crossings, stop lines and aerial signs observed by the vehicle. These traffic elements are composed of polygons. Due to observation errors, the observed geometric shapes may be different from the actual ones, and there may be certain differences between multiple observations. When measuring vehicles, single-point GPS with low accuracy is used. Their accuracy is usually 2 to 10 meters, which is not enough to achieve lane-level matching. Moreover, in locations with poor GPS signals, its accuracy will be greatly degraded, so there is a certain position difference between multiple observations of the same location by the vehicle. However, the relative positions between multiple geometric features observed by the vehicle at the same time are relatively accurate, that is, relative accuracy is met. Now it is necessary to estimate the correspondence between A and B and the affine transformation relationship between them. Since we have determined the coarse-grained matching relationship between the fragment data, that is, we know which fragment data are in the same section, so we only need to solve this problem in two-dimensional space. The problem is simplified to finding the transformation relationship between two rigid bodies with similar shapes and composed of multiple geometric shapes. This problem seems simple, but in fact there are many uncertainties, and it is difficult to get the optimal solution through a deterministic algorithm.
图1为本发明实施例提供的一种基于蒙特卡洛优化的局部碎片地图匹配方法流程示意图,如图1所示,该方法包括以下步骤:FIG1 is a flow chart of a local fragment map matching method based on Monte Carlo optimization provided by an embodiment of the present invention. As shown in FIG1 , the method includes the following steps:
S1,定义用于评估匹配好坏程度的能量函数,所述能量函数以参与匹配的两块局部碎片地图的面积及其重叠面积为变量;能量函数反映的是不匹配程度,越低越好。S1, define an energy function for evaluating the quality of matching, wherein the energy function takes the areas of the two local fragment maps involved in the matching and their overlapping areas as variables; the energy function reflects the degree of mismatch, the lower the better.
能量函数Objective如下式所示:The energy function Objective is as follows:
式中,Ai和Bj分别是局部碎片地图A和B中两个有重叠的几何图形;Overlap函数用来计算两个几何形状之间的重叠面积,Area函数用来计算单个几何形状的面积。Where A i and B j are two overlapping geometric shapes in the local fragment maps A and B, respectively; the Overlap function is used to calculate the overlapping area between two geometric shapes, and the Area function is used to calculate the area of a single geometric shape.
如果两个几何形状完全重叠,该目标函数的值为1,如果完全不重叠,则为0。两个碎片几何数据之间的匹配就是让所有的几何要素之间的重叠面积在满足不互斥的前提下最小化能量函数。If the two geometric shapes completely overlap, the value of the objective function is 1, and if they do not overlap at all, it is 0. The matching between two fragmented geometric data is to minimize the energy function under the premise of satisfying non-mutual exclusion of the overlapping area between all geometric elements.
S2,针对待匹配的两块局部碎片地图A和B,计算局部碎片地图A和B的面积及其重叠面积代入所述能量函数中计算初始能量值;S2, for the two local fragment maps A and B to be matched, calculating the areas of the local fragment maps A and B and their overlapping areas, and substituting them into the energy function to calculate the initial energy value;
这里计算得到初始能量值后,需比较初始能量值与能量阈值的大小,若初始能量值≤能量阈值,则认为平移或旋转后的局部碎片地图B与局部碎片地图A匹配,并输出平移或旋转后的局部碎片地图B,无需进行后续步骤。After the initial energy value is calculated here, it is necessary to compare the initial energy value with the energy threshold. If the initial energy value ≤ the energy threshold, it is considered that the translated or rotated local fragment map B matches the local fragment map A, and the translated or rotated local fragment map B is output without the need for subsequent steps.
S3,在二维平面上,局部碎片地图的可能移动方式有两种:平移和旋转。由于道路几何数据中车道线几乎无处不在,它具有很明显的局部直线特征,所以又可以将平移分为沿着车道线方向的平移和垂直于车道线的平移,前者我们称之为纵向平移,后者我们称之为横向平移,旋转逆时针为正,顺时针为负。S3, on a two-dimensional plane, there are two possible ways to move a local fragment map: translation and rotation. Since lane lines are almost everywhere in road geometry data, they have obvious local straight line characteristics, so translation can be divided into translation along the lane line and translation perpendicular to the lane line. The former is called longitudinal translation and the latter is called lateral translation. Counterclockwise rotation is positive and clockwise rotation is negative.
在本实施例中,保持A固定不动,对局部碎片地图B进行随机平移或旋转,将平移或旋转后的局部碎片地图B以及保持不动的局部碎片地图A的面积及其重叠面积代入所述能量函数中计算新的能量值,比较新的能量值与能量阈值的大小,若新的能量值≤能量阈值,则认为平移或旋转后的局部碎片地图B与局部碎片地图A匹配,并输出平移或旋转后的局部碎片地图B,否则执行步骤S4;In this embodiment, A is kept fixed, and the local fragment map B is randomly translated or rotated. The area of the translated or rotated local fragment map B and the fixed local fragment map A and their overlapping area are substituted into the energy function to calculate a new energy value. The new energy value is compared with the energy threshold. If the new energy value is less than or equal to the energy threshold, it is considered that the translated or rotated local fragment map B matches the local fragment map A, and the translated or rotated local fragment map B is output. Otherwise, step S4 is executed.
S4,比较新的能量值与初始能量值,若新的能量值较低,则接受局部碎片地图B此次平移或旋转操作,并跳转至步骤S3,否则拒绝局部碎片地图B此次平移或旋转操作并执行步骤S5;S4, compare the new energy value with the initial energy value. If the new energy value is lower, accept the translation or rotation operation of the local fragment map B and jump to step S3. Otherwise, reject the translation or rotation operation of the local fragment map B and execute step S5.
S5,判断连续拒绝次数是否达到预设次数,若是则认为能量函数已收敛,输出连续拒绝之前的局部碎片地图B,否则跳转至步骤S3。S5, judging whether the number of consecutive rejections reaches a preset number, if so, it is considered that the energy function has converged, and the local fragment map B before the consecutive rejections is output, otherwise jump to step S3.
优选的,在一些实施例中,步骤S3中所述的对局部碎片地图B进行随机平移或旋转,包括:Preferably, in some embodiments, the random translation or rotation of the local fragment map B in step S3 includes:
产生一个[0,1]之间的随机数x;Generate a random number x between [0,1];
若0≤x≤0.33,则对局部碎片地图B进行横向平移一个随机距离;If 0≤x≤0.33, the local fragment map B is translated horizontally by a random distance;
若0.33<x≤0.66,则对局部碎片地图B进行纵向平移一个随机距离;If 0.33<x≤0.66, the local fragment map B is translated vertically by a random distance;
若0.66<x≤1,则将局部碎片地图B旋转一个随机角度;If 0.66<x≤1, rotate the local fragment map B by a random angle;
所述随机距离和随机角度均根据匹配精度要求设定取值范围。例如,匹配精度要求为0.05米,则平移的随机距离应在0.01~0.1米之间。The random distance and random angle are both set in a value range according to the matching accuracy requirement. For example, if the matching accuracy requirement is 0.05 meters, the random distance of translation should be between 0.01 and 0.1 meters.
优选的,在一些实施例中,步骤S4中在比较新的能量值与初始能量值后,若新的能量值较低,则基于能量差值,利用市长算法计算接受概率,然后根据所述接受概率判断是否接受局部碎片地图B此次平移或旋转操作。Preferably, in some embodiments, after comparing the new energy value with the initial energy value in step S4, if the new energy value is lower, the acceptance probability is calculated using the Mayor algorithm based on the energy difference, and then a determination is made based on the acceptance probability whether to accept the translation or rotation operation of the local fragment map B.
具体的利用市长算法计算接受概率,如下式所示:The specific method of calculating the acceptance probability using the mayor algorithm is as shown in the following formula:
Pacc=αe-βTΔE Pacc = αe - βTΔE
其中α和β是两个常量,ΔE为状态更新后的能量差,T为系统的虚拟温度,温度越高代表系统越活跃,也就越可能通过状态更新到达一个高能量状态,反之越难跨过能量壁垒。通过调节这个因子我们可以控制更新的接受率,通常来讲,我们需要让这个接受概率达到50%,否则系统可能会陷入一个局部能量最小态。Among them, α and β are two constants, ΔE is the energy difference after the state update, and T is the virtual temperature of the system. The higher the temperature, the more active the system is, and the more likely it is to reach a high energy state through state update, and vice versa, the more difficult it is to cross the energy barrier. By adjusting this factor, we can control the acceptance rate of the update. Generally speaking, we need to make this acceptance probability reach 50%, otherwise the system may fall into a local energy minimum state.
产生一个[0,1]之间的随机数y;Generate a random number y between [0,1];
比较随机数y与接收概率之间的大小;Compare the random number y with the received probability;
若随机数y小于接收概率,则接受局部碎片地图B此次平移或旋转操作;If the random number y is less than the acceptance probability, the translation or rotation operation of the local fragment map B is accepted;
否则,拒绝局部碎片地图B此次平移或旋转操作。Otherwise, the translation or rotation operation of the local fragment map B is rejected.
本发明通过蒙特卡洛采样方法将二维平面上复杂的几何形状之间的匹配问题转化成一个迭代求解的问题,能够避免在算法中编码复杂的规则,通过对虚拟温度因子进行调节,我们可以控制采取保守匹配策略还是激进的匹配策略。在两个局部几何地图相差不远的时候,算法可以自然地搜索到最佳匹配结果。The present invention transforms the matching problem between complex geometric shapes on a two-dimensional plane into an iterative solution problem through the Monte Carlo sampling method, which can avoid encoding complex rules in the algorithm. By adjusting the virtual temperature factor, we can control whether to adopt a conservative matching strategy or an aggressive matching strategy. When the two local geometric maps are not far apart, the algorithm can naturally search for the best matching result.
图2为本发明实施例提供的一种基于蒙特卡洛优化的局部碎片地图匹配装置结构示意图,如图2所示,该装置,包括:FIG2 is a schematic diagram of the structure of a local fragment map matching device based on Monte Carlo optimization provided by an embodiment of the present invention. As shown in FIG2 , the device includes:
函数定义模块,定义用于评估匹配好坏程度的能量函数,所述能量函数以参与匹配的两块局部碎片地图的面积及其重叠面积为变量;A function definition module, defining an energy function for evaluating the degree of matching, wherein the energy function takes the areas of two local fragment maps involved in the matching and their overlapping areas as variables;
能量值计算模块,用于计算局部碎片地图A和B的面积及其重叠面积代入所述能量函数中计算初始能量值;用于计算平移或旋转后的B与A的能量值;An energy value calculation module, used to calculate the areas of local fragment maps A and B and their overlapping areas, and substitute them into the energy function to calculate the initial energy value; used to calculate the energy values of B and A after translation or rotation;
局部碎片地图姿态调整模块,用于对局部碎片地图B进行随机平移或旋转;A local fragment map posture adjustment module is used to randomly translate or rotate the local fragment map B;
比较判断模块,用于比较新的能量值与初始能量值的大小,用于比较新的能量值与能量阈值的大小,用于根据比较结果判断接受或拒绝局部碎片地图B的平移或旋转操作,用于判断连续拒绝次数是否达到预设次数。A comparison and judgment module is used to compare the new energy value with the initial energy value, to compare the new energy value with the energy threshold, to judge whether to accept or reject the translation or rotation operation of the local fragment map B according to the comparison result, and to judge whether the number of consecutive rejections reaches a preset number.
请参阅图3,图3为本发明实施例提供的电子设备的实施例示意图。如图3所示,本发明实施例提了一种电子设备500,包括存储器510、处理器520及存储在存储器520上并可在处理器520上运行的计算机程序511,处理器520执行计算机程序511时实现以下步骤:Please refer to FIG3, which is a schematic diagram of an embodiment of an electronic device provided by an embodiment of the present invention. As shown in FIG3, an embodiment of the present invention provides an
S1,定义用于评估匹配好坏程度的能量函数,所述能量函数以参与匹配的两块局部碎片地图的面积及其重叠面积为变量;S1, defining an energy function for evaluating the degree of matching, wherein the energy function takes the areas of the two local fragment maps involved in the matching and their overlapping areas as variables;
S2,针对待匹配的两块局部碎片地图A和B,计算局部碎片地图A和B的面积及其重叠面积代入所述能量函数中计算初始能量值;S2, for the two local fragment maps A and B to be matched, calculating the areas of the local fragment maps A and B and their overlapping areas, and substituting them into the energy function to calculate the initial energy value;
S3,对局部碎片地图B进行随机平移或旋转,代入能量函数计算新的能量值,比较新的能量值与能量阈值的大小,若新的能量值≤能量阈值,则认为平移或旋转后的局部碎片地图B与局部碎片地图A匹配,并输出平移或旋转后的局部碎片地图B,否则执行步骤S4;S3, randomly translate or rotate the local fragment map B, substitute it into the energy function to calculate the new energy value, compare the new energy value with the energy threshold, if the new energy value is less than or equal to the energy threshold, it is considered that the translated or rotated local fragment map B matches the local fragment map A, and output the translated or rotated local fragment map B, otherwise, execute step S4;
S4,比较新的能量值与初始能量值,若新的能量值较低,则接受局部碎片地图B此次平移或旋转操作,并跳转至步骤S3,否则拒绝局部碎片地图B此次平移或旋转操作并执行步骤S5;S4, compare the new energy value with the initial energy value. If the new energy value is lower, accept the translation or rotation operation of the local fragment map B and jump to step S3. Otherwise, reject the translation or rotation operation of the local fragment map B and execute step S5.
S5,判断连续拒绝次数是否达到预设次数,若是则认为能量函数已收敛,输出连续拒绝之前的局部碎片地图B,否则跳转至步骤S3。S5, judging whether the number of consecutive rejections reaches a preset number, if so, it is considered that the energy function has converged, and the local fragment map B before the consecutive rejections is output, otherwise jump to step S3.
请参阅图4,图4为本发明实施例提供的一种计算机可读存储介质的实施例示意图。如图4所示,本实施例提供了一种计算机可读存储介质600,其上存储有计算机程序611,该计算机程序611被处理器执行时实现如下步骤:Please refer to Figure 4, which is a schematic diagram of an embodiment of a computer-readable storage medium provided by an embodiment of the present invention. As shown in Figure 4, this embodiment provides a computer-
S1,定义用于评估匹配好坏程度的能量函数,所述能量函数以参与匹配的两块局部碎片地图的面积及其重叠面积为变量;S1, defining an energy function for evaluating the degree of matching, wherein the energy function takes the areas of the two local fragment maps involved in the matching and their overlapping areas as variables;
S2,针对待匹配的两块局部碎片地图A和B,计算局部碎片地图A和B的面积及其重叠面积代入所述能量函数中计算初始能量值;S2, for the two local fragment maps A and B to be matched, calculating the areas of the local fragment maps A and B and their overlapping areas, and substituting them into the energy function to calculate the initial energy value;
S3,对局部碎片地图B进行随机平移或旋转,代入能量函数计算新的能量值,比较新的能量值与能量阈值的大小,若新的能量值≤能量阈值,则认为平移或旋转后的局部碎片地图B与局部碎片地图A匹配,并输出平移或旋转后的局部碎片地图B,否则执行步骤S4;S3, randomly translate or rotate the local fragment map B, substitute it into the energy function to calculate the new energy value, compare the new energy value with the energy threshold, if the new energy value is less than or equal to the energy threshold, it is considered that the translated or rotated local fragment map B matches the local fragment map A, and output the translated or rotated local fragment map B, otherwise, execute step S4;
S4,比较新的能量值与初始能量值,若新的能量值较低,则接受局部碎片地图B此次平移或旋转操作,并跳转至步骤S3,否则拒绝局部碎片地图B此次平移或旋转操作并执行步骤S5;S4, compare the new energy value with the initial energy value. If the new energy value is lower, accept the translation or rotation operation of the local fragment map B and jump to step S3. Otherwise, reject the translation or rotation operation of the local fragment map B and execute step S5.
S5,判断连续拒绝次数是否达到预设次数,若是则认为能量函数已收敛,输出连续拒绝之前的局部碎片地图B,否则跳转至步骤S3。S5, judging whether the number of consecutive rejections reaches a preset number, if so, it is considered that the energy function has converged, and the local fragment map B before the consecutive rejections is output, otherwise jump to step S3.
需要说明的是,在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详细描述的部分,可以参见其它实施例的相关描述。It should be noted that in the above embodiments, the description of each embodiment has its own emphasis, and for parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式计算机或者其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is described with reference to the flowchart and/or block diagram of the method, device (system), and computer program product according to the embodiment of the present invention. It should be understood that each process and/or box in the flowchart and/or block diagram, as well as the combination of the process and/or box in the flowchart and/or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded computer or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one process or multiple processes in the flowchart and/or one box or multiple boxes in the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device that implements the functions specified in one or more processes in the flowchart and/or one or more boxes in the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and/or one or more boxes in the block diagram.
尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包括这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111667417.XA CN114485683B (en) | 2021-12-31 | 2021-12-31 | Local fragment map matching method and device based on Monte Carlo optimization |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111667417.XA CN114485683B (en) | 2021-12-31 | 2021-12-31 | Local fragment map matching method and device based on Monte Carlo optimization |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114485683A CN114485683A (en) | 2022-05-13 |
CN114485683B true CN114485683B (en) | 2023-04-21 |
Family
ID=81508404
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111667417.XA Active CN114485683B (en) | 2021-12-31 | 2021-12-31 | Local fragment map matching method and device based on Monte Carlo optimization |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114485683B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6434265B1 (en) * | 1998-09-25 | 2002-08-13 | Apple Computers, Inc. | Aligning rectilinear images in 3D through projective registration and calibration |
CN104835116A (en) * | 2015-04-10 | 2015-08-12 | 山东师范大学 | Contour-based two-dimensional fragment splicing method |
CN108564605A (en) * | 2018-04-09 | 2018-09-21 | 大连理工大学 | A kind of three-dimensional measurement spots cloud optimization method for registering |
CN110930444A (en) * | 2019-11-29 | 2020-03-27 | 上海有个机器人有限公司 | Point cloud matching method, medium, terminal and device based on bilateral optimization |
CN112435299A (en) * | 2021-01-28 | 2021-03-02 | 深圳大学 | Airborne point cloud assisted satellite image stereo matching point cloud precision orientation method |
CN113701741A (en) * | 2021-08-03 | 2021-11-26 | 哈尔滨工程大学 | Heuristic multi-robot SLAM map fusion method |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10274325B2 (en) * | 2016-11-01 | 2019-04-30 | Brain Corporation | Systems and methods for robotic mapping |
-
2021
- 2021-12-31 CN CN202111667417.XA patent/CN114485683B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6434265B1 (en) * | 1998-09-25 | 2002-08-13 | Apple Computers, Inc. | Aligning rectilinear images in 3D through projective registration and calibration |
CN104835116A (en) * | 2015-04-10 | 2015-08-12 | 山东师范大学 | Contour-based two-dimensional fragment splicing method |
CN108564605A (en) * | 2018-04-09 | 2018-09-21 | 大连理工大学 | A kind of three-dimensional measurement spots cloud optimization method for registering |
CN110930444A (en) * | 2019-11-29 | 2020-03-27 | 上海有个机器人有限公司 | Point cloud matching method, medium, terminal and device based on bilateral optimization |
CN112435299A (en) * | 2021-01-28 | 2021-03-02 | 深圳大学 | Airborne point cloud assisted satellite image stereo matching point cloud precision orientation method |
CN113701741A (en) * | 2021-08-03 | 2021-11-26 | 哈尔滨工程大学 | Heuristic multi-robot SLAM map fusion method |
Non-Patent Citations (1)
Title |
---|
杨家俊 等.图像配准关键技术综述.《导航与控制》.2020,第19卷(第1期),77-84. * |
Also Published As
Publication number | Publication date |
---|---|
CN114485683A (en) | 2022-05-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110609290A (en) | Lidar matching and positioning method and device | |
CN110084840A (en) | Point cloud registration method, device, server and computer-readable medium | |
CN112700479B (en) | Registration method based on CNN point cloud target detection | |
CN111208492A (en) | Vehicle lidar external parameter calibration method and device, computer equipment and storage medium | |
CN113866747B (en) | A calibration method and device for multiple laser radars | |
CN111915657B (en) | Point cloud registration method and device, electronic equipment and storage medium | |
CN111707279A (en) | Matching evaluation method, medium, terminal and device of laser point cloud and map | |
CN111707997A (en) | Radar target tracking method and device, electronic equipment and storage medium | |
CN114332291A (en) | Oblique photography model building outer contour rule extraction method | |
CN114371475A (en) | Method, system, equipment and computer storage medium for optimizing calibration parameters | |
CN114705180B (en) | Data correction method, device and equipment for high-precision map and storage medium | |
CN114485683B (en) | Local fragment map matching method and device based on Monte Carlo optimization | |
CN114137562B (en) | Multi-target tracking method based on improved global nearest neighbor | |
CN115828517A (en) | Vehicle lane centering control simulation test method and device and computer equipment | |
CN118328998B (en) | High-precision navigation mapping method, device and system based on 5G communication | |
CN117590362B (en) | Multi-laser radar external parameter calibration method, device and equipment | |
CN110006432A (en) | A method of based on the Indoor Robot rapid relocation under geometry prior information | |
CN111735443A (en) | A Dense Target Track Association Method Based on Assignment Matrix | |
CN115727836B (en) | Fusion positioning method and system based on laser reflector and odometer | |
CN117629182A (en) | Positioning method, device, equipment and storage medium | |
CN109117866B (en) | Lane recognition algorithm evaluation method, computer equipment and storage medium | |
CN116433456A (en) | Point cloud filtering method, system and medium based on GPU and high-precision map | |
CN115546785A (en) | Three-dimensional target detection method and device | |
CN111474535B (en) | Mobile robot global positioning method based on characteristic thermodynamic diagram | |
CN115239841A (en) | Lane line generation method, device, computer equipment and storage medium |
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 | ||
PE01 | Entry into force of the registration of the contract for pledge of patent right |
Denomination of invention: A method and device for local fragment map matching based on Monte Carlo optimization Granted publication date: 20230421 Pledgee: CITIC Bank Limited by Share Ltd. Wuhan branch Pledgor: WUHHAN KOTEL BIG DATE Corp. Registration number: Y2025980038914 |