Nothing Special   »   [go: up one dir, main page]

CN115409969A - Long-distance-measurement ground laser point cloud plane segmentation algorithm - Google Patents

Long-distance-measurement ground laser point cloud plane segmentation algorithm Download PDF

Info

Publication number
CN115409969A
CN115409969A CN202210847780.8A CN202210847780A CN115409969A CN 115409969 A CN115409969 A CN 115409969A CN 202210847780 A CN202210847780 A CN 202210847780A CN 115409969 A CN115409969 A CN 115409969A
Authority
CN
China
Prior art keywords
point
plane
points
distance
neighborhood
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.)
Pending
Application number
CN202210847780.8A
Other languages
Chinese (zh)
Inventor
陈茂霖
安奥博
潘建平
唐菲菲
赵立都
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing Jiaotong University
Original Assignee
Chongqing Jiaotong University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chongqing Jiaotong University filed Critical Chongqing Jiaotong University
Priority to CN202210847780.8A priority Critical patent/CN115409969A/en
Publication of CN115409969A publication Critical patent/CN115409969A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/20Finite element generation, e.g. wire-frame surface description, tesselation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/12Edge-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10028Range image; Depth image; 3D point clouds
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20021Dividing image into blocks, subimages or windows

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computer Graphics (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Image Analysis (AREA)

Abstract

本发明公开了一种长测距地面激光点云平面分割算法,具体包括以下步骤:T1、确定基于动态搜索范围的最佳邻域,T2、基于维度特征和最佳邻域的区域增长算法设计,本发明涉及激光点云数据处理应用技术领域。该长测距地面激光点云平面分割算法,具有密度自适应性,邻域搜索范围基于理论点间距自动生成,能满足不同扫描距离处点云查找邻域的需要;最佳邻域的构建保证点云局部特征的计算不受密度变化的影响;采样间隔的估算符合地面激光扫描仪采集原理,增强了理论点间距的合理性;将最佳邻域加入区域增长,使平面分割算法适应于高密度变化点云,具有动态搜索范围的广泛适用性,邻域搜索范围的确定从单点出发,无需分析点云整体密度变化。

Figure 202210847780

The invention discloses an algorithm for plane segmentation of long-range ground laser point clouds, which specifically includes the following steps: T1, determining the best neighborhood based on the dynamic search range, T2, designing a region growth algorithm based on dimensional features and the best neighborhood , The present invention relates to the technical field of laser point cloud data processing and application. The long-range ground laser point cloud plane segmentation algorithm is density-adaptive, and the neighborhood search range is automatically generated based on the theoretical point spacing, which can meet the needs of point cloud search for neighbors at different scanning distances; the construction of the best neighborhood is guaranteed The calculation of the local features of the point cloud is not affected by the density change; the estimation of the sampling interval is in line with the acquisition principle of the ground laser scanner, which enhances the rationality of the theoretical point spacing; the best neighborhood is added to the region growth, so that the plane segmentation algorithm is suitable for high Density change point cloud has wide applicability of dynamic search range, and the determination of neighborhood search range starts from a single point without analyzing the overall density change of point cloud.

Figure 202210847780

Description

一种长测距地面激光点云平面分割算法A Plane Segmentation Algorithm of Long Range Ground Laser Point Cloud

技术领域technical field

本发明涉及激光点云数据处理应用技术领域,具体为一种长测距地面激光点云平面分割算法。The invention relates to the technical field of laser point cloud data processing and application, in particular to a long-range ground laser point cloud plane segmentation algorithm.

背景技术Background technique

激光扫描技术是建筑信息采集的主要方式之一。由于激光扫描仪采集的点云是散乱、无序的,如何从中有效地提取建筑信息对智慧城市建设具有十分重要的研究意义。Laser scanning technology is one of the main ways of building information collection. Since the point clouds collected by laser scanners are scattered and disordered, how to effectively extract building information from them has very important research significance for the construction of smart cities.

激光扫描技术根据载体的不同,分为机载激光扫描技术、车载激光扫描技术和地面激光扫描技术等。根据数据采集方式,机载激光扫描技术能从空中采集建筑顶面信息,缺失立面信息,地面激光扫描技术可以采集到丰富的建筑立面信息,是精细化三维重建的重要数据来源。According to different carriers, laser scanning technology can be divided into airborne laser scanning technology, vehicle laser scanning technology and ground laser scanning technology. According to the data collection method, airborne laser scanning technology can collect building top surface information from the air, lacking facade information, and ground laser scanning technology can collect rich building facade information, which is an important data source for refined 3D reconstruction.

平面分割是提取建筑立面的重要手段,包括区域增长,模型拟合和特征聚类等。区域增长法是种子点在其邻域中根据某些规则进行生长的过程,首先依据曲率最小[Besl,1988]、面显著性强度最高[Wu Hao,2019]等准则选取种子点,接着依据生长规则在其邻域中查找生长点,法向量,欧式距离[CL Kang,2020],点面距[卢维欣,2015],平面拟合残差[XNing,2009]等特征被广泛用于生长规则中,同时将未进行增长的生长点作为新种子点,直至遍历全部点;模型拟合是通过原始点云与特定模型的拟合实现分割,模型由几何基元构成[S Xia,2020]。其中效果较好的算法是霍夫变换[D Borrmann,2011]、随机采样一致性[LLi,2017]及其衍生算法[B Zhao,2020];特征聚类法分为两个步骤:边界提取与聚类。根据点的局部特征可有效检测边界,例如,边界点与相邻点的法向量夹角较大,而同一平面上的点法向量夹角较小[E Che,2017]、以边界点为中心的邻域,其包围路径始末方向夹角小于360°[C Mineo,2019]。聚类算法有k均值算法、k最近邻算法及基于密度的算法(DBSCAN) 等[金建国,2014]。Plane segmentation is an important means to extract building facades, including region growing, model fitting and feature clustering, etc. The region growing method is a process in which the seed point grows according to certain rules in its neighborhood. First, the seed point is selected according to the minimum curvature [Besl, 1988] and the highest surface saliency intensity [Wu Hao, 2019], and then according to the growth The rule finds growing points in its neighborhood, normal vectors, Euclidean distance [CL Kang, 2020], point-to-plane distance [Lu Weixin, 2015], plane fitting residuals [XNing, 2009] and other features are widely used in growth rules , and at the same time use the growth points that have not been grown as new seed points until all points are traversed; model fitting is to achieve segmentation by fitting the original point cloud with a specific model, and the model is composed of geometric primitives [S Xia, 2020]. Among them, the algorithm with better effect is Hough transform [D Borrmann, 2011], random sampling consistency [LLi, 2017] and its derivative algorithm [B Zhao, 2020]; the feature clustering method is divided into two steps: boundary extraction and clustering. The boundary can be effectively detected according to the local characteristics of the point. For example, the angle between the normal vector of the boundary point and the adjacent point is large, while the angle between the normal vector of the point on the same plane is small [E Che,2017], centered on the boundary point Neighborhood, the angle between the start and end directions of the enclosing path is less than 360° [C Mineo, 2019]. Clustering algorithms include k-means algorithm, k-nearest neighbor algorithm, and density-based algorithm (DBSCAN), etc. [Jin Jianguo, 2014].

目前已有的建筑平面分割方法存在以下不足:The existing building plane segmentation methods have the following deficiencies:

1、较少考虑高密度变化对分割的影响。随着扫描仪硬件的不断优化,增加了地面激光扫描的测程,也带来了高密度变化的问题,例如,扫描线夹角 0.06°,最大扫描距离1km,点间距可实现毫米级到米级的跨越,导致场景内高密度变化,带来了邻域尺寸难以统一的问题。区域增长和特征聚类对邻域选择十分敏感,邻域尺寸选择影响着平面分割的质量。1. Less consideration is given to the impact of high-density changes on segmentation. With the continuous optimization of scanner hardware, the measurement range of terrestrial laser scanning has been increased, which has also brought about the problem of high-density changes. For example, the angle between scanning lines is 0.06°, the maximum scanning distance is 1km, and the point spacing can be realized from millimeters to meters The leaping of levels leads to high-density changes in the scene, which brings about the problem that the size of the neighborhood is difficult to unify. Region growing and feature clustering are very sensitive to neighborhood selection, and neighborhood size selection affects the quality of plane segmentation.

2、难以兼顾效率和精度。模型拟合法有更高的鲁棒性,但对原始点云质量有更高的要求。由于地物遮挡,地面激光点云在完整性方面存在一定缺陷,而且随着扫描距离增加,采集的点较为稀疏,因此,在长测距地基点云上使用该算法需要对点云进行优化,给算法效率带来影响。区域增长算法原理简单,效率较高,广泛用于大场景点云分割,种子点选取和生长规则影响着分割效率和质量,合理的种子点选取方法可以大幅降低算法耗时,分割平面的质量由生长规则决定。此外,特征拟合要求点云有均匀的密度,若密度不均匀或过低,会导致边界缺失,影响分割的质量和稳定性。2. It is difficult to balance efficiency and precision. The model fitting method has higher robustness, but has higher requirements on the quality of the original point cloud. Due to the occlusion of ground objects, the ground laser point cloud has certain defects in integrity, and as the scanning distance increases, the collected points are relatively sparse. Therefore, the use of this algorithm on the long-range ground-based point cloud requires optimization of the point cloud. affect the efficiency of the algorithm. The region growing algorithm is simple in principle and high in efficiency. It is widely used in point cloud segmentation of large scenes. The selection of seed points and growth rules affect the efficiency and quality of segmentation. A reasonable method of seed point selection can greatly reduce the time-consuming algorithm. The quality of the segmentation plane is determined by Growth rules determine. In addition, feature fitting requires the point cloud to have a uniform density. If the density is uneven or too low, the boundary will be missing, which will affect the quality and stability of the segmentation.

发明内容Contents of the invention

(一)解决的技术问题(1) Solved technical problems

针对现有技术的不足,本发明提供了一种长测距地面激光点云平面分割算法,解决了长测距地基点云扫描距离长,点云密度随扫描距离的增长而有较大变化的问题,已有的平面分割方法很少针对此类情况进行设计,基于此,本发明设计了一种密度自适应分割方法,以解决下列问题:Aiming at the deficiencies of the existing technology, the present invention provides a plane segmentation algorithm of long-range ground laser point cloud, which solves the problem that the long-range ground-based point cloud scan distance is long, and the point cloud density changes greatly with the increase of the scan distance. Problem, existing planar segmentation methods are rarely designed for this type of situation, based on this, the present invention designs a density adaptive segmentation method to solve the following problems:

1)设计动态搜索范围查找最佳邻域,以解决密度变化给邻域尺寸选择带来的问题。长测距地基点云的高密度变化特性,使得不同密度区域的点云具有不同邻域尺寸,给平面分割带来影响,通过设置搜索范围查找各点最佳邻域是解决此类问题的有效思路,同时搜索范围由理论点间距确定,基于单点构建搜索范围,使算法适应于最长扫描距离不同的地面激光点云。1) Design a dynamic search range to find the best neighborhood to solve the problem of neighborhood size selection caused by density changes. The high-density change characteristics of long-range ground-based point clouds make point clouds in different density areas have different neighborhood sizes, which affects plane segmentation. Finding the best neighborhood of each point by setting the search range is an effective way to solve such problems. At the same time, the search range is determined by the theoretical point spacing, and the search range is constructed based on a single point, so that the algorithm is suitable for ground laser point clouds with different longest scanning distances.

