Point cloud segmentation method and apparatus, storage medium, and electronic device

By determining the local plane curvature characteristics and density of the point cloud, combining the relative distance value, and using the moving least squares method and normal weighted function, the problem of inaccurate precision in point cloud segmentation is solved, and a more efficient point cloud segmentation effect is achieved.

WO2025200525A1PCT designated stage Publication Date: 2025-10-02CHINA TELECOM BESTPAY CO LTD

Patent Information

Application Number
PCT/CN2024/135595
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-03-27
Filing Date
2024-11-29
Publication Date
2025-10-02

AI Technical Summary

Technical Problem

The existing point cloud segmentation algorithm is not ideally adaptable to complex scene structures and object shapes, which leads to the problems of under-segmentation, over-segmentation and inaccurate segmentation accuracy in plane segmentation methods.

Method used

By determining the local plane curvature characteristics and local density of the target sample points and combining them with the candidate relative distance values, the spatial point cloud is segmented. The moving least squares method is used to fit the local plane and the normal weighting function is used to improve the fitting performance. The kd-tree structure is used to accelerate the neighborhood point search. The local density and relative distance values ​​are combined for clustering and merging.

Benefits of technology

The accuracy and precision of point cloud segmentation are improved, and the local structure and distribution characteristics of point clouds can be better identified, achieving more accurate spatial point cloud segmentation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024135595_02102025_PF_FP_ABST
    Figure CN2024135595_02102025_PF_FP_ABST
Patent Text Reader

Abstract

The present application discloses a point cloud segmentation method and apparatus, a storage medium, and an electronic device. The method comprises: for a target sample point in a spatial point cloud, determining a curvature feature of a local plane corresponding to the target sample point in the spatial point cloud; on the basis of the curvature feature, determining a local density corresponding to the local plane; on the basis of candidate relative distance values between a plurality of other sample points and the target sample point, determining a target relative distance value corresponding to the target sample point, wherein the plurality of other sample points are sample points other than the target sample point in the spatial point cloud; and on the basis of the local density and the target relative distance value, segmenting the spatial point cloud to obtain a spatial point cloud segmentation result.
Need to check novelty before this filing date? Find Prior Art

Description

Point cloud segmentation method, device, storage medium and electronic device

[0001] Related applications

[0002] This application claims priority to Chinese patent application number 202410361052.5, filed on March 27, 2024, entitled “Point cloud segmentation method, device, storage medium and electronic device,” the entire text of which is hereby incorporated by reference. Technical Field

[0003] The present application relates to the technical field of three-dimensional point cloud segmentation, and in particular to a point cloud segmentation method, device, storage medium and electronic device. Background Art

[0004] Point cloud segmentation technology divides point cloud data. Point cloud data within the same segmented area typically share similar characteristic attributes (such as geometric features and texture characteristics). It has wide applications in fields such as 3D model reconstruction, autonomous driving, and virtual reality. Related technologies are not ideally adaptable to complex scene structures and object morphologies, making it difficult for segmentation algorithms to distinguish the boundaries of different objects or regions. Consequently, the plane segmentation methods provided by these technologies are prone to under-segmentation, over-segmentation, and inaccurate segmentation accuracy.

[0005] To address the above-mentioned problems, no effective solutions have been proposed so far. Summary of the Invention

[0006] The embodiments of the present application provide a point cloud segmentation method, device, storage medium, and electronic device to at least solve the technical problem of unsatisfactory accuracy of spatial point cloud segmentation existing in the related art.

[0007] According to one aspect of an embodiment of the present application, a point cloud segmentation method is provided, comprising: determining, for a target sample point in a spatial point cloud, a curvature feature of a local plane corresponding to the target sample point in the spatial point cloud; determining, based on the curvature feature, a local density corresponding to the local plane; determining, based on candidate relative distance values ​​between a plurality of other sample points and the target sample point, a target relative distance value corresponding to the target sample point, wherein the plurality of other sample points are sample points other than the target sample point in the spatial point cloud; and segmenting the spatial point cloud based on the local density and the target relative distance value to obtain a spatial point cloud segmentation result.

[0008] In some embodiments, the local plane includes a plurality of neighborhood sample points other than the target sample point, and the plurality of other sample points include the plurality of neighborhood sample points, and determining the curvature characteristics of the local plane corresponding to the target sample point in the spatial point cloud includes: determining a target universal function, wherein the target universal function represents the degree of deviation between the characteristic values ​​corresponding to the plurality of neighborhood sample points and the fitting function value corresponding to the target sample point, the value of the target universal function depends on the value of the fitting function value as an independent variable, and the fitting function value is an approximate representation of the target sample point on the local plane; when the target universal function takes the minimum value, determining the fitting function value to be the target value; when the fitting function value takes the target value, the normal vector corresponding to the target sample point; and determining the curvature characteristics based on the normal vector.

[0009] In some embodiments, determining the target universal function includes: determining the Euclidean distances between the multiple neighborhood sample points and the target sample point respectively; determining the weight function values ​​corresponding to the multiple neighborhood sample points respectively based on the Euclidean distances; generating the target universal function based on the weight function values ​​and eigenvalues ​​corresponding to the multiple neighborhood sample points respectively, and the fitting function value corresponding to the target sample point.

[0010] In some embodiments, determining the local density corresponding to the local plane based on the curvature feature includes:

[0011] Determine a first sample point set representing a local distribution feature corresponding to the target sample point, and a second sample point set representing a local neighborhood feature corresponding to the target sample point, wherein the local plane includes sample points in the first sample point set and the second sample point set; determine a plurality of candidate sample points that are the intersection of the first sample point set and the second sample point set; determine curvature features corresponding to the plurality of candidate sample points respectively by determining the curvature feature corresponding to the target sample point; and determine the local density based on the curvature feature corresponding to the target sample point and the curvature features corresponding to the plurality of candidate sample points respectively.

[0012] In some embodiments, the curvature feature is a normal vector, and determining the local density based on the curvature feature corresponding to the target sample point and the curvature features corresponding to the multiple candidate sample points includes: determining the cosine value between the normal vectors corresponding to the multiple candidate sample points and the normal vector corresponding to the target sample; and determining the local density based on the cosine values ​​corresponding to the multiple candidate sample points and a predetermined screening threshold.

