CN111986223B - Method for extracting trees in outdoor point cloud scene based on energy function - Google Patents
Method for extracting trees in outdoor point cloud scene based on energy function Download PDFInfo
- Publication number
- CN111986223B CN111986223B CN202010680646.4A CN202010680646A CN111986223B CN 111986223 B CN111986223 B CN 111986223B CN 202010680646 A CN202010680646 A CN 202010680646A CN 111986223 B CN111986223 B CN 111986223B
- Authority
- CN
- China
- Prior art keywords
- cluster
- points
- clusters
- energy function
- tree
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 65
- 239000011159 matrix material Substances 0.000 claims abstract description 44
- 238000000605 extraction Methods 0.000 claims abstract description 27
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 9
- 238000004364 calculation method Methods 0.000 claims abstract description 7
- 238000012216 screening Methods 0.000 claims abstract description 4
- 239000013598 vector Substances 0.000 claims description 8
- 229920000642 polymer Polymers 0.000 claims description 6
- 238000010845 search algorithm Methods 0.000 claims description 3
- 238000009472 formulation Methods 0.000 claims description 2
- 239000000203 mixture Substances 0.000 claims description 2
- 230000006870 function Effects 0.000 description 32
- 230000011218 segmentation Effects 0.000 description 11
- 238000005457 optimization Methods 0.000 description 8
- 238000010586 diagram Methods 0.000 description 5
- 238000012545 processing Methods 0.000 description 4
- 238000004458 analytical method Methods 0.000 description 2
- 238000013473 artificial intelligence Methods 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 238000011160 research Methods 0.000 description 2
- NAWXUBYGYWOOIX-SFHVURJKSA-N (2s)-2-[[4-[2-(2,4-diaminoquinazolin-6-yl)ethyl]benzoyl]amino]-4-methylidenepentanedioic acid Chemical compound C1=CC2=NC(N)=NC(N)=C2C=C1CCC1=CC=C(C(=O)N[C@@H](CC(=C)C(O)=O)C(O)=O)C=C1 NAWXUBYGYWOOIX-SFHVURJKSA-N 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000009795 derivation Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 238000013178 mathematical model Methods 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 230000035945 sensitivity Effects 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/187—Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/22—Matching criteria, e.g. proximity measures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/23—Clustering techniques
- G06F18/232—Non-hierarchical techniques
- G06F18/2321—Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/70—Denoising; Smoothing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10028—Range image; Depth image; 3D point clouds
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02A—TECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
- Y02A90/00—Technologies having an indirect contribution to adaptation to climate change
- Y02A90/10—Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- General Engineering & Computer Science (AREA)
- Probability & Statistics with Applications (AREA)
- Quality & Reliability (AREA)
- Image Analysis (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a tree extraction method in an outdoor point cloud scene based on an energy function, which comprises the steps of selecting LiDAR point cloud data and eliminating plane points in the LiDAR point cloud data to obtain candidate tree points; clustering by using Euclidean clustering algorithm, and storing all clusters obtained by clustering in a cluster C; performing similarity matrix calculation, then calculating an energy function of the cluster C, and merging clusters in the cluster C according to the energy function; and (5) screening and optimizing the cluster after merging, and finishing extraction. According to the tree extraction method in the outdoor point cloud scene based on the energy function, the problem of insufficient clustering is solved by effectively combining clusters; the clusters which are not enough into one tree after the clustering is completed are taken as noise points to be removed, the removal of non-tree objects is completed, the extraction accuracy of single tree is improved, the calculation process is fast, and the method has good practical value.
Description
Technical Field
The invention belongs to the technical field of artificial intelligence calculation methods, and particularly relates to an extraction method of trees in an outdoor point cloud scene based on an energy function.
Background
With the development of virtual reality, artificial intelligence and computer vision technology, the analysis of various three-dimensional outdoor scenes has become a research subject with important research significance and application value. The tree is used as one of important elements in urban scenes, and is widely applied to the fields of urban planning construction, 3D tree modeling, urban tree detection and the like. In recent years, researchers have proposed many different methods for extracting trees from LiDAR data, mainly a segmentation and classification process, and most algorithms are implemented based on this idea. Currently, tree extraction methods based on segmentation and classification are mainly divided into six major categories:
(1) Tree extraction based on region growing: including dividing building structures and individual trees. The single tree extracted by the method has high precision and good performance in a relatively simple outdoor environment. Region-based methods fall into two categories: seed region (or bottom-up) methods and non-seed region (or top-down) methods. The segmentation of the region based on seeds is started by selecting a plurality of seed points, and from the seed points as starting points, a point cloud region is gradually formed by adding seed neighborhood points. This method has a long processing time and is susceptible to noise points. The new and improved method for detecting the point cloud by taking the characteristics of gradient, normal vector, curvature and the like as the growth criteria is provided later, the method improves the segmentation robustness, is insensitive to outliers and noise points, but if the initial seed points and the growth rules are improperly selected, the problems of over segmentation or under segmentation and the like are caused. The non-seed region method is a top-down based method, all points are firstly classified into the same region, then the points in the region are subjected to refinement treatment and gradually divided into small regions until the division is completed, the division result of the non-seed region method depends on the division position and mode, and the use of the method is greatly limited due to the fact that a large amount of priori knowledge such as object models, the number of regions and the like are required.
(2) Tree extraction based on attribute features: the method is based on the attribute of the point cloud data for segmentation, and has good robustness. Firstly, calculating attributes of point cloud data, including texture features, normal vectors, color information and the like, then clustering the features, and finally dividing point clouds of different features. The method depends on the definition of the neighborhood between the points and the point density of the point cloud data, so that the defects of high time complexity and low processing efficiency exist along with the increase of the point cloud data density, and the method is not suitable for processing the point cloud data with larger scale.
(3) Tree extraction based on graph optimization: the method based on graph optimization is to take point cloud data as vertexes, construct edges by utilizing the spatial neighborhood relation of points, weight connecting edges by utilizing the similarity of neighborhood points to construct a graph, and realize the segmentation of the point cloud by utilizing a graph cutting method. A well-known graph optimization method is a graph-based segmentation algorithm (FH algorithm), which is simple and efficient to find the minimum spanning tree in the graph. The method based on graph optimization generally adopts a strategy solution of global optimization, can obtain a global optimization result, and is not influenced by scene complexity and mathematical models. However, due to the complex process of constructing the graph, when the point cloud data is large in scale, the optimization process cannot generally run in real time.
(4) Tree extraction based on model fitting: the method is mainly used for extracting objects with specific shapes, including planes, cylinders and spheres, the fitting degree of the cloud of detection points to model parameters is needed, data belonging to the target objects in object data with specific shapes are reserved, and then a complete tree is displayed through combination. When using a model-based fitting method, each extracted tree cluster requires a refinement process. This method has a pure mathematical principle, is fast and powerful. The method is limited by sensitivity to noise, so that the experimental result is not ideal under the conditions of huge data and complex scene.
(5) Cluster-based tree extraction: clusters are considered to be high density regions of the data space that are separated by low density regions. The guiding thought is as follows: as soon as the density of points in a region is above a certain threshold, it is added to clusters that are close to it. The method is widely applied to extracting individual trees from MLS data, and can quickly and successfully separate single trees, but the problem of insufficient clustering or over-clustering often exists, so that the tree extraction is not complete.
(6) Voxel-based tree extraction: the method comprises the steps of firstly converting point cloud into a voxel format when preprocessing point cloud data, carrying out neighborhood judgment by taking voxels as units, and realizing the segmentation of point cloud series by comparing the color, the intensity and the spatial position of points to extract candidate trees; although good results are obtained, the performance is severely limited by voxel granularity and boundary blurring caused by different point cloud partitions, resulting in loss of segmentation accuracy.
Disclosure of Invention
The invention aims to provide an extraction method of trees in an outdoor point cloud scene based on an energy function, which solves the problems of low separation accuracy and huge data and slow operation in the existing extraction method.
The technical scheme adopted by the invention is that the method for extracting the tree in the outdoor point cloud scene based on the energy function comprises the following steps:
step 1, selecting LiDAR point cloud data, and removing plane points in the LiDAR point cloud data to obtain candidate tree points;
step 2, clustering the candidate tree points in the step 1 by using an Euclidean clustering algorithm, and storing all clusters obtained by clustering in a cluster C;
step 3, performing similarity matrix calculation on the cluster C obtained in the step 2; adding a unique constraint and a conditional constraint, then calculating an energy function of the cluster C, and merging clusters in the cluster C according to the energy function;
and 4, screening and optimizing the clusters according to the clusters combined in the step 3, judging the point number of each cluster, deleting the clusters with the point number not more than 1000, and finishing extraction.
The present invention is also characterized in that,
the step 1 specifically comprises the following steps:
step 1.1, randomly selecting at least three non-collinear points in LiDAR point cloud data, fitting the points to form a plane, and calculating four coefficients of the plane through normal vectors;
step 1.2, calculating the distance from each point remained in LiDAR point cloud data to the plane in step 1.1, judging the point which is closer to the plane according to a threshold value, marking the point as the local point of the model, and recording the number of the local points of the model;
step 1.3, iterating repeatedly, and when the iteration exit condition is met, exiting the loop to obtain the most reasonable solution in the whole iteration process, namely a plane point set;
and step 1.4, eliminating the plane point set in the step 1.3 to obtain candidate tree points.
The iteration exit condition in the step 1.3 is specifically:
step 1.3.1, setting W as probability of randomly extracting local points, wherein n 'represents the number of data to be selected for calculating model parameters, and obtaining probability W of randomly extracting n' points as local points n′ The method comprises the steps of carrying out a first treatment on the surface of the Calculating the probability of at least one extra-local point being present, denoted as 1-W n′ The method comprises the steps of carrying out a first treatment on the surface of the Calculating the probability (1-W that at least one outlier exists for each iteration k' times n′ ) k′ The method comprises the steps of carrying out a first treatment on the surface of the The probability that at least one set of correct model parameters can be obtained by iterating k' times is recorded as 1- (1-W) n′ ) k′ ;
Step 1.3.2, calculating confidence level p=1- (1-W) n′ ) k′ ;
Step 1.3.3, taking the logarithm of the confidence level P in step 1.3.2, and back-pushing to obtain k' =log (1-P)/log (1-W) n′ ) The k 'value is the iteration termination condition, and the loop is exited when the actual iteration number is not less than k'.
The step 2 is specifically as follows:
step 2.1, establishing a topological structure for the candidate tree points in the step 1 by using the kd-tree;
step 2.2, selecting any point p in the topological structure in step 2.1, finding k points closest to the point p through a kd-tree neighbor search algorithm, and clustering the points with the distance smaller than a set threshold value into a set Q;
step 2.3, selecting the rest points except p points in the set Q, searching k neighbors through kd-tree, continuously adding the points smaller than a distance threshold into the set Q, repeating until the number of elements in the set Q is not increased, and dividing to finish a cluster;
and 2.4, continuously selecting points outside the set Q, repeating the steps 2.2 and 2.3 until all the points in the topological structure are divided into a certain cluster, and storing the clusters obtained by all the clusters into a cluster C.
The step 3 is specifically as follows:
step 3.1, setting the j-th element of the ith row of the adjacent matrix, cluster c i The centroid of (2) is denoted as p i Cluster c j The centroid of (2) is denoted as p j Calculating Euclidean distance dis (p i ,p j ,c i ,c j ) Direction difference dir (p) i ,p j ,c i ,c j ) Similarity value W (c) i ,c j ) As in formulas (1) - (3):
dis(p i ,p j ,c i ,c j )=||p i -p j || (1)
W(c i ,c j )=λdis(p i ,p j ,c i ,c j )+βdir(p i ,p j ,c i ,c j ) (3)
in the formulas (1) - (3), the parameter V represents p i Or p j P by least squares linear fitting method i Or p j Fitting a plane locally, and then solving a direction vector corresponding to the maximum characteristic value to be a main direction; where the parameter λ+β=1, λ is between 0 and 1 and the value of λ depends on the cluster c i Wherein, the density of the polymer is equal to or higher than that of the polymer,parameter p * Belonging to cluster c i K "represents cluster c i Total points in (a);
and 3.2, setting the cluster C in the step 2 to contain n clusters, wherein the two-dimensional matrix M represents the relation among each cluster and is a symmetrical matrix, and the value is 0 or 1, and the merging principle is to merge clusters with the value of 1 in the two-dimensional matrix M.
The step 3.2 specifically comprises the following steps:
step 3.2.1, initializing elements in the two-dimensional matrix M based on Euclidean distance, if the distance is not more than 0.2M, initializing the data in the corresponding two-dimensional matrix M to be 1, otherwise, initializing the data in the two-dimensional matrix M to be 0;
step 3.2.2 adding uniqueness aboutThe beam is as in formula (4), and the unique constraint indicates that only one element of each row in the two-dimensional matrix M after being updated by the energy function formula is assigned 1; using M ij To represent the value of (i, j) in the two-dimensional matrix M, if M after the energy function is updated ij =1, then M ji =1, representing the corresponding cluster c i And c j Combining;
step 3.2.3, adding a conditional constraint such as a formula (5), wherein the conditional constraint represents that the cluster most suitable for merging is found according to the similarity matrix of the two clusters with the maximum similarity value;
wherein parameter S ij,is Is a matrix, wherein S ij,is In "ij" represents the value of the j-th column of the current i-th row, and "is" represents cluster c i With other cluster values, S ij,is Then cluster c is represented i And c j The weight of (2) is:
where if j=s, γ=0, whereas γ=1;
step 3.2.4, in combination with the unique constraint of step 3.2.2 and the conditional constraint of step 3.2.3, can yield an energy function, such as equation (7),
after the uniqueness constraint formulation is simplified, the energy function PE' before updating is the formula (12),
step 3.2.5, updating the post-update energy function PE O The relation with the energy function PE' before update is as shown in formula (13):
ED=PE O -PE' (13)
if j=s, then S' pq,pq =0, obtainable:
bringing equation (15) into equation (14) yields:
since ED is less than or equal to 0, the rule of updating is set as shown in formula (17):
step 3.2.6, updating the two-dimensional symmetric matrix M through the formula (17) in the step 3.2.5, and merging according to the updated result;
and 3.2.7, merging the clusters with the median value of 1 in the two-dimensional matrix processed in the step 3.2.6, and repeating the steps until no clusters can be merged.
The beneficial effects of the invention are as follows: according to the tree extraction method in the outdoor point cloud scene based on the energy function, the problem of insufficient clustering is solved by effectively combining clusters; the clusters which are not enough into one tree after the clustering is completed are taken as noise points to be removed, the removal of non-tree objects is completed, the accuracy of single tree extraction is improved, the calculation process is fast, and the method has good practical value.
Drawings
FIG. 1 is a flow chart of a method for extracting trees in an outdoor point cloud scene based on an energy function;
FIG. 2 is a schematic diagram of mapping raw data to a two-dimensional plane in a tree extraction method of the present invention;
FIG. 3 is a schematic diagram of Euclidean clustering results in the tree extraction method of the present invention;
FIG. 4 is a schematic diagram of a primary clustering result of an energy function method in the tree extraction method of the invention;
FIG. 5 is a schematic diagram of the final clustering result of the energy function method in the tree extraction method of the present invention;
fig. 6 is a schematic diagram of an optimization result in the tree extraction method of the present invention.
Detailed Description
The invention will now be described in detail with reference to the drawings and the detailed description.
The invention discloses a tree extraction method in an outdoor point cloud scene based on an energy function, which is shown in fig. 1 and comprises the following steps:
step 1, as shown in fig. 2, selecting LiDAR point cloud data, projecting the LiDAR point cloud data onto a two-dimensional plane, and removing plane points in the LiDAR point cloud data to obtain candidate tree points. The initial LiDAR point cloud data is divided into ground points and non-ground points, and specifically comprises the following steps:
step 1.1, randomly selecting at least three non-collinear points in LiDAR point cloud data, fitting the points to form a plane, and calculating four coefficients of the plane through normal vectors; the number of points constituting the plane is determined according to the model, and the minimum data number suitable for the model is generally selected, and as one plane is fitted, at least three points are required to be selected and are not collinear;
step 1.2, calculating the distance from each point remained in LiDAR point cloud data to the plane in step 1.1, judging the point which is closer to the plane according to a threshold value, marking the point as the local point of the model, and recording the number of the local points of the model;
step 1.3, iterating repeatedly, and when the iteration exit condition is met, exiting the loop to obtain the most reasonable solution in the whole iteration process, namely, a plane point set capable of fitting the model to the greatest extent; the iteration exit condition specifically comprises:
in the step 1.3.1 of the method,let W denote the probability of randomly extracting local points, n 'denote the number of data to be selected for calculating model parameters, and calculate the probability W that all the n' points extracted randomly are local points n′ The method comprises the steps of carrying out a first treatment on the surface of the Calculating the probability of at least one extra-local point being present, denoted as 1-W n′ The method comprises the steps of carrying out a first treatment on the surface of the Calculating the probability (1-W that at least one outlier exists for each iteration k' times n′ ) k′ When k' is sufficiently large, the probability (1-W n′ ) k′ Will be small, meaning that the higher the model reliability; the probability that at least one set of correct model parameters can be obtained by iterating k' times is recorded as 1- (1-W) n′ ) k′ ;
Step 1.3.2, calculating confidence level p=1- (1-W) n′ ) k′ Representing the expected probability that the RANSAC algorithm will provide a useful result after operation;
step 1.3.3, logarithm of confidence level P, back-extrapolated k' =log (1-P)/log (1-W) n′ ) The k 'value is the iteration termination condition, and the loop is exited when the actual iteration number is not less than k'.
And step 1.4, eliminating the plane point set in the step 1.3 to obtain candidate tree points.
Step 2, assuming that any one candidate tree point in the step 1 represents one cluster, clustering the candidate trees by using a Euclidean clustering algorithm, and storing all clusters obtained by clustering in a cluster C.
If each candidate tree point represents a cluster, the candidate trees are directly clustered and solved through an energy function, so that insufficient memory is easily caused when similarity data between each data point and the rest data points are stored. Therefore, the Euclidean clustering algorithm is utilized to perform clustering processing on the candidate trees, the candidate tree points are divided into a plurality of clusters, and the initial number of clusters is reduced.
Step 2.1, establishing a topological structure for the candidate tree points in the step 1 by using the kd-tree; the method comprises the following steps:
firstly, dividing dimensions, calculating variance for all dimension values, and selecting dimension d with maximum variance 0 The method comprises the steps of carrying out a first treatment on the surface of the Subsequently, the data item of the cutting criterion is selected, and the dimension d is found 0 Median of all data items abovem, dividing the data set according to m, dividing into two, and recording two data subsets as D l And D r Establishing tree nodes and storing the division; again, D for both data subsets l And D r Repeating the above division, and setting the newly generated tree node as the left and right children of the last division; and finally, fully dividing until the data cannot be divided any more, and storing the corresponding data into the last node, namely the leaf node.
Step 2.2, randomly selecting any point p in the topological structure in step 2.1, finding k points closest to the point p through a kd-tree neighbor search algorithm, and clustering the points with the distance smaller than a set threshold value into a set Q;
step 2.3, selecting points except p points in the set Q, searching k neighbors through kd-tree, adding the points smaller than the distance threshold value into the set Q, and repeating the process until the number of elements in the set Q is not increased, and completing one cluster division;
and 2.4, continuously selecting points outside the set Q, repeating the steps 2.2 and 2.3 until all the points in the topological structure are divided into a certain cluster, and storing the clusters obtained by all the clusters in the cluster C.
As shown in FIG. 3, the points in FIG. 2 are separated into 11 total parts by Euclidean clustering, AA\BB\CC\DD\EE\FF\HH\II\JJ\GG KK.
Step 3, performing similarity matrix calculation on the cluster C obtained in the step 2; the energy function of cluster C is then calculated, and the clusters in cluster C are merged according to the energy function.
Clustering the outdoor scene point cloud data by Euclidean distance to obtain a cluster C, wherein the aim is to combine the relatively similar data samples together, and then find two most similar clusters by calculating the value of a similarity matrix and combine the two most similar clusters to form a new cluster. But the above-described approach to finding the best-combined cluster only reveals the locally best-combined situation. Therefore, when solving for similarity, unique constraints and conditional constraints are added to compose an energy function by which it is analyzed whether two clusters need to be merged. Based on the principle of minimizing the energy function, when a tree is clustered into a plurality of clusters, cluster merging can be effectively performed.
Step 3.1, setting the j-th element of the ith row of the adjacent matrix, cluster c i The centroid of (2) is denoted as p i Cluster c j The centroid of (2) is denoted as p j Calculating Euclidean distance dis (p i ,p j ,c i ,c j ) Direction difference dir (p) i ,p j ,c i ,c j ) Similarity value W (c) i ,c j ) As in formulas (1) - (3):
dis(p i ,p j ,c i ,c j )=||p i -p j || (1)
W(c i ,c j )=λdis(p i ,p j ,c i ,c j )+βdir(p i ,p j ,c i ,c j ) (3)
in the formulas (1) - (3), the parameter V represents p i Or p j P by least squares linear fitting method i Or p j Fitting a plane locally, and then solving a direction vector corresponding to the maximum characteristic value to be a main direction; where the parameter λ+β=1, λ is between 0 and 1 and the value of λ depends on the cluster c i Wherein, the density of the polymer is equal to or higher than that of the polymer,parameter p * Belonging to cluster c i K "represents cluster c i Is a total point of the total number.
And 3.2, setting the cluster C in the step 2 to contain n clusters, wherein the two-dimensional matrix M represents the relation among each cluster and is a symmetrical matrix, and the value is 0 or 1, and the merging principle is to merge clusters with the value of 1 in the two-dimensional matrix M. The method comprises the following steps:
step 3.2.1, initializing elements in the two-dimensional matrix M based on Euclidean distance, if the distance is not more than 0.2M, initializing the data in the corresponding two-dimensional matrix M to be 1, otherwise, initializing the data in the two-dimensional matrix M to be 0;
step 3.2.2, adding a unique constraint, such as a formula (4), wherein the unique constraint indicates that only one element in each row of the two-dimensional matrix M after being updated by the energy function formula is assigned with 1, and particularly only one-to-one relation occurs in each iterative clustering process; using M ij To represent the value of (i, j) in the two-dimensional matrix M, if M after the energy function is updated ij =1, then M ji =1, representing the corresponding cluster c i And c j Combining;
step 3.2.3, adding a conditional constraint, such as a formula (5), wherein the conditional constraint represents that the cluster most suitable for merging is found according to the similarity matrix of the two clusters with the maximum similarity value;
wherein parameter S ij,is Is a matrix due to the requirement of getting the current ith row and cluster c i Another cluster that is most similar, so the current cluster c is added i Computing cluster c with respect to other clusters i And c j A value of the effect of time; wherein S is ij,is In "ij" represents the value of the j-th column of the current i-th row, and "is" represents cluster c i With other cluster values, S ij,is Then cluster c is represented i And c j The weight of (2) is:
where if j=s, γ=0, whereas γ=1;
step 3.2.4, in combination with the unique constraint of step 3.2.2 and the conditional constraint of step 3.2.3, can yield an energy function, such as equation (7),
in order to obtain the value of the energy function more conveniently and intuitively, formulas of the unique constraint and the conditional constraint are simplified respectively.
Simplifying the unique constraint formula:
wherein the method comprises the steps ofThe derivation of (2) is shown in the formula (9):
after simplification, the energy function PE is as shown in formula (10):
the pre-update energy function PE' is equation (11),
bringing equation (10) into equation (11) to obtain
Step 3.2.5, to minimize the energy function, it is necessary to update the energy function PE from then on O And the energy function PE' before updating is analyzed as shown in formula (13):
ED=PE O -PE' (13)
Based on the analysis of the update process energy variation, the energy change will be determined from M in the formula pq Become M' pq As in equation (14):
since j=s, then S' pq,pq =0, obtainable:
from equation (14)
Since ED.ltoreq.0 is always maintained, on this basis, an updated rule is proposed as shown in equation (17):
step 3.2.6, updating the two-dimensional symmetric matrix M through the formula (17) in the step 3.2.5, and merging according to the updated result; if the calculated value of formula (17) is greater than 0, cluster c i And cluster c j The corresponding value in the two-dimensional array is marked as 0; if the calculated value of equation (17) is equal to 0, cluster c i And cluster c j The corresponding value in the two-dimensional array is marked as 1; if the calculated value of equation (17) is less than 0, cluster c i And cluster c j The corresponding value in the two-dimensional array is unchanged;
and 3.2.7, merging the clusters with the median value of 1 in the two-dimensional matrix processed in the step 3.2.6, and repeating the steps until no clusters can be merged.
As shown in FIG. 4, clustering the clustering by the energy function method in FIG. 3 once, to obtain six parts in total, A-B (combining AA and BB), C-D (combining CC and DD), E-F (combining FF and EE), HH, I-J (combining II and JJ), and G-K (combining GG and KK); after repeated combination, the final combination result is shown in FIG. 5 and is divided into four parts of A-B, C-D-E-F (C-D and E-F are combined), HH, I-J-G-K (I-J and G-K are combined).
And 4, screening and optimizing the clusters according to the clusters combined in the step 3, judging the point number of each cluster, deleting the clusters with the point number not more than 1000, and finishing extraction. As shown in FIG. 6, clusters not greater than 1000 in FIG. 5 are eliminated, and the remaining C-D-E-F and I-J-G-K are the final extraction results.
Claims (3)
1. The method for extracting the tree in the outdoor point cloud scene based on the energy function is characterized by comprising the following steps of:
step 1, selecting LiDAR point cloud data, and removing plane points in the LiDAR point cloud data to obtain candidate tree points;
step 2, clustering the candidate tree points in the step 1 by using an Euclidean clustering algorithm, and storing all clusters obtained by clustering in a cluster C;
step 2.1, establishing a topological structure for the candidate tree points in the step 1 by using the kd-tree;
step 2.2, selecting any point p in the topological structure in step 2.1, finding k points closest to the point p through a kd-tree neighbor search algorithm, and clustering the points with the distance smaller than a set threshold value into a set Q;
step 2.3, selecting the rest points except p points in the set Q, searching k neighbors through kd-tree, continuously adding the points smaller than a distance threshold into the set Q, repeating until the number of elements in the set Q is not increased, and dividing to finish a cluster;
step 2.4, continuously selecting points outside the set Q, repeating the step 2.2 and the step 2.3 until all points in the topological structure are divided into a certain cluster, and storing clusters obtained by all clusters into a cluster C;
step 3, performing similarity matrix calculation on the cluster C obtained in the step 2; adding a unique constraint and a conditional constraint, then calculating an energy function of the cluster C, and merging clusters in the cluster C according to the energy function;
step 3.1, setting the j-th element of the ith row of the adjacent matrix, cluster c i The centroid of (2) is denoted as p i Cluster c j The centroid of (2) is denoted as p j Calculating Euclidean distance dis (p i ,p j ,c i ,c j ) Direction difference dir (p) i ,p j ,c i ,c j ) Similarity value W (c) i ,c j ) As in formulas (1) - (3):
dis(p i ,p j ,c i ,c j )=||p i -p j || (1)
W(c i ,c j )=λdis(p i ,p j ,c i ,c j )+βdir(p i ,p j ,c i ,c j ) (3)
in the formulas (1) - (3), the parameter V represents p i Or p j P by least squares linear fitting method i Or p j Fitting a plane locally, and then solving a direction vector corresponding to the maximum characteristic value to be a main direction; where the parameter λ+β=1, λ is between 0 and 1 and the value of λ depends on the cluster c i Wherein, the density of the polymer is equal to or higher than that of the polymer,parameter p * Belonging to cluster c i K "represents cluster c i Total points in (a);
step 3.2, the cluster C in the step 2 is provided to contain n clusters, the two-dimensional matrix M represents the relation among each cluster and is a symmetrical matrix, the value is 0 or 1, and the merging principle is to merge clusters with the value of 1 in the two-dimensional matrix M;
step 3.2.1, initializing elements in the two-dimensional matrix M based on Euclidean distance, if the distance is not more than 0.2M, initializing the data in the corresponding two-dimensional matrix M to be 1, otherwise, initializing the data in the two-dimensional matrix M to be 0;
step 3.2.2, adding a unique constraint such as a formula (4), wherein the unique constraint represents that only one element of each row in the two-dimensional matrix M after being updated by the energy function formula is assigned 1; using M ij To represent the value of (i, j) in the two-dimensional matrix M, if M after the energy function is updated ij =1, then M ji =1, representing the corresponding cluster c i And c j Combining;
step 3.2.3, adding a conditional constraint such as a formula (5), wherein the conditional constraint represents that the cluster most suitable for merging is found according to the similarity matrix of the two clusters with the maximum similarity value;
wherein parameter S ij,is Is a matrix, wherein S ij,is In "ij" represents the value of the j-th column of the current i-th row, and "is" represents cluster c i With other cluster values, S ij,is Then cluster c is represented i And c j The weight of (2) is:
where if j=s, γ=0, whereas γ=1;
step 3.2.4, in combination with the unique constraint of step 3.2.2 and the conditional constraint of step 3.2.3, can yield an energy function, such as equation (7),
after the uniqueness constraint formulation is simplified, the energy function PE' before updating is the formula (12),
step 3.2.5, updating the post-update energy function PE O The relation with the energy function PE' before update is as shown in formula (13):
ED=PE O -PE' (13)
if j=s, then S' pq,pq =0, obtainable:
bringing equation (15) into equation (14) yields:
since ED is less than or equal to 0, the rule of updating is set as shown in formula (17):
step 3.2.6, updating the two-dimensional symmetric matrix M through the formula (17) in the step 3.2.5, and merging according to the updated result;
step 3.2.7, merging clusters with the median value of 1 in the two-dimensional matrix processed in the step 3.2.6, and repeatedly executing the steps until no clusters can be merged;
and 4, screening and optimizing the clusters according to the clusters combined in the step 3, judging the point number of each cluster, deleting the clusters with the point number not more than 1000, and finishing extraction.
2. The method for extracting the tree in the outdoor point cloud scene based on the energy function according to claim 1, wherein the step 1 is specifically:
step 1.1, randomly selecting at least three non-collinear points in LiDAR point cloud data, fitting the points to form a plane, and calculating four coefficients of the plane through normal vectors;
step 1.2, calculating the distance from each point remained in LiDAR point cloud data to the plane in step 1.1, judging the point which is closer to the plane according to a threshold value, marking the point as the local point of the model, and recording the number of the local points of the model;
step 1.3, iterating repeatedly, and when the iteration exit condition is met, exiting the loop to obtain the most reasonable solution in the whole iteration process, namely a plane point set;
and step 1.4, eliminating the plane point set in the step 1.3 to obtain candidate tree points.
3. The method for extracting trees from outdoor point cloud scene based on energy function according to claim 2, wherein the iteration exit condition in step 1.3 is specifically:
step 1.3.1, setting W as probability of randomly extracting local points, wherein n 'represents the number of data to be selected for calculating model parameters, and obtaining probability W of randomly extracting n' points as local points n′ The method comprises the steps of carrying out a first treatment on the surface of the Calculating the probability of at least one extra-local point being present, denoted as 1-W n′ The method comprises the steps of carrying out a first treatment on the surface of the Calculating the probability (1-W that at least one outlier exists for each iteration k' times n′ ) k′ The method comprises the steps of carrying out a first treatment on the surface of the The probability that at least one set of correct model parameters can be obtained by iterating k' times is recorded as 1- (1-W) n′ ) k′ ;
Step 1.3.2, calculating confidence level p=1- (1-W) n′ ) k′ ;
Step 1.3.3, taking the logarithm of the confidence level P in step 1.3.2, and back-pushing to obtain k' =log (1-P)/log (1-W) n′ ) The k 'value is the iteration termination condition, and the loop is exited when the actual iteration number is not less than k'.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010680646.4A CN111986223B (en) | 2020-07-15 | 2020-07-15 | Method for extracting trees in outdoor point cloud scene based on energy function |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010680646.4A CN111986223B (en) | 2020-07-15 | 2020-07-15 | Method for extracting trees in outdoor point cloud scene based on energy function |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111986223A CN111986223A (en) | 2020-11-24 |
CN111986223B true CN111986223B (en) | 2024-02-06 |
Family
ID=73438654
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010680646.4A Active CN111986223B (en) | 2020-07-15 | 2020-07-15 | Method for extracting trees in outdoor point cloud scene based on energy function |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111986223B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112907546B (en) * | 2021-02-25 | 2024-04-05 | 北京农业信息技术研究中心 | Non-contact measuring device and method for beef scale |
CN114359643A (en) * | 2021-12-20 | 2022-04-15 | 东南大学 | Structured feature screening method based on Manhattan world hypothesis |
CN114972743A (en) * | 2022-03-18 | 2022-08-30 | 西安理工大学 | Radius expansion-based hierarchical single tree extraction method |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8195734B1 (en) * | 2006-11-27 | 2012-06-05 | The Research Foundation Of State University Of New York | Combining multiple clusterings by soft correspondence |
CN110110802A (en) * | 2019-05-14 | 2019-08-09 | 南京林业大学 | Airborne laser point cloud classification method based on high-order condition random field |
CN110348478A (en) * | 2019-06-04 | 2019-10-18 | 西安理工大学 | It is a kind of based on Shape Classification and trees extracting method in the outdoor point cloud scene combined |
CN111091062A (en) * | 2019-11-21 | 2020-05-01 | 东南大学 | Robot out-of-order target sorting method based on 3D visual clustering and matching |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10198858B2 (en) * | 2017-03-27 | 2019-02-05 | 3Dflow Srl | Method for 3D modelling based on structure from motion processing of sparse 2D images |
CN109325998B (en) * | 2018-10-08 | 2023-06-30 | 香港理工大学 | Indoor 3D modeling method, system and related device based on point cloud data |
-
2020
- 2020-07-15 CN CN202010680646.4A patent/CN111986223B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8195734B1 (en) * | 2006-11-27 | 2012-06-05 | The Research Foundation Of State University Of New York | Combining multiple clusterings by soft correspondence |
CN110110802A (en) * | 2019-05-14 | 2019-08-09 | 南京林业大学 | Airborne laser point cloud classification method based on high-order condition random field |
CN110348478A (en) * | 2019-06-04 | 2019-10-18 | 西安理工大学 | It is a kind of based on Shape Classification and trees extracting method in the outdoor point cloud scene combined |
CN111091062A (en) * | 2019-11-21 | 2020-05-01 | 东南大学 | Robot out-of-order target sorting method based on 3D visual clustering and matching |
Non-Patent Citations (2)
Title |
---|
曾碧 ; 黄文 ; .一种融合多特征聚类集成的室内点云分割方法.计算机工程.2018,(第03期),全文. * |
陈逍遥 ; 任小玲 ; 夏邢 ; 史政坤 ; .基于标记的多状态离群点去除算法.国外电子测量技术.2020,(第01期),全文. * |
Also Published As
Publication number | Publication date |
---|---|
CN111986223A (en) | 2020-11-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111986223B (en) | Method for extracting trees in outdoor point cloud scene based on energy function | |
Zhang et al. | Deep learning-based classification and reconstruction of residential scenes from large-scale point clouds | |
CN109325993B (en) | Saliency feature enhanced sampling method based on class octree index | |
Liu et al. | Seqlpd: Sequence matching enhanced loop-closure detection based on large-scale point cloud description for self-driving vehicles | |
CN112184752A (en) | Video target tracking method based on pyramid convolution | |
CN112288857A (en) | Robot semantic map object recognition method based on deep learning | |
CN110188763B (en) | Image significance detection method based on improved graph model | |
CN115205690B (en) | Method and device for extracting street tree in monomer mode based on MLS point cloud data | |
CN109323697B (en) | Method for rapidly converging particles during starting of indoor robot at any point | |
CN110348478B (en) | Method for extracting trees in outdoor point cloud scene based on shape classification and combination | |
CN111340723A (en) | Terrain-adaptive airborne LiDAR point cloud regularization thin plate spline interpolation filtering method | |
CN111524140A (en) | Medical image semantic segmentation method based on CNN and random forest method | |
CN115049925A (en) | Method for extracting field ridge, electronic device and storage medium | |
CN112200248A (en) | Point cloud semantic segmentation method, system and storage medium under urban road environment based on DBSCAN clustering | |
CN114581451A (en) | Scattering map neural network-based brain magnetic resonance image segmentation method | |
CN115393631A (en) | Hyperspectral image classification method based on Bayesian layer graph convolution neural network | |
CN114494586B (en) | Lattice projection deep learning network broadleaf branch and leaf separation and skeleton reconstruction method | |
Yin et al. | A new apple segmentation and recognition method based on modified fuzzy C-means and hough transform | |
CN112241676A (en) | Method for automatically identifying terrain sundries | |
CN112070787B (en) | Aviation three-dimensional point cloud plane segmentation method based on opponent reasoning theory | |
Atik et al. | Explainable Artificial Intelligence for Machine Learning-Based Photogrammetric Point Cloud Classification | |
CN114463338A (en) | Automatic building laser foot point extraction method based on graph cutting and post-processing | |
Yan et al. | Hierarchical superpixel segmentation by parallel CRTrees labeling | |
Zhang et al. | A method for identifying and repairing holes on the surface of unorganized point cloud | |
CN113256793A (en) | Three-dimensional data processing method and system |
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 |