CN114882085B - Three-dimensional point cloud registration method and system based on single cube - Google Patents
- ️Tue Feb 14 2023
Info
-
Publication number
- CN114882085B CN114882085B CN202210556470.0A CN202210556470A CN114882085B CN 114882085 B CN114882085 B CN 114882085B CN 202210556470 A CN202210556470 A CN 202210556470A CN 114882085 B CN114882085 B CN 114882085B Authority
- CN
- China Prior art keywords
- point cloud
- dice
- point
- plane
- circle Prior art date
- 2022-05-20 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
- 238000000034 method Methods 0.000 title claims abstract description 44
- 239000011159 matrix material Substances 0.000 claims abstract description 41
- 238000013519 translation Methods 0.000 claims abstract description 22
- 238000012545 processing Methods 0.000 claims abstract description 19
- 230000011218 segmentation Effects 0.000 claims abstract description 19
- 238000003708 edge detection Methods 0.000 claims abstract description 15
- 230000009466 transformation Effects 0.000 claims abstract description 9
- 238000004364 calculation method Methods 0.000 claims abstract description 6
- 238000010276 construction Methods 0.000 claims abstract description 5
- 238000000605 extraction Methods 0.000 claims abstract description 5
- 239000013598 vector Substances 0.000 claims description 13
- 238000004422 calculation algorithm Methods 0.000 claims description 9
- 238000004088 simulation Methods 0.000 claims description 3
- 230000010365 information processing Effects 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 7
- 230000009286 beneficial effect Effects 0.000 description 4
- 230000006870 function Effects 0.000 description 3
- 238000005259 measurement Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000008447 perception Effects 0.000 description 1
- 230000001568 sexual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/30—Determination of transform parameters for the alignment of images, i.e. image registration
- G06T7/33—Determination of transform parameters for the alignment of images, i.e. image registration using feature-based methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/13—Edge detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/70—Determining position or orientation of objects or cameras
- G06T7/73—Determining position or orientation of objects or cameras using feature-based methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10028—Range image; Depth image; 3D point clouds
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20084—Artificial neural networks [ANN]
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- General Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- Biomedical Technology (AREA)
- Molecular Biology (AREA)
- Biophysics (AREA)
- General Engineering & Computer Science (AREA)
- Artificial Intelligence (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Life Sciences & Earth Sciences (AREA)
- Health & Medical Sciences (AREA)
- Image Analysis (AREA)
Abstract
The invention discloses a single cube based three-dimensional point cloud registration method and a single cube based three-dimensional point cloud registration system, wherein the method comprises the following steps: acquiring an original point cloud and extracting a dice point cloud according to the original point cloud; judging whether the point cloud data of the dice is complete, and performing plane segmentation, rotation and image processing on the point cloud of the dice to obtain a preprocessed image; carrying out circle edge detection and circle fitting on the preprocessed image, and carrying out coordinate transformation to obtain three-dimensional coordinates of the number of the dice plane points and the center of the circle; constructing homonymy point pairs according to three-dimensional coordinates of the centers of the planar point numbers of the dice; and calculating a rotation matrix and a translation matrix between the homonymy point pairs, and completing registration based on the rotation matrix and the translation matrix. The system comprises: the system comprises a point cloud extraction module, an image processing module, a center calculation module, a homonymy point pair construction module and a registration module. By using the invention, the point cloud data scanned by the two stations can be accurately registered to obtain complete three-dimensional point cloud data. The invention can be widely applied to the field of geographic information processing.
Description
技术领域technical field
本发明涉及地理信息处理领域,尤其涉及一种基于单一立方体三维点云配准方法及系统。The invention relates to the field of geographic information processing, in particular to a single cube-based three-dimensional point cloud registration method and system.
背景技术Background technique
点云配准是进行三维重建和场景感知的基础。点云配准的实质是将两个坐标系中的点云坐标转换到统一的坐标系。点云配准方法一般分为无特征配准和特征配准,无特征配准一般是基于迭代最近点算法(ICP)算法进行实现,但使用ICP算法往往需要一个较好的初始配准。特征配准就是利用两个坐标系统中共有的特征点进行配准,传统工业配准主要有在测量目标上粘贴平面标记和标靶球定位法两种配准方法,平面标记本身在二维平面畸变较大,从而降低配准精度。标靶球定位法在进行扫描作业时需提前观察扫描环境布放标靶球,这一过程大大降低了作业速度,且标靶球配准在后续的软件配准中需进行手动标记,自动化程度较低。Point cloud registration is the basis for 3D reconstruction and scene perception. The essence of point cloud registration is to transform the point cloud coordinates in two coordinate systems into a unified coordinate system. Point cloud registration methods are generally divided into featureless registration and feature registration. Featureless registration is generally implemented based on the iterative closest point algorithm (ICP) algorithm, but using the ICP algorithm often requires a better initial registration. Feature registration is to use the common feature points in the two coordinate systems for registration. Traditional industrial registration mainly includes two registration methods: sticking plane marks on the measurement target and target ball positioning. The plane marks themselves are on the two-dimensional plane The distortion is large, thereby reducing the registration accuracy. The target ball positioning method needs to observe the scanning environment in advance and place the target ball during the scanning operation. This process greatly reduces the operation speed, and the target ball registration needs to be manually marked in the subsequent software registration. lower.
发明内容Contents of the invention
为了解决上述技术问题,本发明的目的是提供一种基于单一立方体三维点云配准方法及系统,能够将两个测站所扫描的点云数据准确进行配准,得到完整的三维点云数据。In order to solve the above technical problems, the object of the present invention is to provide a single cube-based three-dimensional point cloud registration method and system, which can accurately register the point cloud data scanned by two stations to obtain complete three-dimensional point cloud data .
本发明所采用的第一技术方案是:一种单一立方体三维点云配准方法,包括以下步骤:The first technical solution adopted in the present invention is: a single cube three-dimensional point cloud registration method, comprising the following steps:
获取原始点云并根据原始点云提取骰子点云;Obtain the original point cloud and extract the dice point cloud according to the original point cloud;
判断到骰子点云数据完整,对骰子点云进行平面分割、旋转和图像处理,得到预处理图像;It is judged that the data of the dice point cloud is complete, and the plane segmentation, rotation and image processing are performed on the dice point cloud to obtain the preprocessed image;
对预处理图像进行圆边缘检测和圆拟合,并进行坐标变换,得到骰子平面点数圆中心三维坐标;Perform circle edge detection and circle fitting on the preprocessed image, and perform coordinate transformation to obtain the three-dimensional coordinates of the center of the dice plane point circle;
根据骰子平面点数圆中心三维坐标构建同名点对;Construct point pairs with the same name according to the three-dimensional coordinates of the center of the dice plane point circle;
计算同名点对之间的旋转矩阵和平移矩阵,并基于旋转矩阵和平移矩完成配准。Calculate the rotation matrix and translation matrix between the point pairs with the same name, and complete the registration based on the rotation matrix and translation moment.
进一步,还包括:Further, it also includes:
判断到骰子点云数据不完整,对骰子点云进行平面分割,并计算平面交点和平面交线向量;It is judged that the data of the dice point cloud is incomplete, plane segmentation is performed on the dice point cloud, and the plane intersection point and plane intersection line vector are calculated;
将平面交点沿平面交线向量平移,得到仿真虚拟点;Translate the plane intersection point along the plane intersection line vector to obtain the simulated virtual point;
根据平面交点和仿真虚拟点构建同名点对。Constructs point pairs with the same name from plane intersections and simulated virtual points.
进一步,还包括:Further, it also includes:
基于迭代最近点算法,对粗配准得到的两个测站点云进行精配准。Based on the iterative closest point algorithm, fine registration is performed on the two station cloud obtained by rough registration.
进一步,骰子点云数据是否完整的判断步骤具体包括:Further, the steps for judging whether the dice point cloud data is complete include:
基于K最近邻点搜索方法,根据骰子点云与预设的完整点云计算点云平均距离;Based on the K-nearest neighbor point search method, the average distance between the point cloud and the preset complete point cloud is calculated according to the dice point cloud;
将点云平均距离与预设阈值比较;Compare the point cloud average distance with a preset threshold;
判断到点云平均距离小于预设阈值,骰子点云数据完整;It is judged that the average distance of the point cloud is less than the preset threshold, and the dice point cloud data is complete;
判断到点云平均距离大于等于预设阈值,骰子点云数据不完整。It is judged that the average distance to the point cloud is greater than or equal to the preset threshold, and the dice point cloud data is incomplete.
进一步,所述判断到骰子点云数据完整,对骰子点云进行平面分割、旋转和图像处理,得到预处理图像这一步骤,其具体包括:Further, the step of determining that the dice point cloud data is complete, performing plane segmentation, rotation and image processing on the dice point cloud to obtain a preprocessed image specifically includes:
判断到骰子点云数据完整,对骰子点云进行平面分割,得到分割后的平面点云;It is judged that the data of the dice point cloud is complete, and the plane segmentation is performed on the dice point cloud to obtain the segmented plane point cloud;
将分割后的平面点云旋转至基准平面并进行栅格化处理,得到栅格图像;Rotate the segmented planar point cloud to the reference plane and perform rasterization processing to obtain a raster image;
对栅格图像进行卷积和二值化处理,得到预处理图像。Perform convolution and binarization processing on the raster image to obtain the preprocessed image.
进一步,所述对预处理图像进行圆边缘检测和圆拟合,并进行坐标变换,得到骰子点数中心三维坐标这一步骤,其具体包括:Further, the step of performing circle edge detection and circle fitting on the preprocessed image, and performing coordinate transformation to obtain the three-dimensional coordinates of the center of the dice points specifically includes:
基于Canny边缘检测方法,对预处理图像进行圆边缘检测,得到骰子平面点云的中心圆边界坐标;Based on the Canny edge detection method, the circle edge detection is performed on the preprocessed image, and the center circle boundary coordinates of the dice plane point cloud are obtained;
根据骰子平面点云的中心圆边界坐标进行圆拟合,得到圆心二维坐标;Carry out circle fitting according to the center circle boundary coordinates of the dice plane point cloud, and obtain the two-dimensional coordinates of the center of the circle;
结合圆心在坐标系中的高度,将圆心二维坐标旋转回初始状态,得到骰子点数中心三维坐标。Combined with the height of the center of the circle in the coordinate system, the two-dimensional coordinates of the center of the circle are rotated back to the initial state to obtain the three-dimensional coordinates of the center of the dice points.
进一步,所述圆拟合的公式表示如下:Further, the formula of the circle fitting is expressed as follows:
X'2+Y'2+DX'+EY'+F=0X' 2 +Y' 2 +DX'+EY'+F=0
上式中,X'、Y'表示点数圆边界坐标,D、E和F分别表示圆的参数,Xc、Yc分别表示拟合圆的中心的横坐标和纵坐标。In the above formula, X' and Y' represent the boundary coordinates of the point circle, D, E and F represent the parameters of the circle respectively, and X c and Y c represent the abscissa and ordinate of the center of the fitting circle, respectively.
本发明所采用的第二技术方案是:一种基于单一立方体三维点云配准系统,包括:The second technical solution adopted by the present invention is: a single cube-based three-dimensional point cloud registration system, comprising:
点云提取模块,用于获取原始点云并根据原始点云提取骰子点云;The point cloud extraction module is used to obtain the original point cloud and extract the dice point cloud according to the original point cloud;
图像处理模块,判断到骰子点云数据完整,对骰子点云进行平面分割、旋转和图像处理,得到预处理图像;The image processing module judges that the data of the dice point cloud is complete, performs plane segmentation, rotation and image processing on the dice point cloud, and obtains a preprocessed image;
中心计算模块,用于对预处理图像进行圆边缘检测和圆拟合,并进行坐标变换,得到骰子平面点数圆中心三维坐标;The center calculation module is used to perform circle edge detection and circle fitting on the preprocessed image, and perform coordinate transformation to obtain the three-dimensional coordinates of the center of the dice plane point circle;
同名点对构建模块,用于根据骰子平面点数圆中心三维坐标构建同名点对;The same-name point pair construction module is used to construct the same-name point pair according to the three-dimensional coordinates of the center of the dice plane point circle;
配准模块,用于计算同名点对之间的旋转矩阵和平移矩阵,并基于旋转矩阵和平移矩完成配准。The registration module is used to calculate the rotation matrix and translation matrix between the point pairs with the same name, and complete the registration based on the rotation matrix and translation moment.
本发明方法及系统的有益效果是:本发明利用骰子立方体作为两个坐标系统共有的特征物构造特征点进行三维点云配准,相较于现有技术,无需进行平面标记和额外布放标靶球,从而提高三维点云的重建精度和重建速度。The beneficial effects of the method and system of the present invention are: the present invention uses the dice cube as the feature point shared by the two coordinate systems to perform three-dimensional point cloud registration. The target ball, thereby improving the reconstruction accuracy and reconstruction speed of the 3D point cloud.
附图说明Description of drawings
图1是本发明具体实施例一种基于单一立方体三维点云配准方法的步骤流程图;Fig. 1 is a flow chart of the steps of a single cube-based three-dimensional point cloud registration method according to a specific embodiment of the present invention;
图2是本发明具体实施例测站的原始点云;Fig. 2 is the original point cloud of measuring station of the specific embodiment of the present invention;
图3是本发明具体实施例基于NDT-RANSAC算法进行平面分割的示意图;Fig. 3 is the schematic diagram that the specific embodiment of the present invention carries out plane segmentation based on NDT-RANSAC algorithm;
图4是本发明具体实施例骰子点云提取示意图;Fig. 4 is a schematic diagram of dice point cloud extraction according to a specific embodiment of the present invention;
图5是本发明具体实施基于骰子点数中心坐标提取示意图;Fig. 5 is a schematic diagram of extracting center coordinates based on dice points according to the specific implementation of the present invention;
图6是本发明具体实施例基于骰子点数中心坐标为特征点配准过程示意图;Fig. 6 is a schematic diagram of the feature point registration process based on the central coordinates of dice points according to a specific embodiment of the present invention;
图7是本发明具体实施例基于骰子立方体虚拟交点为特征点配准过程示意图;Fig. 7 is a schematic diagram of the registration process of feature points based on the virtual intersection of dice cubes according to a specific embodiment of the present invention;
图8是本发明具体实施例一种基于单一立方体三维点云配准系统的结构框图。Fig. 8 is a structural block diagram of a three-dimensional point cloud registration system based on a single cube according to a specific embodiment of the present invention.
具体实施方式Detailed ways
下面结合附图和具体实施例对本发明做进一步的详细说明。对于以下实施例中的步骤编号,其仅为了便于阐述说明而设置,对步骤之间的顺序不做任何限定,实施例中的各步骤的执行顺序均可根据本领域技术人员的理解来进行适应性调整。The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. For the step numbers in the following embodiments, it is only set for the convenience of illustration and description, and the order between the steps is not limited in any way. The execution order of each step in the embodiments can be adapted according to the understanding of those skilled in the art sexual adjustment.
如图1所示,本发明提供了一种基于单一立方体三维点云配准方法,该方法包括以下步骤:As shown in Figure 1, the present invention provides a kind of registration method based on single cube three-dimensional point cloud, and this method comprises the following steps:
S1、获取原始点云并根据原始点云提取骰子点云;S1. Obtain the original point cloud and extract the dice point cloud according to the original point cloud;
具体地,获取两个测站原始点云并对原始点云进行预处理,原始点云示意图参照图2,参照图3和图4,基于NDT-RANSAC算法将骰子点云自动提取出,得到对应两个测站的骰子点云。Specifically, the original point clouds of two measuring stations are acquired and preprocessed. Refer to Figure 2 for the schematic diagram of the original point clouds, and refer to Figures 3 and 4. Based on the NDT-RANSAC algorithm, the dice point clouds are automatically extracted to obtain the corresponding Dice point cloud for two stations.
S2、判断点云数据是否完整;S2, judging whether the point cloud data is complete;
S2.1、基于K最近邻点搜索方法,根据骰子点云与预设的完整点云计算点云平均距离;S2.1, based on the K nearest neighbor point search method, calculate the average distance of the point cloud according to the dice point cloud and the preset complete point cloud;
S2.2、将点云平均距离与预设阈值比较;S2.2. Comparing the point cloud average distance with a preset threshold;
S2.3、判断到点云平均距离小于预设阈值,骰子点云数据完整;S2.3. Judging that the average distance to the point cloud is less than the preset threshold, and the point cloud data of the dice is complete;
S2.4、判断到点云平均距离大于等于预设阈值,骰子点云数据不完整;S2.4. Judging that the average distance to the point cloud is greater than or equal to the preset threshold, and the dice point cloud data is incomplete;
具体地,给定源点云集Q(骰子三个面完整点云)和扫描点云集P,基于K最近邻点搜索,得到两组点云平均距离d;Specifically, given the source point cloud set Q (the complete point cloud of the three sides of the dice) and the scanned point cloud set P, based on the K nearest neighbor point search, the average distance d of the two sets of point clouds is obtained;
若d小于阈值t则认为扫描点云为骰子三个面完整点云,使用第一技术路线(参照图5和图6)即跳转至步骤S3,若d大于等于阈值t则认为扫描到的骰子点云平面不完整,使用第二技术路线(参照图7)即跳转至步骤S6。If d is less than the threshold t, it is considered that the scanned point cloud is the complete point cloud of the three sides of the dice, and the first technical route (refer to Figure 5 and Figure 6) is used to jump to step S3; if d is greater than or equal to the threshold t, it is considered that the scanned point cloud is The plane of the dice point cloud is incomplete, and the second technical route (refer to FIG. 7 ) is used to jump to step S6.
S3、判断到骰子点云数据完整,对骰子点云进行平面分割、旋转和图像处理,得到预处理图像;S3, judging that the data of the dice point cloud is complete, performing plane segmentation, rotation and image processing on the dice point cloud to obtain a preprocessed image;
S3.1、判断到骰子点云数据完整,对骰子点云进行平面分割,得到分割后的平面点云;S3.1. It is judged that the data of the dice point cloud is complete, and the dice point cloud is plane-segmented to obtain the plane point cloud after segmentation;
S3.2、将分割后的平面点云旋转至基准平面并进行栅格化处理,得到栅格图像;S3.2. Rotate the segmented planar point cloud to the reference plane and perform rasterization processing to obtain a raster image;
S3.3、对栅格图像进行卷积和二值化处理,得到预处理图像。S3.3. Convolving and binarizing the raster image to obtain a preprocessed image.
具体地,将两个测站骰子平面分割后的平面点云旋转至与xOy平面平行,根据平面分割后骰子平面法向量,求出与扫描坐标系X、Z轴的夹角Ω:Specifically, rotate the plane point clouds after the dice plane division of the two stations to be parallel to the xOy plane, and calculate the angle between the X and Z axes of the scanning coordinate system according to the dice plane normal vector after the plane division Ω:
上式中,Ω分别表示X、Z轴三个方向的旋转角,R1、R3分别代表X和Z轴的旋转矩阵,X、Y、Z分别代表输入的点云三维坐标,X'、Y'、Z'表示经过两个旋转角旋转后的点云三维坐标;In the above formula, Ω represents the rotation angles in the three directions of the X and Z axes respectively, R 1 and R 3 represent the rotation matrices of the X and Z axes respectively, X, Y and Z represent the three-dimensional coordinates of the input point cloud respectively, X', Y', Z 'Indicates the three-dimensional coordinates of the point cloud after two rotation angles;
然后进行图像处理,将点云栅格化,每个栅格RGB值为栅格内点云RGB值的平均值。之后对栅格图像进行卷积操作,通过邻域关系填充栅格点云数为零的RGB值,对RGB图像进行灰度化并进行灰度拉伸,使平面点数圆灰度值最大程度区别周围灰度值,对灰度图像二值化;Then perform image processing to rasterize the point cloud, and the RGB value of each grid is the average value of the RGB value of the point cloud in the grid. Afterwards, the convolution operation is performed on the raster image, and the RGB value of the raster point cloud number is zero is filled through the neighborhood relationship, and the RGB image is grayscaled and grayscale stretched to maximize the difference in the grayscale value of the plane point number circle. The surrounding gray value is used to binarize the gray image;
S4、对预处理图像进行圆边缘检测和圆拟合,并进行坐标变换,得到骰子点数中心三维坐标;S4. Perform circle edge detection and circle fitting on the preprocessed image, and perform coordinate transformation to obtain the three-dimensional coordinates of the center of the dice points;
具体地,点数是骰子每个面有相应的点数,如1、2、3点。Specifically, the number of points is that each side of the dice has a corresponding number of points, such as 1, 2, and 3 points.
S4.1、基于Canny边缘检测方法,对预处理图像进行圆边缘检测,得到骰子平面点云的中心圆边界坐标;S4.1, based on the Canny edge detection method, the circle edge detection is performed on the preprocessed image, and the center circle boundary coordinates of the dice plane point cloud are obtained;
S4.2、根据骰子平面点云的中心圆边界坐标进行圆拟合,得到圆心二维坐标;S4.2. Perform circle fitting according to the center circle boundary coordinates of the dice plane point cloud to obtain the two-dimensional coordinates of the center of the circle;
S4.3、结合圆心在坐标系中的高度,将圆心二维坐标旋转回初始状态,得到骰子点数中心三维坐标。S4.3. Combining the height of the center of the circle in the coordinate system, the two-dimensional coordinates of the center of the circle are rotated back to the initial state to obtain the three-dimensional coordinates of the center of the dice points.
具体地,将三维中心坐标旋转回初始状态利用中心坐标与之前旋转至二维平面的旋转矩阵的逆相乘:Specifically, to rotate the 3D center coordinates back to the initial state, multiply the center coordinates with the inverse of the rotation matrix previously rotated to the 2D plane:
上式中,Ω分别表示X、Z轴两个方向的旋转角,分别代表X和Z轴的逆旋转矩阵,Xc、Yc、Zc分别代表输入的圆心三维坐标,X′c、Y′c、Z′c表示旋转回空间坐标系的三维坐标。In the above formula, Ω represents the rotation angles of the X and Z axes respectively, Represent the inverse rotation matrix of the X and Z axes respectively, X c , Y c , and Z c represent the three-dimensional coordinates of the input circle center respectively, and X′ c , Y′ c , Z′ c represent the three-dimensional coordinates rotated back to the space coordinate system.
所述骰子点数中心三维坐标包括公共平面的三维中心坐标和非公共平面的三维中心坐标。The three-dimensional coordinates of the center of the dice points include three-dimensional center coordinates of a common plane and three-dimensional center coordinates of a non-public plane.
S5、根据骰子点数中心三维坐标构建同名点对并跳转至步骤S9;S5. Construct a point pair with the same name according to the three-dimensional coordinates of the center of the dice points and jump to step S9;
具体地,考虑两个测站特征点不同对应情况,求出每个点对之间的距离t,ξ值最小即两组特征点对为同名点:Specifically, considering the different correspondence between the feature points of the two stations, the distance t between each point pair is calculated, and the ξ value is the smallest, that is, the two sets of feature point pairs are points with the same name:
ξ=min{ti} (4)ξ=min{t i } (4)
求出同名点之间的旋转矩阵和平移矩阵,即可对Slave点云进行旋转:The Slave point cloud can be rotated by finding the rotation matrix and translation matrix between points with the same name:
上式中,M表示同名点求得的旋转矩阵,E表示同名点求得的平移矩阵,X、Y、Z分别代表输入的点云三维坐标,X”、Y”、Z”表示经过旋转和平移后的点云三维坐标;In the above formula, M represents the rotation matrix obtained from the point with the same name, E represents the translation matrix obtained from the point with the same name, X, Y, and Z represent the three-dimensional coordinates of the input point cloud, and X", Y", and Z" represent the rotation and Three-dimensional coordinates of the point cloud after translation;
S6、判断到骰子点云数据不完整,对骰子点云进行平面分割,并计算平面交点和平面交线向量;S6, judging that the data of the dice point cloud is incomplete, performing plane segmentation on the dice point cloud, and calculating plane intersection points and plane intersection line vectors;
具体地,对骰子点云进行平面分割得到平面参数,根据平面分割后骰子三个相邻平面参数求得三个平面的交点,根据三个骰子平面参数求出每个测站两两相邻平面的交线向量。Specifically, the plane parameters are obtained by plane segmentation of the dice point cloud, the intersection point of the three planes is obtained according to the three adjacent plane parameters of the dice after plane segmentation, and the two adjacent planes of each station are obtained according to the three plane parameters of the dice The intersection vector of .
S7、将平面交点沿平面交线向量平移,得到仿真虚拟点;S7. Translating the plane intersection point along the plane intersection line vector to obtain a simulated virtual point;
具体地,平面交点分别沿三条交线向量平移一个单位仿真出三个虚拟点,为了避免配准过程点对应的对称性,沿垂直地面的交线向量的反方向一个单位再仿真出一个虚拟点;根据骰子平面之间的不同点数平面关系(如点数为1的平面和点数为6的平面平行),对从(Slave)点云交点和仿真虚拟点平移和旋转以便与主(Master)点云三个面交点和仿真虚拟点构造同名点;Specifically, three virtual points are simulated by moving the intersection point of the plane along the three intersection vectors by one unit. In order to avoid the symmetry corresponding to the points in the registration process, a virtual point is simulated by one unit in the opposite direction of the intersection vector perpendicular to the ground. ;According to the plane relationship of different points between the planes of the dice (for example, the plane with a point of 1 and the plane with a point of 6 are parallel), translate and rotate the intersection point of the slave (Slave) point cloud and the simulation virtual point so as to be consistent with the master (Master) point cloud The three surface intersection points and the simulated virtual point construct a point with the same name;
仿真虚拟点的公式表示如下:The formula for the simulated virtual point is expressed as follows:
上式中,表示交线的方向向量,V表示交点沿交线方向平移1个单位得到的点坐标。In the above formula, Indicates the direction vector of the intersection line, and V indicates the point coordinates obtained by translating the intersection point by 1 unit along the intersection line direction.
S8、根据平面交点和仿真虚拟点构建同名点对并跳转至步骤S9;S8. Construct a point pair with the same name according to the plane intersection point and the simulated virtual point and jump to step S9;
具体地,根据Master骰子平面交点和4个虚拟点与Slave平移后的交点和4个虚拟点一一对应,得到同名点对。Specifically, according to the one-to-one correspondence between the intersection point of the Master dice plane and the four virtual points, and the intersection point and the four virtual points after the translation of the Slave, a point pair with the same name is obtained.
S9、基于HornsMethod方法计算同名点对之间的旋转矩阵和平移矩阵,并基于旋转矩阵和平移矩完成粗配准。S9. Calculate the rotation matrix and translation matrix between the point pairs with the same name based on the HornsMethod method, and complete the rough registration based on the rotation matrix and translation moment.
具体地,HornsMethod方法步骤为计算点集合的中心点,将点集合移动到原点,计算最优旋转矩阵M,计算平移矩阵E。Specifically, the steps of the HornsMethod method are to calculate the center point of the point set, move the point set to the origin, calculate the optimal rotation matrix M, and calculate the translation matrix E.
计算中心点公式表达如下:The formula for calculating the center point is expressed as follows:
上式中,P表示点云集合坐标,N表示点云集合点云个数,μA表示点云集A中心,μB表示点云集B中心。In the above formula, P represents the coordinates of the point cloud collection, N represents the number of point clouds in the point cloud collection, μ A represents the center of point cloud collection A, and μ B represents the center of point cloud collection B.
点集重新中心化公式表达如下:The point set re-centralization formula is expressed as follows:
上式中,A′i表示原始点云集A中心化后的点云集,Bi'表示原始点云集B中心化后的点云集。In the above formula, A′ i represents the point cloud set after the centering of the original point cloud set A, and B i ' represents the point cloud set after the centering of the original point cloud set B.
计算点集之间的协方差矩阵H公式表达如下:The formula for calculating the covariance matrix H between point sets is expressed as follows:
上式中,H表示点云集A和点云集B之间的协方差矩阵。In the above formula, H represents the covariance matrix between point cloud set A and point cloud set B.
计算点集之间的旋转矩阵M和平移矩阵公式表达如下:The formulas for calculating the rotation matrix M and translation matrix between point sets are expressed as follows:
[U,S,V]=SVD(H) (13)[U,S,V]=SVD(H) (13)
M=VUT (14)M = V U T (14)
E=-RμA+μB (15)E=-Rμ A +μ B (15)
上式中,U、S、V分别代表SVD分解出来的三个值,M代表旋转矩阵,E代表平移矩阵。In the above formula, U, S, and V represent the three values decomposed by SVD, M represents the rotation matrix, and E represents the translation matrix.
粗配准计算公式如下:The calculation formula of coarse registration is as follows:
上式中,M代表旋转矩阵,X、Y、Z分别代表输入的点云三维坐标,X'、Y'、Z'表示经过旋转矩阵旋转后的点云三维坐标,E代表平移矩阵。In the above formula, M represents the rotation matrix, X, Y, and Z represent the three-dimensional coordinates of the input point cloud, X', Y', and Z' represent the three-dimensional coordinates of the point cloud after rotation by the rotation matrix, and E represents the translation matrix.
S10、基于迭代最近点算法(ICP),对粗配准得到的两个测站点云进行精配准。S10. Based on the Iterative Closest Point Algorithm (ICP), perform fine registration on the two station point clouds obtained through the rough registration.
如图8所示,一种基于单一立方体三维点云配准系统,包括:As shown in Figure 8, a 3D point cloud registration system based on a single cube, including:
点云提取模块,用于获取原始点云并根据原始点云提取骰子点云;The point cloud extraction module is used to obtain the original point cloud and extract the dice point cloud according to the original point cloud;
图像处理模块,判断到骰子点云数据完整,对骰子点云进行平面分割、旋转和图像处理,得到预处理图像;The image processing module judges that the data of the dice point cloud is complete, performs plane segmentation, rotation and image processing on the dice point cloud, and obtains a preprocessed image;
中心计算模块,用于对预处理图像进行圆边缘检测和圆拟合,并进行坐标变换,得到骰子平面点数圆中心三维坐标;The center calculation module is used to perform circle edge detection and circle fitting on the preprocessed image, and perform coordinate transformation to obtain the three-dimensional coordinates of the center of the dice plane point circle;
同名点对构建模块,用于根据骰子平面点数圆中心三维坐标构建同名点对;The same-name point pair construction module is used to construct the same-name point pair according to the three-dimensional coordinates of the center of the dice plane point circle;
相交计算模块,判断到骰子点云数据不完整,对骰子点云进行平面分割,并计算平面交点和平面交线向量;The intersection calculation module judges that the data of the dice point cloud is incomplete, performs plane segmentation on the dice point cloud, and calculates plane intersection points and plane intersection line vectors;
虚拟点构建模块,用于将平面交点沿平面交线向量平移,得到仿真虚拟点;The virtual point building block is used to translate the plane intersection point along the plane intersection line vector to obtain the simulated virtual point;
第二同名点对构建模块,用于根据平面交点和仿真虚拟点构建同名点对。The second same-named point pair construction module is used for constructing the same-named point pair according to the plane intersection point and the simulated virtual point.
配准模块,用于计算同名点对之间的旋转矩阵和平移矩阵,并基于旋转矩阵和平移矩完成配准。The registration module is used to calculate the rotation matrix and translation matrix between the point pairs with the same name, and complete the registration based on the rotation matrix and translation moment.
精配准模块,基于迭代最近点算法(ICP),对场景进行精配准。The fine registration module, based on the iterative closest point algorithm (ICP), performs fine registration of the scene.
上述方法实施例中的内容均适用于本系统实施例中,本系统实施例所具体实现的功能与上述方法实施例相同,并且达到的有益效果与上述方法实施例所达到的有益效果也相同。The content in the above-mentioned method embodiments is applicable to this system embodiment. The specific functions realized by this system embodiment are the same as those of the above-mentioned method embodiments, and the beneficial effects achieved are also the same as those achieved by the above-mentioned method embodiments.
一种基于单一立方体三维点云配准装置:A three-dimensional point cloud registration device based on a single cube:
至少一个处理器;at least one processor;
至少一个存储器,用于存储至少一个程序;at least one memory for storing at least one program;
当所述至少一个程序被所述至少一个处理器执行,使得所述至少一个处理器实现如上所述一种基于单一立方体三维点云配准方法。When the at least one program is executed by the at least one processor, the at least one processor is made to implement the above-mentioned method for 3D point cloud registration based on a single cube.
上述方法实施例中的内容均适用于本装置实施例中,本装置实施例所具体实现的功能与上述方法实施例相同,并且达到的有益效果与上述方法实施例所达到的有益效果也相同。The content in the above-mentioned method embodiment is applicable to this device embodiment, and the specific functions realized by this device embodiment are the same as those of the above-mentioned method embodiment, and the beneficial effects achieved are also the same as those achieved by the above-mentioned method embodiment.
一种存储介质,其中存储有处理器可执行的指令,其特征在于:所述处理器可执行的指令在由处理器执行时用于实现如上所述一种基于单一立方体三维点云配准方法。A storage medium, wherein processor-executable instructions are stored, wherein the processor-executable instructions are used to implement the above-mentioned single-cube-based three-dimensional point cloud registration method when executed by the processor .
上述方法实施例中的内容均适用于本存储介质实施例中,本存储介质实施例所具体实现的功能与上述方法实施例相同,并且达到的有益效果与上述方法实施例所达到的有益效果也相同。The content in the above-mentioned method embodiments is applicable to this storage medium embodiment. The functions realized by this storage medium embodiment are the same as those of the above-mentioned method embodiments, and the beneficial effects achieved are also the same as those achieved by the above-mentioned method embodiments. same.
以上是对本发明的较佳实施进行了具体说明,但本发明创造并不限于所述实施例,熟悉本领域的技术人员在不违背本发明精神的前提下还可做作出种种的等同变形或替换,这些等同的变形或替换均包含在本申请权利要求所限定的范围内。The above is a specific description of the preferred implementation of the present invention, but the invention is not limited to the described embodiments, and those skilled in the art can also make various equivalent deformations or replacements without violating the spirit of the present invention. , these equivalent modifications or replacements are all within the scope defined by the claims of the present application.
Claims (8)
1. A single cube based three-dimensional point cloud registration method is characterized by comprising the following steps:
acquiring original point cloud, carrying out noise reduction pretreatment, and extracting dice point cloud according to the pretreated point cloud;
judging whether the point cloud data of the dice is complete, and performing plane segmentation, rotation and image processing on the point cloud of the dice to obtain a preprocessed image;
carrying out circle edge detection and circle fitting on the preprocessed image, and carrying out coordinate transformation to obtain three-dimensional coordinates of the number of the dice plane points and the center of the circle;
constructing homonymous point pairs according to the three-dimensional coordinates of the centers of the point numbers of the dice planes;
and calculating a rotation matrix and a translation matrix between the homonymy point pairs, and finishing coarse registration based on the rotation matrix and the translation matrix.
2. The single cube based three-dimensional point cloud registration method according to claim 1, further comprising:
judging that the point cloud data of the dice is incomplete, performing plane segmentation on the point cloud of the dice, and calculating a plane intersection point and a plane intersection line vector;
translating the plane intersection point along the plane intersection line vector to obtain a simulation virtual point;
and constructing homonymous point pairs according to the plane intersection points and the simulation virtual points.
3. The single cube based three-dimensional point cloud registration method according to claim 1 or 2, further comprising:
and performing fine registration on the two survey station point clouds obtained by the coarse registration based on an iterative closest point algorithm.
4. The single cube based three-dimensional point cloud registration method according to claim 1 or 2, wherein the step of determining whether the point cloud data of the dice is complete specifically comprises:
calculating the average distance of the point clouds according to the dice point cloud and a preset complete point cloud based on a K nearest neighbor point searching method;
comparing the point cloud average distance with a preset threshold;
judging that the average distance to the point cloud is smaller than a preset threshold value, and completing the point cloud data of the dice;
and judging that the average distance to the point cloud is greater than or equal to a preset threshold value, and the point cloud data of the dice is incomplete.
5. The single cube-based three-dimensional point cloud registration method according to claim 1, wherein the step of judging that the data of the point cloud of dice is complete, performing plane segmentation, rotation and image processing on the point cloud of dice to obtain a preprocessed image specifically comprises:
judging that the data of the dice point cloud is complete, and performing plane segmentation on the dice point cloud to obtain a segmented plane point cloud;
rotating the divided plane point cloud to a reference plane and performing rasterization processing to obtain a raster image;
and performing convolution and binarization processing on the raster image to obtain a preprocessed image.
6. The single cube-based three-dimensional point cloud registration method according to claim 5, wherein the step of performing circle edge detection and circle fitting on the preprocessed image, and performing coordinate transformation to obtain three-dimensional coordinates of the center of the dice plane point number circle comprises:
performing circle edge detection on the preprocessed image based on a Canny edge detection method to obtain a central circle boundary coordinate of the point cloud of the dice plane;
performing circle fitting according to the boundary coordinates of the central circle of the point cloud of the dice plane to obtain two-dimensional coordinates of the circle center;
and constructing a circle center three-dimensional coordinate by combining the height of the circle center in the coordinate system and rotating the circle center three-dimensional coordinate back to the initial state to obtain the three-dimensional coordinate of the plane point number circle center of the dice.
7. The single cube based three-dimensional point cloud registration method of claim 6, wherein the formula of the circle fitting is expressed as follows:
X' 2 +Y' 2 +DX'+EY'+F=0
in the above formula, X 'and Y' represent point number circle boundary coordinates, D, E and F represent circle parameters, respectively, and X c 、Y c Respectively representing the abscissa and ordinate of the center of the fitted circle.
8. A single cube based three-dimensional point cloud registration system, comprising:
the point cloud extraction module is used for acquiring an original point cloud and extracting a dice point cloud according to the original point cloud;
the image processing module is used for judging that the point cloud data of the dice are complete, and performing plane segmentation, rotation and image processing on the point cloud of the dice to obtain a preprocessed image;
the center calculation module is used for carrying out circle edge detection and circle fitting on the preprocessed image and carrying out coordinate transformation to obtain three-dimensional coordinates of the center of the dice plane point number circle;
the homonymy point pair construction module is used for constructing homonymy point pairs according to the three-dimensional coordinates of the centers of the dice plane point numbers;
and the registration module is used for calculating a rotation matrix and a translation matrix between the same-name point pairs and completing registration based on the rotation matrix and the translation matrix.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210556470.0A CN114882085B (en) | 2022-05-20 | 2022-05-20 | Three-dimensional point cloud registration method and system based on single cube |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210556470.0A CN114882085B (en) | 2022-05-20 | 2022-05-20 | Three-dimensional point cloud registration method and system based on single cube |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114882085A CN114882085A (en) | 2022-08-09 |
CN114882085B true CN114882085B (en) | 2023-02-14 |
Family
ID=82677707
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210556470.0A Active CN114882085B (en) | 2022-05-20 | 2022-05-20 | Three-dimensional point cloud registration method and system based on single cube |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114882085B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115994403B (en) * | 2023-03-22 | 2023-06-23 | 中国水利水电第七工程局有限公司 | Pile casing checking method, device and equipment based on three-dimensional circle center fitting |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105469388A (en) * | 2015-11-16 | 2016-04-06 | 集美大学 | Building point cloud registration algorithm based on dimension reduction |
CN109509226A (en) * | 2018-11-27 | 2019-03-22 | 广东工业大学 | Three dimensional point cloud method for registering, device, equipment and readable storage medium storing program for executing |
CN109658444A (en) * | 2018-11-23 | 2019-04-19 | 大连理工大学 | A kind of regular three-dimensional colour point clouds method for registering based on multi-modal feature |
CN109934855A (en) * | 2018-12-28 | 2019-06-25 | 南京理工大学 | A point cloud-based 3D reconstruction method for power components in live work scenes |
-
2022
- 2022-05-20 CN CN202210556470.0A patent/CN114882085B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105469388A (en) * | 2015-11-16 | 2016-04-06 | 集美大学 | Building point cloud registration algorithm based on dimension reduction |
CN109658444A (en) * | 2018-11-23 | 2019-04-19 | 大连理工大学 | A kind of regular three-dimensional colour point clouds method for registering based on multi-modal feature |
CN109509226A (en) * | 2018-11-27 | 2019-03-22 | 广东工业大学 | Three dimensional point cloud method for registering, device, equipment and readable storage medium storing program for executing |
CN109934855A (en) * | 2018-12-28 | 2019-06-25 | 南京理工大学 | A point cloud-based 3D reconstruction method for power components in live work scenes |
Also Published As
Publication number | Publication date |
---|---|
CN114882085A (en) | 2022-08-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111915677B (en) | 2023-11-17 | A ship pose estimation method based on three-dimensional point cloud features |
US9811880B2 (en) | 2017-11-07 | Backfilling points in a point cloud |
AU2011362799B2 (en) | 2016-02-25 | 3D streets |
CN107679537B (en) | 2019-11-19 | A Pose Estimation Algorithm for Objects in Untextured Space Based on Contour Point ORB Feature Matching |
CN111179324A (en) | 2020-05-19 | Object six-degree-of-freedom pose estimation method based on color and depth information fusion |
CN113065546A (en) | 2021-07-02 | A target pose estimation method and system based on attention mechanism and Hough voting |
CN103761739B (en) | 2016-09-28 | A kind of Image registration method optimized based on half global energy |
CN116129037B (en) | 2023-10-31 | Visual touch sensor, three-dimensional reconstruction method, system, equipment and storage medium thereof |
CN114463503B (en) | 2025-01-03 | Method and device for integrating three-dimensional model and geographic information system |
CN112132876A (en) | 2020-12-25 | Initial pose estimation method in 2D-3D image registration |
CN111798453A (en) | 2020-10-20 | Point cloud registration method and system for unmanned auxiliary positioning |
CN113963107B (en) | 2024-04-02 | Binocular vision-based large-scale target three-dimensional reconstruction method and system |
CN114882085B (en) | 2023-02-14 | Three-dimensional point cloud registration method and system based on single cube |
CN112257721A (en) | 2021-01-22 | Image target region matching method based on Fast ICP |
CN113409242A (en) | 2021-09-17 | Intelligent monitoring method for point cloud of rail intersection bow net |
Niu et al. | 2018 | The line scan camera calibration based on space rings group |
CN115601430A (en) | 2023-01-13 | Texture-free high-reflection object pose estimation method and system based on key point mapping |
CN117132737B (en) | 2024-01-26 | Three-dimensional building model construction method, system and equipment |
CN115222912A (en) | 2022-10-21 | Target pose estimation method and device, computing equipment and storage medium |
CN112581511A (en) | 2021-03-30 | Three-dimensional reconstruction method and system based on approximate vertical scanning point cloud rapid registration |
Wan et al. | 2017 | A performance comparison of feature detectors for planetary rover mapping and localization |
CN110009655B (en) | 2020-12-08 | Generation and use of eight-direction 3D operator for contour enhancement of stereoscopic images |
CN108009576A (en) | 2018-05-08 | A kind of object identification method of object matching, equipment and storage device |
CN115082619A (en) | 2022-09-20 | Three-dimensional point cloud reconstruction and completion method and device, electronic equipment and storage medium |
CN118967532B (en) | 2024-12-17 | Unmanned vehicle attitude correction method based on depth estimation improvement |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
2022-08-09 | PB01 | Publication | |
2022-08-09 | PB01 | Publication | |
2022-08-26 | SE01 | Entry into force of request for substantive examination | |
2022-08-26 | SE01 | Entry into force of request for substantive examination | |
2023-02-14 | GR01 | Patent grant | |
2023-02-14 | GR01 | Patent grant |