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

The segmentation loss function is constructed through multiple segmentation algorithms and Laplace matrix, and the accuracy and ease of use of segmentation result evaluation in the prior art is solved, and a more accurate and simple geometric primitive segmentation evaluation is achieved.

CN120198445BActive Publication Date: 2025-08-12FAIR INNOVATION (SUZHOU) ROBOTIC SYSTEM CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing geometric primitive segmentation method has conflicts between limitations of single standard and multi-standard combination and computational complexity problems when evaluating segmentation results, which is difficult to accurately judge and apply.

Method used

A variety of segmentation algorithms are used to segment the target point cloud in geometric primitives, calculate the probability of each geometric primitive to which the point belongs, and construct the segmentation loss function through the Laplace matrix to determine the optimal segmentation algorithm.

Benefits of technology

It improves the accuracy of evaluation of segmented results, simplifies the evaluation process, avoids the complexity and conflicts of the combination of multiple standards, and improves ease of use.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120198445B_ABST
    Figure CN120198445B_ABST
Patent Text Reader

Abstract

The present invention provides a method, device and electronic device for processing point cloud geometric primitive segmentation. The segmentation results obtained by using different segmentation algorithms for the target point cloud are respectively calculated, and the probability of each point in the target point cloud belonging to each geometric primitive is calculated. Based on the probability of each point belonging to each geometric primitive, the metric of every two points belonging to the same geometric primitive is calculated, and then a Laplace matrix is constructed, and a segmentation loss function is constructed based on the Laplace matrix. Finally, the function value of the segmentation loss function of each segmentation algorithm is calculated, and the optimal segmentation algorithm is determined based on the function value corresponding to each segmentation algorithm. In this solution, by calculating the probability of a point belonging to each geometric primitive, and then calculating the metric of every two points belonging to the same geometric primitive, the quality of each segmentation result is evaluated based on this, which improves the accuracy of the evaluation and avoids the problem of complex evaluation process and possible conflicts existing in the combination of multiple standards, thereby improving the ease of use of the solution.
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 processing point cloud geometric primitive segmentation. Background Art

[0002] Geometric primitives are basic shapes that can be parametrically represented in 3D space. They possess well-defined geometric properties and can accurately describe the form of objects in a scene. Using these primitives to represent point cloud data can significantly simplify complex 3D 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 data volume and improve processing efficiency. Geometric primitive segmentation helps extract semantic information from point clouds. For example, in architectural scanning, segmenting point clouds into geometric primitives such as walls, floors, and columns provides an intuitive understanding of the scene's structure. Segmented geometric primitives have well-defined mathematical descriptions (e.g., equations and parameters), significantly improving the efficiency and accuracy of subsequent tasks such as registration, optimization, and simulation. In reverse engineering, geometric primitive segmentation can help extract design features from scanned data, 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, making it an indispensable component of point cloud processing.

[0003] The metrics for geometric primitive segmentation are used to evaluate the quality of segmentation results and aim to measure the accuracy of segmentation. Commonly used metrics include AIC, BIC, geometric fitting error, normal vector consistency and integrity, etc. However, these methods have certain limitations. If a single criterion is used for evaluation, it is difficult to correctly judge the segmentation results through a single criterion due to the multifaceted nature of segmentation. If multiple criteria are combined to evaluate the segmentation results, although a better segmentation result can be selected, the combination of different criteria may lead to conflicts, difficulties in weight selection, increased computational overhead, inconsistent scales, difficulty in interpretation, overfitting and other problems, making it difficult to apply in actual production and life. Summary of the Invention

[0004] The purpose of the embodiments of the present invention is to provide a method, device and electronic device for processing point cloud geometric primitive segmentation, 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 point cloud geometric primitives, the method comprising:

[0006] Using a plurality of different segmentation algorithms to perform geometric primitive segmentation on the target point cloud, and obtaining a segmentation result of each segmentation algorithm, wherein the segmentation result includes an equation of the geometric primitive obtained by segmentation;

[0007] For each segmentation result, calculating the probability that each point in the target point cloud belongs to each geometric primitive;

[0008] Based on the probability of each point belonging to each geometric primitive, calculate the measure of whether every two points belong to the same geometric primitive;