2)改进区域增长算法,统筹精度与效率。模型拟合和特征聚类对原始点云的质量有一定的要求,地面激光点云质量难以满足要求,优化措施设计困难,而区域增长原理简单,能根据不同要求进行改进,效率较高,为提高分割质量,使用主成分分析法计算维度特征以解决边界点误分的情况,并基于最佳邻域设计生长规则,提高局部特征计算的准确性,使平面分割结果更加合理。2) Improve the region growth algorithm to balance accuracy and efficiency. Model fitting and feature clustering have certain requirements on the quality of the original point cloud. The quality of the ground laser point cloud is difficult to meet the requirements, and the design of optimization measures is difficult. However, the principle of regional growth is simple and can be improved according to different requirements, with high efficiency. Improve the segmentation quality, use principal component analysis to calculate dimensional features to solve the situation of boundary point misclassification, and design growth rules based on the best neighborhood to improve the accuracy of local feature calculation and make the plane segmentation results more reasonable.

(二)技术方案(2) Technical solution

为实现以上目的,本发明通过以下技术方案予以实现:一种长测距地面激光点云平面分割算法,具体包括以下步骤:In order to achieve the above object, the present invention is realized through the following technical solutions: a plane segmentation algorithm of long-range ground laser point cloud, which specifically includes the following steps:

T1、确定基于动态搜索范围的最佳邻域,具体确定方法包括以下步骤:T1. Determine the best neighborhood based on the dynamic search range. The specific determination method includes the following steps:

e1、地面滤波:使用布料滤波算法分离非地面点与地面点,并剔除非地面点云;e1. Ground filtering: use the cloth filtering algorithm to separate non-ground points from ground points, and eliminate non-ground point clouds;

e2、采样间隔估算:根据采集原理,在非地面点云中随机选取N点,分别使用k最近邻算法查找k个近邻点,公式为:e2. Sampling interval estimation: According to the acquisition principle, randomly select N points in the non-ground point cloud, and use the k nearest neighbor algorithm to find k nearest neighbor points respectively. The formula is:

S(pm)={pmn,n=1,2,…,k},m=1,2,…,NS(p m )={p mn ,n=1,2,…,k}, m=1,2,…,N

式中,pm为随机点,pmn为pm的近邻点,S(pm)为近邻点集。In the formula, p m is a random point, p mn is the neighbor point of p m , and S(p m ) is the neighbor point set.

在扫描仪坐标系中,根据pm和pmn的三维坐标,计算其水平夹角Δαmn和垂直夹角Δβmn,Δαmn,Δβmn∈[0°,180°],若Δαmn≥180°,则用360° -Δαmn表示水平夹角In the scanner coordinate system, according to the three-dimensional coordinates of p m and p mn , calculate its horizontal angle Δα mn and vertical angle Δβ mn , Δα mn , Δβ mn ∈ [0°,180°], if Δα mn ≥ 180 °, use 360° -Δα mn to represent the horizontal angle

Figure RE-GDA0003911932500000041
Figure RE-GDA0003911932500000041

Figure RE-GDA0003911932500000042
Figure RE-GDA0003911932500000042

e3、动态搜索范围建立:地面激光扫描仪采集点云的点间距与扫描距离和采样间隔相关,点间距直接影响着点云密度,利用这一特性,在采样间隔的基础上,计算理论上的点间距,结合扫描距离

Figure RE-GDA0003911932500000043
pm点的理论点间距
Figure RE-GDA0003911932500000044
Figure RE-GDA0003911932500000045
e3. Establishment of dynamic search range: The point spacing of the point cloud collected by the ground laser scanner is related to the scanning distance and sampling interval. The point spacing directly affects the point cloud density. Using this feature, on the basis of the sampling interval, calculate the theoretical Point spacing, combined with scan distance
Figure RE-GDA0003911932500000043
Theoretical point spacing of p m points
Figure RE-GDA0003911932500000044
for
Figure RE-GDA0003911932500000045

根据已有实验,在1-10倍数的点间距中选取邻域,使局部特征最明显, 基于此,pm点的动态搜索范围

