Point cloud geometric primitive segmentation processing method and device and electronic equipment

Evaluating the geometric primitive segmentation results through multiple segmentation algorithms and probability calculation methods, solving the problems of incomplete evaluation of single indicators and difficulty in applying multi-index methods in the existing technology, and achieving a more accurate and easy-to-use geometric primitive segmentation method.

CN120198445AActive Publication Date: 2025-06-24FAIR INNOVATION (SUZHOU) ROBOTIC SYSTEM CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510661069.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-22
Publication Date
2025-06-24
Estimated Expiration
2045-05-22

AI Technical Summary

Technical Problem

The existing geometric primitive segmentation methods have problems such as incomplete evaluation of single indicators and difficulty in applying multi-index methods when evaluating segmentation results, which makes it difficult to achieve the correct discrimination of segmentation results.

Method used

A variety of different segmentation algorithms are used to segment the target point cloud, calculate the probability of each geometric primitive to which each point belongs, and calculate the measurement of the same geometric primitive to which every two points belongs based on these probabilities, build the Laplace matrix and segmentation loss function, and finally determine the optimal segmentation algorithm.

Benefits of technology

It improves the accuracy and ease of use of geometric primitive segmentation, avoiding the complex and possible conflicting evaluation process when combining multiple standards.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120198445A_ABST
    Figure CN120198445A_ABST
Patent Text Reader

Abstract

The invention provides a point cloud geometric primitive segmentation processing method, a point cloud geometric primitive segmentation processing device and electronic equipment, and aims to calculate the probability that each point in a target point cloud belongs to each geometric primitive according to segmentation results obtained by adopting different segmentation algorithms for the target point cloud. And then based on the probability of each geometric primitive to which each point belongs, calculating the measurement of the same geometric primitive to which every two points belong, further constructing a Laplacian matrix, and constructing a segmentation loss function based on the Laplacian matrix. And finally, calculating a function value of a segmentation loss function of each segmentation algorithm, and determining an optimal segmentation algorithm based on the function value corresponding to each segmentation algorithm. According to the scheme, the probability of each geometric primitive to which the point belongs is calculated, then the metric of the same geometric primitive to which every two points belong is calculated, and the advantages and disadvantages of each segmentation result are evaluated based on the metric, so that the evaluation accuracy is improved, the problems that the evaluation process is complicated and conflicts possibly exist in multi-standard combination are avoided, and the evaluation efficiency is improved. And the usability of the scheme is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of point cloud processing, and in particular, to a method, device, and electronic device for segmenting and processing geometric primitives of point clouds. Background Art

[0002] Geometric primitives refer to basic shapes that can be parametrically represented in three-dimensional space, having clear geometric properties and being able to accurately describe the shapes of objects in a scene. Using these geometric primitives for the representation of point cloud data can greatly simplify complex three-dimensional models, facilitating storage, transmission, and further processing. For example, segmenting and simplifying point clouds using geometric shapes such as planes, spheres, and cylinders can reduce the data volume and improve processing efficiency. Geometric primitive segmentation helps extract semantic information from point clouds. For example, in building scans, segmenting point clouds into geometric primitives such as walls, floors, and columns can intuitively understand the structure of the scene. The segmented geometric primitives have clear mathematical descriptions (such as equations and parameters), which can significantly improve the efficiency and accuracy of subsequent tasks (such as registration, optimization, simulation, etc.). In reverse engineering, geometric primitive segmentation can help extract the design features of parts from scanned data, thereby accelerating design reconstruction. In summary, geometric primitive segmentation plays a crucial role in improving data processing efficiency, enhancing scene understanding, and supporting various engineering applications, and is an indispensable part of the point cloud processing field.

[0003] The metric standard for geometric primitive segmentation is an index used to evaluate the quality of the segmentation result, aiming to measure the accuracy of the segmentation. Commonly used metric standards mainly include AIC, BIC, geometric fitting error, normal vector consistency, and integrity, etc. However, these methods have certain limitations. If a single standard among these is used for evaluation, due to the multi-faceted nature of segmentation, it is difficult to correctly discriminate the segmentation result through a single standard. If multiple standards are combined to evaluate the segmentation result, although a better segmentation result can be selected, due to the combination of different standards, there may be problems such as conflicts, difficulties in weight selection, increased computational overhead, scale inconsistency, difficulty in interpretation, overfitting, etc., resulting in difficulty in application in actual production and life processes. Summary of the Invention

[0004] The purpose of the embodiments of the present invention is to provide a method, device, and electronic device for segmenting and processing geometric primitives of point clouds, so as to improve the accuracy and usability of geometric primitive segmentation.

[0005] In a first aspect, the present invention provides a method for segmenting and processing geometric primitives of point clouds, the method comprising: Performing geometric primitive segmentation on a target point cloud using a variety of different segmentation algorithms to obtain the segmentation result of each segmentation algorithm, the segmentation result including the equations of the segmented geometric primitives; For each segmentation result, calculate the probability that each point in the target point cloud belongs to each geometric primitive; Based on the probability that each point belongs to each geometric primitive, calculate the metric that every two points belong to the same geometric primitive; Construct a Laplacian matrix according to the metric that every two points belong to the same geometric primitive, and construct a segmentation loss function based on the Laplacian matrix; Calculate the function value of the segmentation loss function of each segmentation algorithm, and determine the optimal segmentation algorithm based on the function value corresponding to each segmentation algorithm.