[0009] Construct a Laplacian matrix based on the metric that every two points belong to the same geometric primitive, and construct a segmentation loss function based on the Laplacian matrix;

[0010] The function value of the segmentation loss function of each segmentation algorithm is calculated, and the optimal segmentation algorithm is determined based on the function value corresponding to each segmentation algorithm.

[0011] In an optional embodiment, the step of calculating the probability that each point in the target point cloud belongs to each geometric primitive includes:

[0012] Calculating the distance from each point in the target point cloud to each geometric primitive;

[0013] Based on the distance from each point to each geometric primitive, the probability that each point belongs to each geometric primitive is calculated according to a preset formula.

[0014] In an optional 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:

[0015] For every two points, obtain the probability that one point belongs to the geometric primitive where the other point is located;

[0016] Based on the probability that two points belong to the geometric primitive where the other point is located, a measure of whether the two points belong to the same geometric primitive is calculated.

[0017] In an optional embodiment, the step of constructing a Laplacian matrix based on the metric of each two points belonging to the same geometric primitive includes:

[0018] Construct a consistent adjacency matrix based on the measure of whether each two points belong to the same geometric primitive;

[0019] Calculate the sum of the connection weights between each point in the target point cloud and all other points;

[0020] Construct a degree matrix based on the sum of the connection weights of each point;

[0021] A Laplacian matrix is constructed according to the consistent adjacency matrix and the degree matrix.

[0022] In an optional embodiment, the step of calculating the sum of the connection weights between each point in the target point cloud and all other points includes:

[0023] Constructing an undirected graph based on the points in the target point cloud, wherein the undirected graph is composed of the points in the target point cloud and the edges between the points;

[0024] For each point in the undirected graph, determine all points that have edges connected to the point;

[0025] Calculate the sum of the connection weights between the point and the points with connected edges.

[0026] In an optional 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:

[0027] For every two geometric primitives, calculating the distances from each point in the target point cloud to the two geometric primitives;

[0028] Determine whether the two geometric primitives need to be merged based on the distances between each point and the two geometric primitives;

[0029] If merging is required, perform a merge operation on the two geometric primitives.

[0030] In an optional 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 includes:

[0031] For each point in the target point cloud, calculating the difference between the distances from the point to the two geometric primitives;

[0032] Comparing the difference with a preset threshold to obtain a comparison result;

[0033] A confidence level is calculated based on the comparison results of all points, and the confidence level is compared with a set threshold. If the confidence level is greater than the set threshold, it is determined that the two geometric primitives need to be merged.

[0034] In an optional embodiment, the step of constructing a segmentation loss function based on the Laplacian matrix includes:

[0035] Determine the geometric primitive to which each point belongs based on the probability that each point belongs to each geometric primitive;

[0036] For each geometric primitive, construct a numerical representation based on the points belonging to the geometric primitive;

[0037] A segmentation loss function is constructed based on the numerical representation of each geometric primitive and the Laplacian matrix.

[0038] In a second aspect, the present invention provides a point cloud geometric primitive segmentation processing device, the device comprising:

[0039] A segmentation module is used to segment the target point cloud into geometric primitives using a plurality of different segmentation algorithms, and obtain a segmentation result of each segmentation algorithm, wherein the segmentation result includes an equation of the geometric primitive obtained by segmentation;

[0040] a calculation module, configured to calculate, for each segmentation result, the probability that each point in the target point cloud belongs to each geometric primitive;

[0041] The calculation module is further configured to calculate a measure of whether every two points belong to the same geometric primitive based on the probability that each point belongs to each geometric primitive;

[0042] A construction module is used to construct a Laplacian matrix according to the metric that every two points belong to the same geometric primitive, and to construct a segmentation loss function based on the Laplacian matrix;

[0043] 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.

[0044] In a third aspect, the present invention provides an electronic device comprising one or more storage media and one or more processors communicating with the storage media, wherein the one or more storage media store machine-executable instructions executable by the processor. When the electronic device is running, the processor executes the machine-executable instructions to execute the method described in any one of the aforementioned embodiments.