Figure RE-GDA0003911932500000046
确定为:
Figure RE-GDA0003911932500000047
Figure RE-GDA0003911932500000048
According to the existing experiments, select the neighborhood in the point spacing of 1-10 times to make the local features the most obvious. Based on this, the dynamic search range of p m points
Figure RE-GDA0003911932500000046
identified as:
Figure RE-GDA0003911932500000047
Figure RE-GDA0003911932500000048

e4、联合聚类分析内外指标和香农熵的最佳邻域搜索:在

Figure RE-GDA0003911932500000049
中选取
Figure RE-GDA00039119325000000410
作为聚类半径,使用KNN法对点云进行聚类,并使用内外指标对聚类结果进行评价,选取最佳聚类结果,内指标基于聚类后各类的空间关系对结果进行评价,考虑到点云海量性对算法效率的影响,在内部指标中选取DB指数,在外指标中选取Rand指数验证DB指数的合理性;e4. Optimal Neighborhood Search for Joint Cluster Analysis Inner and Outer Indicators and Shannon Entropy: In
Figure RE-GDA0003911932500000049
select from
Figure RE-GDA00039119325000000410
As the clustering radius, use the KNN method to cluster the point cloud, and use the internal and external indicators to evaluate the clustering results, select the best clustering results, and use the internal indicators to evaluate the results based on the spatial relationship of various types after clustering. Consider Considering the impact of point cloud mass on algorithm efficiency, select DB index as internal index and Rand index as external index to verify the rationality of DB index;

若聚类后将点云分为m类M={M1,M2,…,Mm},手动分类为n类 N={N1,N2,…,Nn},DB指数和Rand指数的计算如下:If the point cloud is divided into m categories M={M1,M2,...,Mm} after clustering, and manually classified into n categories N={N1,N2,...,Nn}, the calculation of DB index and Rand index is as follows:

Figure RE-GDA00039119325000000411
Figure RE-GDA00039119325000000411

其中,avg(Mi),avg(Mj)表示Mi,Mj的平均点间距,dcen(Mi,Mj)为Mi与Mj的质心距离,nij为Mi与Nj共同点的数量,n.j、ni.分别为为Mi,Nj的点数,N 为点云总数;DB指数越小,Rand指数越大,聚类结果越好。Among them, avg(M i ), avg(M j ) represent the average point spacing of Mi and M j , dcen(M i , M j ) is the centroid distance between Mi and M j , and n ij is the distance between Mi and N j The number of common points, nj and ni. are the points of M i and N j respectively, and N is the total number of point clouds; the smaller the DB index, the larger the Rand index, the better the clustering result.

此时,最佳聚类结果对应的邻域半径对应的整数int,以

Figure RE-GDA0003911932500000056
为左右跨度提取动态搜索范围中的有效子集;At this time, the integer int corresponding to the neighborhood radius corresponding to the best clustering result is
Figure RE-GDA0003911932500000056
Extract valid subsets in the dynamic search range for left and right spans;

香农熵表示某点邻域的信息量,值越小,局部特征越明显,香农熵的计算如下:Shannon entropy represents the amount of information in the neighborhood of a certain point. The smaller the value, the more obvious the local features. The calculation of Shannon entropy is as follows:

Figure RE-GDA0003911932500000051
Figure RE-GDA0003911932500000051

其中,Ef为香农熵,δ1,δ2,δ3是该点邻域的平面拟合残差,由主成分分析法计算而得,且δ1≥δ2≥δ3。在动态搜索范围的有效子集中,以

Figure RE-GDA0003911932500000052
的间隔取值作为邻域半径,通过PCA计算邻域拟合平面的协方差矩阵,将矩阵的特征值开方得到三轴方向的拟合残差δ1,δ2,δ3,根据香农熵的计算公式计算香农熵,选取Ef最小时的邻域半径
Figure RE-GDA0003911932500000053
即确定出最佳邻域为:Among them, Ef is the Shannon entropy, δ 1 , δ 2 , and δ 3 are the plane fitting residuals of the point neighborhood, which are calculated by principal component analysis, and δ 1 ≥ δ 2δ 3 . In a valid subset of the dynamic search range, starting with
Figure RE-GDA0003911932500000052
The value of the interval is taken as the neighborhood radius, and the covariance matrix of the neighborhood fitting plane is calculated by PCA, and the square root of the eigenvalues of the matrix is obtained to obtain the fitting residuals δ 1 , δ 2 , δ 3 in the three-axis direction, according to the Shannon entropy The calculation formula of Shannon entropy is calculated, and the neighborhood radius when Ef is the smallest is selected
Figure RE-GDA0003911932500000053
That is, the best neighborhood is determined as:

Figure RE-GDA0003911932500000054
Figure RE-GDA0003911932500000054

此时,该点的局部特征最明显,根据拟合残差对点的维度特征Dim进行分析At this time, the local characteristics of the point are the most obvious, and the dimension feature Dim of the point is analyzed according to the fitting residual

Figure RE-GDA0003911932500000055
Figure RE-GDA0003911932500000055

其中,Dim∈[0,2],分别对应线状点、平面点和离散点,且λ1≥λ2≥λ3Among them, Dim∈[0, 2] corresponds to linear points, planar points and discrete points respectively, and λ 1 ≥λ 2 ≥λ 3 .

T2、基于维度特征和最佳邻域的区域增长算法设计,具体确定方法包括以下步骤:T2. Design of region growth algorithm based on dimensional features and optimal neighborhood. The specific determination method includes the following steps:

p1、建筑提取:聚类结果不仅包含建筑类,还包含诸如路灯、树木等干扰类,由于建筑类绝大多数点为平面点,路灯,树木等干扰物具有较多的离散点和线状点,基于此,根据每类中平面点的比例选出建筑类,图中不同类具有不同的颜色,灰色为渲染结果;p1. Building extraction: The clustering results include not only buildings, but also disturbances such as street lights and trees. Since most of the points of buildings are plane points, street lights, trees and other disturbances have more discrete points and linear points. , based on this, the building class is selected according to the proportion of plane points in each class. Different classes have different colors in the figure, and gray is the rendering result;

p2、种子点选取和生长规则设置:在建筑物中,依据最佳邻域、维度特征、法向量和点面距选取种子点;p2. Seed point selection and growth rule setting: in the building, select the seed point according to the best neighborhood, dimension features, normal vector and point-to-plane distance;

p3、过分割平面合并:由于激光的透射性,窗户在点云中表现为空洞,在空间上的不连续使得分割得到的初始平面出现过分割的情况。p3. Over-segmentation plane merging: Due to the transmittance of the laser, the window appears as a hole in the point cloud, and the discontinuity in space makes the initial plane obtained by segmentation appear over-segmented.

优选的,所述e2中采样间隔是扫描仪相邻扫描线之间的水平夹角或垂直夹角,其对应的弧度为角分辨率。Preferably, the sampling interval in e2 is the horizontal or vertical angle between adjacent scanning lines of the scanner, and the corresponding radian is the angular resolution.

优选的,所述步骤e2中根据采集原理,在KNN确定的球形邻域S(pm)中, pm相邻扫描线上的近邻点最多,同时以若干区间统计水平夹角的分布情况,建立直方图,区间宽度为Δ。在直方图中选取点数最多的区间,计算区间内水平夹角的平均值αavgPreferably, in the step e2, according to the acquisition principle, in the spherical neighborhood S( pm ) determined by KNN, the adjacent points on the adjacent scanning line of p m are the most, and at the same time, the distribution of horizontal angles is counted in several intervals, Create a histogram with interval width Δ. Select the interval with the most points in the histogram, and calculate the average value α avg of the horizontal angles in the interval.