[0006] In an alternative embodiment, the step of calculating the probability that each point in the target point cloud belongs to each geometric primitive includes: Calculate the distance from each point in the target point cloud to each geometric primitive; Based on the distance from each point to each geometric primitive, calculate the probability that each point belongs to each geometric primitive according to a preset formula.

[0007] In an alternative embodiment, the step of calculating the metric that every two points belong to the same geometric primitive based on the probability that each point belongs to each geometric primitive includes: For every two points, obtain the probability that one point belongs to the geometric primitive where the other point is located; Based on the probability that the two points respectively belong to the geometric primitive where the other point is located, calculate the metric that the two points belong to the same geometric primitive.

[0008] In an alternative embodiment, the step of constructing a Laplacian matrix according to the metric that every two points belong to the same geometric primitive includes: Construct a consistency adjacency matrix based on the metric that every two points belong to the same geometric primitive; Calculate the sum of the connection weights between each point in the target point cloud and all other points; Construct a degree matrix based on the sum of the connection weights of each point; Construct a Laplacian matrix according to the consistency adjacency matrix and the degree matrix.

[0009] In an alternative embodiment, the step of calculating the sum of the connection weights between each point in the target point cloud and all other points includes: Construct an undirected graph according to the points in the target point cloud, where the undirected graph is composed of the points in the target point cloud and the edges between the points; For each point in the undirected graph, determine all the points that have an edge with this point; Calculate the sum of the connection weights between this point and the points that have an edge.

[0010] In an alternative embodiment, before the step of calculating the probability that each point in the target point cloud belongs to each geometric primitive, the method further includes: For every two geometric primitives, calculate the distances from each point in the target point cloud to the two geometric primitives respectively; Based on the distances from each point to the two geometric primitives respectively, determine whether the two geometric primitives need to be merged; If they need to be merged, perform a merging operation on the two geometric primitives.

[0011] In an alternative embodiment, the step of determining whether the two geometric primitives need to be merged based on the distances from each point to the two geometric primitives respectively includes: For each point in the target point cloud, calculate the difference between the distances from the point to the two geometric primitives respectively; Compare the difference with a preset threshold to obtain a comparison result; Calculate a confidence level based on the comparison results of all points, compare the confidence level with a set threshold, and determine that the two geometric primitives need to be merged when the confidence level is greater than the set threshold.

[0012] In an alternative embodiment, the step of constructing a segmentation loss function based on the Laplacian matrix includes: Determine the geometric primitive to which each point belongs based on the probability that each point belongs to each geometric primitive; For each geometric primitive, construct a numerical representation based on the points belonging to the geometric primitive; According to the numerical representation of each geometric primitive and the Laplacian matrix, construct a segmentation loss function.

[0013] In a second aspect, the present invention provides a point cloud geometric primitive segmentation processing device, and the device includes: A segmentation module, configured to perform geometric primitive segmentation on a target point cloud by using a plurality of different segmentation algorithms to obtain a segmentation result of each segmentation algorithm, where the segmentation result includes the equation of the segmented geometric primitive; A calculation module, configured to calculate the probability that each point in the target point cloud belongs to each geometric primitive for each segmentation result; The calculation module is further configured to calculate the metric that every two points belong to the same geometric primitive based on the probability that each point belongs to each geometric primitive; A construction module, configured to construct a Laplacian matrix according to the metric that every two points belong to the same geometric primitive and construct a segmentation loss function based on the Laplacian matrix; A determination module, configured to calculate function values of segmentation loss functions of each segmentation algorithm, and determine an optimal segmentation algorithm based on the function values corresponding to each segmentation algorithm.

[0014] In a third aspect, the present invention provides an electronic device, including one or more storage media and one or more processors communicating with the storage media. The one or more storage media store machine-executable instructions executable by the processor. When the electronic device runs, the processor executes the machine-executable instructions to perform the method according to any one of the foregoing embodiments.

[0015] The present invention provides a method, apparatus and electronic device for point cloud geometric primitive segmentation. First, a target point cloud is geometrically segmented using a variety of different segmentation algorithms to obtain segmentation results for each segmentation algorithm. For each segmentation result, the probability that each point in the target point cloud belongs to each geometric primitive is calculated. Then, based on the probability that each point belongs to each geometric primitive, the metric that each pair of points belongs to the same geometric primitive is calculated. A Laplacian matrix is constructed according to the metric that each pair of points belongs to the same geometric primitive, and a segmentation loss function is constructed based on the Laplacian matrix. Finally, the function values of the segmentation loss functions of each segmentation algorithm are calculated, and an optimal segmentation algorithm is determined based on the function values corresponding to each segmentation algorithm. In this solution, by calculating the probability that a point belongs to each geometric primitive, and then calculating the metric that each pair of points belongs to the same geometric primitive, the quality of each segmentation result is evaluated based on this, improving the accuracy of the evaluation, and avoiding the problems of complex evaluation process and possible conflicts existing in the combination of multiple criteria, and improving the usability of the solution. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] To more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required to be used in the embodiments of the present invention. It should be understood that the following drawings only show some embodiments of the present invention, and therefore should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.