[0045] The present invention provides a method, device and electronic device for processing point cloud geometric primitive segmentation. First, a plurality of different segmentation algorithms are used to perform geometric primitive segmentation on the target point cloud to obtain the segmentation results of each segmentation algorithm. For each segmentation result, the probability of each point in the target point cloud belonging to each geometric primitive is calculated. Then, based on the probability of each point belonging to each geometric primitive, the metric of every two points belonging to the same geometric primitive is calculated. According to the metric of every two points belonging to the same geometric primitive, a Laplace matrix is constructed, and a segmentation loss function is constructed based on the Laplace matrix. Finally, the function value of the segmentation loss function of each segmentation algorithm is calculated, and the optimal segmentation algorithm is determined based on the function value corresponding to each segmentation algorithm. In this solution, by calculating the probability of a point belonging to each geometric primitive, and then calculating the metric of every two points belonging to the same geometric primitive, the quality of each segmentation result is evaluated based on this, thereby improving the accuracy of the evaluation, avoiding the problem of complex evaluation process and possible conflicts existing in the combination of multiple standards, and improving the ease of use of the solution. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments of the present invention. It should be understood that the following drawings only illustrate certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.

[0047] Figure 1 Schematic diagram of geometric primitive segmentation using two segmentation algorithms for the same workpiece;

[0048] Figure 2 Flowchart of a point cloud geometric primitive segmentation processing method provided by an embodiment of the present invention;

[0049] Figure 3 A flowchart of a merging method in a point cloud geometric primitive segmentation processing method provided by an embodiment of the present invention;

[0050] Figure 4 for Figure 3 Flowchart of the sub-steps included in S22;

[0051] Figure 5 for Figure 2 Flowchart of the sub-steps included in S12;

[0052] Figure 6 for Figure 2 Flowchart of the sub-steps included in S13;

[0053] Figure 7 for Figure 2 Flowchart of the sub-steps included in S14;

[0054] Figure 8 for Figure 7 A flowchart of the sub-steps included in S142;

[0055] Figure 9 for Figure 2 Another flow chart of the sub-steps included in S14;

[0056] Figure 10 A functional module block diagram of a point cloud geometric primitive segmentation processing device provided by an embodiment of the present invention;

[0057] Figure 11 This is a structural block diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0058] In the segmentation of point cloud geometric primitives, commonly used segmentation metrics include AIC, BIC, geometric fitting error, normal vector consistency and integrity, etc. However, these methods have certain limitations, such as Figure 1The figure shows the results of two segmentation algorithms for an industrial part. It is difficult to select a better segmentation result by any of the above indicators. Figure 1 The segmentation result on the left side of the image is more complete, while the geometric fitting error and normal vector consistency of the segmentation result on the right side are similar. Therefore, it is difficult to correctly judge the segmentation result with a single indicator.

[0059] Current algorithms inevitably need to balance model goodness of fit and model complexity during the computational process, using metrics such as AIC and BIC. AIC selects models by minimizing the expected entropy, but this can lead to overfitting. BIC considers model complexity while also factoring in the number of point clouds, tending to select simpler models, especially when the sample size is large. The relative importance of these two metrics may vary depending on the point cloud density, thus affecting the segmentation results. Geometric fitting error and normal vector consistency generally favor more complex geometric primitives. For example, a plane can be fitted using a cylinder with a very large radius. In the presence of noise, the geometric fitting error may even be smaller than the plane fitting result. Segmentation completeness is often evaluated in conjunction with other metrics; evaluating segmentation completeness alone can easily lead to misjudgments.

[0060] Therefore, in the existing segmentation processing, the evaluation method has problems such as the incomplete evaluation of a single indicator and the difficulty in applying the multi-indicator method.

[0061] Based on the above research findings, the present invention provides a point cloud geometric primitive segmentation processing solution, which calculates the probability that a point belongs to each geometric primitive, and then calculates the measurement of every two points belonging to the same geometric primitive. Based on this, the quality of each segmentation result is evaluated, which improves the accuracy of the evaluation and avoids the complex and conflicting evaluation process problems existing in the combination of multiple standards, thereby improving the ease of use of the solution.

[0062] The technical solutions in the embodiments of the present invention will be described below with reference to the accompanying drawings in the embodiments of the present invention.

[0063] See also Figure 2 , which is a flow chart of a method for segmenting point cloud geometric primitives according to an embodiment of the present invention. This method can be performed by a point cloud geometric primitive segmentation processing device. This device can be implemented using software and / or hardware and can be configured in an electronic device, such as a computer, server, or tablet computer. The detailed steps of this method are described below.