优选的,参数Δ设置的合理性影响着采样间隔的估算质量,使Δ在 [0.005°,0.015°]的范围中以0.001°的间隔取值,分别计算αavg,最终取所有αavg的中间值med(αavg)为最终的采样间隔。Preferably, the rationality of the parameter Δ setting affects the estimation quality of the sampling interval, so that Δ takes values at intervals of 0.001° in the range of [0.005°, 0.015°], calculates α avg respectively, and finally takes the middle of all α avg The value med(α avg ) is the final sampling interval.

优选的,所述步骤e4中内指标基于聚类后各类的空间关系为邓恩指标指标、轮廓系数和戴维森堡丁指数,外指标将人工分类结果作为参考数据,与聚类结果进行比较,分析聚类结果的有效性,分为标准互信息指标、F-Measure 指标、Rand指数和Jacarrd系数。Preferably, in the step e4, the internal index is based on the spatial relationship of various types after clustering, which is Dunn index index, silhouette coefficient and Davidson-Fort index, and the external index uses the manual classification result as reference data, and compares it with the clustering result, To analyze the validity of clustering results, it is divided into standard mutual information index, F-Measure index, Rand index and Jacarrd coefficient.

优选的,所述步骤p2中生长规则的具体设置方法如下;Preferably, the specific setting method of the growth rule in the step p2 is as follows;

U1、选取种子点:在建筑类中将平面点作为起始种子点,生长过程中将全部生长点作为新的种子点,任一点仅执行一次生长操作;U1. Select the seed point: in the construction class, the plane point is used as the initial seed point, and all the growth points are used as the new seed point during the growth process, and only one growth operation is performed for any point;

U2、设置生长规则:首先将生长点必为平面点作为前提条件,然后生长点要满足距离要求、法向量要求和点面距要求:U2. Set the growth rules: first, the growth point must be a plane point as a prerequisite, and then the growth point must meet the distance requirements, normal vector requirements and point-to-plane distance requirements:

Figure RE-GDA0003911932500000071
Figure RE-GDA0003911932500000071

其中,D是生长点与种子点的欧式距离,

Figure RE-GDA0003911932500000072
是种子点最佳邻域半径,φ是生长点与种子点的法向量夹角,φth是法向量夹角阈值,d’是点面距的较大值,d’th是点面距阈值。Among them, D is the Euclidean distance between the growth point and the seed point,
Figure RE-GDA0003911932500000072
is the optimal neighborhood radius of the seed point, φ is the normal vector angle between the growth point and the seed point, φ th is the normal vector angle threshold, d' is the larger value of the point-to-plane distance, d' th is the point-to-plane distance threshold .

U3、分配线状点:线状点也是平面的一部分,在所有平面点完成生长后,再将线状点分配至最邻近平面,得到初始分割结果。U3. Allocation of linear points: linear points are also part of the plane. After all the plane points are grown, the linear points are allocated to the nearest adjacent plane to obtain the initial segmentation result.

优选的,所述步骤p3中的过分割问题,是通过平面合并来优化初始结果,平面合并需要满足下面几条要求:Preferably, the over-segmentation problem in the step p3 is to optimize the initial result by plane merging, and the plane merging needs to meet the following requirements:

(1)平面法向量夹角要求:计算两个平面的法向量夹角,夹角需小于阈值φth(1) Plane normal vector angle requirements: Calculate the normal vector angle between two planes, and the angle must be smaller than the threshold φ th ;

(2)点面距要求:对两个平面P1,P2,分别求得几何中心C1,C2,点面距的计算如下:(2) Point-to-plane distance requirements: For two planes P 1 and P 2 , the geometric centers C 1 and C 2 are obtained respectively, and the point-to-plane distance is calculated as follows:

Figure RE-GDA0003911932500000073
Figure RE-GDA0003911932500000073

其中Dc为C1,C2的空间距离,

Figure RE-GDA0003911932500000074
为两平面的法向量,点面距需小于阈值d′th;where D c is the space distance between C 1 and C 2 ,
Figure RE-GDA0003911932500000074
is the normal vector of the two planes, and the point-to-plane distance must be smaller than the threshold d′ th ;

(3)平面距离要求:过分割是窗户缺失导致的,将场景内窗户的最大高度作为距离阈值。(3) Plane distance requirement: over-segmentation is caused by missing windows, and the maximum height of windows in the scene is used as the distance threshold.

优选的,首先以P1中一点为中心建立平衡二叉树,以距离阈值构建搜索范围,然后查询P2在此范围内的点,点存在即满足平面距离要求。Preferably, firstly, a balanced binary tree is established with a point in P 1 as the center, and a search range is constructed with a distance threshold, and then the points in P 2 within this range are queried, and the existence of a point satisfies the plane distance requirement.

(三)有益效果(3) Beneficial effects

本发明提供了一种长测距地面激光点云平面分割算法。与现有技术相比具备以下有益效果:The invention provides an algorithm for plane segmentation of long-range ground laser point clouds. Compared with the prior art, it has the following beneficial effects:

(1)、该长测距地面激光点云平面分割算法,具有密度自适应性,邻域搜索范围基于理论点间距自动生成(此方案将理论点间距的1-10倍作为邻域的动态搜索范围),能满足不同扫描距离处点云查找邻域的需要;最佳邻域的构建保证点云局部特征的计算不受密度变化的影响;采样间隔的估算符合地面激光扫描仪采集原理,增强了理论点间距的合理性;将最佳邻域加入区域增长,使平面分割算法适应于高密度变化点云。(1) The long-range ground laser point cloud plane segmentation algorithm is density-adaptive, and the neighborhood search range is automatically generated based on the theoretical point spacing (this scheme uses 1-10 times the theoretical point spacing as the dynamic search of the neighborhood range), which can meet the needs of point cloud search for neighbors at different scanning distances; the construction of the best neighborhood ensures that the calculation of local features of point clouds is not affected by density changes; the estimation of sampling interval conforms to the acquisition principle of ground laser scanners, and enhances The rationality of the theoretical point spacing is confirmed; the best neighbor is added to the region growth, so that the plane segmentation algorithm is suitable for high-density changing point clouds.

(2)、该长测距地面激光点云平面分割算法,具有动态搜索范围的广泛适用性,邻域搜索范围的确定从单点出发,无需分析点云整体密度变化,避免了对不同测距地基点云搜索范围的反复设置,具有更强的适用性。(2) The plane segmentation algorithm of the long-range ground laser point cloud has wide applicability of the dynamic search range. The determination of the neighborhood search range starts from a single point without analyzing the overall density change of the point cloud, which avoids the need for different distance measurements. The repeated setting of the search range of the ground-based point cloud has stronger applicability.

(3)、该长测距地面激光点云平面分割算法,通过聚类分析内外指标的使用,通过对聚类结果的合理分析,在保证最佳邻域提取质量的基础上,剔除了动态搜索范围无效子集,避免了香农熵在无效子集上的计算,降低了最佳邻域的搜索时间。(3) The long-range ground laser point cloud plane segmentation algorithm, through the use of internal and external indicators of cluster analysis, through the reasonable analysis of cluster results, eliminates the dynamic search on the basis of ensuring the best neighborhood extraction quality Scope invalid subset avoids the calculation of Shannon entropy on the invalid subset and reduces the search time of the best neighbor.