[0017] Figure 1 A schematic diagram of geometric primitive segmentation of the same workpiece using two segmentation algorithms; Figure 2 A flowchart of the method for point cloud geometric primitive segmentation provided by an embodiment of the present invention; Figure 3 A flowchart of the merging method in the method for point cloud geometric primitive segmentation provided by an embodiment of the present invention; Figure 4 For Figure 3 A flowchart of the sub-steps included in S22; Figure 5 ForFigure 2 Flow chart of sub-steps included in S12; Figure 6 For Figure 2 Flow chart of sub-steps included in S13; Figure 7 For Figure 2 Flow chart of sub-steps included in S14; Figure 8 For Figure 7 Flow chart of sub-steps included in S142; Figure 9 For Figure 2 Another flow chart of sub-steps included in S14; Figure 10 Functional module block diagram of the point cloud geometric primitive segmentation processing device provided by the embodiment of the present invention; Figure 11 Structural block diagram of the electronic device provided by the embodiment of the present invention. Detailed implementation manners

[0018] In point cloud geometric primitive segmentation, common segmentation metric criteria include AIC, BIC, geometric fitting error, normal vector consistency, integrity, etc. However, these methods have certain limitations. For example, Figure 1 As shown in , the results of two segmentation algorithms for an industrial part are difficult to select a better segmentation result through any of the above indicators. Figure 1 The integrity of the segmentation result on the left side in is higher, while the geometric fitting error and normal vector consistency of the segmentation result on the right side are not much different. Therefore, it is difficult to correctly discriminate the segmentation result through a single indicator.

[0019] Current algorithms inevitably need to trade off between the goodness of fit and the complexity of the model during the calculation process, such as through indicators like AIC and BIC. AIC selects the model by minimizing the expected entropy value, but it may lead to overfitting. BIC, while considering the model complexity, also combines the number of point clouds. Especially when the sample size is large, it tends to select a simpler model. These two indicators may cause the relative size to change under different point cloud densities, thus affecting the selection of the segmentation result. Geometric fitting error and normal vector consistency usually tend to select geometric primitives with higher complexity. For example, a plane can be fitted by a cylindrical surface with a very large radius. In the presence of noise, the geometric fitting error may even be smaller than the fitting result of the plane. The integrity of the segmentation is usually jointly evaluated with other indicators for the segmentation result. It is easy to misjudge when evaluating solely based on the segmentation integrity.

[0020] Therefore, in the existing segmentation processing, there are problems such as the single indicator evaluation being incomplete and the application of multi-indicator methods being difficult.

[0021] Based on the above research findings, the present invention provides a point cloud geometric primitive segmentation processing solution. By calculating the probability of each point belonging to each geometric primitive, and then calculating the metric of each pair of points belonging to the same geometric primitive, the advantages and disadvantages of each segmentation result are evaluated based on this, improving the accuracy of the evaluation, and avoiding the problems of complex evaluation process and possible conflicts existing in the combination of multiple criteria, thus enhancing the usability of the solution.

[0022] Next, the technical solutions in the embodiments of the present invention will be described with reference to the accompanying drawings in the embodiments of the present invention.

[0023] Please refer to Figure 2 , which is a flowchart of the point cloud geometric primitive segmentation processing method provided by the embodiment of the present invention. The point cloud geometric primitive segmentation processing method can be executed by a point cloud geometric primitive segmentation processing device. The point cloud geometric primitive segmentation processing device can be implemented by software and / or hardware, and can be configured in an electronic device. The electronic device can be a computer device, a server, a tablet computer, etc. The detailed steps of the point cloud geometric primitive segmentation processing method are introduced as follows.

[0024] S11, perform geometric primitive segmentation on the target point cloud using a variety of different segmentation algorithms to obtain the segmentation results of each segmentation algorithm. The segmentation results include the equations of the geometric primitives obtained by segmentation.

[0025] S12, for each segmentation result, calculate the probability of each point in the target point cloud belonging to each geometric primitive.

[0026] S13, based on the probability of each point belonging to each geometric primitive, calculate the metric of each pair of points belonging to the same geometric primitive.

[0027] S14, construct a Laplacian matrix according to the metric of each pair of points belonging to the same geometric primitive, and construct a segmentation loss function based on the Laplacian matrix.

[0028] S15, calculate the function value of the segmentation loss function of each segmentation algorithm, and determine the optimal segmentation algorithm based on the function value corresponding to each segmentation algorithm.

[0029] In this embodiment, the target point cloud can be obtained by photographing the target workpiece based on the captured image. Geometric primitive segmentation is performed on the target point cloud using a variety of different segmentation algorithms respectively. Among them, each segmentation algorithm can be an existing and commonly used segmentation algorithm, which is not limited in this embodiment.