[0013] In some embodiments, determining the target relative distance value corresponding to the target sample point based on the candidate relative distance values ​​between the target sample point and the other sample points includes: taking the local density corresponding to the target sample point in the local plane as the target local density; determining the other local densities corresponding to the other sample points in the local plane by adopting the method of determining the target local density; when the target local density is the maximum value among the other local densities corresponding to the other sample points, determining the maximum value among the candidate relative distance values ​​corresponding to the other sample points as the target relative distance value; when the target local density is not the maximum value among the other local densities corresponding to the other sample points, determining the minimum value among the candidate relative distance values ​​corresponding to the other sample points as the target relative distance value.

[0014] In some embodiments, the spatial point cloud is segmented based on the local density and the target relative distance value to obtain a spatial point cloud segmentation result, including: determining an initial cluster center based on the local density and the target relative distance value; allocating sample points in the spatial point cloud according to the initial clustering to obtain a plurality of initial cluster sets corresponding to the initial clustering; merging the plurality of initial cluster sets to obtain the initial clustering result; performing an outlier test on the initial clustering result to obtain an outlier test result; and updating the initial clustering result based on the outlier test result to obtain the spatial point cloud segmentation result.

[0015] According to another aspect of an embodiment of the present application, a point cloud segmentation device is provided, comprising: a curvature determination module for determining, for a target sample point in a spatial point cloud, a curvature feature of a local plane corresponding to the target sample point in the spatial point cloud; a local density determination module for determining, based on the curvature feature, a local density corresponding to the local plane; a relative distance determination module for determining, based on candidate relative distance values ​​between a plurality of other sample points and the target sample point, a target relative distance value corresponding to the target sample point, wherein the plurality of other sample points are sample points in the spatial point cloud other than the target sample point; and a segmentation execution module for segmenting the spatial point cloud based on the local density and the target relative distance value to obtain a spatial point cloud segmentation result.

[0016] According to another aspect of an embodiment of the present application, a non-volatile storage medium is provided, wherein the non-volatile storage medium stores a plurality of computer instructions, and when the plurality of computer instructions are executed by a processor, the processor enables the processor to implement the point cloud segmentation method described in any one of the aforementioned embodiments.

[0017] According to another aspect of an embodiment of the present application, an electronic device is provided, comprising: one or more processors and a memory, wherein the memory is used to store one or more computer programs, and when the one or more computer programs are executed by the one or more processors, the one or more processors implement the point cloud segmentation method described in any of the aforementioned embodiments.

[0018] In an embodiment of the present application, for a target sample point in a spatial point cloud, the curvature characteristics of the local plane corresponding to the target sample point in the spatial point cloud are determined; based on the curvature characteristics, the local density corresponding to the local plane is determined; based on the candidate relative distance values ​​between multiple other sample points and the target sample point, the target relative distance value corresponding to the target sample point is determined, wherein the multiple other sample points are sample points in the spatial point cloud other than the target sample point; based on the local density and the target relative distance value, the spatial point cloud is segmented to obtain a spatial point cloud segmentation result. The purpose of using local density and relative distance values ​​to improve the ability to characterize the spatial distribution and geometric characteristics of the spatial point cloud is achieved, and the technical effect of improving the accuracy of spatial point cloud segmentation is achieved, thereby solving the technical problem of unsatisfactory spatial point cloud segmentation accuracy existing in the related art. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technology descriptions. Obviously, the drawings described below are only some embodiments of this application. For those of ordinary skill in the art, other drawings can be derived from these drawings without inventive effort.

[0020] FIG1 is a flowchart of a point cloud segmentation method provided according to an embodiment of the present application.

[0021] FIG2 is a schematic flowchart of a point cloud segmentation method provided according to an embodiment of the present application.

[0022] FIG3 is a schematic diagram of a point cloud segmentation device provided according to an embodiment of the present application. DETAILED DESCRIPTION

[0023] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.

[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0025] According to an embodiment of the present application, an embodiment of a method for point cloud segmentation is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0026] FIG1 is a flow chart of a point cloud segmentation method according to an embodiment of the present application. As shown in FIG1 , the method includes the following steps:

[0027] Step S102: for a target sample point in the spatial point cloud, determining a curvature feature of a local plane corresponding to the target sample point in the spatial point cloud.

[0028] It can be understood that extracting the curvature features of the local plane around the target sample point describes the rate of change of the point cloud and is helpful for identifying the local structure of the point cloud. By calculating the geometric properties of the target sample point, it can help identify flat areas, curved areas, or sharp corners. By extracting curvature features, it is helpful to understand the geometric characteristics of the local plane where the target sample point is located, providing support for subsequent segmentation operations and improving the precision and accuracy of segmentation.

[0029] In an optional embodiment, the local plane includes multiple neighborhood sample points other than the target sample point, and the multiple other sample points include multiple neighborhood sample points, and the curvature characteristics of the local plane corresponding to the target sample point in the spatial point cloud are determined, including: determining a target universal function, wherein the target universal function represents the degree of deviation between the characteristic values ​​corresponding to the multiple neighborhood sample points and the fitting function value corresponding to the target sample point, the value of the target universal function depends on the value of the fitting function as an independent variable, and the fitting function value is an approximate representation of the target sample point on the local plane; when the target universal function takes the minimum value, determining the fitting function value to be the target value; when the fitting function takes the target value, the normal vector corresponding to the target sample point; and determining the curvature characteristics based on the normal vector.

[0030] It can be understood that determining a target universal function is used to quantify the degree of deviation between the eigenvalues ​​corresponding to multiple neighborhood sample points and the value of the fitting function for the target sample point on the local plane. The fitting function is an approximate representation of the position of the target sample point on the local plane, and its value is the coordinates or other spatial position parameters of the target sample point on the local plane. The value of the target universal function depends on the value of the fitting function as the independent variable, which means that the value of the target universal function will change with the change of the fitting function value. In order to find the fitting function value that minimizes the value of the target universal function, that is, the target value. When the fitting function value is the target value, the normal vector corresponding to the target sample point can be obtained. The normal vector is a vector perpendicular to the local plane and describes directionality. Since the fitting function represents the position of the target sample point on the local plane, the normal vector can be calculated based on this fitting function. Determining the curvature feature based on the normal vector describes the degree of curvature of the local plane and is closely related to the change of the normal vector. Through the above process, the moving least squares method is introduced to fit the local plane of the sample point to calculate the normal vector of the sample point. This takes into account the influence of multiple neighborhood sample points within the local plane (i.e., the local area), thereby more accurately describing the geometric shape around the target sample point.

