CN108961397B - A Simplified Method for Tree-Oriented 3D Point Cloud Data - Google Patents

A Simplified Method for Tree-Oriented 3D Point Cloud Data Download PDF

Info

Publication number
CN108961397B
CN108961397B CN201810729237.1A CN201810729237A CN108961397B CN 108961397 B CN108961397 B CN 108961397B CN 201810729237 A CN201810729237 A CN 201810729237A CN 108961397 B CN108961397 B CN 108961397B
Authority
CN
China
Prior art keywords
cube
point
pointdataset
coordinate
width
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810729237.1A
Other languages
Chinese (zh)
Other versions
CN108961397A (en
Inventor
张素莉
许骏
付浩海
张华�
潘欣
张妳妳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Changchun Institute of Applied Chemistry of CAS
Original Assignee
Changchun Institute of Applied Chemistry of CAS
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 Changchun Institute of Applied Chemistry of CAS filed Critical Changchun Institute of Applied Chemistry of CAS
Priority to CN201810729237.1A priority Critical patent/CN108961397B/en
Publication of CN108961397A publication Critical patent/CN108961397A/en
Application granted granted Critical
Publication of CN108961397B publication Critical patent/CN108961397B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Computer Graphics (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention provides a tree-oriented three-dimensional point cloud data simplifying method, which constructs a three-dimensional cubic grid, calculates homogeneous connection weights of the network and neighbor grids, and sequentially eliminates some redundant points according to the size of the homogeneous connection weights so as to simplify the three-dimensional point cloud data of trees. The method simplifies the data and maintains the vegetation structure expressed by the three-dimensional point cloud data of the original tree as much as possible, and has higher practical application value in the field of tree three-dimensional modeling.

Description

一种面向树木的三维点云数据的简化方法A Simplified Method for Tree-Oriented 3D Point Cloud Data

技术领域technical field

本发明属于空间定位、遥感、通信网络融合技术领域,具体涉及一种面向树木的三维点云数据的简化方法,利用互联网、大数据、云计算技术对植物进行三维数据处理。The invention belongs to the technical field of spatial positioning, remote sensing and communication network fusion, and in particular relates to a simplified method for tree-oriented three-dimensional point cloud data, which utilizes Internet, big data and cloud computing technologies to process three-dimensional data of plants.

背景技术Background technique

当前通过激光扫描仪、激光雷达等设备可以快速的对物体进行三维扫描,这些设备获得的是由大量三维空间点构成点云数据。利用这些点云数据可以快速和低成本的进行物体的三维建模具有较为重要的实际应用意义。At present, laser scanners, lidars and other equipment can quickly scan objects in 3D, and these devices obtain point cloud data composed of a large number of 3D space points. Using these point cloud data can quickly and cost-effectively carry out 3D modeling of objects, which has important practical application significance.

然而,密集的空间扫描带来较为精细的物体细节信息的同时,也带来了极大的计算负担和存储负担,因此十分有必要对激光扫描仪、激光雷达等设备获得的三维点云数据进行简化,保留原有物体的特征的同时尽量的缩减点云数据集中三维空间点的数量。进行三维点云数据的简化对于获得数据量更少、更易于计算和显示的三维物体十分重要。However, dense spatial scanning brings relatively fine detail information of objects, but also brings great computational and storage burdens. Simplify, keep the features of the original objects and try to reduce the number of 3D space points in the point cloud dataset. The simplification of 3D point cloud data is very important to obtain 3D objects with less data and easier to calculate and display.

当前的方法和技术多集中于:通过聚类算法、八叉树的分割查找、找到物体中平面、曲面的规律,在发现规律的同时删除掉或者合并在处在同一平面、曲面上冗余和重复的点。这些技术在简化较为规律的人造建筑、人造物体、存在大面积平面结构的对象的时候较为有效。然而,在处理树木的时候,由于树木包含的叶片、树枝,在这些对象上找到面和曲面规律较为困难,而通过强行进行聚类和八叉树分割会丢弃掉一些相对重要的枝杈和整体形态信息,因此当前的算法对于简化树木三维点云数据效率较低。The current methods and technologies are mostly focused on: finding the rules of planes and surfaces in objects through clustering algorithms, octree segmentation and search, and deleting or merging redundant and repeated points. These techniques are more effective in simplifying relatively regular man-made buildings, man-made objects, and objects with large-area planar structures. However, when dealing with trees, due to the leaves and branches contained in trees, it is difficult to find surface and surface patterns on these objects, and some relatively important branches and overall morphology are discarded by forced clustering and octree segmentation. information, so current algorithms are less efficient for simplifying tree 3D point cloud data.

本发明的任务是提出一种面向针叶树木的三维点云数据的简化方法,能够针对树木点云的特性,对其三维空间点的数量进行简化。The task of the present invention is to propose a simplification method for 3D point cloud data of coniferous trees, which can simplify the number of 3D space points according to the characteristics of the tree point cloud.

发明内容:Invention content:

针对现有技术存在的问题,本发明提供一种面向树木的三维点云数据的简化方法,该方法构造三维立方网格并计算网络与邻居网格的同质连接权值,并依据同质连接权值的大小来顺次剔除一些冗余点,简化树木的三维点云数据。Aiming at the problems existing in the prior art, the present invention provides a simplified method for tree-oriented 3D point cloud data. The method constructs a 3D cubic grid and calculates the homogeneous connection weight between the network and the neighbor grid. The size of the weights is used to sequentially remove some redundant points and simplify the 3D point cloud data of trees.

本发明所述的一种面向树木的三维点云数据的简化方法,包括以下步骤:A simplified method for tree-oriented three-dimensional point cloud data according to the present invention, comprising the following steps:

S1.输入包含n个三维空间点的树木点云数据集PointDataSet,输入网格边长width,输入同质化聚束数量clusternum,输入简化百分比percent:S1. Input the tree point cloud dataset PointDataSet containing n three-dimensional space points, input the grid side length width, input the number of homogenized clusters clusternum, and input the reduction percentage percent:

S101.输入树木点云数据集PointDataSet,PointDataSet为一个三维空间点构成的数据集{p1,p2,..pn}该数据集包含n个三维空间点;其中任意一个三维点pi={px,py,pz},px为该点在x轴的坐标,py为该点在y轴的坐标,pz为该点在z轴的坐标;S101. Input a tree point cloud data set PointDataSet, PointDataSet is a data set composed of three-dimensional space points {p 1 , p 2 ,..p n } The data set contains n three-dimensional space points; any one of the three-dimensional points pi={ px,py,pz},px is the coordinate of the point on the x-axis, py is the coordinate of the point on the y-axis, pz is the coordinate of the point on the z-axis;

S102,统计PointDataSet中的所有点,获得PointDataSet中所有点的x坐标最大值xmax,x坐标最小值xmin,y坐标最大值ymax,y坐标最小值ymin,z坐标最大值zmax,z坐标最小值zmin;S102, count all points in the PointDataSet, and obtain the maximum value of the x coordinate xmax, the minimum value of the x coordinate xmin, the maximum value of the y coordinate ymax, the minimum value of the y coordinate, the maximum value zmax of the z coordinate, and the minimum value zmin of the z coordinate of all points in the PointDataSet. ;

S103,PointDataSet中的所有点的x轴跨度xdistance=xmax-xmin,y轴跨度ydistance=ymax-ymin,z轴跨度zdistance=zmax-zmin;S103, the x-axis span xdistance=xmax-xmin of all points in the PointDataSet, the y-axis span ydistance=ymax-ymin, the z-axis span zdistance=zmax-zmin;

S104,输入网格边长width,输入同质化聚束数量clusternum;S104, input the grid side length width, and input the number of homogenized bunches clusternum;

网格边长width的默认值为xdistance/1000;The default value of grid side length width is xdistance/1000;

同质化聚束数量clusternum的默认值为100;The default value of clusternum, the number of homogenized clusters, is 100;

S2.将PointDataSet所占用的三维空间按照边长为width切割为多个立方网格,构成立方网格列表CubeList:S2. Cut the three-dimensional space occupied by the PointDataSet into multiple cubic grids according to the side length of width to form a cubic grid list CubeList:

S201,立方网格列表CubeList=空集合;S201, cube grid list CubeList=empty collection;

S202,x迭代器xcounter=xmin;S202, x iterator xcounter=xmin;

S203,y迭代器ycounter=ymin;S203, y iterator ycounter=ymin;

S204,z迭代器zcounter=zmin;S204, z iterator zcounter=zmin;

S205,建立一个立方网格Cube,Cube包含以下属性:S205, a cubic grid Cube is established, and the Cube includes the following properties:

Cube对应的空间范围scope为从(xcounter,ycounter,zcounter)至(xcounter+width,ycounter+width,zcounter+width)The spatial scope corresponding to Cube is from (xcounter, ycounter, zcounter) to (xcounter+width, ycounter+width, zcounter+width)

Cube的中心点位置的坐标:The coordinates of the center point of the Cube:

cp=(xcounter+width/2,ycounter+width/2,ycounter+width/2)cp=(xcounter+width/2,ycounter+width/2,ycounter+width/2)

Cube的点密度density=0;Cube的隶属类目category=0;Cube的同质连权值priority=0;Cube's point density density=0; Cube's membership category=0; Cube's homogeneous weight priority=0;

S206,Cube的点密度density=在PointDataSet中包含在Cube空间范围内的所有空间点的个数;S206, the point density of Cube=the number of all spatial points contained in the Cube space in the PointDataSet;

S207,将Cube加入到CubeList之中;S207, add Cube to CubeList;

S208,zcounter=zcounter+width;S208, zcounter=zcounter+width;

S209,如果zcounter>=zmax则转到S210,否则转到S205;S209, if zcounter>=zmax, go to S210, otherwise go to S205;

S210,ycounter=ycounter+width;S210, ycounter=ycounter+width;

S211,如果ycounter>=ymax则转到212,否则转到S204;S211, if ycounter>=ymax, go to 212, otherwise go to S204;

S212,xcounter=xcounter-1;S212, xcounter=xcounter-1;

S213,如果xcounter>=xmax则转到S214,否则转到S203;S213, if xcounter>=xmax, go to S214, otherwise go to S203;

S214,该步骤计算过程结束;S214, the calculation process of this step ends;

S3.计算CubeList中每一个Cube的类属关系category,获得距离指数distanceindex:S3. Calculate the category of each Cube in the CubeList, and obtain the distance index distanceindex:

S301,将CubeList中每一个Cube的点密度density作为输入数据,通过k-means算法将输入数据划分为clusternum个类目,获得clusternum个聚类中心c[1],c[2],…c[clustenum];其中c[1]表示编号为1的聚类中心,c[2]表示编号为2的聚类中心,c[clustenum]表示编号为clusternum的聚类中心;c[i]表示第i个聚类中心;S301, take the point density density of each Cube in the CubeList as the input data, divide the input data into clusternum categories through the k-means algorithm, and obtain clusternum cluster centers c[1], c[2],...c[ clustenum]; where c[1] represents the cluster center numbered 1, c[2] represents the cluster center numbered 2, c[clustenum] represents the cluster center numbered clusternum; c[i] represents the i-th cluster center a cluster center;

S302,对于CubeList中的每一个Cube,计算该Cube的density与clusternum个聚类中心的距离,并找到与density距离最近的聚类中心,将聚类中心的编号存储到Cube的类属关系category之中;S302, for each Cube in the CubeList, calculate the distance between the density of the Cube and the clusternum cluster centers, find the cluster center with the closest distance from the density, and store the number of the cluster center in the category of the Cube's generic relationship. middle;

S303,建立数组CloseDistance=空数组;S303, create an array CloseDistance=empty array;

S304,对于PointDataSet中的每一个三维空间点,找到与该点最近的另外一个三维空间点并将距离值加入到CloseDistance之中;S304, for each three-dimensional space point in the PointDataSet, find another three-dimensional space point closest to the point and add the distance value to the CloseDistance;

S305,计算CloseDistance的均值avgdistacne;S305, calculate the mean avgdistacne of CloseDistance;

S307,统计CubeList所有Cube的category的均值avgcatalog;S307, count the mean avgcatalog of the categories of all Cubes in the CubeList;

S308,获得距离指数distanceindex,其计算公式如下:S308, obtain the distance index distanceindex, and its calculation formula is as follows:

Figure BDA0001720448140000031
Figure BDA0001720448140000031

S4.计算CubeList中每一个Cube同质连权值priority:S4. Calculate the priority of the homogeneous weights of each Cube in the CubeList:

S401,对于CubeList中的每一个Cube进行以下步骤的处理;S401, the following steps are performed for each Cube in the CubeList;

S402,当前要处理网格currentCube=在CubeList中取出一个Cube;S402, grid currentCube to be processed at present=take out a Cube from the CubeList;

S403,当前要处理的中心点centerpoint=currentCube的中心点位置的坐标cp;S403, the current center point centerpoint=coordinate cp of the center point position of the currentCube to be processed;

S404,邻居列表neighborlist=计算CubeList中所有Cube的cp到centerpoint的距离,取出距离小于等于distanceindex的所有Cube;S404, neighbor list neighborlist=calculate the distance from the cp of all Cubes in the CubeList to the centerpoint, and extract all Cubes whose distance is less than or equal to distanceindex;

S405,allnum=neighborlist中Cube的数量;S405, allnum=number of cubes in neighborlist;

S406,同质化计数器scounter=0,异质化计数器ycounter=0,迭代计数器counter=1;S406, the homogenization counter scounter=0, the homogenization counter ycounter=0, the iteration counter counter=1;

S407,testCube=取出neighborlist中第counter个Cube;S407, testCube=take out the counter-th Cube in neighborlist;

S408,diff=ABS(currentCube的隶属类目category-testCube的隶属类目category);S408, diff=ABS (the affiliation category of the currentCube—the affiliation category of the testCube);

其中ABS表示计算绝对值;Among them, ABS represents the absolute value of calculation;

S409,如果diff大于2则ycounter=ycounter+1,否则scounter=scounter+1;S409, if the diff is greater than 2, then ycounter=ycounter+1, otherwise counter=scounter+1;

S410,counter=counter+1;S410, counter=counter+1;

S411,如果counter大于allnum则转到S412,否则转到S405;S411, if counter is greater than allnum, go to S412, otherwise go to S405;

S412,计算同质连接权限pri,对应公式如下:S412, calculate the homogeneous connection permission pri, and the corresponding formula is as follows:

Figure BDA0001720448140000041
Figure BDA0001720448140000041

S413.currentCube的同质连权值priority=pri;S413. The homogeneous weight priority=pri of the currentCube;

S5,依据同质连权值不断将三维空间点从PointDataSet中剔除,直到达到简化百分比:S5, continuously remove the three-dimensional space points from the PointDataSet according to the homogeneous connection weight until the reduction percentage is reached:

S501,std=计算CubeList中所有Cube的同质连权值priority的标准差;S501, std=calculate the standard deviation of the priority of the homogeneous weights of all cubes in the CubeList;

S502,轮转值circle=std/clusternum;S502, the rotation value circle=std/clusternum;

S503,对CubeList的所有Cube按照priority值进行从小到大的排序;S503, sort all cubes in the CubeList from small to large according to the priority value;

S504,待处理最小网格FirstCube=取出CubeList中排在第一位的Cube;S504, the smallest grid to be processed FirstCube=takes out the Cube ranked first in the CubeList;

S505,ptlist=在PointDataSet内,取出包含在FirstCube空间范围内的所有三维空间点;S505, ptlist=in the PointDataSet, take out all the three-dimensional space points contained in the FirstCube space;

S506,如果ptlist中点的个数小于8则转到S507,否则转到S508;S506, if the number of points in the ptlist is less than 8, go to S507, otherwise go to S508;

S507,将FirstCube从CubeList中删除,转到S510;S507, delete FirstCube from the CubeList, and go to S510;

S508,找到ptlist中距离FirstCube中心点位置的坐标cp最近的点,并将该点从PointDataSet中删除;S508, find the point closest to the coordinate cp of the center point of the FirstCube in the ptlist, and delete the point from the PointDataSet;

S509,FirstCube的同质连权值priority=FirstCube的同质连权值priority+circle;S509, the homogeneous connection weight priority of FirstCube=the homogeneous connection weight priority+circle of FirstCube;

S510,currentN=计算PointDataSet当前包含三维空间点的数量;S510, currentN=calculate the number of three-dimensional space points currently included in the PointDataSet;

S511,如果(n-currentN)/n小于percent则转到S503,否则转到S512;S511, if (n-currentN)/n is less than percent, go to S503, otherwise go to S512;

S512,将PointDataSet作为简化结果输出。S512, output the PointDataSet as the simplified result.

本发明的有益效果如下:提供一种面向树木的三维点云数据的简化方法,该方法构造三维立方网格并计算网络与邻居网格的同质连接权值,并依据同质连接权值的大小来顺次剔除一些冗余点,简化树木的三维点云数据。利用本发明在简化数据的同时并尽量保持原有树木的三维点云数据所表达的植被结构,在树木三维建模领域具有较高的实际应用价值。The beneficial effects of the present invention are as follows: a simplified method for tree-oriented three-dimensional point cloud data is provided. size to remove some redundant points in sequence and simplify the 3D point cloud data of trees. The present invention simplifies data and keeps the vegetation structure expressed by the original three-dimensional point cloud data of trees as much as possible, and has high practical application value in the field of three-dimensional modeling of trees.

附图说明Description of drawings

图1为实施例2由三维空间点构成的树木图;Fig. 1 is the dendrogram that embodiment 2 consists of three-dimensional space points;

图2为实施例2本发明方法获得简化后的三维松树图;2 is a simplified three-dimensional pine tree diagram obtained by the method of the present invention in Embodiment 2;

图3为实施例3由三维空间点构成的树木图;Fig. 3 is the dendrogram that embodiment 3 is formed by three-dimensional space point;

图4为实施例4本发明方法获得简化后的三维松树图。FIG. 4 is a simplified three-dimensional pine tree diagram obtained by the method of the present invention in Example 4. FIG.

具体实施方式Detailed ways

通过以下实施例描述了本发明的具体实施方式,但是本领域的技术人员应当理解,这仅仅是举例说明,本发明的保护范围是由所附权利要求书限定的,本领域的技术人员在不背离本发明的原理和实质的前提下,可以对这些实施方式做出多种变更或修改,这些变更和修改均落入本发明的保护范围。The specific embodiments of the present invention are described by the following examples, but those skilled in the art should understand that this is only an illustration, the protection scope of the present invention is defined by the appended claims, and those skilled in the art should not On the premise of departing from the principle and essence of the present invention, various changes or modifications can be made to these embodiments, and these changes and modifications all fall within the protection scope of the present invention.

实施例1Example 1

1、一种面向树木的三维点云数据的简化方法,包括以下步骤:1. A simplified method for tree-oriented 3D point cloud data, comprising the following steps:

S1.输入包含n个三维空间点的树木点云数据集PointDataSet,输入网格边长width,输入同质化聚束数量clusternum,输入简化百分比percent:S1. Input the tree point cloud dataset PointDataSet containing n three-dimensional space points, input the grid side length width, input the number of homogenized clusters clusternum, and input the reduction percentage percent:

S101.输入树木点云数据集PointDataSet,PointDataSet为一个三维空间点构成的数据集{p1,p2,..pn}该数据集包含n个三维空间点;其中任意一个三维点pi={px,py,pz},px为该点在x轴的坐标,py为该点在y轴的坐标,pz为该点在z轴的坐标;S101. Input a tree point cloud data set PointDataSet, PointDataSet is a data set composed of three-dimensional space points {p 1 , p 2 ,..p n } The data set contains n three-dimensional space points; any one of the three-dimensional points pi={ px,py,pz},px is the coordinate of the point on the x-axis, py is the coordinate of the point on the y-axis, pz is the coordinate of the point on the z-axis;

S102,统计PointDataSet中的所有点,获得PointDataSet中所有点的x坐标最大值xmax,x坐标最小值xmin,y坐标最大值ymax,y坐标最小值ymin,z坐标最大值zmax,z坐标最小值zmin;S102, count all points in the PointDataSet, and obtain the maximum value of the x coordinate xmax, the minimum value of the x coordinate xmin, the maximum value of the y coordinate ymax, the minimum value of the y coordinate, the maximum value zmax of the z coordinate, and the minimum value zmin of the z coordinate of all points in the PointDataSet. ;

S103,PointDataSet中的所有点的x轴跨度xdistance=xmax-xmin,y轴跨度ydistance=ymax-ymin,z轴跨度zdistance=zmax-zmin;S103, the x-axis span xdistance=xmax-xmin of all points in the PointDataSet, the y-axis span ydistance=ymax-ymin, the z-axis span zdistance=zmax-zmin;

S104,输入网格边长width,输入同质化聚束数量clusternum;S104, input the grid side length width, and input the number of homogenized bunches clusternum;

网格边长width的默认值为xdistance/1000;The default value of grid side length width is xdistance/1000;

同质化聚束数量clusternum的默认值为100;The default value of clusternum, the number of homogenized clusters, is 100;

S2.将PointDataSet所占用的三维空间按照边长为width切割为多个立方网格,构成立方网格列表CubeList:S2. Cut the three-dimensional space occupied by the PointDataSet into multiple cubic grids according to the side length of width to form a cubic grid list CubeList:

S201,立方网格列表CubeList=空集合;S201, cube grid list CubeList=empty collection;

S202,x迭代器xcounter=xmin;S202, x iterator xcounter=xmin;

S203,y迭代器ycounter=ymin;S203, y iterator ycounter=ymin;

S204,z迭代器zcounter=zmin;S204, z iterator zcounter=zmin;

S205,建立一个立方网格Cube,Cube包含以下属性:S205, a cubic grid Cube is established, and the Cube includes the following properties:

Cube对应的空间范围scope为从(xcounter,ycounter,zcounter)至(xcounter+width,ycounter+width,zcounter+width)The spatial scope corresponding to Cube is from (xcounter, ycounter, zcounter) to (xcounter+width, ycounter+width, zcounter+width)

Cube的中心点位置的坐标:The coordinates of the center point of the Cube:

cp=(xcounter+width/2,ycounter+width/2,ycounter+width/2)cp=(xcounter+width/2,ycounter+width/2,ycounter+width/2)

Cube的点密度density=0;Cube的隶属类目category=0;Cube的同质连权值priority=0;Cube's point density density=0; Cube's membership category=0; Cube's homogeneous weight priority=0;

S206,Cube的点密度density=在PointDataSet中包含在Cube空间范围内的所有空间点的个数;S206, the point density of Cube=the number of all spatial points contained in the Cube space in the PointDataSet;

S207,将Cube加入到CubeList之中;S207, add Cube to CubeList;

S208,zcounter=zcounter+width;S208, zcounter=zcounter+width;

S209,如果zcounter>=zmax则转到S210,否则转到S205;S209, if zcounter>=zmax, go to S210, otherwise go to S205;

S210,ycounter=ycounter+width;S210, ycounter=ycounter+width;

S211,如果ycounter>=ymax则转到212,否则转到S204;S211, if ycounter>=ymax, go to 212, otherwise go to S204;

S212,xcounter=xcounter-1;S212, xcounter=xcounter-1;

S213,如果xcounter>=xmax则转到S214,否则转到S203;S213, if xcounter>=xmax, go to S214, otherwise go to S203;

S214,该步骤计算过程结束;S214, the calculation process of this step ends;

S3.计算CubeList中每一个Cube的类属关系category,获得距离指数distanceindex:S3. Calculate the category of each Cube in the CubeList, and obtain the distance index distanceindex:

S301,将CubeList中每一个Cube的点密度density作为输入数据,通过k-means算法将输入数据划分为clusternum个类目,获得clusternum个聚类中心c[1],c[2],…c[clustenum];其中c[1]表示编号为1的聚类中心,c[2]表示编号为2的聚类中心,c[clustenum]表示编号为clusternum的聚类中心;c[i]表示第i个聚类中心;S301, take the point density density of each Cube in the CubeList as the input data, divide the input data into clusternum categories through the k-means algorithm, and obtain clusternum cluster centers c[1], c[2],...c[ clustenum]; where c[1] represents the cluster center numbered 1, c[2] represents the cluster center numbered 2, c[clustenum] represents the cluster center numbered clusternum; c[i] represents the i-th cluster center a cluster center;

S302,对于CubeList中的每一个Cube,计算该Cube的density与clusternum个聚类中心的距离,并找到与density距离最近的聚类中心,将聚类中心的编号存储到Cube的类属关系category之中;S302, for each Cube in the CubeList, calculate the distance between the density of the Cube and the clusternum cluster centers, find the cluster center with the closest distance from the density, and store the number of the cluster center in the category of the Cube's generic relationship. middle;

S303,建立数组CloseDistance=空数组;S303, create an array CloseDistance=empty array;

S304,对于PointDataSet中的每一个三维空间点,找到与该点最近的另外一个三维空间点并将距离值加入到CloseDistance之中;S304, for each three-dimensional space point in the PointDataSet, find another three-dimensional space point closest to the point and add the distance value to the CloseDistance;

S305,计算CloseDistance的均值avgdistacne;S305, calculate the mean avgdistacne of CloseDistance;

S307,统计CubeList所有Cube的category的均值avgcatalog;S307, count the mean avgcatalog of the categories of all Cubes in the CubeList;

S308,获得距离指数distanceindex,其计算公式如下:S308, obtain the distance index distanceindex, and its calculation formula is as follows:

Figure BDA0001720448140000061
Figure BDA0001720448140000061

S4.计算CubeList中每一个Cube同质连权值priority:S4. Calculate the priority of the homogeneous weights of each Cube in the CubeList:

S401,对于CubeList中的每一个Cube进行以下步骤的处理;S401, the following steps are performed for each Cube in the CubeList;

S402,当前要处理网格currentCube=在CubeList中取出一个Cube;S402, grid currentCube to be processed at present=take out a Cube from the CubeList;

S403,当前要处理的中心点centerpoint=currentCube的中心点位置的坐标cp;S403, the current center point centerpoint=coordinate cp of the center point position of the currentCube to be processed;

S404,邻居列表neighborlist=计算CubeList中所有Cube的cp到centerpoint的距离,取出距离小于等于distanceindex的所有Cube;S404, neighbor list neighborlist=calculate the distance from the cp of all Cubes in the CubeList to the centerpoint, and extract all Cubes whose distance is less than or equal to distanceindex;

S405,allnum=neighborlist中Cube的数量;S405, allnum=number of cubes in neighborlist;

S406,同质化计数器scounter=0,异质化计数器ycounter=0,迭代计数器counter=1;S406, the homogenization counter scounter=0, the homogenization counter ycounter=0, the iteration counter counter=1;

S407,testCube=取出neighborlist中第counter个Cube;S407, testCube=take out the counter-th Cube in neighborlist;

S408,diff=ABS(currentCube的隶属类目category-testCube的隶属类目category);S408, diff=ABS (the affiliation category of the currentCube—the affiliation category of the testCube);

其中ABS表示计算绝对值;Among them, ABS represents the absolute value of calculation;

S409,如果diff大于2则ycounter=ycounter+1,否则scounter=scounter+1;S409, if the diff is greater than 2, then ycounter=ycounter+1, otherwise counter=scounter+1;

S410,counter=counter+1;S410, counter=counter+1;

S411,如果counter大于allnum则转到S412,否则转到S405;S411, if counter is greater than allnum, go to S412, otherwise go to S405;

S412,计算同质连接权限pri,对应公式如下:S412, calculate the homogeneous connection permission pri, and the corresponding formula is as follows:

Figure BDA0001720448140000071
Figure BDA0001720448140000071

S413.currentCube的同质连权值priority=pri;S413. The homogeneous weight priority=pri of the currentCube;

S5,依据同质连权值不断将三维空间点从PointDataSet中剔除,直到达到简化百分比:S5, continuously remove the three-dimensional space points from the PointDataSet according to the homogenous connection weights until the reduction percentage is reached:

S501,std=计算CubeList中所有Cube的同质连权值priority的标准差;S501, std=calculate the standard deviation of the priority of the homogeneous weights of all cubes in the CubeList;

S502,轮转值circle=std/clusternum;S502, the rotation value circle=std/clusternum;

S503,对CubeList的所有Cube按照priority值进行从小到大的排序;S503, sort all cubes in the CubeList from small to large according to the priority value;

S504,待处理最小网格FirstCube=取出CubeList中排在第一位的Cube;S504, the smallest grid to be processed FirstCube=takes out the Cube ranked first in the CubeList;

S505,ptlist=在PointDataSet内,取出包含在FirstCube空间范围内的所有三维空间点;S505, ptlist=in the PointDataSet, take out all the three-dimensional space points contained in the FirstCube space;

S506,如果ptlist中点的个数小于8则转到S507,否则转到S508;S506, if the number of points in the ptlist is less than 8, go to S507, otherwise go to S508;

S507,将FirstCube从CubeList中删除,转到S510;S507, delete FirstCube from the CubeList, and go to S510;

S508,找到ptlist中距离FirstCube中心点位置的坐标cp最近的点,并将该点从PointDataSet中删除;S508, find the point in the ptlist closest to the coordinate cp of the center point of the FirstCube, and delete the point from the PointDataSet;

S509,FirstCube的同质连权值priority=FirstCube的同质连权值priority+circle;S509, the homogeneous connection weight priority of FirstCube=the homogeneous connection weight priority+circle of FirstCube;

S510,currentN=计算PointDataSet当前包含三维空间点的数量;S510, currentN=calculate the number of three-dimensional space points currently included in the PointDataSet;

S511,如果(n-currentN)/n小于percent则转到S503,否则转到S512;S511, if (n-currentN)/n is less than percent, go to S503, otherwise go to S512;

S512,将PointDataSet作为简化结果输出。S512, output the PointDataSet as the simplified result.

实施例2Example 2

一棵由三维空间点构成的树木(红松):A tree (Korean pine) consisting of points in 3D space:

步骤1,输入一个点云构成的三维松树,如图1所示;图1的PointDataSet包含100万个三维点,输入网格的边长width=5,输入同质化聚束数量clusternum=30,输入简化百分比percent=50%;Step 1, input a 3D pine tree composed of a point cloud, as shown in Figure 1; the PointDataSet in Figure 1 contains 1 million 3D points, the side length of the input grid is width=5, and the number of homogenized clusters is clusternum=30. Enter the simplified percentage percent=50%;

步骤2,立方网格列表CubeList;Step 2, the cube grid list CubeList;

步骤3,计算获得距离指数distanceindex=0.7432;Step 3, calculate and obtain the distance index distanceindex=0.7432;

步骤4,计算CubeList中每一个Cube同质连权值priority;Step 4: Calculate the priority of the homogeneous weights of each Cube in the CubeList;

步骤5,获得简化后的结果,如图2所示;可以看出三维空间点的数量相比原有的三维点云图里面的数量大大减少,树木原有的形态仍然得到了保证,说明本专利方法较为有效。Step 5, the simplified result is obtained, as shown in Figure 2; it can be seen that the number of three-dimensional space points is greatly reduced compared with the number in the original three-dimensional point cloud image, and the original shape of the tree is still guaranteed, indicating that this patent method is more effective.

实施例3Example 3

利用本发明实施例1的一棵由三维空间点构成的树木(臭松)A tree (Smell pine) composed of three-dimensional space points using Embodiment 1 of the present invention

步骤1,输入一个点云构成的三维松树,如图3所示;图3的PointDataSet包含30万个三维点,输入网格的边长width=4,输入同质化聚束数量clusternum=25,输入简化百分比percent=50%;Step 1, input a three-dimensional pine tree composed of point clouds, as shown in Figure 3; the PointDataSet in Figure 3 contains 300,000 three-dimensional points, the side length of the input grid is width=4, and the number of homogenized clusters is clusternum=25. Enter the simplified percentage percent=50%;

步骤2,立方网格列表CubeList;Step 2, the cube grid list CubeList;

步骤3,计算获得距离指数distanceindex=0.621;Step 3, calculate and obtain the distance index distanceindex=0.621;

步骤4,计算CubeList中每一个Cube同质连权值priority;Step 4: Calculate the priority of the homogeneous weights of each Cube in the CubeList;

步骤5,获得简化后的结果,如图4所示,看出简化和该树木的形态仍然得以保留。Step 5, the simplified result is obtained, as shown in Figure 4, it can be seen that the simplification and the shape of the tree are still preserved.

Claims (1)

1. A tree-oriented three-dimensional point cloud data simplification method comprises the following steps:
s1, inputting a tree point cloud data set PointDataSet containing n three-dimensional space points, inputting a grid side length width, inputting a homogenization bunching number clusternum, and inputting a simplification percentage:
s101, inputting a tree point cloud data set PointDataSet, wherein the PointDataSet is a data set { p) formed by three-dimensional space points1, p2, …, pnAny three-dimensional point pi = { px, py, pz }, px is the coordinate of the point on the x-axis, py is the coordinate of the point on the y-axis, and pz is the coordinate of the point on the z-axis;
s102, counting all points in the PointDataSet to obtain the maximum value xmax of an x coordinate, the minimum value xmin of the x coordinate, the maximum value ymax of a y coordinate, the minimum value ymin of the y coordinate, the maximum value zmax of a z coordinate and the minimum value zmin of the z coordinate of all points in the PointDataSet;
s103, x-axis span xdistance = xmax-xmin, y-axis span ydistance = ymax-ymin, and z-axis span zdistance = zmax-zmin of all points in the PointDataSet;
s104, inputting the grid side length width and the homogenization bunching number clusternum;
the default value of the grid side length width is xdistance/1000;
the default value of the homogenization bunching number clusternum is 100;
s2, cutting the three-dimensional space occupied by the PointDataSet into a plurality of cubic grids according to the side length width, and forming a cubic grid list cube:
s201, a cubic grid list CubeList = empty set;
s202, x iterator xcount = xmin;
s203, y iterator ycounter = ymin;
s204, z iterator zcounter = zmin;
s205, establishing a cubic grid Cube, wherein the Cube comprises the following attributes:
the spatial range scope corresponding to Cube is from (xcount, ycounter, zcounter) to (xcount + width, ycounter + width, zcounter + width);
coordinates of the position of the center point of Cube:
cp=(xcounter+width/2,ycounter+width/2,ycounter+width/2);
cube point density = 0; cube's membership category = 0; cube's homogenous connection weight priority = 0;
s206, Cube point density = the number of all spatial points included in the Cube spatial range in the PointDataSet;
s207, adding the Cube into the Cube List;
S208,zcounter=zcounter+width;
s209, go to S210 if zcount > = zmax, otherwise go to S205;
S210,ycounter=ycounter+width;
s211, if ycounter > = ymax, go to 212, otherwise go to S204;
S212,xcounter=xcounter-1;
s213, go to S214 if xcount > = xmax, otherwise go to S203;
s214, the calculation process is ended;
s3, calculating the generic relationship category of each Cube in the Cube list to obtain the distance index:
s301, using the point density dense of each Cube in the Cube List as input data, dividing the input data into cluster categories through a k-means algorithm, and obtaining cluster centers c 1, c 2 and … c cluster;
wherein c 1 represents the clustering center with number 1, c 2 represents the clustering center with number 2, and c [ clusternum ] represents the clustering center with number clusternum; c [ i ] denotes the ith cluster center;
s302, for each Cube in the Cube List, calculating the distance between the density of the Cube and cluster centers, finding the cluster center closest to the density, and storing the serial number of the cluster center in the category relationship category of the Cube;
s303, establishing an array CloseDistance = null array;
s304, for each three-dimensional space point in the PointDataSet, finding another three-dimensional space point closest to the point and adding the distance value into the closeDistance;
s305, calculating the mean value avgdistacne of the CloseDistance;
s307, counting the average value avgcatalog of the categories of all the cubes of the Cube list;
s308, obtaining the distance index distanceindex, wherein the calculation formula is as follows:
Figure DEST_PATH_IMAGE001
s4, calculating the priority of each Cube homogeneous connection weight in the Cube List:
s401, processing the following steps for each Cube in the Cube list;
s402, taking out one Cube in the Cube List when the currentCube = the grid to be processed currently;
s403, the coordinate cp of the center point position of the center point center = current cube to be processed currently;
s404, calculating the distances from cp of all Cubes in the CubeList to centerpoint, and taking out all Cubes with the distances less than or equal to distanceindex;
s405, allnum = number of cubes in neighborist;
s406, the homogenization counter scount =0, the heterogeneous counter yzcount =0, and the iteration counter count = 1;
s407, testCube = take out the second counter Cube in neighborlist;
s408, diff = ABS (membership category of currentCube-membership category of testCube);
wherein ABS represents the calculated absolute value;
s409, yzcount = yzcount +1 if diff is greater than 2, otherwise scouter = scouter + 1;
S410,counter=counter+1;
s411, if the counter is larger than allnum, turning to S412, otherwise, turning to S405;
s412, calculating a homogeneous connection authority pri, wherein the corresponding formula is as follows:
Figure 506344DEST_PATH_IMAGE003
s413. currentCube' S homogeneous weight priority = pri;
s5, continuously eliminating the three-dimensional space points from the PointDataSet according to the homogeneous connection weight value until the simplification percentage is reached:
s501, std = calculating the standard deviation of the homogeneous connection weight priority of all the cubes in the Cube List;
s502, a rotation value circle = std/clusternum;
s503, sorting all the cubes of the Cube List from small to large according to the priority values;
s504, taking out the first-ranked Cube in the Cube List, wherein the first-ranked Cube is the minimum grid Firstcube = to be processed;
s505, taking out all three-dimensional space points contained in the FirstCube space range within the pointDataSet by ptlist =;
s506, if the number of the ptlist midpoints is less than 8, turning to S507, otherwise, turning to S508;
s507, deleting the FirstCube from the CubeList, and turning to S510;
s508, finding a point nearest to a coordinate cp of the position of the center point of the FirstCube in the ptlist, and deleting the point from the PointDataSet;
s509, the homogeneous connection weight priority of the FirstCube = the homogeneous connection weight priority + circle of the FirstCube;
s510, currentN = calculating the number of the points of the PointDataSet which currently contain the three-dimensional space;
s511, if (n-current/n) is less than percent, go to S503, otherwise go to S512;
s512, outputting the PointDataSet as a simplification result.
CN201810729237.1A 2018-07-05 2018-07-05 A Simplified Method for Tree-Oriented 3D Point Cloud Data Active CN108961397B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810729237.1A CN108961397B (en) 2018-07-05 2018-07-05 A Simplified Method for Tree-Oriented 3D Point Cloud Data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810729237.1A CN108961397B (en) 2018-07-05 2018-07-05 A Simplified Method for Tree-Oriented 3D Point Cloud Data

Publications (2)

Publication Number Publication Date
CN108961397A CN108961397A (en) 2018-12-07
CN108961397B true CN108961397B (en) 2022-06-21

Family

ID=64485924

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810729237.1A Active CN108961397B (en) 2018-07-05 2018-07-05 A Simplified Method for Tree-Oriented 3D Point Cloud Data

Country Status (1)

Country Link
CN (1) CN108961397B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103106684A (en) * 2013-01-15 2013-05-15 北京农业信息技术研究中心 Method and system of three-dimensional reconstruction of shape structure of trees in leaved state

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101853485A (en) * 2010-06-04 2010-10-06 浙江工业大学 A Simplified Processing Method for Non-uniform Point Clouds Based on Neighbor Propagation Clustering
GB2520338A (en) * 2013-11-19 2015-05-20 Nokia Corp Automatic scene parsing
CN106407925B (en) * 2016-09-09 2019-09-27 厦门大学 Automatic extraction method of trees from laser scanning point cloud based on local interval maxima
CN107392875A (en) * 2017-08-01 2017-11-24 长安大学 A kind of cloud data denoising method based on the division of k neighbours domain

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103106684A (en) * 2013-01-15 2013-05-15 北京农业信息技术研究中心 Method and system of three-dimensional reconstruction of shape structure of trees in leaved state

Also Published As

Publication number Publication date
CN108961397A (en) 2018-12-07

Similar Documents

Publication Publication Date Title
CN105719249B (en) A kind of airborne laser radar point cloud denoising method based on three-dimensional grid
CN110599506B (en) Point cloud segmentation method for three-dimensional measurement of complex special-shaped curved surface robot
CN107016725A (en) A kind of vegetation three-dimensional live modeling method for taking LiDAR point cloud data distribution difference into account
CN103544249B (en) A kind of method for indexing scattered point cloud space of historic building
CN115661374B (en) Rapid retrieval method based on space division and model voxelization
CN105469445B (en) A kind of step-length changeably drawing generating method
CN106123812A (en) The method and device of relief surface sugarcane acreage is obtained based on remote sensing image
CN113538264B (en) A denoising method, device and storage medium for point cloud data
CN113868476A (en) Octree point cloud preprocessing method based on local density
CN116416366A (en) 3D model construction method and device and electronic equipment
CN113468286A (en) Three-dimensional pyramid construction method based on triangular patch number division
CN102496179A (en) 3-dimensional scene cutting method
CN110910435B (en) Building point cloud extraction method and device, computer equipment and readable storage medium
CN113610983A (en) Automatic subdivision method for discrete point space curved surface triangular mesh
WO2024120437A1 (en) Bottom surface segmentation method and apparatus for three-dimensional point cloud, and electronic device and storage medium
CN108171793A (en) A kind of method for detecting lamination area triangle gridding
CN114067060A (en) A Fast Generation Method of Dense Point Clouds for 3D Modeling
CN106709969A (en) Partition-based Delaunay triangulated network growth algorithm
Midtbo Spatial modelling by Delaunay networks of two and three dimensions
Wang et al. A hybrid spatial indexing structure of massive point cloud based on octree and 3D R*-tree
CN110738726B (en) Robot vision-guided three-dimensional object reconstruction method based on octree
Fellegara et al. Terrain trees: a framework for representing, analyzing and visualizing triangulated terrains
CN108961397B (en) A Simplified Method for Tree-Oriented 3D Point Cloud Data
Zhao et al. A new k nearest neighbours algorithm using cell grids for 3d scattered point cloud
CN113342999B (en) A Simplified Method for Variable Resolution Point Clouds Based on Multilayer Hopping Tree Structure

Legal Events

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