[0030] Each segmentation algorithm is used to segment the target point cloud, and the corresponding segmentation results can be obtained respectively. The segmentation results include the types of geometric primitives obtained by segmentation and the equations of the geometric primitives. The types of geometric primitives include, for example, planes, cylindrical surfaces, etc. Assume that the target point cloud is represented as , the type of geometric primitive obtained can be represented as , and the equation corresponding to the geometric primitive can be represented as , where n represents the number of points in the target point cloud, and m represents the number of geometric primitives.

[0031] The point cloud geometric primitive segmentation processing solution provided in this embodiment aims to evaluate the segmentation results obtained by each segmentation algorithm through the set evaluation method, and then select the optimal segmentation algorithm from multiple segmentation algorithms. Therefore, for the segmentation results obtained by each segmentation algorithm, the same evaluation method is used for evaluation.

[0032] Each segmentation algorithm segments the points in the target point cloud into corresponding geometric primitives. In this embodiment, first, the probability that each point belongs to each geometric primitive can be calculated, and this probability can be calculated according to the distance from the point to each geometric primitive. For example, the smaller the distance from the point to the geometric primitive, the greater the probability that the point belongs to the geometric primitive, and vice versa, the smaller the probability that the point belongs to the geometric primitive.

[0033] After obtaining the probability that each point belongs to each geometric primitive, the measure that any two points belong to the same geometric primitive can be calculated, and then the Laplacian matrix can be constructed based on the measure that any two points belong to the same geometric primitive. The loss function is constructed using the Laplacian matrix, and this loss function can be used to measure the quality of the segmentation results obtained by the segmentation algorithm.

[0034] After constructing the loss function for the segmentation results of each segmentation algorithm in the above manner, the corresponding function values are obtained. By comparing the function values corresponding to various segmentation algorithms, the optimal segmentation algorithm can be determined. For example, the segmentation algorithm with the smallest function value is the optimal segmentation algorithm.

[0035] The point cloud geometric primitive segmentation scheme provided in this embodiment can calculate the measure that any two points belong to the same geometric primitive by calculating the probability that each point belongs to each geometric primitive. Based on this, a loss function is constructed to evaluate the quality of each segmentation result. In this way, the accuracy of the evaluation is improved, and the problem of complex evaluation process and possible conflicts existing in the combination of multiple criteria is avoided, and the usability of the scheme is improved.

[0036] Since there are some very close faces in the target point cloud, they are segmented into different faces during geometric primitive segmentation. However, in the actual scenario, it is often more reasonable to process them as one face. Based on this, please refer to Figure 3 In this embodiment, after obtaining the segmentation results of each segmentation algorithm, the geometric primitives can be merged first in the following manner and then evaluated.

[0037] S21. For every two geometric primitives, calculate the distances from each point in the target point cloud to these two geometric primitives respectively.

[0038] S22. Based on the distances from each point to these two geometric primitives, determine whether these two geometric primitives need to be merged.

[0039] S23. If they need to be merged, perform a merge operation on these two geometric primitives.

[0040] In this embodiment, when performing the merge of geometric primitives, each pair of geometric primitives is judged each time. Since the types of geometric primitives may be planes, cylindrical surfaces, etc., when merging, it should be noted that planes are merged with planes and cylindrical surfaces are merged with cylindrical surfaces. Therefore, every two geometric primitives here refer to two geometric primitives of the same type.

[0041] When calculating the distance from a point to a plane, the normal vector and intercept of the plane can be obtained, and the distance from the point to the plane is calculated based on the position, normal vector and intercept of the point. When calculating the distance from a point to a cylindrical surface, the axis direction, center point and radius of the cylinder where the cylindrical surface is located can be obtained, and the distance from the point to the cylindrical surface is calculated based on the position, axis direction, center point and radius.

[0042] Specifically, for planes and cylindrical surfaces, the following formulas can be used to calculate the distances from each point to the geometric primitives respectively:

[0043] where represents the distance from point p i to geometric primitive s j , and represent the normal vector and intercept of the plane, and represent the axis direction, center and radius of the cylinder respectively.

[0044] In the above manner, calculate the distances from each point in the target point cloud to each of the two geometric primitives. On this basis, determine whether these two geometric primitives need to be merged based on the distances from each point to each geometric primitive.

[0045] Among them, please refer to Figure 4 , when determining whether two geometric primitives need to be merged, it can be achieved in the following way: S221. For each point in the target point cloud, calculate the difference between the distances from the point to the two geometric primitives respectively.

[0046] S222. Compare the difference with a preset threshold to obtain a comparison result.

[0047] S223. Calculate a confidence level based on the comparison results of all points, compare the confidence level with a set threshold, and if the confidence level is greater than the set threshold, determine that the two geometric primitives need to be merged.

[0048] In this embodiment, when merging geometric primitives, the merging idea is to merge geometric primitives with a very small proportion into geometric primitives with a large proportion. Therefore, the confidence level of merging geometric primitives is defined as the basis for whether to merge.

[0049] The points in the target point cloud are represented as p i , and the two geometric primitives targeted are respectively s j and s k . According to the above distance calculation method, the distance from point p i to s j can be obtained, as well as the distance from point p i to s k . Calculate the difference between the two distances, represented as . And, in order to ensure judgment with a positive number, therefore, the absolute value of the difference can be taken.