[0031] It's important to note that Moving Least Squares (MLS) is a technique for local surface reconstruction that, compared to traditional least squares methods, better handles local shape changes and discontinuities. By constructing a fitting function around target sample points, MLS can more accurately fit local planes or surfaces and calculate the normal vectors of the target sample points, helping to capture more local details.

[0032] In some embodiments, the above-mentioned fitting function value is obtained based on a predetermined fitting function, which may include a normal weighting function. The normal weighting function can assign different weights based on the distance between the sample points and the fitting center point, so that closer sample points have a greater impact on the fitting result. In this way, the interference of distant sample points on the local fitting can be reduced, thereby obtaining a smoother and more accurate fitting result.

[0033] Establish the fitting function of the target sample point and record it as f x , f x In a local area (ie, local plane) of the current target sample point, it can be approximately represented as follows.

[0034] Among them, x represents the target sample point, is the domain sample point in the k-neighborhood of the target sample point, a(x)=[a1(x),a2(x),…,a m (x)] Trepresents the matrix of unknown coefficients, represents the basis function, and m is the number of basis function terms (m = 4 below). Since the spatial point cloud data belongs to the three-dimensional space, the first-order form of the basis function is p(x) = [1, x, y, z] T , then f x It can be rewritten as follows.

[0035] f x =a1(x)+x i a2(x)+y i a3(x)+z i a4(x)

[0036] Among them, x i represents the i-th domain sample point in the k-neighborhood of the target sample point, y i Indicates that the domain sample point at the i-th location is The horizontal axis (y axis) at i Indicates that the domain sample point at the i-th location is To obtain the precise local plane of the target sample point, it is necessary to minimize the weighted average sum of the characteristic values ​​of the sample points in each area within the local area where the target sample point is located and the fitting function value, that is, to minimize the target universal function.

[0037] In some embodiments, before determining the curvature characteristics of the local plane where the target sample point is located, a kd-tree structure is used to quickly search for neighboring points in the point cloud data. A kd-dimension tree is a tree-like data structure that stores sample points in k-dimensional space for fast retrieval. By constructing a kd-tree, neighboring sample points of the target sample point in space can be quickly and efficiently found, which helps improve search efficiency in large-scale spatial point clouds.

[0038] In an optional embodiment, determining the target universal function includes: determining the Euclidean distances between a plurality of neighborhood sample points and the target sample point; determining the weight function values ​​corresponding to the plurality of neighborhood sample points based on the Euclidean distances; and generating the target universal function based on the weight function values ​​and eigenvalues ​​corresponding to the plurality of neighborhood sample points and the fitting function value corresponding to the target sample point.

[0039] It can be understood that the Euclidean distances between multiple neighborhood sample points and the target sample point are determined. Euclidean distance represents the straight-line distance between two points in space. Calculating the Euclidean distances between the neighborhood sample points and the target sample point is intended to quantify the spatial relationship between them and provide a basis for subsequently determining the weight function value. Based on the Euclidean distances, weight function values ​​corresponding to each of the multiple neighborhood sample points are determined. The weight function, which changes according to distance, is used to assign a weight to each neighborhood sample point. This weight reflects the contribution of the sample point to the local plane where the target sample point to be fitted resides. The closer the neighborhood sample point is to the target sample point, the greater its weight and the greater its influence on the fitting result. Through the above processing, based on the weight function values ​​and eigenvalues ​​corresponding to the multiple neighborhood sample points, as well as the fitting function value corresponding to the target sample point, a target universal function is generated. This function can reflect the characteristics of the local plane and depends on the value of the fitting function. The goal is to minimize the value of the universal function to obtain the optimal fitting result. The normal vector of the target sample point is then calculated to obtain the curvature feature. The local neighborhood information and weight function can be combined to more accurately describe the geometric characteristics of the local plane and improve the accuracy and reliability of spatial point cloud segmentation.

[0040] In some embodiments, the target functional may be a Jacobian (J is the functional value), which can be expressed as follows:

[0041] Among them, w(||xx i ||) represents the domain sample point x at the i-th location i The weight function, ||xx i || represents the fitting point (i.e., target sample point) x and the domain sample point x at the i-th location i The Euclidean distance of , n represents the number of sample points in multiple fields within the neighborhood affected by the point to be fitted (i.e., the target sample point) x.

[0042] In the process of finding the minimum value of the Jacobian form of the objective function, firstly take the derivative of J and let J can obtain the minimum value, and the undetermined coefficient matrix a(x) can be obtained as follows. a=(BWB T ) -1 BW

[0043] Where B is the matrix of quadratic basis functions, W is the diagonal matrix of weight functions n×n, y=[y1,y1,…,y n ] T .

[0044] The normal weighting function is used to enhance the smoothness and continuity of the local fitting plane, which can be expressed as follows:

[0045] Where r = || xx i || / d m is the relative distance, d m is the radius of the influence domain, σ is the shape parameter, and by substituting it into the functional Jacobian formula, we can obtain the unknown coefficient matrix a(x), and the normal vector of the target sample point is a(x).

[0046] In some embodiments, the feature value is used to describe the coordinate value of the neighborhood sample point in the local coordinate system, such as the x, y, z axis coordinates, or other attributes that can describe its spatial position.

[0047] Step S104: Determine the local density corresponding to the local plane based on the curvature feature.

[0048] It can be understood that after obtaining the curvature feature, the curvature feature is used to calculate the local density corresponding to the local plane. The local density reflects the density of the point cloud in a specific area and describes the distribution of points around the target sample point.

[0049] In an optional embodiment, based on the curvature feature, the local density corresponding to the local plane is determined, including: determining a first sample point set representing the local distribution feature corresponding to the target sample point, and a second sample point set representing the local neighborhood feature corresponding to the target sample point, wherein the local plane includes sample points in the first sample point set and the second sample point set; determining multiple candidate sample points of the intersection between the first sample point set and the second sample point set; determining the curvature features corresponding to the multiple candidate sample points respectively by adopting the method of determining the curvature feature corresponding to the target sample point; and determining the local density based on the curvature feature corresponding to the target sample point and the curvature features corresponding to the multiple candidate sample points respectively.

[0050] It can be understood that in the process of determining the local density corresponding to the local plane based on the curvature feature, the local distribution characteristics and local neighborhood characteristics around the target sample point are taken into account. A first set of sample points representing the local distribution characteristics corresponding to the target sample point and a second set of sample points representing the local neighborhood characteristics corresponding to the target sample point are determined. The sample points in these two sets are all contained in the local plane where the target sample point is located. Multiple candidate sample points are determined at the intersection of the two sample point sets. These candidate sample points exist in both the first set of sample points and the second set of sample points and exhibit both local distribution characteristics and local neighborhood characteristics.