[0064] S11 , using a plurality of different segmentation algorithms to perform geometric primitive segmentation on the target point cloud, and obtaining a segmentation result of each segmentation algorithm, wherein the segmentation result includes an equation of the geometric primitive obtained by segmentation.

[0065] S12: For each segmentation result, calculate the probability that each point in the target point cloud belongs to each geometric primitive.

[0066] S13, 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.

[0067] S14, constructing a Laplacian matrix according to the measurement of each two points belonging to the same geometric primitive, and constructing a segmentation loss function based on the Laplacian matrix.

[0068] S15, 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.

[0069] In this embodiment, the target point cloud can be obtained by photographing the target workpiece based on the photographed image. The target point cloud is segmented into geometric primitives using a variety of different segmentation algorithms, wherein each segmentation algorithm can be an existing commonly used segmentation algorithm and is not limited in this embodiment.

[0070] Each segmentation algorithm is used to segment the target point cloud, and the corresponding segmentation results can be obtained. The segmentation results include the type of geometric primitives obtained by segmentation and the equation of the geometric primitives. The types of geometric primitives include planes, cylinders, etc. Assume that the target point cloud is represented as , the type of the obtained geometric primitive can be expressed as , the equation corresponding to the geometric primitive can be expressed as ,in, n Indicates the number of points in the target point cloud, m Represents the number of geometric primitives.

[0071] The point cloud geometric primitive segmentation processing solution provided in this embodiment is intended to evaluate the segmentation results obtained by each segmentation algorithm through a set evaluation method, and then select the optimal segmentation algorithm from multiple segmentation algorithms. Therefore, the segmentation results obtained by each segmentation algorithm are evaluated using the same evaluation method.

[0072] Each segmentation algorithm segments the points in the target point cloud into corresponding geometric primitives. In this embodiment, the probability of each point belonging to each geometric primitive can be first calculated. The probability can be calculated based on 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. Conversely, the smaller the distance from the point to the geometric primitive, the smaller the probability that the point belongs to the geometric primitive.

[0073] After obtaining the probability that each point belongs to each geometric primitive, we can calculate the metric that any two points belong to the same geometric primitive. We can then construct a Laplacian matrix based on the metric that any two points belong to the same geometric primitive. This Laplacian matrix is then used to construct a loss function, which can be used to measure the quality of the segmentation results obtained by the segmentation algorithm.

[0074] By constructing the loss function using the above method for the segmentation results of each segmentation algorithm, the corresponding function value is 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.

[0075] The point cloud geometric primitive segmentation solution provided in this embodiment calculates the probability that each point belongs to each geometric primitive, thereby calculating a measure of how likely any two points belong to the same geometric primitive. Based on this, a loss function is constructed to evaluate the quality of each segmentation result. This improves the accuracy of the evaluation and avoids the complex and potentially conflicting evaluation process associated with combining multiple criteria, thereby enhancing the solution's usability.

[0076] Since there are some very close faces in the target point cloud, they are divided into different faces when performing geometric primitive segmentation. However, in actual scenes, it is often more reasonable to treat them as a single face. Based on this, please refer to Figure 3 ,In this embodiment, after obtaining the segmentation results of each segmentation algorithm, ,the merging of geometric primitives may be performed in the following manner, ,and then the evaluation may be performed.

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

[0078] S22: Determine whether the two geometric primitives need to be merged based on the distances from each point to the two geometric primitives.

[0079] S23: If merging is required, perform a merging operation on the two geometric primitives.

[0080] In this embodiment, when merging geometric primitives, a check is performed on each pair of geometric primitives. Since geometric primitives can be of different types, such as planes or cylinders, when merging, it is important to note that planes are merged with planes, and cylinders are merged with cylinders. Therefore, "each pair of geometric primitives" here refers to two geometric primitives of the same type.

[0081] When calculating the distance from a point to a plane, the plane's normal and intercept are available. The distance from the point to the plane is calculated based on the point's position, normal, and intercept. When calculating the distance from a point to a cylindrical surface, the axis direction, center point, and radius of the cylinder on which the cylindrical surface resides are available. The distance from the point to the cylindrical surface is calculated based on the point's position, axis direction, center point, and radius.