[0050] Compare the obtained difference with a preset threshold. For example, the preset threshold is 1.00 m, and an indicator function is used to quantify the comparison result. That is, if the difference is less than the preset threshold, the comparison result is 1, and if the difference is greater than or equal to the preset threshold, the comparison result is 0.

[0051] Each point in the target point cloud is processed in the above manner to obtain the comparison results of each point. Then, take the average of the comparison results of each point to obtain the confidence level between the two geometric primitives, which is specifically characterized as follows:

[0052] Among them, represents the geometric primitive sj and s k the confidence between, denotes the indicator function, denotes the preset threshold.

[0053] The greater the confidence between two geometric primitives, the greater the likelihood that the two geometric primitives belong to the same geometric primitive. Conversely, the smaller the confidence, the smaller the likelihood that the two geometric primitives belong to the same geometric primitive.

[0054] Therefore, by comparing the obtained confidence with the set threshold, if the confidence is greater than the set threshold, it can be determined that the two geometric primitives can be merged. Among them, the set threshold can be 0.5, and specifically there is no limit.

[0055] After performing the above merging judgment and merging process on every two geometric primitives in the segmentation result, then evaluate each segmentation result.

[0056] Please refer to Figure 5 , the steps of calculating the probability that each point in the target point cloud belongs to each geometric primitive can be implemented in the following way: S121, calculate the distance from each point in the target point cloud to each geometric primitive.

[0057] S122, based on the distance from each point to each geometric primitive, calculate the probability that each point belongs to each geometric primitive according to a preset formula.

[0058] In this embodiment, the distance from each point to each geometric primitive can be calculated in the above way. The smaller the distance from a point to a geometric primitive, the greater the probability that the point belongs to the geometric primitive. Conversely, the greater the distance from a point to a geometric primitive, the smaller the probability that the point belongs to the geometric primitive.

[0059] Therefore, based on the distance from a point to a geometric primitive, the probability that the point belongs to the geometric primitive can be calculated according to the following preset formula:

[0060] where, denotes the point p i belongs to the geometric primitive s j probability, exp denotes the exponential function, denotes the point p i to the geometric primitive s j distance, is a hyperparameter.

[0061] Please refer toFigure 6 , the step of calculating the metric that every two points belong to the same geometric primitive based on the probabilities of each point belonging to each geometric primitive can be implemented in the following way: S131. For every two points, obtain the probability that one point belongs to the geometric primitive where the other point is located.

[0062] S132. Based on the probabilities that the two points respectively belong to the geometric primitive where the other point is located, calculate the metric that the two points belong to the same geometric primitive.

[0063] In this embodiment, for every two points in the target point cloud, on the basis of determining the geometric primitives where the two points are respectively located, the metric that the two points belong to the same geometric primitive can be determined, and this metric can represent the relative distance between the two points in the target point cloud.

[0064] For example, for the point p i and p j , the geometric primitive where the point p i is located is represented as s ( p i ), and the geometric primitive where the point p j is located is represented as s ( p j ). Among them, the probability that the point p i belongs to the geometric primitive where the point p j is located is , and the probability that the point p j belongs to the geometric primitive where the point p i is located is .

[0065] Based on the probabilities that the two points respectively belong to the geometric primitive where the other point is located, the metric that the two points belong to the same geometric primitive can be calculated according to the following formula: .

[0066] Please refer to Figure 7 , the step of constructing the Laplacian matrix according to the metric that every two points belong to the same geometric primitive can be implemented in the following way: S141. Construct a consistency adjacency matrix based on the metric that every two points belong to the same geometric primitive.

[0067] S142. Calculate the sum of the connection weights between each point in the target point cloud and all other points.

[0068] S143. Construct a degree matrix based on the sum of the connection weights of each point.

[0069] S144. Construct a Laplacian matrix according to the consistency adjacency matrix and the degree matrix.

[0070] In this embodiment, based on the metric that every two points in the target point cloud belong to the same geometric primitive, a consistency adjacency matrix W as shown below can be constructed. This consistency adjacency matrix is a symmetric positive definite matrix and can represent the metric that every two points belong to the same geometric primitive:

[0071] On this basis, the sum of the connection weights between each point in the target point cloud and all other points can be calculated. Please refer to Figure 8 The steps of calculating the sum of the connection weights between each point in the target point cloud and all other points can be implemented in the following manner: S1421. Construct an undirected graph according to the points in the target point cloud. The undirected graph is composed of the points in the target point cloud and the edges between the points.

[0072] S1422. For each point in the undirected graph, determine all the points that have an edge connected to this point.

[0073] S1423. Calculate the sum of the connection weights between this point and the points that have an edge connected to it.

[0074] In this embodiment, an undirected graph G can be defined. This undirected graph is described by a set of points V and a set of edges E, that is, it is represented as .

[0075] For two points v i and v j in the undirected graph, the metric that these two points belong to the same geometric primitive can be used as the weight between the two points, and . Therefore, for any point v i in the undirected graph, the sum of the connection weights between this point and the points that have an edge connected to it can be expressed as follows:

[0076] On this basis, a degree matrix can be defined based on the sum of the connection weights of each point. The degree matrix is a diagonal matrix and only the main diagonal has values, which is expressed as follows:

[0077] The consistency adjacency matrix obtained above is also matrix, where the j th value in the first row of the matrix corresponds to the above weight . On this basis, subtract the consistency adjacency matrix from the degree matrix to obtain the Laplacian matrix L:

[0078] On this basis, please refer to Figure 9 , and the steps of constructing the segmentation loss function based on the Laplacian matrix can be implemented in the following way: S145. Determine the geometric primitive to which each point belongs based on the probability that each point belongs to each geometric primitive.

[0079] S146. For each geometric primitive, construct a numerical representation based on the points belonging to that geometric primitive.

[0080] S147. According to the numerical representation of each geometric primitive and the Laplacian matrix, construct a segmentation loss function.

[0081] In this embodiment, it is assumed that the target point cloud is segmented into two geometric primitives A and , where is the geometric primitive composed of the points other than the geometric primitive A. Under a segmentation algorithm, the segmentation situation of each point in the target point cloud can be characterized by a numerical representation: , where when h i = 1, it means that the point p i belongs to the geometric primitive A, and when h i = 0, it means that the point p i belongs to the geometric primitive .

[0082] In the case where the target point cloud is segmented into k geometric primitives, the k geometric primitives are represented as , then the numerical representation of the k geometric primitives is . Among them, h k represents the numerical representation of the kth geometric primitive, and this numerical representation is the numerical representation of n points respectively, that is h k consists of n elements, the numerical representation of the points belonging to this geometric primitive is 1, and the numerical representation of the points not belonging to this geometric primitive is 0.

[0083] Unify the numerical representations of all geometric primitives as . After the above processing, the Laplacian matrix L can be obtained. Based on this, the segmentation loss function can be constructed in the following way:

[0084] Among them, Trace represents the trace of a matrix.

[0085] In the case of constructing the segmentation loss function, the function value of the segmentation result obtained by each segmentation algorithm under the segmentation loss function can be calculated. If the function value of the segmentation loss function is smaller, it indicates that the segmentation effect of the segmentation algorithm is better. Therefore, the segmentation algorithm with the smallest function value of the corresponding segmentation loss function among multiple segmentation algorithms can be selected as the optimal segmentation algorithm.

[0086] The point cloud geometric primitive segmentation processing solution provided in this embodiment can more accurately calculate the compatibility of whether any two points belong to the same geometric primitive by introducing a graph theory mechanism and constructing a consistency adjacency matrix. Compared with the traditional evaluation methods based on single indicators such as geometric fitting error and normal vector consistency, this solution can more comprehensively and accurately evaluate the segmentation quality when facing complex data, meeting the high requirements of semantic segmentation.

[0087] Aiming at the defects that existing multi-index evaluation methods usually require complex judgment logic and parameter adjustment, and there are often conflicts between different indexes, this solution uses a single index to achieve an effect similar to that of combining multi-index methods, avoiding the difficulties of parameter selection and conflicts, simplifying the evaluation process, greatly improving the usability of the algorithm, reducing the need for manual intervention, and enabling the algorithm to be more conveniently applied in different scenarios.

[0088] In this solution, by constructing a consistency adjacency matrix and calculating compatibility probabilities, the complexity of the algorithm is reduced, and at the same time, the robustness of the algorithm under different point cloud densities and noise effects is enhanced.

[0089] Based on the same inventive concept, please refer to Figure 10 , this embodiment of the present invention also provides a schematic diagram of the functional modules of a point cloud geometric primitive segmentation processing device. This embodiment can divide the functional modules of the point cloud geometric primitive segmentation processing device according to the above method embodiment. For example, each functional module can be corresponding to each function, or two or more functions can be integrated into one processing module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in this embodiment of the present invention is illustrative, only a logical function division, and there may be other division methods in actual implementation.

[0090] For example, in the case of dividing each functional module corresponding to each function, Figure 10The shown point cloud geometric primitive segmentation processing device is only a schematic diagram of a device. The point cloud geometric primitive segmentation processing device may include a segmentation module, a calculation module, a construction module, and a determination module. The functions of each functional module of the point cloud geometric primitive segmentation processing device will be elaborated in detail below.

[0091] The segmentation module is used to perform geometric primitive segmentation on the target point cloud by using a variety of different segmentation algorithms, and obtain the segmentation results of each segmentation algorithm. The segmentation results include the equations of the geometric primitives obtained by segmentation. The calculation module is used to calculate the probability that each point in the target point cloud belongs to each geometric primitive for each segmentation result. The calculation module is further used to calculate the metric that every two points belong to the same geometric primitive based on the probability that each point belongs to each geometric primitive. The construction module is used to construct a Laplacian matrix according to the metric that every two points belong to the same geometric primitive, and construct a segmentation loss function based on the Laplacian matrix. The determination module is used to calculate the function value of the segmentation loss function of each segmentation algorithm, and determine the optimal segmentation algorithm based on the function value corresponding to each segmentation algorithm.