[0051] Determining the curvature features corresponding to the target sample point can be used to determine the curvature features corresponding to each of the multiple candidate sample points. This can be achieved using methods such as the moving least squares method. Specifically, a local plane is fitted to each candidate sample point and its curvature features are calculated. Each candidate sample point will have a corresponding curvature feature value. Through the above process, the local density is determined based on the curvature features corresponding to the target sample point and the curvature features corresponding to the multiple candidate sample points. This process can comprehensively consider the curvature information of the target sample point and its surrounding candidate sample points. One possible method is to calculate statistics (such as the mean, median, etc.) of the curvature features of the candidate sample points and compare them with the curvature features of the target sample point to obtain an estimate of the local density. The level of local density can reflect the shape complexity and point distribution of the region where the target sample point is located. This method, which considers local distribution features and local neighborhood features, facilitates accurate determination of the local density of the local plane where the target sample point is located.

[0052] In some embodiments, the first set of sample points is obtained using a k-nearest neighbor method, and the second set of sample points is obtained using an inverse nearest neighbor method. The k-nearest neighbor method accurately reflects the local distribution characteristics of the sample points in space, while the inverse nearest neighbor method examines its neighborhood from a global perspective, reducing the limitations of the local neighborhood.

[0053] In an optional embodiment, the curvature feature is a normal vector, and the local density is determined based on the curvature feature corresponding to the target sample point and the curvature features corresponding to multiple candidate sample points, including: determining the cosine value between the normal vectors corresponding to the multiple candidate sample points and the normal vector corresponding to the target sample; and determining the local density based on the cosine values ​​corresponding to the multiple candidate sample points and a predetermined screening threshold.

[0054] It can be understood that the curvature feature is embodied as a normal vector, which is a vector perpendicular to the local plane and can reflect the rate of change of the plane. Local density can be determined based on the normal vector corresponding to the target sample point and the normal vectors corresponding to multiple candidate sample points. By determining the cosine value between the normal vectors corresponding to each of the candidate sample points and the normal vector corresponding to the target sample, the angle between the two vectors can be reflected, thereby quantifying the similarity or difference between the normal vectors of the candidate sample points and the normal vector of the target sample point. Local density is determined based on the cosine values ​​corresponding to the multiple candidate sample points and a predetermined screening threshold. If the cosine value between the normal vector of a candidate sample point and the normal vector of the target sample point is greater than or equal to the screening threshold, the candidate sample point is considered to have similar directionality to the target sample point on the local plane and can be included in the local density processing. This helps to eliminate points that are spatially close but have significantly different directions, thereby improving the accuracy of local density calculation. The local density is determined based on the number or distribution of candidate sample points that meet the screening criteria and is calculated as the ratio of the number of candidate sample points that meet the criteria to the total number of candidate sample points. The size of the local density obtained through the above processing reflects the shape complexity and point distribution of the local plane where the target sample point is located, thereby more comprehensively describing the geometric characteristics of the local plane in the point cloud data.

[0055] It should be noted that the similarity or difference between the normal vector of the candidate sample point and the normal vector of the target sample point is considered as follows: the closer the cosine value is to 1, the smaller the angle between the two normal vectors is, that is, they are more similar. The closer the cosine value is to -1, the larger the angle between the two normal vectors is, that is, they are less similar.

[0056] In some embodiments, based on the three-dimensional data of the spatial point cloud, the local density is defined using k-nearest neighbors, inverse neighbors, and normal vector information. In the intersection of the k-nearest neighbors (the first set of sample points) and the inverse neighbors (the second set of sample points), candidate sample points whose cosine values ​​of the normal vectors of the target sample points are less than a predetermined screening threshold are found and excluded. The k-nearest neighbors can accurately reflect the local distribution characteristics of the samples in space, while the inverse neighbors can reduce the limitations of the local neighborhoods based on a global perspective. The Euclidean distance between all sample points is calculated by constructing a kd tree structure, which is recorded as d(x, x). i ), find the k sample points closest to x from all data points in the spatial point cloud, which is defined as the nearest neighbor set of x, that is, the first sample point set, denoted as NN k (x). If x i ∈NN k (x), then x is x i The inverse neighbor of RNN is defined as: k (x i )={x∈X|x i ∈NNk (x)}

[0057] The local density is defined as follows:

[0058] ρ is the local density of x, λ is the predetermined screening threshold, cos(x,x i ) for x and x i The cosine of the normal vector.

[0059] Step S106: determining a target relative distance value corresponding to the target sample point based on candidate relative distance values ​​between the other sample points and the target sample point, wherein the other sample points are sample points other than the target sample point in the spatial point cloud.

[0060] It can be understood that by determining the target relative distance value, the spatial position information of the target sample point in the overall spatial point cloud can be described. The above processing is conducive to identifying point groups with similar position attributes, thereby improving the continuity and consistency of segmentation.

[0061] In an optional embodiment, based on the candidate relative distance values ​​between multiple other sample points and the target sample point, the target relative distance value corresponding to the target sample point is determined, including: taking the local density corresponding to the target sample point in the local plane as the target local density; determining other local densities corresponding to the multiple other sample points in the local plane by adopting the method of determining the target local density; when the target local density is the maximum value among the other local densities corresponding to the multiple other sample points, determining the maximum value among the candidate relative distance values ​​corresponding to the multiple other sample points as the target relative distance value; when the target local density is not the maximum value among the other local densities corresponding to the multiple other sample points, determining the minimum value among the candidate relative distance values ​​corresponding to the multiple other sample points as the target relative distance value.

[0062] It can be understood that when determining the target relative distance value corresponding to the target sample point, it is necessary to combine the local density information of the local plane where the target sample point is located. The local density corresponding to the target sample point in the local plane is used as the target local density, which reflects the shape complexity and point distribution of the local plane where the target sample point is located. The method of determining the target local density is used to determine the other local densities corresponding to the local planes of multiple other sample points. Comparing the target local density with the other local densities of other sample points, if the target local density is the maximum value among the other local densities corresponding to multiple other sample points, it is helpful to identify those isolated points far away from other high-density areas, and determine the maximum value among the candidate relative distance values ​​corresponding to multiple other sample points as the target relative distance value. The maximum value is selected to reflect the degree of distance of the target sample point relative to other sample points, because when the target local density is the largest, the target sample point may be a prominent point in the local area and can be used as a candidate for the cluster center.