(4)、该长测距地面激光点云平面分割算法,具有兼顾效率与精度,通过维度特征提取边界点,解决了边界法向量估算不准确的问题;在聚类结果的基础上,通过各类的整体维度特征,提取建筑类,仅对建筑类进行平面分割,显著降低了数据量,提高了处理效率;选择平面点作为种子点和生长点,有效剔除了离散点,最后将边界点分配最近平面,提高了边界处分割结果的准确性;基于窗户尺寸设计面片合并条件,有效解决了窗户信息缺失导致的过分割问题,使平面分割结果更加合理。(4) The plane segmentation algorithm of the long-range ground laser point cloud has both efficiency and accuracy, and the boundary points are extracted through dimensional features, which solves the problem of inaccurate estimation of the boundary normal vector; on the basis of the clustering results, through various The overall dimensional characteristics of the class, extract the building class, and only divide the building class into a plane, which significantly reduces the amount of data and improves the processing efficiency; select the plane point as the seed point and the growth point, effectively eliminate the discrete points, and finally assign the boundary points The closest plane improves the accuracy of the segmentation results at the boundary; the mesh merging condition is designed based on the window size, which effectively solves the over-segmentation problem caused by the lack of window information, making the plane segmentation results more reasonable.

附图说明Description of drawings

图1为本发明实施例基于动态搜索范围的平面分割流程图;FIG. 1 is a flowchart of plane segmentation based on a dynamic search range according to an embodiment of the present invention;

图2为本发明实施例随机点与近邻点水平夹角和垂直夹角计算示意图;Fig. 2 is a schematic diagram of the calculation of the horizontal angle and the vertical angle between a random point and a neighboring point according to an embodiment of the present invention;

图3为本发明实施例水平夹角直方图构建示意图;Fig. 3 is a schematic diagram of building a horizontal angle histogram according to an embodiment of the present invention;

图4为本发明实施例最佳邻域确定示意图;FIG. 4 is a schematic diagram of determining the best neighborhood according to an embodiment of the present invention;

图5为本发明实施例建筑物提取示意图;5 is a schematic diagram of building extraction according to an embodiment of the present invention;

图6为本发明实施例区域增长效果示意图;Fig. 6 is a schematic diagram of the regional growth effect of the embodiment of the present invention;

图7为本发明实施例面片合并示意图。Fig. 7 is a schematic diagram of merging dough pieces according to an embodiment of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

请参阅图1-7,本发明实施例提供一种技术方案:一种长测距地面激光点云平面分割算法,具体包括以下步骤:Please refer to Figures 1-7, an embodiment of the present invention provides a technical solution: a plane segmentation algorithm for long-range ground laser point clouds, which specifically includes the following steps:

T1、确定基于动态搜索范围的最佳邻域,具体确定方法包括以下步骤:T1. Determine the best neighborhood based on the dynamic search range. The specific determination method includes the following steps:

e1、地面滤波:使用布料滤波算法分离非地面点与地面点,并剔除非地面点云。e1. Ground filtering: Use the cloth filtering algorithm to separate non-ground points from ground points, and eliminate non-ground point clouds.

e2、采样间隔估算:采样间隔是扫描仪相邻扫描线之间的水平夹角或垂直夹角,其对应的弧度为角分辨率,根据采集原理,在非地面点云中随机选取N点,分别使用k最近邻算法查找k个近邻点,公式为:e2. Sampling interval estimation: The sampling interval is the horizontal or vertical angle between adjacent scanning lines of the scanner, and the corresponding radian is the angular resolution. According to the acquisition principle, N points are randomly selected in the non-ground point cloud, Use the k-nearest neighbor algorithm to find k neighbor points respectively, the formula is:

S(pm)={pmn,n=1,2,…,k},m=1,2,…,NS(p m )={p mn ,n=1,2,…,k}, m=1,2,…,N

式中,pm为随机点,pmn为pm的近邻点,S(pm)为近邻点集。In the formula, p m is a random point, p mn is the neighbor point of p m , and S(p m ) is the neighbor point set.

在扫描仪坐标系中,根据pm和pmn的三维坐标,计算其水平夹角Δαmn和垂直夹角Δβmn,Δαmn,Δβmn∈[0°,180°],若Δαmn≥180°,则用360° -Δαmn表示水平夹角In the scanner coordinate system, according to the three-dimensional coordinates of p m and p mn , calculate its horizontal angle Δα mn and vertical angle Δβ mn , Δα mn , Δβ mn ∈ [0°,180°], if Δα mn ≥ 180 °, use 360° -Δα mn to represent the horizontal angle

Figure RE-GDA0003911932500000101
Figure RE-GDA0003911932500000101

Figure RE-GDA0003911932500000102
Figure RE-GDA0003911932500000102

根据采集原理,在KNN确定的球形邻域S(pm)中,pm相邻扫描线上的近邻点最多,如图2,同时以若干区间统计水平夹角的分布情况,建立直方图,区间宽度为Δ。在直方图中选取点数最多的区间,计算区间内水平夹角的平均值αavgAccording to the collection principle, in the spherical neighborhood S(p m ) determined by KNN, the adjacent points on the adjacent scan line of p m are the most, as shown in Figure 2. At the same time, the distribution of horizontal angles is counted in several intervals, and a histogram is established. The interval width is Δ. Select the interval with the most points in the histogram, and calculate the average value α avg of the horizontal angles in the interval.

参数Δ设置的合理性影响着采样间隔的估算质量,使Δ在[0.005°,0.015°]的范围中以0.001°的间隔取值,分别计算αavg,最终取所有αavg的中间值med(αavg)为最终的采样间隔。The rationality of the parameter Δ setting affects the estimation quality of the sampling interval, so that Δ takes values at intervals of 0.001° in the range of [0.005°, 0.015°], calculates α avg respectively, and finally takes the median value of all α avg med( α avg ) is the final sampling interval.

e3、动态搜索范围建立:地面激光扫描仪采集点云的点间距与扫描距离和采样间隔相关,点间距直接影响着点云密度,利用这一特性,在采样间隔的基础上,计算理论上的点间距,结合扫描距离

Figure RE-GDA0003911932500000103
pm点的理论点间距
Figure RE-GDA0003911932500000104
Figure RE-GDA0003911932500000105
e3. Establishment of dynamic search range: The point spacing of the point cloud collected by the ground laser scanner is related to the scanning distance and sampling interval. The point spacing directly affects the point cloud density. Using this feature, on the basis of the sampling interval, calculate the theoretical Point spacing, combined with scan distance
Figure RE-GDA0003911932500000103
Theoretical point spacing of p m points
Figure RE-GDA0003911932500000104
for
Figure RE-GDA0003911932500000105

根据已有实验,在1-10倍数的点间距中选取邻域,使局部特征最明显, 基于此,pm点的动态搜索范围

Figure RE-GDA0003911932500000106
可确定为:
Figure RE-GDA0003911932500000107
Figure RE-GDA0003911932500000108
According to the existing experiments, select the neighborhood in the point spacing of 1-10 times to make the local features the most obvious. Based on this, the dynamic search range of p m points
Figure RE-GDA0003911932500000106
Can be determined as:
Figure RE-GDA0003911932500000107
Figure RE-GDA0003911932500000108

e4、联合聚类分析内外指标和香农熵的最佳邻域搜索:在

Figure RE-GDA0003911932500000109
中选取
Figure RE-GDA00039119325000001010
作为聚类半径,使用KNN法对点云进行聚类,并使用内外指标对聚类结果进行评价,选取最佳聚类结果。e4. Optimal Neighborhood Search for Joint Cluster Analysis Inner and Outer Indicators and Shannon Entropy: In
Figure RE-GDA0003911932500000109
select from
Figure RE-GDA00039119325000001010
As the clustering radius, the KNN method is used to cluster the point cloud, and the internal and external indicators are used to evaluate the clustering results, and the best clustering results are selected.