[0092] It can be understood that the above segmentation module, calculation module, construction module, and determination module can be used to execute the above S11 to S15. The detailed implementation manners of the segmentation module, calculation module, construction module, and determination module can refer to the content related to the above S11 to S15.

[0093] In a possible implementation manner, the above calculation module can be used to: Calculate the distances from each point in the target point cloud to each geometric primitive. Based on the distances from each point to each geometric primitive, calculate the probability that each point belongs to each geometric primitive according to a preset formula.

[0094] In a possible implementation manner, the above calculation module can be used to: For every two points, obtain the probability that one point belongs to the geometric primitive where the other point is located. Based on the probabilities that the two points respectively belong to the geometric primitive where the other point is located, calculate the metric that the two points belong to the same geometric primitive.

[0095] In a possible implementation manner, the above construction module can be used to: Construct a consistency adjacency matrix based on the metric that every two points belong to the same geometric primitive. Calculate the sum of the connection weights between each point in the target point cloud and all other points. Construct a degree matrix based on the sum of the connection weights of each point. Construct a Laplacian matrix according to the consistency adjacency matrix and the degree matrix.

[0096] In a possible implementation, the above construction module can specifically be used for: Construct an undirected graph based on the points in the target point cloud, where the undirected graph is composed of the points in the target point cloud and the edges connecting the points; For each point in the undirected graph, determine all the points that have an edge connection with this point; Calculate the sum of the connection weights between the point and the points with edge connections.

[0097] In a possible implementation, the point cloud geometric primitive segmentation device may further include a merging module, and this merging module can be used for: For every two geometric primitives, calculate the distances from each point in the target point cloud to these two geometric primitives respectively; Based on the distances from each point to these two geometric primitives, determine whether these two geometric primitives need to be merged; If merging is required, perform a merging operation on these two geometric primitives.

[0098] In a possible implementation, the above merging module can be used for: For each point in the target point cloud, calculate the difference between the distances from the point to these two geometric primitives respectively; Compare the difference with a preset threshold to obtain a comparison result; Calculate a confidence level based on the comparison results of all points, compare the confidence level with a set threshold, and if the confidence level is greater than the set threshold, determine that these two geometric primitives need to be merged.

[0099] In a possible implementation, the above construction module can specifically be used for: Determine the geometric primitive to which each point belongs based on the probability of each point belonging to each geometric primitive; For each geometric primitive, construct a numerical representation based on the points belonging to this geometric primitive; Construct a segmentation loss function according to the numerical representation of each geometric primitive and the Laplacian matrix.

[0100] Please refer to Figure 11, is a block diagram of the structure of the electronic device provided by the embodiment of the present invention. The electronic device can be a computer device, a server, a tablet computer, etc. The electronic device includes a memory, a processor, and a communication module. Each element of the memory, the processor, and the communication module is electrically connected directly or indirectly to each other to realize data transmission or interaction. For example, these elements can be electrically connected to each other through one or more communication buses or signal lines.

[0101] Among them, the memory is used to store computer programs or data. The memory can be, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc.

[0102] The processor is used to read / write the data or programs stored in the memory and execute the point cloud geometric primitive segmentation processing method provided by any embodiment of the present invention.

[0103] The communication module is used to establish a communication connection between the electronic device and other communication terminals through the network and is used to send and receive data through the network.

[0104] It should be understood that Figure 11 The structure shown is only a schematic diagram of the structure of the electronic device. The electronic device may further include more or fewer components than those shown in Figure 11 or have a different configuration from that shown in Figure 11 .

[0105] Furthermore, the embodiment of the present invention further provides a computer-readable storage medium. The computer-readable storage medium stores machine-executable instructions, and when the machine-executable instructions are executed, the point cloud geometric primitive segmentation processing method provided by the above embodiment is realized.

[0106] Specifically, the computer-readable storage medium can be a general storage medium, such as a mobile disk, a hard disk, etc. When the computer program on the computer-readable storage medium is run, it can execute the above point cloud geometric primitive segmentation processing method. Regarding the process involved when the machine-executable instructions in the computer-readable storage medium are run, reference can be made to the relevant descriptions in the above method embodiments, which will not be elaborated here.

[0107] In the embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For another example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections between each other can be through some communication interfaces. The indirect couplings or communication connections of the devices or units can be in electrical, mechanical or other forms.

[0108] In addition, the units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place, or they can be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0109] Furthermore, in each embodiment of the present invention, the various functional modules can be integrated together to form an independent part, or each module can exist alone, or two or more modules can be integrated to form an independent part.

[0110] It should be noted that if the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks, or optical discs and other various media that can store program codes.

[0111] 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 any such actual relationship or order between these entities or operations.