[0063] Conversely, if the target local density is not the maximum value among the other local densities corresponding to multiple other sample points, it helps to identify cluster structures in areas with large density variations. The minimum value is determined among the candidate relative distance values ​​corresponding to the multiple other sample points and used as the target relative distance value. The minimum value is selected to reflect the proximity of the target sample point to the other sample points. Through the above processing, the target relative distance value of the target sample point is determined by combining local density information and candidate relative distance values. This is based on the complexity of the local area and takes into account the relative position relationship of the target sample point with other sample points, which is conducive to providing accurate point cloud data processing results.

[0064] In some embodiments, the target relative distance δ can be determined based on the magnitude of the local density. When the target local density ρ corresponding to the target sample point is the maximum local density, the target relative distance δ is the maximum of all distances between the target sample point and other sample points. When the target local density ρ corresponding to the target sample point is not the maximum local density, δ is the minimum distance between the target sample point and the point whose local density is greater than that of the target sample point. This can be expressed as follows:

[0065] Among them, I S ={k∈I S :ρ k >ρ}, different points have the same maximum local density, which leads to uncertainty in δ. To avoid this, a random number ω can be added to the same maximum local density, which can be set to ω∈(0.005,0.006) according to specific needs. Then, the relative distance of each sample point (candidate relative distance) can be calculated using the above formula.

[0066] Step S108: Segment the spatial point cloud based on the local density and the target relative distance value to obtain a spatial point cloud segmentation result.

[0067] It can be understood that point cloud segmentation based on local density and target relative distance values ​​divides the spatial point cloud into different regions or subsets, each of which has similar characteristics or attributes. By considering local density and target relative distance values, different parts of the spatial point cloud can be more effectively distinguished, resulting in more accurate segmentation results.

[0068] In an optional embodiment, the spatial point cloud is segmented based on the local density and the target relative distance value to obtain a spatial point cloud segmentation result, including: determining the initial cluster center based on the local density and the target relative distance value; allocating the sample points in the spatial point cloud according to the initial clustering to obtain multiple initial cluster sets corresponding to the initial clustering; merging the multiple initial cluster sets to obtain an initial clustering result; performing an outlier test on the initial clustering result to obtain an outlier test result; and updating the initial clustering result based on the outlier test result to obtain a spatial point cloud segmentation result.

[0069] As can be understood, segmenting a spatial point cloud based on local density and target relative distance values ​​identifies and extracts different structures and features within the point cloud. The local density and target relative distance values ​​of target sample points can be determined for each sample point in the spatial point cloud, thereby determining the initial cluster centers. Sample points with high local density and high target relative distance values ​​are more likely to become cluster centers, being both prominent in the local area and maintaining a certain distance from other high-density areas. After determining the initial cluster centers, sample points in the spatial point cloud are assigned to the cluster corresponding to the nearest cluster center. Multiple initial clusters may need to be merged to optimize the clustering results. Outlier testing is used to identify and address isolated points or noise points that do not belong to any cluster, thereby preventing them from negatively impacting the accuracy of the clustering results. Based on the results of the outlier testing, the initial clustering results are updated. Identified outliers are removed from the clusters, and clusters may be further merged or split as needed. The updated clustering results are the final spatial point cloud segmentation results, reflecting the distribution of different structures and features within the spatial point cloud data. Through the above processing, the spatial point cloud can be effectively segmented based on the local density and the target relative distance value.

[0070] In some embodiments, the sample point assignment process may be based on a distance metric, such as Euclidean distance, to ensure that each sample point is assigned to the nearest cluster.

[0071] In some embodiments, the purpose of the above merging process is to eliminate clusters that are too close or overlapping due to noise or uneven data distribution. It can be performed based on the distance between clusters, density difference, shape similarity or other appropriate criteria.

[0072] In some embodiments, the outlier test may be implemented by calculating the distance, density, or other relevant indicators from each point to the cluster to which it belongs, and identifying points that do not meet a preset threshold as outliers.

[0073] In some embodiments, the local density and target relative distance value of the target sample point are determined, and the local density and target relative distance value of each sample in the spatial point cloud can be determined. Add v to identify the sample point in the point cloud space, and for each sample point, the local density and target relative distance value of each sample can be determined according to γ v =ρ v ·δ v The size of γ determines the cluster center, that is, the cluster center is mainly composed of larger γ v Sure.

[0074] After selecting the initial cluster center by local density and relative distance, the remaining points are assigned to the corresponding clusters according to the allocation strategy of the DPC algorithm to obtain the cluster set of the initial clustering. Each cluster may contain multiple density peak points, which need to be merged. The DPC plane segmentation algorithm is an extension of the Density Peaks Clustering (DPC) algorithm, which is used to process planar point cloud data or data point sets in two-dimensional space. The traditional DPC algorithm is mainly used for clustering three-dimensional or higher-dimensional point cloud data, while the DPC plane segmentation algorithm clusters and segments data points on a two-dimensional plane.

[0075] The similarity between clusters and the inverse nearest neighbor of each cluster’s boundary points are used to merge similar clusters. The similarity between clusters can be expressed as The numerator is the number of pairs of points that are natural nearest neighbors in the two clusters, and the denominator is the average number of natural nearest neighbors of the two clusters. p and q represent multiple initial cluster sets. C p represents an initial cluster set, C q represents another initial cluster set. If S(C p ,C q )≥1, it means that the two clusters are similar. At this time, when the difference between the number of k-nearest neighbor points and the number of inverse neighbor points of the boundary points of the two clusters is less than the acceptable threshold k, the two clusters are merged, otherwise they are not merged. p ,C q )<1, the two clusters do not need to be merged.

[0076] For the initial clustering results, the initial clusters are further refined and segmented based on the model fitting method to finally complete the plane segmentation. First, according to the initial clustering results, three sample points are randomly selected from each cluster to fit the plane, for example, expressed as Ax+By+Cz+D=0. The other sample points in each cluster are tested for outliers. If the distance between the remaining sample points and the plane is greater than the predetermined distance, for example, expressed as When 25% or more of the sample points in each cluster are outliers, the plane fitting is invalid and new sample points are selected for fitting. When less than 25% of the sample points in each cluster are outliers, these outliers are removed to complete the precise plane segmentation as an update to the initial clustering result.