[0082] Specifically, for planes and cylinders, the distance from each point to the geometric primitive can be calculated using the following formulas:

[0083]

[0084] in, Indicates a point p i To geometric primitives s j distance, and denote the normal and intercept of the plane, and They represent the axis direction, center and radius of the cylinder respectively.

[0085] According to the above method, the distance from each point in the target point cloud to each of the two geometric primitives is calculated. Based on this, it is determined whether the two geometric primitives need to be merged based on the distance from each point to each geometric primitive.

[0086] Among them, see Figure 4 , when judging whether two geometric primitives need to be merged, it can be achieved in the following ways:

[0087] S221 : For each point in the target point cloud, calculate the difference between the distances from the point to the two geometric primitives.

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

[0089] 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.

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

[0091] The points in the target point cloud are represented as p i , the two geometric primitives ares j and s k , according to the above distance calculation method, we can get the point p i to s j The distance and point p i to s k The difference between the two distances is calculated as Furthermore, in order to ensure that the judgment is made with a positive number, the absolute value of the difference can be taken.

[0092] The obtained difference is compared with a preset threshold, for example, the preset threshold is 1.00m, and the 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; if the difference is greater than or equal to the preset threshold, the comparison result is 0.

[0093] Each point in the target point cloud is processed in the same way as above to obtain the comparison results of each point. Then the average of the comparison results of each point is taken to obtain the confidence level between the two geometric primitives, which is specifically represented as follows:

[0094]

[0095] in, Representing geometric primitives s j and s k The confidence level between represents the indicator function, Indicates the preset threshold.

[0096] The greater the confidence between two geometric primitives, the greater the possibility that the two geometric primitives belong to the same geometric primitive. Conversely, the less likely the two geometric primitives belong to the same geometric primitive.

[0097] Therefore, the obtained confidence level is compared with a set threshold. If the confidence level is greater than the set threshold, it can be determined that the two geometric primitives can be merged. The set threshold can be 0.5, and there is no specific limitation.

[0098] After performing the above-mentioned merging judgment and merging processing on every two geometric primitives in the segmentation results, each segmentation result is evaluated.

[0099] See also Figure 5 , the above steps of calculating the probability that each point in the target point cloud belongs to each geometric primitive can be implemented as follows:

[0100] S121, calculating the distance from each point in the target point cloud to each geometric primitive.

[0101] 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.

[0102] In this embodiment, the distance from each point to each geometric primitive can be calculated using the above method. 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 larger the distance from a point to a geometric primitive, the lower the probability that the point belongs to the geometric primitive.

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

[0104]

[0105] in, Indicates a point p i Belongs to geometric primitives s j The probability of , exp represents the exponential function, Indicates a point p i To geometric primitives s j distance, is a hyperparameter.

[0106] See also Figure 6 , the above step of calculating the measure of every two points belonging to the same geometric primitive based on the probability of each point belonging to each geometric primitive can be achieved by:

[0107] S131, for every two points, obtain the probability that one point belongs to the geometric primitive where the other point is located.

[0108] S132 , based on the probability that the two points respectively belong to the geometric primitive where the other point is located, calculate a metric that the two points belong to the same geometric primitive.

[0109] In this embodiment, for every two points in the target point cloud, based on determining the geometric primitives in which the two points are located, the measurement of the same geometric primitive to which the two points belong can be determined, and the measurement can represent the relative distance between the two points in the target point cloud.

[0110] For example, for point p i and p j ,point p iThe geometric primitives are represented as s ( p i ),point p j The geometric primitives are represented as s ( p j ). Among them, point p i Belonging point p j The probability of the geometric primitive is ,point p j Belonging point p i The probability of the geometric primitive is .

[0111] Based on the probability that two points belong to the same geometric primitive, the measure of whether two points belong to the same geometric primitive can be calculated as follows: .

[0112] See also Figure 7 , the above step of constructing the Laplacian matrix based on the metric of each two points belonging to the same geometric primitive can be achieved as follows:

[0113] S141, constructing a consistent adjacency matrix based on the metric that every two points belong to the same geometric primitive.

[0114] S142, calculating the sum of the connection weights between each point in the target point cloud and all other points.

[0115] S143, constructing a degree matrix based on the sum of the connection weights of each point.