内指标基于聚类后各类的空间关系对结果进行评价,主要有以下几种:邓恩指标(Dunn)指标、轮廓系数(Silhouette coefficient)和戴维森堡丁指数(DB Index)等,外指标将人工分类结果作为参考数据,与聚类结果进行比较,分析聚类结果的有效性,分为标准互信息指标(NMI)、F-Measure 指标、Rand指数和Jacarrd系数等,考虑到点云海量性对算法效率的影响,在内部指标中选取DB指数,在外指标中选取Rand指数验证DB指数的合理性。The internal index evaluates the results based on the spatial relationship of various types after clustering. There are mainly the following types: Dunn index, Silhouette coefficient (Silhouette coefficient) and Davidson's Boding index (DB Index), etc. The external index will be The manual classification results are used as reference data, compared with the clustering results, and the effectiveness of the clustering results is analyzed, which are divided into standard mutual information index (NMI), F-Measure index, Rand index and Jacarrd coefficient, etc., considering the mass of point clouds For the impact on the efficiency of the algorithm, the DB index is selected as the internal index, and the Rand index is selected as the external index to verify the rationality of the DB index.

若聚类后将点云分为m类M={M1,M2,…,Mm},手动分类为n类 N={N1,N2,…,Nn},DB指数和Rand指数的计算如下:If the point cloud is divided into m categories M={M1,M2,...,Mm} after clustering, and manually classified into n categories N={N1,N2,...,Nn}, the calculation of DB index and Rand index is as follows:

Figure RE-GDA0003911932500000111
Figure RE-GDA0003911932500000111

其中,avg(Mi),avg(Mj)表示Mi,Mj的平均点间距,dcen(Mi,Mj)为Mi与Mj的质心距离,nij为Mi与Nj共同点的数量,n.j、ni.分别为为Mi,Nj的点数,N 为点云总数。DB指数越小,Rand指数越大,聚类结果越好,图4为最佳邻域确定图,其中图4(a)为内外指标,图4(b)为香农熵。Among them, avg(M i ), avg(M j ) represent the average point spacing of Mi and M j , dcen(M i , M j ) is the centroid distance between Mi and M j , and n ij is the distance between Mi and N j The number of common points, nj and ni. are the points of M i and N j respectively, and N is the total number of point clouds. The smaller the DB index, the larger the Rand index, the better the clustering result. Figure 4 is the optimal neighborhood determination diagram, in which Figure 4(a) is the internal and external indicators, and Figure 4(b) is the Shannon entropy.

此时,最佳聚类结果对应的邻域半径对应的整数int,以

Figure RE-GDA0003911932500000112
为左右跨度提取动态搜索范围中的有效子集,如图4(a);At this time, the integer int corresponding to the neighborhood radius corresponding to the best clustering result is
Figure RE-GDA0003911932500000112
Extract valid subsets in the dynamic search range for the left and right spans, as shown in Figure 4(a);

香农熵表示某点邻域的信息量,值越小,局部特征越明显,香农熵的计算如下:Shannon entropy represents the amount of information in the neighborhood of a certain point. The smaller the value, the more obvious the local features. The calculation of Shannon entropy is as follows:

Figure RE-GDA0003911932500000113
Figure RE-GDA0003911932500000113

其中,Ef为香农熵,δ1,δ2,δ3是该点邻域的平面拟合残差,可由主成分分析法(PCA)计算而得[5],且δ1≥δ2≥δ3。在动态搜索范围的有效子集中,以

Figure RE-GDA0003911932500000114
的间隔取值作为邻域半径,通过PCA计算邻域拟合平面的协方差矩阵,将矩阵的特征值开方得到三轴方向的拟合残差δ1,δ2,δ3,根据式(6)计算香农熵,如图4(b),选取Ef最小时的邻域半径
Figure RE-GDA0003911932500000115
即确定出最佳邻域。Among them, Ef is the Shannon entropy, δ 1 , δ 2 , and δ 3 are the plane fitting residuals of the point neighborhood, which can be calculated by principal component analysis (PCA) [5], and δ 1δ 2 ≥ δ 3 . In a valid subset of the dynamic search range, starting with
Figure RE-GDA0003911932500000114
The value of the interval is taken as the neighborhood radius, and the covariance matrix of the neighborhood fitting plane is calculated by PCA, and the square root of the eigenvalues of the matrix is obtained to obtain the fitting residuals δ 1 , δ 2 , δ 3 in the three-axis direction, according to the formula ( 6) Calculate the Shannon entropy, as shown in Figure 4(b), select the neighborhood radius when Ef is the smallest
Figure RE-GDA0003911932500000115
That is, the best neighborhood is determined.

Figure RE-GDA0003911932500000121
Figure RE-GDA0003911932500000121

此时,该点的局部特征最明显,可根据拟合残差对点的维度特征Dim进行分析At this time, the local characteristics of the point are the most obvious, and the dimension feature Dim of the point can be analyzed according to the fitting residual

Figure RE-GDA0003911932500000122
Figure RE-GDA0003911932500000122

其中,Dim∈[0,2],分别对应线状点、平面点和离散点,且λ1≥λ2≥λ3Among them, Dim∈[0, 2] corresponds to linear points, planar points and discrete points respectively, and λ 1 ≥λ 2 ≥λ 3 .

T2、基于维度特征和最佳邻域的区域增长算法设计T2, Design of Region Growth Algorithm Based on Dimensional Features and Optimal Neighborhood

p1、建筑提取:聚类结果不仅包含建筑类,还包含诸如路灯、树木等干扰类,由于建筑类绝大多数点为平面点,路灯,树木等干扰物具有较多的离散点和线状点,基于此,根据每类中平面点的比例选出建筑类,如图5,图中不同类具有不同的颜色,灰色为渲染结果;p1. Building extraction: The clustering results include not only buildings, but also disturbances such as street lights and trees. Since most of the points of buildings are plane points, street lights, trees and other disturbances have more discrete points and linear points. , based on this, the building class is selected according to the proportion of plane points in each class, as shown in Figure 5, different classes have different colors in the figure, and gray is the rendering result;

p2、种子点选取和生长规则设置:在建筑物中,依据最佳邻域、维度特征、法向量和点面距选取种子点,并设置生长规则,具体方法如下;p2. Seed point selection and growth rule setting: In the building, select the seed point according to the best neighborhood, dimension features, normal vector and point-to-plane distance, and set the growth rule, the specific method is as follows;

1)选取种子点。在建筑类中将平面点作为起始种子点,生长过程中将全部生长点作为新的种子点,任一点仅执行一次生长操作。1) Select the seed point. In the building class, the plane point is used as the initial seed point, and all the growth points are used as the new seed point during the growth process, and any point only performs one growth operation.

2)设置生长规则。首先将生长点必为平面点作为前提条件,然后生长点要满足距离要求、法向量要求和点面距要求:2) Set the growth rules. First, the growth point must be a plane point as a prerequisite, and then the growth point must meet the distance requirements, normal vector requirements and point-to-plane distance requirements:

Figure RE-GDA0003911932500000123
Figure RE-GDA0003911932500000123

其中,D是生长点与种子点的欧式距离,

Figure RE-GDA0003911932500000124
是种子点最佳邻域半径,φ是生长点与种子点的法向量夹角,φth是法向量夹角阈值,d’是点面距的较大值,d’th是点面距阈值。Among them, D is the Euclidean distance between the growth point and the seed point,
Figure RE-GDA0003911932500000124
is the optimal neighborhood radius of the seed point, φ is the normal vector angle between the growth point and the seed point, φ th is the normal vector angle threshold, d' is the larger value of the point-to-plane distance, d' th is the point-to-plane distance threshold .

3)分配线状点。线状点也是平面的一部分,在所有平面点完成生长后,再将线状点分配至最邻近平面,得到初始分割结果,如图6(b)3) Assign linear points. The linear points are also part of the plane. After all the plane points are grown, the linear points are assigned to the nearest adjacent plane to obtain the initial segmentation results, as shown in Figure 6(b)