[0077] Through the above-mentioned step S102, for a target sample point in a spatial point cloud, the curvature characteristics of the local plane corresponding to the target sample point in the spatial point cloud are determined; step S104, based on the curvature characteristics, the local density corresponding to the local plane is determined; step S106, based on the candidate relative distance values ​​between a plurality of other sample points and the target sample point, the target relative distance value corresponding to the target sample point is determined, wherein the plurality of other sample points are sample points other than the target sample point in the spatial point cloud; step S108, based on the local density and the target relative distance value, the spatial point cloud is segmented to obtain a spatial point cloud segmentation result. This can achieve the purpose of using local density and relative distance values ​​to improve the ability to characterize the spatial distribution and geometric characteristics of the spatial point cloud, achieve the technical effect of improving the accuracy of spatial point cloud segmentation, and thus solve the technical problem of [keywords].

[0078] Based on the above embodiments and optional embodiments, the present application proposes an optional implementation method. FIG2 is a schematic flow chart of an optional point cloud segmentation method provided according to the embodiment of the present application. As shown in FIG2, step S1: using the kd tree structure to realize fast search of neighborhood points of point cloud data. In order to solve the problem of discontinuity and non-smoothness of fitting the local plane by the least squares method, the moving least squares method is used to fit the local plane of the sample point to calculate the normal vector of the sample point, and the normal weighting function is selected to increase its fitting performance and smoothness. The fitting function of the target sample point is established and recorded as f x , f x In a local area (i.e., local plane) of the current target sample point, it can be approximately expressed as:

[0079] Among them, x represents the target sample point, is the domain sample point in the k-neighborhood of the target sample point, a(x)=[a1(x),a2(x),…,a m (x)] T represents the matrix of unknown coefficients, represents the basis function, and m is the number of basis function terms (m = 4 below). Since the spatial point cloud data belongs to the three-dimensional space, the first-order form of the basis function is p(x) = [1, x, y, z] T , then f x Can be rewritten as: f x =a1(x)+x i a2(x)+y i a3(x)+z i a4(x)

[0080] Among them, x i represents the i-th domain sample point in the k-neighborhood of the target sample point, y i Indicates that the domain sample point at the i-th location is The horizontal axis (y axis) at i Indicates that the domain sample point at the i-th location is To obtain the precise local plane of the target sample point, it is necessary to minimize the weighted average sum of the characteristic values ​​of the sample points in each area within the local area where the target sample point is located and the fitting function value, that is, to minimize the target universal function.

[0081] The above target functional can be Jacobian (J is the functional value), which can be expressed as follows:

[0082] Among them, w(||xx i ||) represents the domain sample point x at the i-th location i The weight function, ||xx i || represents the fitting point (i.e., target sample point) x and the domain sample point x at the i-th location i The Euclidean distance of , n represents the number of sample points in multiple fields within the neighborhood affected by the point to be fitted (i.e., the target sample point) x.

[0083] In the process of finding the minimum value of the Jacobian form of the objective function, firstly take the derivative of J and let J can obtain the minimum value, and the undetermined coefficient matrix a(x) can be obtained as follows. a=(BWB T ) -1 BW

[0084] Where B is the matrix of quadratic basis functions, W is the diagonal matrix of weight functions n×n, y=[y1,y1,…,y n ] T .

[0085] The normal weighting function is used to enhance the smoothness and continuity of the local fitting plane, which can be expressed as follows:

[0086] Where r = || xx i || / d m is the relative distance, d m is the radius of the influence domain, σ is the shape parameter, and by substituting it into the functional Jacobian formula, we can obtain the unknown coefficient matrix a(x), and the normal vector of the target sample point is a(x).

[0087] Step S2: Improve the local density calculation method in the DPC algorithm. Based on the three-dimensional data of the spatial point cloud, use the k nearest neighbor, inverse nearest neighbor and normal vector information to define the local density. In the intersection of the k nearest neighbor (the first sample point set) and the inverse nearest neighbor (the second sample point set), find the candidate sample points whose cosine value of the normal vector of the target sample point is less than the predetermined screening threshold and exclude them. The K nearest neighbor can accurately reflect the local distribution characteristics of the sample in space, while the inverse nearest neighbor checks the neighborhood based on a global perspective, which can reduce the limitations of the local neighborhood. The Euclidean distance between all sample points is calculated by constructing a kd tree structure, which is recorded as d(x,x i ), find the k sample points closest to x from all data points in the spatial point cloud, which is defined as the nearest neighbor set of x, that is, the first sample point set, denoted as NN k (x). If x i ∈NN k (x), then x is x i The inverse neighbor of RNN is defined as: k (x i )={x∈X|x i ∈NN k (x)}

[0088] The local density is defined as follows:

[0089] ρ is the local density of x, λ is the predetermined screening threshold, cos(x,x i ) for x and x i The cosine of the normal vector.

[0090] Step S3: The target relative distance δ can be determined based on the local density. When the target local density ρ corresponding to the target sample point is the maximum local density, the target relative distance δ is the maximum value of all distances between the target sample point and other sample points. When the target local density ρ corresponding to the target sample point is not the maximum local density, δ is the minimum distance between the target sample point and the point whose local density is greater than that of the target sample point. It can be expressed as follows:

[0091] Among them, I S ={k∈I S :ρ k>ρ}, different points have the same maximum local density, resulting in uncertainty in δ. To avoid this, a random number ω can be added to the same maximum local density, which can be set to ω∈(0.005,0.006) according to specific needs. Then, the relative distance of each sample point (candidate relative distance) can be calculated by the above formula. By determining the local density and target relative distance value of the target sample point, the local density and target relative distance value of each sample in the spatial point cloud can be determined. Add v to identify the sample point in the point cloud space. For each sample point, the local density and target relative distance value of each sample can be determined according to γ v =ρ v ·δ v The size of γ determines the cluster center, that is, the cluster center is mainly composed of larger γ v Sure.

[0092] Step S4: After selecting the initial cluster center by local density and relative distance, the remaining points are assigned to the corresponding clusters according to the allocation strategy of the DPC algorithm to obtain the cluster set of the initial cluster. Each cluster may contain multiple density peak points, which need to be merged. The similarity between clusters and the inverse nearest neighbor of the boundary points of each cluster are used to merge similar clusters. The above-mentioned similarity between clusters can be expressed as The numerator is the number of pairs of points that are natural nearest neighbors in the two clusters, and the denominator is the average number of natural nearest neighbors of the two clusters. p and q represent multiple initial cluster sets. C p represents an initial cluster set, C q represents another initial cluster set. If S(C p ,C q )≥1, it means that the two clusters are similar. At this time, when the difference between the number of k-nearest neighbor points and the number of inverse neighbor points of the boundary points of the two clusters is less than the acceptable threshold k, the two clusters are merged, otherwise they are not merged. p ,C q )<1, the two clusters do not need to be merged.