[0116] S144: Construct a Laplacian matrix according to the consistent adjacency matrix and the degree matrix.

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

[0118]

[0119] On this basis, the sum of the connection weights between each point in the target point cloud and all other points can be calculated, see Figure 8 , the step of calculating the sum of the connection weights between each point in the target point cloud and all other points can be achieved as follows:

[0120] S1421: 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 between the points.

[0121] S1422: For each point in the undirected graph, determine all points that have edges connected to the point.

[0122] S1423: Calculate the sum of the connection weights between the point and the points with connected edges.

[0123] In this embodiment, an undirected graph G can be defined, which is described by a set of points V and a set of edges E, that is, .

[0124] For two points in an undirected graph v i and v j , the measure that the two points belong to the same geometric primitive can be used as the weight between the two points, and Therefore, for any point in the undirected graph v i , the sum of the connection weights between the point and the points with which it has edges can be expressed as follows:

[0125]

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

[0127]

[0128] The consistent adjacency matrix obtained above is also The matrix of the first row of the matrix j The values correspond to the weights mentioned above On this basis, the Laplace matrix L is obtained by subtracting the consistency adjacency matrix from the degree matrix:

[0129]

[0130] On this basis, see Figure 9 , the steps of constructing the segmentation loss function based on the Laplacian matrix can be achieved as follows:

[0131] S145 , determining the geometric primitive to which each point belongs based on the probability that each point belongs to each geometric primitive.

[0132] S146 , for each geometric primitive, construct a numerical representation based on the points belonging to the geometric primitive.

[0133] S147, constructing a segmentation loss function based on the numerical representation of each geometric primitive and the Laplace matrix.

[0134] In this embodiment, it is assumed that the target point cloud is divided into two geometric primitives A and ,in, That is, the geometric primitives composed of points other than the geometric primitive A. Under a segmentation algorithm, the segmentation of each point in the target point cloud can be represented by a numerical representation: , among which, when h i =1, indicating a point p i Belongs to the geometric primitive A, when h i =0, indicating a point p i Belongs to geometric primitives .

[0135] When 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 .in, h k That is, it represents the numerical representation of the kth geometric primitive, which is the numerical representation of n points, that is, h k It consists of n elements. The numerical representation of the points belonging to the geometric primitive is 1, and the numerical representation of the points not belonging to the geometric primitive is 0.

[0136] The numerical representation of all geometric primitives is unified as After the above processing, the Laplace matrix L can be obtained. Based on this, the segmentation loss function can be constructed in the following way:

[0137]

[0138] Where Trace represents the trace of the matrix.

[0139] Once the segmentation loss function is constructed, the value of the segmentation result obtained by each segmentation algorithm under the segmentation loss function can be calculated. The smaller the value of the segmentation loss function, the better the segmentation effect of the segmentation algorithm. Therefore, the segmentation algorithm with the smallest value of the segmentation loss function among multiple segmentation algorithms can be selected as the optimal segmentation algorithm.

[0140] The point cloud geometric primitive segmentation processing solution provided in this embodiment introduces a graph theory mechanism and constructs a consistent adjacency matrix, so that it can more accurately calculate whether any two points belong to the same geometric primitive. Compared with the traditional evaluation method 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.

[0141] Existing multi-indicator evaluation methods usually require complex judgment logic and parameter adjustments, and there are often conflicts between different indicators. This solution uses a single indicator to achieve similar effects as the combination of multi-indicator methods, avoiding the difficulties of parameter selection and conflicts, simplifying the evaluation process, greatly improving the algorithm's ease of use, reducing the need for manual intervention, and enabling the algorithm to be more conveniently applied in different scenarios.

[0142] In this scheme, by constructing a consistent adjacency matrix and calculating the compatibility probability, the complexity of the algorithm is reduced, and the robustness of the algorithm under different point cloud densities and noise is enhanced.

[0143] Based on the same inventive concept, please refer to Figure 10 , an embodiment of the present invention further provides a functional module diagram 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 divided according to each function, or two or more functions can be integrated into one processing module. The above-mentioned integrated module 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 the embodiment of the present invention is schematic and is only a logical functional division. There may be other division methods in actual implementation.