p3、过分割平面合并:由于激光的透射性,窗户在点云中表现为空洞,在空间上的不连续使得分割得到的初始平面出现过分割的情况,如图7(a)。针对过分割问题,通过平面合并来优化初始结果,平面合并需要满足下面几条要求:p3. Over-segmented plane merging: Due to the transmittance of the laser, the window appears as a hole in the point cloud, and the discontinuity in space makes the initial plane obtained by segmentation appear over-segmented, as shown in Figure 7(a). For the over-segmentation problem, the initial results are optimized by plane merging. The plane merging needs to meet the following requirements:

(1)平面法向量夹角要求。计算两个平面的法向量夹角,夹角需小于阈值φth(1) Requirements for the included angle of the plane normal vector. Calculate the angle between the normal vectors of the two planes, and the angle must be smaller than the threshold φ th .

(2)点面距要求。对两个平面P1,P2,分别求得几何中心C1,C2,点面距的计算如下:(2) Point-to-plane distance requirements. For two planes P 1 , P 2 , the geometric centers C 1 , C 2 are obtained respectively, and the point-to-plane distance is calculated as follows:

Figure RE-GDA0003911932500000131
Figure RE-GDA0003911932500000131

其中Dc为C1,C2的空间距离,

Figure RE-GDA0003911932500000132
为两平面的法向量,点面距需小于阈值d′th。where D c is the space distance between C 1 and C 2 ,
Figure RE-GDA0003911932500000132
is the normal vector of the two planes, and the point-to-plane distance must be smaller than the threshold d′ th .

(3)平面距离要求。过分割是窗户缺失导致的,可将场景内窗户的最大高度作为距离阈值。首先,以P1中一点为中心建立平衡二叉树,以距离阈值构建搜索范围。然后,查询P2在此范围内的点,点存在即满足平面距离要求。图7为面片合并图,其中图7(a)为初始分割结果,图7(b)为距离阈值1.8m;图7(c)为距离阈值0.5m,图7(b)代表距离阈值设置为1.8m时面片合并效果,有效解决过分割情况。图7(c)代表距离阈值为0.5m时面片合并效果,仍存在过分割。(3) Plane distance requirements. Over-segmentation is caused by missing windows, and the maximum height of windows in the scene can be used as the distance threshold. First, build a balanced binary tree centered on a point in P1 , and build a search range with a distance threshold. Then, query the points within this range of P2 , and the existence of the points meets the plane distance requirement. Figure 7 is a patch merging diagram, in which Figure 7(a) is the initial segmentation result, Figure 7(b) is the distance threshold of 1.8m; Figure 7(c) is the distance threshold of 0.5m, and Figure 7(b) represents the distance threshold setting When the mesh size is 1.8m, the merge effect can effectively solve the over-segmentation situation. Figure 7(c) represents the patch merging effect when the distance threshold is 0.5m, and there is still over-segmentation.

同时本说明书中未作详细描述的内容均属于本领域技术人员公知的现有技术。At the same time, the content not described in detail in this specification belongs to the prior art known to those skilled in the art.

需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is a relationship between these entities or operations. any such actual relationship or order exists between them. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements of or also include elements inherent in such a process, method, article, or apparatus.

尽管已经示出和描述了本发明的实施例,对于本领域的普通技术人员而言,可以理解在不脱离本发明的原理和精神的情况下可以对这些实施例进行多种变化、修改、替换和变型,本发明的范围由所附权利要求及其等同物限定。Although the embodiments of the present invention have been shown and described, those skilled in the art can understand that various changes, modifications and substitutions can be made to these embodiments without departing from the principle and spirit of the present invention. and modifications, the scope of the invention is defined by the appended claims and their equivalents.

Claims (8)