[0093] Step S5: For the initial clustering results, the initial clusters are further refined and segmented by the model fitting method to finally complete the plane segmentation. First, according to the initial clustering results, three sample points are randomly selected from each cluster to fit the plane, for example, expressed as Ax+By+Cz+D=0. The other sample points in each cluster are tested for outliers. If the distance between the remaining sample points and the plane is greater than the predetermined distance, for example, expressed as When 25% or more of the sample points in each cluster are outliers, the plane fitting is invalid and new sample points are selected for fitting. When less than 25% of the sample points in each cluster are outliers, these outliers are removed to complete the precise plane segmentation as an update to the initial clustering result.

[0094] The above optional implementation method achieves at least the following effects: using the moving least squares method to calculate the point cloud normal vector and the normal vector to represent the curvature, adding a normal weighting function to increase the smoothness and continuity of the local fitting plane, and making the normal vector estimation more accurate. And a complete normal vector and normal curvature calculation method is given. A new local density calculation method is constructed based on the k-nearest neighbor, inverse neighbor and normal vector, and the clustering effect is enhanced by the point cloud data features. A cluster merging method is performed, combining the similarity between clusters and the k-nearest neighbor and inverse neighbor relationship of the boundary points to merge the clusters by similarity, and combining the model fitting method and the DPC algorithm to complete the precise segmentation of the point cloud data plane, which can effectively improve the segmentation accuracy of the spatial point cloud.

[0095] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0096] This embodiment also provides a point cloud segmentation device, which is used to implement the above-mentioned embodiments and preferred implementations. Details that have already been described will not be repeated. As used below, the terms "module" and "device" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.

[0097] According to an embodiment of the present application, an embodiment of a device for implementing a point cloud segmentation method is also provided. FIG3 is a schematic diagram of a point cloud segmentation device according to an embodiment of the present application. As shown in FIG3 , the above-mentioned point cloud segmentation device includes: a curvature determination module 302, a local density determination module 304, a relative distance determination module 306, and a segmentation execution module 308. The device is described below.

[0098] The curvature determination module 302 is used to determine, for a target sample point in the spatial point cloud, a curvature feature of a local plane corresponding to the target sample point in the spatial point cloud;

[0099] A local density determination module 304 is connected to the curvature determination module 302 and is used to determine the local density corresponding to the local plane based on the curvature feature;

[0100] a relative distance determination module 306, connected to the local density determination module 304, for determining a target relative distance value corresponding to the target sample point based on candidate relative distance values ​​between a plurality of other sample points and the target sample point, wherein the plurality of other sample points are sample points other than the target sample point in the spatial point cloud;

[0101] The segmentation execution module 308 is connected to the relative distance determination module 306 and is used to segment the spatial point cloud based on the local density and the target relative distance value to obtain a spatial point cloud segmentation result.

[0102] In a point cloud segmentation device provided in an embodiment of the present application, a curvature determination module 302 is provided for determining, for a target sample point in a spatial point cloud, the curvature characteristics of a local plane corresponding to the target sample point in the spatial point cloud; a local density determination module 304 is connected to the curvature determination module 302 and is used to determine the local density corresponding to the local plane based on the curvature characteristics; a relative distance determination module 306 is connected to the local density determination module 304 and is used to determine a target relative distance value corresponding to the target sample point based on candidate relative distance values ​​between multiple other sample points and the target sample point, wherein the multiple other sample points are sample points other than the target sample point in the spatial point cloud; and a segmentation execution module 308 is connected to the relative distance determination module 306 and is used to segment the spatial point cloud based on the local density and the target relative distance value to obtain a spatial point cloud segmentation result. The present invention achieves the purpose of improving the ability to characterize the spatial distribution and geometric characteristics of the spatial point cloud by utilizing the local density and relative distance values, and achieves the technical effect of improving the accuracy of spatial point cloud segmentation, thereby solving the technical problem of [keywords].

[0103] It should be noted that the above modules can be implemented by software or hardware. For example, for the latter, it can be implemented in the following ways: the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.

[0104] It should be noted that the curvature determination module 302, local density determination module 304, relative distance determination module 306, and segmentation execution module 308 correspond to steps S102 to S108 in the embodiment. The examples and application scenarios implemented by these modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiment. It should be noted that these modules, as part of the device, can be run on a computer terminal.

[0105] It should be noted that the optional or preferred implementation of this embodiment can be found in the relevant description in the embodiment, which will not be repeated here.

[0106] The above-mentioned point cloud segmentation device may also include a processor and a memory. The curvature determination module 302, the local density determination module 304, the relative distance determination module 306, the segmentation execution module 308, etc. are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize the corresponding functions.

[0107] The processor includes a kernel, which retrieves the corresponding program unit from memory. There can be one or more kernels. Memory may include non-permanent memory in a computer-readable medium, random access memory (RAM), and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory includes at least one memory chip.

[0108] An embodiment of the present application provides a non-volatile storage medium having a program stored thereon, which implements a point cloud segmentation method when executed by a processor.

[0109] An embodiment of the present application provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented: for a target sample point in a spatial point cloud, determining the curvature characteristics of a local plane corresponding to the target sample point in the spatial point cloud; determining the local density corresponding to the local plane based on the curvature characteristics; determining a target relative distance value corresponding to the target sample point based on candidate relative distance values ​​between a plurality of other sample points and the target sample point, wherein the plurality of other sample points are sample points other than the target sample point in the spatial point cloud; and segmenting the spatial point cloud based on the local density and the target relative distance value to obtain a spatial point cloud segmentation result. The device herein may be a server, a PC, or the like.

[0110] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that is initialized with the following method steps: for a target sample point in a spatial point cloud, determining the curvature characteristics of a local plane corresponding to the target sample point in the spatial point cloud; determining the local density corresponding to the local plane based on the curvature characteristics; determining a target relative distance value corresponding to the target sample point based on candidate relative distance values ​​between multiple other sample points and the target sample point, wherein the multiple other sample points are sample points other than the target sample point in the spatial point cloud; and segmenting the spatial point cloud based on the local density and the target relative distance value to obtain a spatial point cloud segmentation result.