[0144] For example, when each functional module is divided into corresponding functional modules, Figure 10 The point cloud geometric primitive segmentation processing device shown is only a schematic diagram of the 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 are described in detail below.

[0145] A segmentation module is used to segment the target point cloud into geometric primitives using a plurality of different segmentation algorithms, and obtain a segmentation result of each segmentation algorithm, wherein the segmentation result includes an equation of the geometric primitive obtained by segmentation;

[0146] a calculation module, configured to calculate, for each segmentation result, the probability that each point in the target point cloud belongs to each geometric primitive;

[0147] The calculation module is further configured to calculate a measure of whether every two points belong to the same geometric primitive based on the probability that each point belongs to each geometric primitive;

[0148] A construction module is used to construct a Laplacian matrix according to the metric that every two points belong to the same geometric primitive, and to construct a segmentation loss function based on the Laplacian matrix;

[0149] 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.

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

[0151] In one possible implementation, the calculation module may be used to:

[0152] Calculating the distance from each point in the target point cloud to each geometric primitive;

[0153] Based on the distance from each point to each geometric primitive, the probability that each point belongs to each geometric primitive is calculated according to a preset formula.

[0154] In one possible implementation, the calculation module may be used to:

[0155] For every two points, obtain the probability that one point belongs to the geometric primitive where the other point is located;

[0156] Based on the probability that two points belong to the geometric primitive where the other point is located, a measure of whether the two points belong to the same geometric primitive is calculated.

[0157] In one possible implementation, the above building blocks may be used to:

[0158] Construct a consistent adjacency matrix based on the measure of whether each two points belong to the same geometric primitive;

[0159] Calculate the sum of the connection weights between each point in the target point cloud and all other points;

[0160] Construct a degree matrix based on the sum of the connection weights of each point;

[0161] A Laplacian matrix is constructed according to the consistent adjacency matrix and the degree matrix.

[0162] In one possible implementation, the above building blocks may be used to:

[0163] Constructing an undirected graph based on the points in the target point cloud, wherein the undirected graph is composed of the points in the target point cloud and the edges between the points;

[0164] For each point in the undirected graph, determine all points that have edges connected to the point;

[0165] Calculate the sum of the connection weights between the point and the points with connected edges.

[0166] In a possible implementation, the point cloud geometric primitive segmentation device may further include a merging module, which may be used to:

[0167] For every two geometric primitives, calculating the distances from each point in the target point cloud to the two geometric primitives;

[0168] Determine whether the two geometric primitives need to be merged based on the distances between each point and the two geometric primitives;

[0169] If merging is required, perform a merge operation on the two geometric primitives.

[0170] In a possible implementation, the above-mentioned merging module may be used to:

[0171] For each point in the target point cloud, calculating the difference between the distances from the point to the two geometric primitives;

[0172] Comparing the difference with a preset threshold to obtain a comparison result;

[0173] A confidence level is calculated based on the comparison results of all points, and the confidence level is compared with a set threshold. If the confidence level is greater than the set threshold, it is determined that the two geometric primitives need to be merged.

[0174] In one possible implementation, the above building blocks may be used to:

[0175] Determine the geometric primitive to which each point belongs based on the probability that each point belongs to each geometric primitive;

[0176] For each geometric primitive, construct a numerical representation based on the points belonging to the geometric primitive;

[0177] A segmentation loss function is constructed based on the numerical representation of each geometric primitive and the Laplacian matrix.

[0178] See also Figure 11, is a block diagram of the structure of an electronic device provided in an embodiment of the present invention. The electronic device may be a computer, server, tablet computer, or other device. The electronic device includes a memory, a processor, and a communication module. The memory, processor, and communication module are electrically connected to each other directly or indirectly to enable data transmission or exchange. For example, these components may be electrically connected to each other via one or more communication buses or signal lines.

[0179] Memory is used to store computer programs or data. Memory can include, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), and electrically erasable programmable read-only memory (EEPROM).

[0180] The processor is used to read / write 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.

[0181] 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.

[0182] 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 also include Figure 11 More or fewer components than shown, or with Figure 11 Different configurations shown.

[0183] Furthermore, an embodiment of the present invention also provides a computer-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are executed, the point cloud geometric primitive segmentation processing method provided in the above embodiment is implemented.