1. A long-distance ground laser point cloud plane segmentation algorithm is characterized in that: the method specifically comprises the following steps:
t1, determining the optimal neighborhood based on the dynamic search range, wherein the specific determination method comprises the following steps:
e1, ground filtering: separating non-ground points and ground points by using a cloth filtering algorithm, and rejecting non-ground point clouds;
e2, sampling interval estimation: according to the collection principle, N points are randomly selected from non-ground point cloud, k nearest neighbor points are searched by using a k nearest neighbor algorithm respectively, and the formula is as follows:
S(p m )={p mn ,n=1,2,...,k},m=1,2,…,N
in the formula, p m As random points, p mn Is p m Of (2), S (p) m ) Is a neighbor point set.
In the scanner coordinate system, according to p m And p mn Calculating the horizontal included angle delta alpha of the three-dimensional coordinate mn And angle of vertical separation Δ β mn ,Δα mn ,Δβ mn ∈[0°,180°]If Δ α mn Not less than 180 deg., 360-delta alpha mn Indicating horizontal included angle
Figure FDA0003752112740000011
Figure FDA0003752112740000012
e3, establishing a dynamic search range: the point distance of the point cloud collected by the ground laser scanner is related to the scanning distance and the sampling interval, the point distance directly influences the point cloud density, the theoretical point distance is calculated on the basis of the sampling interval by utilizing the characteristic, and the scanning distance is combined
Figure FDA0003752112740000013
p m Theoretical dot spacing of dots
Figure FDA0003752112740000014
Is composed of
Figure FDA0003752112740000015
According to the existing experiment, neighborhood is selected from 1-10 times of point spacing to make local features most obvious, based on which, p m Dynamic search range of points
Figure FDA0003752112740000021
The determination is as follows:
Figure FDA0003752112740000022
e4, performing joint clustering analysis on the internal and external indexes and the best neighborhood search of the Shannon entropy: in that
Figure FDA0003752112740000023
In selection
Figure FDA0003752112740000024
As a clustering radius, clustering point clouds by using a KNN method, evaluating a clustering result by using internal and external indexes, selecting an optimal clustering result, evaluating the result by using the internal index based on various spatial relations after clustering, selecting a DB index from the internal index in consideration of the influence of the point cloud massiveness on algorithm efficiency, and selecting a Rand index from the external index to verify the rationality of the DB index;
if the point cloud is classified into M types M = { M1, M2, \8230;, mm } after clustering, the point cloud is manually classified into N types N = { N1, N2, \8230;, nn }, and the DB index and the Rand index are calculated as follows:
Figure FDA0003752112740000025
Figure FDA0003752112740000026
wherein, avg (M) i ),avg(M j ) Represents M i ,M j The average dot pitch of (a) is,dcen(M i ,M j ) Is M i And M j Distance of center of mass, n ij Is M i And N j The number of common points, n.j, ni, is M i ,N j N is the total number of point clouds;
at this time, the integer int corresponding to the neighborhood radius corresponding to the best clustering result is used to calculate the best clustering result
Figure FDA0003752112740000027
Extracting a valid subset in the dynamic search range for the left and right spans;
the shannon entropy expresses the information quantity of a certain point neighborhood, the smaller the value is, the more obvious the local characteristic is, and the shannon entropy is calculated as follows:
Figure FDA0003752112740000028
wherein Ef is Shannon entropy, delta 1 ,δ 2 ,δ 3 Is the plane fitting residual error of the point neighborhood, is calculated by a principal component analysis method, and delta 1 ≥δ 2 ≥δ 3 . In a valid subset of the dynamic search range to
Figure FDA0003752112740000031
The interval value of (2) is used as the neighborhood radius, the covariance matrix of the neighborhood fitting plane is calculated through PCA, and the characteristic value of the matrix is squared to obtain the fitting residual error delta in the three-axis direction 1 ,δ 2 ,δ 3 Calculating the Shannon entropy according to the calculation formula of the Shannon entropy, and selecting the neighborhood radius when the Ef is minimum
Figure FDA0003752112740000032
Namely, the optimal neighborhood is determined as:
Figure FDA0003752112740000033
at the moment, the local feature of the point is most obvious, and the dimensional feature Dim of the point is analyzed according to the fitting residual error
Figure FDA0003752112740000034
Wherein Dim ∈ [0,2 ]]Corresponding to a linear point, a planar point and a discrete point, respectively, and λ 1 ≥λ 2 ≥λ 3
T2, designing a region growing algorithm based on dimensional features and an optimal neighborhood, wherein the specific determination method comprises the following steps:
p1, building extraction, namely selecting a building class according to the proportion of plane points in each class;
p2, seed point selection and growth rule setting: in a building, selecting seed points according to an optimal neighborhood, dimensional characteristics, a normal vector and a point-to-surface distance;
p3, over-segmentation plane merging: due to the transmission of the laser, the window appears as a hollow in the point cloud, and the discontinuity in space causes the initial plane obtained by the segmentation to be over-segmented.
2. The long-range ground laser point cloud plane segmentation algorithm of claim 1, wherein: and the sampling interval in the e2 is a horizontal included angle or a vertical included angle between adjacent scanning lines of the scanner, and the corresponding radian is the angular resolution.
3. The long-range ground laser point cloud plane segmentation algorithm of claim 1, wherein: in the step e2, according to the collecting principle, a spherical neighborhood S (p) determined by KNN m ) In, p m The number of the adjacent points on the adjacent scanning lines is the most, and the distribution condition of the horizontal included angle is counted by a plurality of intervals to establish a histogram, wherein the interval width is delta. Selecting the interval with the most points in the histogram, and calculating the average value alpha of the horizontal included angles in the interval avg
4. The long-range ground laser point cloud plane segmentation algorithm of claim 3, wherein: rationality shadow of parameter Δ settingsResponsive to the estimated mass of the sampling interval, Δ is set at [0.005 °,0.015 °]Are taken at intervals of 0.001 DEG in the range of (A), alpha is respectively calculated avg Finally take all alpha avg Middle value of (a) avg ) Is the final sampling interval.
5. The long-range ground laser point cloud plane segmentation algorithm of claim 1, wherein: and e4, enabling the internal indexes to be dunen index indexes, contour coefficients and davisenburg indexes based on the spatial relations of the clustered indexes, enabling the external indexes to take the manual classification results as reference data, comparing the reference data with the clustering results, analyzing the effectiveness of the clustering results, and dividing the clustering results into standard mutual information indexes, F-Measure indexes, rand indexes and Jacard coefficients.
6. The long-range ground laser point cloud plane segmentation algorithm of claim 1, wherein: the specific setting method of the growth rule in the step p2 is as follows;
u1, selecting seed points: taking a plane point as an initial seed point in a building class, taking all growing points as new seed points in the growing process, and performing growing operation once at any point;
u2, setting a growth rule: firstly, taking a growing point as a plane point as a precondition, and then meeting the distance requirement, normal vector requirement and point-to-plane distance requirement of the growing point:
Figure RE-FDA0003911932490000041
wherein D is the Euclidean distance between the growing point and the seed point,
Figure RE-FDA0003911932490000042
is the optimum neighborhood radius of the seed point, phi is the normal vector angle between the growing point and the seed point, phi th Is a normal vector angle threshold, d 'is a larger value of the point-to-surface distance, d' th Is the point-to-area distance threshold.
U3, assigning line points: the linear points are also part of the plane, and after all the plane points are grown, the linear points are distributed to the nearest plane to obtain an initial segmentation result.
7. The long-range ground laser point cloud plane segmentation algorithm of claim 1, wherein: the over-segmentation problem in step p3 is to optimize an initial result by plane merging, where the plane merging needs to meet the following requirements:
(1) The requirements of the included angle of the normal vectors of the planes are as follows: calculating the normal vector included angle of the two planes, wherein the included angle needs to be less than a threshold value phi th
(2) The requirement of point-surface distance: for two planes P 1 ,P 2 Respectively find out the geometric center C 1 ,C 2 The dot-to-face distance is calculated as follows:
Figure FDA0003752112740000051
wherein D c Is C 1 ,C 2 The spatial distance of (a) is,
Figure FDA0003752112740000052
the distance between points and planes is less than a threshold value for normal vectors of two planes
Figure FDA0003752112740000053
(3) The plane distance requirement is as follows: over-segmentation is caused by the absence of windows, and the maximum height of a window in a scene is used as a distance threshold.
8. The long-range ground laser point cloud plane segmentation algorithm of claim 7, wherein: first, with P 1 Establishing a balanced binary tree by taking a middle point as a center, constructing a search range by using a distance threshold value, and then inquiring P 2 At points within this range, the points exist, i.e., meet the plane distance requirement.
CN202210847780.8A 2022-07-19 2022-07-19 Long-distance-measurement ground laser point cloud plane segmentation algorithm Pending CN115409969A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210847780.8A CN115409969A (en) 2022-07-19 2022-07-19 Long-distance-measurement ground laser point cloud plane segmentation algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210847780.8A CN115409969A (en) 2022-07-19 2022-07-19 Long-distance-measurement ground laser point cloud plane segmentation algorithm

Publications (1)

Publication Number Publication Date
CN115409969A true CN115409969A (en) 2022-11-29

Family

ID=84157486

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210847780.8A Pending CN115409969A (en) 2022-07-19 2022-07-19 Long-distance-measurement ground laser point cloud plane segmentation algorithm

Country Status (1)

Country Link
CN (1) CN115409969A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115661552A (en) * 2022-12-12 2023-01-31 高德软件有限公司 Point cloud processing method, point cloud anomaly detection method, medium and computing equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115661552A (en) * 2022-12-12 2023-01-31 高德软件有限公司 Point cloud processing method, point cloud anomaly detection method, medium and computing equipment

Similar Documents

Publication Publication Date Title
CN112489212B (en) An intelligent 3D mapping method for buildings based on multi-source remote sensing data
CN112465948B (en) Vehicle-mounted laser pavement point cloud rarefying method capable of retaining spatial features
CN107292276B (en) A vehicle point cloud clustering method and system
CN105335966B (en) Multiscale morphology image division method based on local homogeney index
CN106780524B (en) A 3D point cloud road boundary automatic extraction method
CN114332366B (en) Digital urban single house point cloud elevation 3D feature extraction method
CN110443810B (en) A point cloud plane segmentation method based on fast adjacent voxel query
CN105488770B (en) A kind of airborne laser radar point cloud filtering method of object-oriented
CN106529469B (en) Unmanned aerial vehicle-mounted LiDAR point cloud filtering method based on self-adaptive gradient
CN110490888B (en) Highway geometric feature vectorization extraction method based on airborne laser point cloud
CN105139379B (en) Based on the progressive extracting method of classified and layered airborne Lidar points cloud building top surface
CN106097311A (en) The building three-dimensional rebuilding method of airborne laser radar data
CN112099046B (en) Airborne LIDAR 3D plane detection method based on multi-valued voxel model
CN111340723A (en) A terrain-adaptive thin-plate spline interpolation filtering method for airborne LiDAR point cloud regularization
CN108074232B (en) An airborne LIDAR building detection method based on voxel segmentation
CN110348478B (en) Method for extracting trees in outdoor point cloud scene based on shape classification and combination
CN113486817A (en) Coal face coal rock identification method based on laser scanning
CN116109601A (en) A real-time target detection method based on 3D lidar point cloud
CN116258857A (en) Outdoor tree-oriented laser point cloud segmentation and extraction method
CN116579949B (en) Airborne point cloud ground point filtering method suitable for urban multi-noise environment
CN115099304A (en) Building facade point cloud extraction method
CN112070787B (en) A Plane Segmentation Method of Aviation 3D Point Cloud Based on Oppositional Reasoning Theory
CN113409332A (en) Building plane segmentation method based on three-dimensional point cloud
CN115409969A (en) Long-distance-measurement ground laser point cloud plane segmentation algorithm
CN116485821A (en) A method and device for building point cloud segmentation and vector contour extraction

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