[0111] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0112] The present application is described with reference to the flow chart and / or block diagram of the method, device (system), and computer program product according to the embodiment of the present application. It should be understood that each flow process and / or box in the flow chart and / or block diagram and the combination of the flow process and / or box in the flow chart and / or block diagram can be realized by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processing machine or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for realizing the function specified in one flow chart flow or multiple flows and / or one box or multiple boxes of the block diagram.

[0113] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0114] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0115] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0116] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0117] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0118] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0119] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0120] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present application, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.

Claims

1. A point cloud segmentation method, comprising: For a target sample point in a spatial point cloud, determining a curvature feature of a local plane corresponding to the target sample point in the spatial point cloud; Determining a local density corresponding to the local plane based on the curvature feature; Determining a target relative distance value corresponding to the target sample point based on candidate relative distance values ​​between a plurality of other sample points and the target sample point, wherein the plurality of other sample points are sample points other than the target sample point in the spatial point cloud; The spatial point cloud is segmented based on the local density and the target relative distance value to obtain a spatial point cloud segmentation result.

2. The method according to claim 1, wherein the local plane includes a plurality of neighboring sample points other than the target sample point, the plurality of other sample points include the plurality of neighboring sample points, and determining the curvature feature of the local plane corresponding to the target sample point in the spatial point cloud comprises: Determining a target universal function, wherein the target universal function represents a degree of deviation between the characteristic values ​​corresponding to the plurality of neighborhood sample points and the fitting function value corresponding to the target sample point, the value of the target universal function depends on the value of the fitting function as an independent variable, and the fitting function value is an approximate representation of the target sample point on the local plane; When the target universal function takes a minimum value, determining the fitting function value to take a target value; When the fitting function takes the target value, the normal vector corresponding to the target sample point; Based on the normal vector, the curvature feature is determined.

3. The method according to claim 2, wherein determining the target functional comprises: Determine the Euclidean distances between each of the plurality of neighborhood sample points and the target sample point; Determining weight function values ​​corresponding to each of the plurality of neighborhood sample points based on the Euclidean distance; The target universal function is generated based on the weight function values ​​and the eigenvalues ​​corresponding to the plurality of neighborhood sample points, and the fitting function value corresponding to the target sample point.

4. The method according to claim 1, wherein determining the local density corresponding to the local plane based on the curvature feature comprises: Determining a first sample point set representing a local distribution feature corresponding to the target sample point, and a second sample point set representing a local neighborhood feature corresponding to the target sample point, wherein the local plane includes sample points in the first sample point set and the second sample point set; Determine a plurality of candidate sample points of the intersection between the first sample point set and the second sample point set; Determining the curvature features corresponding to the plurality of candidate sample points respectively by determining the curvature features corresponding to the target sample point; The local density is determined based on the curvature feature corresponding to the target sample point and the curvature features respectively corresponding to the plurality of candidate sample points.

5. The method according to claim 4, wherein the curvature feature is a normal vector, and determining the local density based on the curvature feature corresponding to the target sample point and the curvature features corresponding to the plurality of candidate sample points comprises: Determine the cosine value between the normal vectors corresponding to the multiple candidate sample points and the normal vector corresponding to the target sample; The local density is determined based on the cosine values ​​corresponding to the multiple candidate sample points and a predetermined screening threshold.

6. The method according to claim 1, wherein determining a target relative distance value corresponding to the target sample point based on candidate relative distance values ​​between a plurality of other sample points and the target sample point comprises: The local density corresponding to the target sample point on the local plane is used as the target local density; Determine other local densities corresponding to the multiple other sample points on the local plane in a manner of determining the target local density; When the target local density is the maximum value among the other local densities respectively corresponding to the multiple other sample points, determining the maximum value among the candidate relative distance values ​​respectively corresponding to the multiple other sample points as the target relative distance value; When the target local density is not the maximum value among the other local densities respectively corresponding to the multiple other sample points, a minimum value is determined among the candidate relative distance values ​​respectively corresponding to the multiple other sample points as the target relative distance value.

7. The method according to any one of claims 1 to 6, wherein segmenting the spatial point cloud based on the local density and the target relative distance value to obtain a spatial point cloud segmentation result comprises: Determining an initial cluster center based on the local density and the target relative distance value; According to the initial clustering, sample points in the spatial point cloud are allocated to obtain a plurality of initial cluster sets corresponding to the initial clustering; Performing merging processing based on the multiple initial cluster sets to obtain the initial clustering result; Performing an outlier test on the initial clustering result to obtain an outlier test result; Based on the outlier test result, the initial clustering result is updated to obtain the spatial point cloud segmentation result.

8. A point cloud segmentation device, comprising: a curvature determination module, configured to determine, for a target sample point in a spatial point cloud, a curvature feature of a local plane corresponding to the target sample point in the spatial point cloud; A local density determination module, configured to determine a local density corresponding to the local plane based on the curvature feature; a relative distance determination module, configured to determine a target relative distance value corresponding to the target sample point based on candidate relative distance values ​​between a plurality of other sample points and the target sample point, wherein the plurality of other sample points are sample points other than the target sample point in the spatial point cloud; The segmentation execution module is used to segment the spatial point cloud based on the local density and the target relative distance value to obtain a spatial point cloud segmentation result.

9. A non-volatile storage medium having a plurality of computer instructions stored thereon, wherein when the plurality of computer instructions are executed by a processor, the processor implements the point cloud segmentation method according to any one of claims 1 to 7.

10. An electronic device comprising: One or more processors and a memory, the memory being used to store one or more computer programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the point cloud segmentation method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Density self-adapting non-uniform point cloud simplifying treatment method

    CN101853526A

  • 3D model processing method and device

    CN109102559A

  • Rock mass structural plane and occurrence information rapid extraction method, equipment and medium

    CN113255677A

  • Optimized center homogenization clustering fusion point cloud segmentation method

    CN113888553A

  • Point cloud segmentation method and device, storage medium and electronic equipment

    CN118247507A

Cited By

  • BIM-based curtain wall simulation design method and system

    CN120910972A

  • BIM-based curtain wall simulation design method and system

    CN120910972B

  • Goods information classification method and system based on visual identification

    CN121033557A

  • Point cloud normal estimation method and device based on local subspace clustering, electronic equipment and storage medium

    CN121686027A

  • A point cloud normal estimation method and device based on local subspace clustering, electronic equipment and storage medium

    CN121686027B