[0184] Specifically, the computer-readable storage medium can be a general-purpose storage medium, such as a removable disk or hard disk. When the computer program on the computer-readable storage medium is executed, the above-described point cloud geometric primitive segmentation processing method can be executed. Regarding the processes involved when the computer-readable storage medium and its executable instructions are executed, reference can be made to the relevant descriptions in the above-described method embodiments and will not be further described here.

[0185] 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 schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed may be through some communication interface, the indirect coupling or communication connection of the device or unit may be electrical, mechanical or other forms.

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

[0187] Furthermore, the functional modules in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.

[0188] It should be noted that if a function is implemented as a software module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or a portion of the 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, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, mobile hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0189] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any actual relationship or order between these entities or operations.

[0190] The foregoing description is merely an embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Those skilled in the art will readily appreciate that the present invention is susceptible to various modifications and variations. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.

Claims

1. A point cloud geometric primitive segmentation processing method, characterized in that: The method comprises: Using a plurality of different segmentation algorithms to perform geometric primitive segmentation on the target point cloud, and obtaining a segmentation result of each segmentation algorithm, wherein the segmentation result includes an equation of the geometric primitive 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 probability of each point belonging to each geometric primitive, calculate the measure of whether every two points belong to the same geometric primitive; Construct a Laplacian matrix based on the metric that every two points belong to the same geometric primitive, and construct a segmentation loss function based on the Laplacian matrix; The function value of the segmentation loss function of each segmentation algorithm is calculated, and the optimal segmentation algorithm is determined 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 comprises: Calculating 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, the probability that each point belongs to each geometric primitive is calculated 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 measure of whether every two points belong to the same geometric primitive based on the probability that each point belongs to each geometric primitive comprises: 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 two points belong to the geometric primitive where the other point is located, a measure of whether the two points belong to the same geometric primitive is calculated.

4. The point cloud geometric primitive segmentation processing method according to claim 1, characterized in that: The step of constructing a Laplacian matrix according to the metric of each two points belonging to the same geometric primitive comprises: Construct a consistent adjacency matrix based on the measure of whether each 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; A Laplacian matrix is constructed according to the consistent adjacency matrix and the degree matrix.

5. The point cloud geometric primitive segmentation processing method according to claim 4, characterized in that: 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 based on the points in the target point cloud, wherein 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 points that have edges connected to the point; Calculate the sum of the connection weights between the point and the points with connected edges.

6. The point cloud geometric primitive segmentation processing method according to claim 1, characterized in that: 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 the two geometric primitives; Determine whether the two geometric primitives need to be merged based on the distances between each point and the two geometric primitives; If merging is required, a merge operation is performed on the two geometric primitives.

7. The point cloud geometric primitive segmentation processing method according to claim 6, characterized in that: The step of judging whether the two geometric primitives need to be merged based on the distances from each point to the two geometric primitives includes: For each point in the target point cloud, calculating the difference between the distances from the point to the two geometric primitives; Comparing the difference with a preset threshold to obtain a comparison result; A confidence level is calculated based on the comparison results of all points, and the confidence level is compared with a set threshold. If the confidence level 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 a segmentation loss function based on the Laplace 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; A segmentation loss function is constructed based on the numerical representation of each geometric primitive and the Laplacian matrix.

9. A point cloud geometric primitive segmentation processing device, characterized in that: The device comprises: A segmentation module is used to segment the target point cloud into geometric primitives using a plurality of different segmentation algorithms, and obtain a segmentation result of each segmentation algorithm, wherein the segmentation result includes an equation of the geometric primitive obtained by segmentation; a calculation module, configured to calculate, for each segmentation result, the probability that each point in the target point cloud belongs to each geometric primitive; The calculation module is further configured to calculate a measure of whether every two points belong to the same geometric primitive based on the probability that each point belongs to each geometric primitive; A construction module is used to construct a Laplacian matrix according to the metric that every two points belong to the same geometric primitive, and to 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.

10. An electronic device, characterized in that: The electronic device comprises one or more storage media and one or more processors communicating with the storage media, wherein the one or more storage media store machine-executable instructions executable by the processors. When the electronic device is running, the processor executes the machine-executable instructions to perform the method described in any one of claims 1 to 8.

Citation Information

Patent Citations

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

    CN106228539A

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

    CN118537564A