[0112] The above are only embodiments of the present invention and are not intended to limit the protection scope of the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. A method for segmenting and processing point cloud geometric primitives, characterized in that, The method includes: Performing geometric primitive segmentation on the target point cloud using multiple different segmentation algorithms to obtain the segmentation results of each segmentation algorithm, where the segmentation results include the equations of the geometric primitives obtained by segmentation; For each segmentation result, calculating the probability that each point in the target point cloud belongs to each geometric primitive; Based on the probabilities that each point belongs to each geometric primitive, calculating the metric that every two points belong to the same geometric primitive; Constructing a Laplacian matrix according to the metric that every two points belong to the same geometric primitive, and constructing a segmentation loss function based on the Laplacian matrix; Calculating the function value of the segmentation loss function of each segmentation algorithm, and determining the optimal segmentation algorithm based on the function value corresponding to each segmentation algorithm.

2. The point cloud geometric primitive segmentation processing method according to claim 1, characterized in that The step of calculating the probability that each point in the target point cloud belongs to each geometric primitive includes: Calculating the distances from each point in the target point cloud to each geometric primitive; Based on the distances from each point to each geometric primitive, calculating the probability that each point belongs to each geometric primitive according to a preset formula.

3. The point cloud geometric primitive segmentation processing method according to claim 1, characterized in that The step of calculating the metric that every two points belong to the same geometric primitive based on the probabilities that each point belongs to each geometric primitive includes: For every two points, obtaining the probability that one point belongs to the geometric primitive where the other point is located; Based on the probabilities that the two points respectively belong to the geometric primitive where the other point is located, calculating the metric that the two points belong to the same geometric primitive.

4. The point cloud geometric primitive segmentation processing method according to claim 1, wherein The step of constructing a Laplacian matrix according to the metric that every two points belong to the same geometric primitive includes: Constructing a consistency adjacency matrix based on the metric that every two points belong to the same geometric primitive; Calculating the sum of the connection weights between each point in the target point cloud and all other points; Constructing a degree matrix based on the sum of the connection weights of each point; Constructing a Laplacian matrix according to the consistency adjacency matrix and the degree matrix.

5. The point cloud geometric primitive segmentation processing method according to claim 4, wherein, The step of calculating the sum of the connection weights between each point in the target point cloud and all other points includes: Constructing an undirected graph according to the points in the target point cloud, where the undirected graph is composed of the points in the target point cloud and the edges between the points; For each point in the undirected graph, determining all the points that have edges with this point; Calculating the sum of the connection weights between this point and the points that have edges with it.

6. The point cloud geometric primitive segmentation processing method according to claim 1, wherein Before the step of calculating the probability that each point in the target point cloud belongs to each geometric primitive, the method further includes: For every two geometric primitives, calculating the distances from each point in the target point cloud to these two geometric primitives respectively; Based on the distances from each point to these two geometric primitives respectively, determining whether these two geometric primitives need to be merged; If merging is needed, performing a merge operation on these two geometric primitives.

7. The point cloud geometric primitive segmentation processing method according to claim 6, wherein The step of determining whether these two geometric primitives need to be merged based on the distances from each point to these two geometric primitives respectively includes: For each point in the target point cloud, calculating the difference between the distances from this point to these two geometric primitives respectively; Comparing the difference with a preset threshold to obtain a comparison result; The confidence is calculated based on the comparison results of all points, and the confidence is compared with a set threshold. When the confidence is greater than the set threshold, it is determined that the two geometric primitives need to be merged.

8. The point cloud geometric primitive segmentation processing method according to claim 1, characterized in that The step of constructing the segmentation loss function based on the Laplacian matrix includes: Determine the geometric primitive to which each point belongs based on the probability of each point belonging to each geometric primitive. For each geometric primitive, construct a numerical representation based on the points belonging to the geometric primitive. According to the numerical representation of each geometric primitive and the Laplacian matrix, construct a segmentation loss function.

9. A point cloud geometric primitive segmentation processing device, characterized in that, The device includes: A segmentation module for performing geometric primitive segmentation on the target point cloud using a variety of different segmentation algorithms to obtain the segmentation results of each segmentation algorithm, where the segmentation results include the equations of the geometric primitives obtained by segmentation. A calculation module for calculating the probability of each point in the target point cloud belonging to each geometric primitive for each segmentation result. The calculation module is further configured to calculate the metric of each two points belonging to the same geometric primitive based on the probability of each point belonging to each geometric primitive. A construction module for constructing a Laplacian matrix based on the metric of each two points belonging to the same geometric primitive and constructing a segmentation loss function based on the Laplacian matrix. A determination module for calculating the function value of the segmentation loss function of each segmentation algorithm and determining the optimal segmentation algorithm based on the function value corresponding to each segmentation algorithm.

10. An electronic device, characterized in that, It includes one or more storage media and one or more processors communicating with the storage media. The one or more storage media store machine-executable instructions executable by the processor. When the electronic device runs, the processor executes the machine-executable instructions to perform the method according to any one of claims 1-8.

Citation Information

Patent Citations

  • Method for automatically recognizing various types of geometric elements in three-dimensional point cloud

    CN106228539A

  • Point cloud cylindrical surface segmentation method based on prior information sampling consistency

    CN116542985A

  • Three-dimensional point cloud data geometric primitive fitting method, system and equipment

    CN118537564A

  • Method and apparatus for multi-model primitive fitting based on deep geometric boundary and instance aware segmentation

    US10410354B1