Three-dimensional point cloud segmentation method and apparatus based on locally weighted curvature and two-point method
Through the local weighted curvature and two-point method, the normal vector and local weighted curvature of the three-dimensional point cloud image are calculated, boundary feature points are marked and point cloud plane model is fitted, which solves the problem of low segmentation accuracy of three-dimensional point clouds in the existing technology, and achieves more accurate point cloud segmentation, which is suitable for autonomous driving, automobile manufacturing and building construction.
Patent Information
- Application Number
- PCT/CN2024/135622
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-01-26
- Filing Date
- 2024-11-29
- Publication Date
- 2025-07-31
AI Technical Summary
In the prior art, the three-dimensional point cloud segmentation method based on image visual effects or point cloud semantics has the problem of undersegment, oversegment or low segmentation accuracy.
Using the method based on local weighted curvature and two-point method, the normal vector of each sample point in the three-dimensional point cloud image is calculated, the local weighted curvature is calculated, and the preset curvature is compared with the preset curvature threshold, the boundary feature points are marked, and the point cloud plane model is fitted for iterative calculations, and the target inner point is obtained, and the three-dimensional point cloud image is finally segmented, and the local point cloud density is voxelized and quadratic segmentation is performed.
It realizes accurate segmentation of three-dimensional point cloud images, improves segmentation accuracy, and can more accurately identify the boundary characteristics of point cloud data. It is suitable for fields such as autonomous driving, automobile manufacturing and building construction.
Smart Images

Figure CN2024135622_31072025_PF_FP_ABST
Abstract
Description
Three-dimensional point cloud segmentation method and device based on local weighted curvature and two-point method
[0001] Related applications
[0002] This application claims priority to Chinese patent application No. 2024101161127, filed on January 26, 2024, entitled “Three-dimensional point cloud segmentation method and device based on local weighted curvature and two-point method”, the entire text of which is hereby incorporated by reference. Technical Field
[0003] The present application relates to the field of point cloud processing, and more specifically, to a three-dimensional point cloud segmentation method and device based on local weighted curvature and a two-point method. Background Art
[0004] A point cloud is a collection of coordinates of points in a three-dimensional image, which can reflect the geometric information of a scene or object. With the development of point cloud acquisition equipment such as lasers, radars, and depth cameras, point clouds are being used in more and more scenarios. Segmenting three-dimensional point cloud images can achieve a refined division of objects in the image. Point cloud segmentation technology divides point cloud data to achieve segmentation of three-dimensional point cloud images. Usually, point cloud data in the same divided area have similar feature attributes (such as geometric features, texture features, etc.). Three-dimensional point cloud segmentation is often used in fields such as three-dimensional model reconstruction. Specifically, in the field of architecture, point cloud segmentation of buildings is the premise and foundation for the reconstruction of digital city three-dimensional models.
[0005] In related technologies, point cloud segmentation is performed based on image visual effects or point cloud semantics, which may cause problems such as plane under-segmentation, over-segmentation, or low segmentation accuracy.
[0006] To address the above-mentioned problems, no effective solutions have been proposed so far. Summary of the Invention
[0007] According to a first aspect of an embodiment of the present application, a three-dimensional point cloud segmentation method based on local weighted curvature and a two-point method is provided, comprising: calculating a normal vector for each sample point in a three-dimensional point cloud image; calculating a local weighted curvature for each sample point based on the normal vector, and comparing the local weighted curvature with a preset curvature threshold to obtain a comparison result; if the comparison result indicates that the local weighted curvature of the sample point is less than the preset curvature threshold, marking the sample point as a boundary feature point to obtain a boundary feature point set; fitting a point cloud plane model based on the boundary feature point set, iteratively calculating the point cloud plane model to obtain a target inlier set; and segmenting the three-dimensional point cloud image based on the boundary feature point set and the target inlier set.
[0008] Optionally, after segmenting the three-dimensional point cloud image based on the boundary feature point set and the target internal point set, it also includes: calculating the local point cloud density, and voxelizing the segmented three-dimensional point cloud image based on the local point cloud density to obtain N point cloud blocks, where N is a positive integer; extracting the boundary point cloud of the point cloud block to obtain a boundary voxel list; obtaining a neighborhood voxel set of each voxel in the boundary voxel list, and calculating the distance between each neighborhood voxel of each voxel and the fitting plane to obtain a voxel distance value, and when the voxel distance value is less than a preset distance threshold, adding the neighborhood voxel to the boundary voxel list to obtain an updated boundary voxel list, where the fitting plane is a plane constructed when fitting the point cloud plane model; performing secondary segmentation on the segmented three-dimensional point cloud image based on the boundary voxel list to obtain a target three-dimensional point cloud image.
[0009] Optionally, before calculating the normal vector of each sample point in the three-dimensional point cloud image, the method further includes: searching each sample point in the three-dimensional point cloud image based on a neighborhood point search algorithm to determine the local neighborhood of each sample point; and obtaining a neighborhood point set for each sample point based on the local neighborhood, wherein M neighborhood points are stored in the neighborhood point set, and M is a positive integer.
[0010] Optionally, the step of calculating the local weighted curvature of each sample point based on the normal vector includes: calculating the normal curvature of the sample point relative to each neighboring point based on the normal vector of the sample point and the normal vector of the neighboring point corresponding to the sample point; calculating the first principal curvature and the second principal curvature of the sample point relative to each neighboring point based on the normal curvature, and calculating the average curvature of the sample point relative to each neighboring point based on the first principal curvature and the second principal curvature; calculating the weighted curvature of the sample point relative to each neighboring point based on the first principal curvature, the second principal curvature, the normal curvature and the average curvature; calculating the local weighted curvature of each sample point based on the weighted curvature of the sample point relative to each neighboring point and the weighted curvature of the neighboring point corresponding to the sample point.
[0011] Optionally, the step of calculating the weighted curvature of the sample point relative to each of the neighborhood points based on the first principal curvature, the second principal curvature, the normal curvature and the average curvature includes: calculating the absolute value of the curvature difference between the first principal curvature and the second principal curvature of the sample point relative to each of the neighborhood points; using the exponent of the absolute value of the curvature difference as a weighted value; and calculating the weighted curvature of the sample point relative to each of the neighborhood points based on the weighted value, the normal curvature and the average curvature.
[0012] Optionally, the step of fitting a point cloud plane model based on a set of boundary feature points, iteratively calculating the point cloud plane model, and obtaining a target inlier set includes: step 1, selecting two sample points from the set of boundary feature points; step 2, constructing a point cloud plane model based on the coordinate values of the two sample points and the normal vectors of the two sample points; step 3, calculating the distance value from each sample point to the point cloud plane in the point cloud plane model; step 4, comparing the distance value with a preset distance threshold to obtain a comparison result, and when the comparison result indicates that the distance value from the sample point to the point cloud plane is less than the preset distance threshold, the sample point is taken as an inlier, obtaining an inlier set based on all comparison results, and counting the number of inliers in the inlier set; repeating steps 1 to 4, performing iterative calculation until the number of iterations reaches the number threshold, stopping the iteration, and selecting the point cloud plane model with the largest number of inliers as the target point cloud plane model to obtain the target inlier set of the target point cloud plane model.
[0013] Optionally, the step of calculating the normal vector of each sample point in the three-dimensional point cloud image includes: establishing a fitting function for each sample point in the three-dimensional point cloud image based on the sample point and the neighborhood point corresponding to the sample point; and obtaining the normal vector of the sample point based on the fitting function.
[0014] According to the second aspect of the embodiment of the present application, a three-dimensional point cloud segmentation device based on local weighted curvature and two-point method is also provided, including: a calculation unit, used to calculate the normal vector of each sample point in the three-dimensional point cloud image; a comparison unit, used to calculate the local weighted curvature of each sample point based on the normal vector, and compare the local weighted curvature with a preset curvature threshold to obtain a comparison result; a marking unit, used to mark the sample point as a boundary feature point when the comparison result indicates that the local weighted curvature of the sample point is less than the preset curvature threshold, and obtain a boundary feature point set; a fitting unit, used to fit a point cloud plane model based on the boundary feature point set, and iteratively calculate the point cloud plane model to obtain a target internal point set; a segmentation unit, used to segment the three-dimensional point cloud image based on the boundary feature point set and the target internal point set.
[0015] Optionally, the three-dimensional point cloud segmentation device based on local weighted curvature and two-point method also includes: a first calculation module, used to calculate the local point cloud density, and voxelize the segmented three-dimensional point cloud image based on the local point cloud density to obtain N point cloud blocks, where N is a positive integer; a first extraction module, used to extract the boundary point cloud of the point cloud block to obtain a boundary voxel list; a first acquisition module, used to obtain a set of neighboring voxels of each voxel in the boundary voxel list, and calculate the distance between each neighboring voxel of each voxel and the fitting plane to obtain a voxel distance value. When the voxel distance value is less than a preset distance threshold, the neighboring voxel is added to the boundary voxel list to obtain an updated boundary voxel list, where the fitting plane is a plane constructed when fitting the point cloud plane model; a first segmentation module, used to perform secondary segmentation on the segmented three-dimensional point cloud image based on the boundary voxel list to obtain a target three-dimensional point cloud image.
[0016] Optionally, the three-dimensional point cloud segmentation device based on local weighted curvature and two-point method also includes: a first determination module, used to search each sample point in the three-dimensional point cloud image based on a neighborhood point search algorithm to determine the local neighborhood of each sample point; a second acquisition module, used to acquire a neighborhood point set of each sample point based on the local neighborhood, wherein M neighborhood points are stored in the neighborhood point set, and M is a positive integer.
[0017] Optionally, the comparison unit includes: a second calculation module, used to calculate the normal curvature of the sample point relative to each of the neighboring points based on the normal vector of the sample point and the normal vector of the neighboring points corresponding to the sample point; a third calculation module, used to calculate the first principal curvature and the second principal curvature of the sample point relative to each of the neighboring points based on the normal curvature, and calculate the average curvature of the sample point relative to each of the neighboring points based on the first principal curvature and the second principal curvature; a fourth calculation module, used to calculate the weighted curvature of the sample point relative to each of the neighboring points based on the first principal curvature, the second principal curvature, the normal curvature and the average curvature; and a fifth calculation module, used to calculate the local weighted curvature of each of the sample points based on the weighted curvature of the sample point relative to each of the neighboring points and the weighted curvature of the neighboring points corresponding to the sample point.
[0018] Optionally, the fourth calculation module includes: a first calculation submodule, used to calculate the absolute value of the curvature difference between the first principal curvature and the second principal curvature of the sample point relative to each of the neighborhood points; a first as submodule, used to use the exponent of the absolute value of the curvature difference as a weighted value; and a second calculation submodule, used to calculate the weighted curvature of the sample point relative to each of the neighborhood points based on the weighted value, the normal curvature and the average curvature.
[0019] Optionally, the fitting unit includes: a first selection module, used for step 1, selecting two sample points from the boundary feature point set; a first construction module, used for step 2, constructing a point cloud plane model based on the coordinate values of the two sample points and the normal vectors of the two sample points; a sixth calculation module, used for step 3, calculating the distance value from each sample point to the point cloud plane in the point cloud plane model; a first comparison module, used for step 4, comparing the distance value with a preset distance threshold to obtain a comparison result, and when the comparison result indicates that the distance value from the sample point to the point cloud plane is less than the preset distance threshold, taking the sample point as an inlier, obtaining an inlier set based on all comparison results, and counting the number of inliers in the inlier set; a first repetition module, used to repeat steps 1 to 4, perform iterative calculation until the number of iterations reaches the number threshold, stop the iteration, and select the point cloud plane model with the largest number of inliers as the target point cloud plane model, and obtain the target inlier set of the target point cloud plane model.
[0020] Optionally, the calculation unit includes: a first establishment module, used to establish a fitting function for each sample point in the three-dimensional point cloud image based on the sample point and the neighborhood point corresponding to the sample point; and a third acquisition module, used to acquire the normal vector of the sample point based on the fitting function.
[0021] According to the third aspect of an embodiment of the present application, a computer-readable storage medium is also provided, wherein the computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned three-dimensional point cloud segmentation methods based on local weighted curvature and the two-point method.
[0022] According to the fourth aspect of an embodiment of the present application, an electronic device is also provided, comprising one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement any one of the above-mentioned three-dimensional point cloud segmentation methods based on local weighted curvature and the two-point method.
[0023] The details of one or more embodiments of the present application are set forth in the accompanying drawings and the description below. Other features, objects, and advantages of the present application will become apparent from the description, drawings, and claims. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0025] FIG1 is a flowchart of an optional three-dimensional point cloud segmentation method based on local weighted curvature and a two-point method according to an embodiment of the present application;
[0026] FIG2 is a flowchart of an optional method for performing refined segmentation of a three-dimensional point cloud image according to an embodiment of the present application;
[0027] FIG3 is a schematic diagram of an optional three-dimensional point cloud segmentation device based on local weighted curvature and a two-point method according to an embodiment of the present application;
[0028] FIG4 is a hardware structure block diagram of an electronic device (or mobile device) for a three-dimensional point cloud segmentation method based on local weighted curvature and a two-point method according to an embodiment of the present application. DETAILED DESCRIPTION
[0029] 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.
[0030] 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.
[0031] To facilitate those skilled in the art to understand the present application, some of the terms or nouns involved in the embodiments of the present application are explained below:
[0032] Functional Jacobian refers to the determinant of the Jacobian matrix of a multivariate function transformation.
[0033] It should be noted that the three-dimensional point cloud segmentation method and device based on local weighted curvature and two-point method in the present disclosure can be used in the field of image processing. When the three-dimensional point cloud is segmented based on the local weighted curvature and two-point method, it can also be used in any field other than the image processing field. When the three-dimensional point cloud is segmented based on the local weighted curvature and two-point method, the present disclosure does not limit the application field of the three-dimensional point cloud segmentation method and device based on local weighted curvature and two-point method.
[0034] It should be noted that the relevant information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant region, and provide corresponding operation portals for users to choose to authorize or refuse. For example, an interface is set up between this system and the relevant users or institutions. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or institution through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or institution.
[0035] The following embodiments of this application can be applied to various 3D point cloud segmentation systems / applications / devices. This application calculates the local weighted curvature of each sample point through the normal vector of the sample point and the neighborhood points of the sample point, which can accurately screen out the boundary features of the sample point, and then obtain a set of boundary feature points for point cloud segmentation. The boundary points in the boundary feature point set are then fitted with a point cloud plane model using a two-point method, and iterative calculations are performed to screen out a set of target inliers. The segmentation range of the 3D point cloud is then clarified through the boundary feature points and the target inliers, and accurate segmentation of the 3D point cloud is performed.
[0036] This application performs voxel processing on the point cloud plane results after segmentation, and uses the local point cloud density to refine the boundary points of its adjacent planes, and then performs a more accurate secondary segmentation on the segmented three-dimensional point cloud to achieve the accuracy of point cloud segmentation.
[0037] The present application is described in detail below with reference to various embodiments.
[0038] Example 1
[0039] According to an embodiment of the present application, an embodiment of a three-dimensional point cloud segmentation method based on local weighted curvature and a two-point method 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.
[0040] FIG1 is a flowchart of an optional three-dimensional point cloud segmentation method based on local weighted curvature and a two-point method according to an embodiment of the present application. As shown in FIG1 , the method includes the following steps:
[0041] Step S101, calculating the normal vector of each sample point in the three-dimensional point cloud image;
[0042] Step S102, calculating the local weighted curvature of each sample point based on the normal vector, and comparing the local weighted curvature with a preset curvature threshold to obtain a comparison result;
[0043] Step S103: if the comparison result indicates that the local weighted curvature of the sample point is greater than or equal to a preset curvature threshold, the sample point is marked as a boundary feature point to obtain a boundary feature point set;
[0044] Step S104, fitting a point cloud plane model based on the boundary feature point set, performing iterative calculations on the point cloud plane model to obtain a target internal point set;
[0045] Step S105 : segmenting the three-dimensional point cloud image based on the boundary feature point set and the target interior point set.
[0046] Through the above steps, the normal vector of each sample point in the three-dimensional point cloud image is first calculated, and then the local weighted curvature of each sample point is calculated based on the normal vector, and the local weighted curvature is compared with the preset curvature threshold to obtain a comparison result. Then, when the comparison result indicates that the local weighted curvature of the sample point is greater than or equal to the preset curvature threshold, the sample point is marked as a boundary feature point to obtain a boundary feature point set, and a point cloud plane model is fitted based on the boundary feature point set. The point cloud plane model is iteratively calculated to obtain a target inlier set, and finally the three-dimensional point cloud image is segmented based on the boundary feature point set and the target inlier set.
[0047] In this embodiment, the local weighted curvature of the sample point is calculated based on the normal vector of each sample point and the neighborhood points of the sample point, and the boundary feature points of the three-dimensional point cloud image are obtained based on the local weighted curvature. Then, the point cloud plane model is fitted to the boundary feature points based on the two-point method, and the target internal point set is obtained through iterative calculation of the point cloud model. The three-dimensional point cloud image is segmented by the boundary feature points and the target internal point set. Based on the local weighted curvature feature, the boundary features of the sample point can be accurately determined, and the boundary feature points of the three-dimensional point cloud image are screened out. Then, the point cloud plane model is fitted by the two-point method, and the sample points of the point cloud data are divided twice, and the segmentation range of the three-dimensional point cloud image is determined, thereby achieving accurate segmentation of the three-dimensional point cloud image, thereby solving the technical problem of low point cloud segmentation accuracy in the point cloud segmentation method in the related art.
[0048] The embodiments of the present application are described in detail below in combination with the above steps.
[0049] It should be noted that 3D point cloud segmentation refers to the process of segmenting and classifying 3D point cloud data according to the different objects or scenes to which they belong. With the rapid development of information technology and image processing technology, point cloud segmentation is widely used in various fields. For example, in the field of autonomous driving, 3D point cloud segmentation can be used to detect and identify elements such as roads, pedestrians, vehicles, and traffic signs, thereby helping to realize functions such as environmental perception, path planning, and decision-making; in the field of automobile manufacturing, 3D point cloud segmentation can be used to detect defects in parts and identify components in the assembly process; in the field of building construction, 3D point cloud segmentation can be used for digital modeling and reconstruction.
[0050] It should be noted that the embodiment of the present application screens boundary feature points by calculating local weighted curvature to obtain the boundary features of the three-dimensional point cloud, and then fits the point cloud plane model through the two-point method and performs iterative calculation. The target internal point set is obtained through iterative calculation. The internal points in the target internal point set can indicate that the sample points of the three-dimensional point cloud belong to the fitted point cloud plane model. The boundary segmentation is performed through the target internal point set and the boundary feature point set, and the segmented three-dimensional point cloud is secondary segmented through voxelization processing, thereby improving the accuracy of three-dimensional point cloud segmentation.
[0051] Optionally, before calculating the normal vector of each sample point in the three-dimensional point cloud image, the method further includes: searching each sample point in the three-dimensional point cloud image based on a neighborhood point search algorithm to determine the local neighborhood of each sample point; and obtaining a neighborhood point set for each sample point based on the local neighborhood, wherein M neighborhood points are stored in the neighborhood point set, and M is a positive integer.
[0052] It should be noted that the local weighted curvature of the embodiment of the present application is calculated based on the normal vector of the sample point and the neighborhood points of the sample point. Therefore, it is necessary to first search the sample points in the three-dimensional point cloud image based on the neighborhood search algorithm, determine the local neighborhood of the sample point, and extract all the sample points from the local neighborhood as the neighborhood points of the sample point to obtain the neighborhood point set corresponding to each sample point. The neighborhood search algorithm can be a fast neighborhood point search algorithm based on the kd tree structure.
[0053] Step S101 : Calculate the normal vector of each sample point in the three-dimensional point cloud image.
[0054] Optionally, the step of calculating the normal vector of each sample point in the three-dimensional point cloud image includes: establishing a fitting function for each sample point in the three-dimensional point cloud image based on the sample point and the neighborhood points corresponding to the sample point; and obtaining the normal vector of the sample point based on the fitting function.
[0055] It should be noted that before calculating the local weighted curvature, it is necessary to first calculate the normal vector of the sample point. The normal vector refers to the normal direction of each sample point in three-dimensional space. The normal vector is an important attribute that describes the surface direction and shape of the point cloud. It can provide surface information and structural information of the point cloud data. When calculating the normal vector, the local plane of the sample point can be fitted by the moving least squares method to calculate the normal vector of the sample point.
[0056] Specifically, first establish the fitting function f for each sample point x , f x In a local neighborhood of the current sample point, it can be approximately expressed as:
[0057] Among them, x represents the current sample point, is a neighborhood point in the local neighborhood of the current 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. Since the point cloud data belongs to the three-dimensional space, the first-order form of the basis function is expressed as 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)
[0058] Among them, x i Represents the neighborhood point at position i in the local neighborhood of the current sample point, y i Indicates that the neighboring points are The horizontal axis value at z i Indicates that the neighboring points are To obtain the accurate local plane of the current sample point, the vertical axis value at the current sample point needs to minimize the weighted average sum between the values of each sample point in the local neighborhood of the current sample point and the value of the fitting function, that is, to minimize the functional Jacobian:
[0059] Among them, w(||xx i ||) represents the neighborhood point x i The weight function, ||xx i || represents the relationship between the fitting point x and the neighborhood point x i The Euclidean distance of n represents the number of neighboring points in the neighborhood affected by the point to be fitted x.
[0060] The steps to minimize the functional Jacobian are: first, take the derivative of J and let J can obtain the minimum value, and a(x) can be obtained as: a(x)=(BWB T ) -1 BW
[0061] 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 .
[0062] Then the normal weighting function can be used to enhance the smoothness and continuity of the local fitting plane. Its function expression is:
[0063] Where r = || xx i || / d m is the relative distance, d m is the radius of the influence domain, and σ is the shape parameter. Substituting the Gaussian weight function into the functional Jacobian equation yields the undetermined coefficient matrix a(x). The normal vector of the sample point is a(x).
[0064] Step S102 : calculating the local weighted curvature of each sample point based on the normal vector, and comparing the local weighted curvature with a preset curvature threshold to obtain a comparison result.
[0065] It should be noted that the embodiment of the present application proposes local weighted curvature to enhance the expressive ability of curvature features. Local weighted curvature can enhance the edge feature description ability of point cloud data. The boundary feature points of point cloud data can be screened according to the local weighted curvature, and then the range of the point cloud data to be segmented can be determined through the boundary feature points.
[0066] Optionally, the step of calculating the local weighted curvature of each sample point based on the normal vector includes: calculating the normal curvature of the sample point relative to each neighboring point based on the normal vector of the sample point and the normal vector of the neighboring point corresponding to the sample point; calculating the first principal curvature and the second principal curvature of the sample point relative to each neighboring point based on the normal curvature, and calculating the average curvature of the sample point relative to each neighboring point based on the first principal curvature and the second principal curvature; calculating the weighted curvature of the sample point relative to each neighboring point based on the first principal curvature, the second principal curvature, the normal curvature and the average curvature; calculating the local weighted curvature of each sample point based on the weighted curvature of the sample point relative to each neighboring point and the weighted curvature of the neighboring point corresponding to the sample point.
[0067] It should be noted that when calculating the local weighted curvature, the normal curvature of the sample point relative to each neighboring point is first calculated based on the two normal vectors, the normal vector of the sample point and the normal vector of the neighboring point of the sample point. Then, the first principal curvature and the second principal curvature of the sample point relative to each neighboring point are calculated based on the normal curvature. The first principal curvature and the second principal curvature are two principal curvature values obtained based on the relationship between the normal curvature and the principal curvature. Then, the average curvature of the sample point relative to each neighboring point is calculated based on the first principal curvature and the second principal curvature. Finally, the local weighted curvature of the sample point relative to each neighboring point is calculated based on the above-mentioned parameters.
[0068] Optionally, the step of calculating the weighted curvature of the sample point relative to each neighboring point based on the first principal curvature, the second principal curvature, the normal curvature and the average curvature includes: calculating the absolute value of the curvature difference between the first principal curvature and the second principal curvature of the sample point relative to each neighboring point; using the exponent of the absolute value of the curvature difference as a weighted value; and calculating the weighted curvature of the sample point relative to each neighboring point based on the weighted value, the normal curvature and the average curvature.
[0069] It should be noted that the local weighted curvature in the embodiment of the present application introduces a weighting value to enhance the original curvature value. The weighting value is the exponent of the absolute value of the difference between the first principal curvature and the second principal curvature. The weighted curvature of the sample point relative to each neighborhood point is then calculated based on the average of the normal curvature and the mean curvature and the product of the weighting value.
[0070] Specifically, when calculating the local weighted curvature, the normal curvature is calculated through the normal vector, and then the principal curvature and the average curvature are obtained according to the relationship between the normal curvature and the average curvature. The exponent of the difference between the two principal curvatures is used as the weight of the weighted curvature, and finally the local weighted curvature of each point is obtained according to the mean of the weighted curvature. Assuming that the current sample point is p, there are m neighboring points near point p, q i is the i-th neighbor point of point p, q i The normal vector is M i , the normal vector of p is N, establish an orthogonal coordinate system, X, Y, N is the local coordinate system L of point p, X and Y are orthogonal unit vectors, and the normal curvature of point p can be calculated using an osculating circle passing through point p Then p is relative to q i The normal curvature is expressed as:
[0071] in, is the normal curvature, α is the vector N and pq i The angle between N and M, β is the angle between N and M i The angle between them.
[0072] The above formula can be transformed into:
[0073] in, According to the relationship between normal curvature and principal curvature, we can know that:
[0074] Among them, θ i +θ is the point p passing through q i The angle between the tangent of the normal section and the main direction can be calculated, and finally the principal curvature k1 (i.e. the first principal curvature) and k2 (i.e. the second principal curvature) can be obtained. The average curvature is calculated based on the first principal curvature and the second principal curvature. The curvature characteristics of point p are defined in the form of weighted normal curvature and mean curvature, and the weighted curvature at point p is defined as k wi , whose expression is:
[0075] in, is the weighted curvature of the sample point, the exponential of the absolute value of the difference between k1 and k2 is used as the weight, and the local weighted curvature of each sample point is defined according to its local neighborhood. Its expression is:
[0076] in, is the local weighted curvature, is the data point p i The mean of the weighted curvature in the local neighborhood of , j represents the jth point in the local neighborhood, if The value is small, indicating that point p i The geometric features in the local neighborhood do not change significantly, and the probability of it being a boundary point is low.
[0077] Step S103 : When the comparison result indicates that the local weighted curvature of the sample point is greater than or equal to a preset curvature threshold, the sample point is marked as a boundary feature point to obtain a boundary feature point set.
[0078] It should be noted that after obtaining the local weighted curvature value of each sample point, the local weighted curvature of each sample point is compared with the preset curvature threshold. If the local weighted curvature is greater than or equal to the preset curvature threshold, the geometric feature change of the sample point in the local neighborhood is relatively significant, and it is marked as the boundary feature point of the three-dimensional point cloud segmentation, and then the boundary feature point set is obtained.
[0079] Step S104 , fitting a point cloud plane model based on the boundary feature point set, performing iterative calculations on the point cloud plane model, and obtaining a target inner point set.
[0080] It should be noted that after obtaining the set of boundary feature points, two sample points are randomly selected from the obtained set of boundary feature points, and the two-point method is used to fit the point cloud plane model. Then, the optimal model is found through continuous iteration to obtain the target inlier set. The inlier point can be used to indicate whether the sample point belongs to the point cloud plane model.
[0081] Optionally, the step of fitting a point cloud plane model based on a set of boundary feature points, iteratively calculating the point cloud plane model, and obtaining a target inlier set includes: step one, selecting two sample points from the set of boundary feature points; step two, constructing a point cloud plane model based on the coordinate values of the two sample points and the normal vectors of the two sample points; step three, calculating the distance value from each sample point to the point cloud plane in the point cloud plane model; step four, comparing the distance value with a preset distance threshold to obtain a comparison result, and when the comparison result indicates that the distance value from the sample point to the point cloud plane is greater than or equal to the preset distance threshold, the sample point is taken as an inlier, and an inlier set is obtained based on all comparison results, and the number of inliers in the inlier set is counted; repeating steps one to four, performing iterative calculations until the number of iterations reaches the number threshold, stopping the iteration, and selecting the point cloud plane model with the largest number of inliers as the target point cloud plane model to obtain the target inlier set of the target point cloud plane model.
[0082] It should be noted that the steps of screening out the target inlier set through iterative calculation include:
[0083] (1) Select two sample points from the boundary feature point set;
[0084] (2) Assume that the point cloud plane model is ax+by+cz+d=0. Given two sample points P1(x1, y1, z1) and P2(x2, y2, z2) and the corresponding normal vectors n1 and n2, project the two parameter lines L1=P1+t·n1 and L2=P2+t·n2 onto the plane of n·x=0, and take their intersection as a point P3 on the plane. Substitute P1, P2, and P3 into the plane model ax+by+cz+d=0 to obtain the three parameters a, b, and c, and obtain the fitted point cloud plane model.
[0085] (3) Calculate the distance d from each point in the point cloud to the point cloud plane. If |d| < λ (λ is the initial threshold), the point is considered to belong to a point on the point cloud plane model and is considered an internal point. Otherwise, it is defined as an external point. Finally, all the internal points counted according to the distance threshold constitute the internal point set I.
[0086] (4) By continuously iterating the above steps, record the best fitting geometric model;
[0087] (5) When the number of iterations is greater than the preset maximum number of iterations, the algorithm ends. The quality of the fitting model is judged according to the number of inliers in the inlier set of each iterative model, and then the best fitting point cloud plane model is screened out, the inlier set of the best point cloud plane model is obtained, and the target inlier set is obtained.
[0088] The maximum number of iterations mentioned above can be expressed as:
[0089] Among them, k is the maximum number of iterations, p is the probability of the preset fitting point cloud plane model, which can be set to 99%, 95%, etc., w is the proportion of external points in the data set, n is the sample point in the point cloud data, 1-(1-w) n Represents the probability that at least one of the n data points is an outlier.
[0090] Step S105 : segmenting the three-dimensional point cloud image based on the boundary feature point set and the target interior point set.
[0091] It should be noted that the boundary to be segmented is determined by the boundary feature point set, the sample points are divided according to the target inlier set, the sample points belonging to the inlier target set are retained, and the remaining sample points are discarded, and then the three-dimensional point cloud image is segmented to obtain the segmented three-dimensional point cloud image.
[0092] Optionally, FIG2 is a flowchart of an optional method for performing refined segmentation of a three-dimensional point cloud image according to an embodiment of the present application. As shown in FIG2 , after segmenting the three-dimensional point cloud image based on the boundary feature point set and the target interior point set, the method further includes:
[0093] Step S201: Calculate the local point cloud density and perform voxel processing on the segmented three-dimensional point cloud image based on the local point cloud density to obtain N point cloud blocks, where N is a positive integer;
[0094] Step S202: extracting boundary point clouds from the point cloud block to obtain a boundary voxel list;
[0095] Step S203: Obtain a set of neighboring voxels for each voxel in the boundary voxel list, and calculate the distance between each neighboring voxel of each voxel and the fitting plane to obtain a voxel distance value. If the voxel distance value is less than a preset distance threshold, add the neighboring voxel to the boundary voxel list to obtain an updated boundary voxel list, where the fitting plane is the plane constructed when fitting the point cloud plane model.
[0096] Step S204 : performing secondary segmentation on the segmented three-dimensional point cloud image based on the boundary voxel list to obtain a target three-dimensional point cloud image.
[0097] It should be noted that after obtaining the point cloud segmentation results, there may be jagged boundaries between adjacent planes. In order to refine the boundaries of adjacent planes and improve the efficiency of segmentation, only the boundary voxels of the point cloud block and the points in the buffer zone are considered during the segmentation stage. The segmented 3D point cloud image can be voxelized based on the octree, and the voxel size is considered using local density. The local density is calculated as follows:
[0098] Among them, p d is the local point cloud density, k is the number of neighborhood points in the local neighborhood, r k The distance from the current point to the farthest neighboring point is divided into point cloud blocks p, and the boundary point cloud is extracted to generate a boundary voxel list q. For all voxels in q, they are set as seed voxels, which is a set S. For each voxel S in S i The neighborhood voxel p i A check is performed if the voxel p i If the distance between a point and the fitted point cloud plane is less than the predefined distance threshold, then the point is classified as p, and the voxel p i The updated boundary voxel list is finally obtained, and then the segmented 3D point cloud is segmented again according to the boundary voxel list to obtain the target 3D point cloud image, thereby realizing the refined segmentation of the 3D point cloud.
[0099] The following describes it in detail with reference to another embodiment.
[0100] Example 2
[0101] The three-dimensional point cloud segmentation device based on local weighted curvature and two-point method provided in this embodiment includes multiple implementation units, each implementation unit corresponding to each implementation step in the above-mentioned embodiment 1.
[0102] FIG3 is a schematic diagram of an optional 3D point cloud segmentation device based on local weighted curvature and two-point method according to an embodiment of the present application. As shown in FIG3 , the 3D point cloud segmentation device based on local weighted curvature and two-point method includes: a calculation unit 31, a comparison unit 32, a marking unit 33, a fitting unit 34, and a segmentation unit 35, wherein:
[0103] A calculation unit 31 is used to calculate the normal vector of each sample point in the three-dimensional point cloud image;
[0104] a comparison unit 32 for calculating a local weighted curvature of each sample point based on the normal vector, and comparing the local weighted curvature with a preset curvature threshold to obtain a comparison result;
[0105] a marking unit 33 for marking a sample point as a boundary feature point when the comparison result indicates that the local weighted curvature of the sample point is greater than or equal to a preset curvature threshold, thereby obtaining a set of boundary feature points;
[0106] A fitting unit 34 is configured to fit a point cloud plane model based on the boundary feature point set, and perform iterative calculations on the point cloud plane model to obtain a target inner point set;
[0107] The segmentation unit 35 is configured to segment the three-dimensional point cloud image based on the boundary feature point set and the target interior point set.
[0108] The above-mentioned three-dimensional point cloud segmentation device based on local weighted curvature and two-point method calculates the normal vector of each sample point in the three-dimensional point cloud image through the calculation unit 31; calculates the local weighted curvature of each sample point based on the normal vector through the comparison unit 32, and compares the local weighted curvature with the preset curvature threshold to obtain a comparison result; when the comparison result indicates that the local weighted curvature of the sample point is greater than or equal to the preset curvature threshold, the marking unit 33 marks the sample point as a boundary feature point to obtain a boundary feature point set; fits a point cloud plane model based on the boundary feature point set through the fitting unit 34, iteratively calculates the point cloud plane model to obtain a target internal point set; and segments the three-dimensional point cloud image based on the boundary feature point set and the target internal point set through the segmentation unit 35.
[0109] In this embodiment, the local weighted curvature of the sample point is calculated based on the normal vector of each sample point and the neighborhood points of the sample point, and the boundary feature points of the three-dimensional point cloud image are obtained based on the local weighted curvature. Then, the point cloud plane model is fitted to the boundary feature points based on the two-point method, and the target internal point set is obtained through iterative calculation of the point cloud model. The three-dimensional point cloud image is segmented by the boundary feature points and the target internal point set. Based on the local weighted curvature feature, the boundary features of the sample point can be accurately determined, and the boundary feature points of the three-dimensional point cloud image are screened out. Then, the point cloud plane model is fitted by the two-point method, and the sample points of the point cloud data are divided twice, and the segmentation range of the three-dimensional point cloud image is determined, thereby achieving accurate segmentation of the three-dimensional point cloud image, thereby solving the technical problem of low point cloud segmentation accuracy in the point cloud segmentation method in the related art.
[0110] Optionally, the three-dimensional point cloud segmentation device based on local weighted curvature and two-point method also includes: a first calculation module, used to calculate the local point cloud density, and voxelize the segmented three-dimensional point cloud image based on the local point cloud density to obtain N point cloud blocks, where N is a positive integer; a first extraction module, used to extract the boundary point cloud of the point cloud block to obtain a boundary voxel list; a first acquisition module, used to obtain a set of neighboring voxels of each voxel in the boundary voxel list, and calculate the distance between each neighboring voxel of each voxel and the fitting plane to obtain a voxel distance value. When the voxel distance value is less than a preset distance threshold, the neighboring voxel is added to the boundary voxel list to obtain an updated boundary voxel list, where the fitting plane is a plane constructed when fitting the point cloud plane model; a first segmentation module, used to perform secondary segmentation on the segmented three-dimensional point cloud image based on the boundary voxel list to obtain a target three-dimensional point cloud image.
[0111] Optionally, the three-dimensional point cloud segmentation device based on local weighted curvature and the two-point method also includes: a first determination module, used to search each sample point in the three-dimensional point cloud image based on a neighborhood point search algorithm to determine the local neighborhood of each sample point; a second acquisition module, used to obtain a neighborhood point set for each sample point based on the local neighborhood, wherein M neighborhood points are stored in the neighborhood point set, and M is a positive integer.
[0112] Optionally, the comparison unit includes: a second calculation module, used to calculate the normal curvature of the sample point relative to each neighboring point based on the normal vector of the sample point and the normal vector of the neighboring point corresponding to the sample point; a third calculation module, used to calculate the first principal curvature and the second principal curvature of the sample point relative to each neighboring point based on the normal curvature, and calculate the average curvature of the sample point relative to each neighboring point based on the first principal curvature and the second principal curvature; a fourth calculation module, used to calculate the weighted curvature of the sample point relative to each neighboring point based on the first principal curvature, the second principal curvature, the normal curvature and the average curvature; a fifth calculation module, used to calculate the local weighted curvature of each sample point based on the weighted curvature of the sample point relative to each neighboring point and the weighted curvature of the neighboring point corresponding to the sample point.
[0113] Optionally, the fourth calculation module includes: a first calculation submodule, used to calculate the absolute value of the curvature difference between the first principal curvature and the second principal curvature of the sample point relative to each neighborhood point; a first as submodule, used to use the exponent of the absolute value of the curvature difference as a weighted value; and a second calculation submodule, used to calculate the weighted curvature of the sample point relative to each neighborhood point based on the weighted value, normal curvature and mean curvature.
[0114] Optionally, the fitting unit includes: a first selection module, used for step one, selecting two sample points from the boundary feature point set; a first construction module, used for step two, constructing a point cloud plane model based on the coordinate values of the two sample points and the normal vectors of the two sample points; a sixth calculation module, used for step three, calculating the distance value from each sample point to the point cloud plane in the point cloud plane model; a first comparison module, used for step four, comparing the distance value with a preset distance threshold to obtain a comparison result, and when the comparison result indicates that the distance value from the sample point to the point cloud plane is less than the preset distance threshold, the sample point is taken as an inlier, an inlier set is obtained based on all comparison results, and the number of inliers in the inlier set is counted; a first repetition module, used to repeat steps one to four, perform iterative calculations until the number of iterations reaches the number threshold, stop the iteration, and select the point cloud plane model with the largest number of inliers as the target point cloud plane model, and obtain the target inlier set of the target point cloud plane model.
[0115] Optionally, the calculation unit includes: a first establishment module, used to establish a fitting function for each sample point in the three-dimensional point cloud image based on the sample point and the neighborhood point corresponding to the sample point; and a third acquisition module, used to acquire the normal vector of the sample point based on the fitting function.
[0116] The above-mentioned three-dimensional point cloud segmentation device based on local weighted curvature and two-point method can also include a processor and a memory. The above-mentioned calculation unit 31, comparison unit 32, marking unit 33, fitting unit 34, segmentation unit 35, 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.
[0117] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and the kernel parameters can be adjusted to segment the 3D point cloud image with high precision.
[0118] The above-mentioned 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, and the memory includes at least one memory chip.
[0119] According to another aspect of an embodiment of the present application, a computer-readable storage medium is also provided, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned three-dimensional point cloud segmentation methods based on local weighted curvature and the two-point method.
[0120] According to another aspect of an embodiment of the present application, an electronic device is also provided, comprising one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by one or more processors, the one or more processors implement any one of the above-mentioned three-dimensional point cloud segmentation methods based on local weighted curvature and the two-point method.
[0121] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program initialized with the following method steps: calculating the normal vector of each sample point in a three-dimensional point cloud image; calculating the local weighted curvature of each sample point based on the normal vector, and comparing the local weighted curvature with a preset curvature threshold to obtain a comparison result; when the comparison result indicates that the local weighted curvature of the sample point is greater than or equal to the preset curvature threshold, marking the sample point as a boundary feature point to obtain a boundary feature point set; fitting a point cloud plane model based on the boundary feature point set, iteratively calculating the point cloud plane model to obtain a target inlier set; and segmenting the three-dimensional point cloud image based on the boundary feature point set and the target inlier set.
[0122] FIG4 is a hardware structure block diagram of an electronic device (or mobile device) according to an embodiment of the present application for a three-dimensional point cloud segmentation method based on local weighted curvature and a two-point method. As shown in FIG4 , the electronic device may include one or more (402a, 402b, ..., 402n are used in FIG4 ) processors 402 (the processor 402 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), and a memory 404 for storing data. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a keyboard, a power supply and / or a camera. It will be understood by those skilled in the art that the structure shown in FIG4 is for illustration only and does not limit the structure of the above-mentioned electronic device. For example, the electronic device may also include more or fewer components than those shown in FIG4 , or have a configuration different from that shown in FIG4 .
[0123] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0124] In the above embodiments of the present application, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0125] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only exemplary. For example, the division of units can be a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0126] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple units. Some or all of the units may be selected to achieve the purpose of the present embodiment according to actual needs.
[0127] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0128] If the integrated unit is implemented in the form of a software functional unit 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 application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program code.
[0129] The above is only an implementation method of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A three-dimensional point cloud segmentation method based on local weighted curvature and two-point method, comprising: Calculating the normal vector of each sample point in the three-dimensional point cloud image; Calculating the local weighted curvature of each sample point based on the normal vector, and comparing the local weighted curvature with a preset curvature threshold to obtain a comparison result; When the comparison result indicates that the local weighted curvature of the sample point is less than the preset curvature threshold, marking the sample point as a boundary feature point to obtain a boundary feature point set; Fitting a point cloud plane model based on the boundary feature point set, and performing iterative calculation on the point cloud plane model to obtain a target inlier set; Segmenting the three-dimensional point cloud image based on the boundary feature point set and the target inlier set.
2. The method according to claim 1, wherein after segmenting the three-dimensional point cloud image based on the boundary feature point set and the target inlier set, further comprising: Calculating the local point cloud density, and performing voxelization processing on the segmented three-dimensional point cloud image based on the local point cloud density to obtain N point cloud blocks, where N is a positive integer; Extracting boundary point clouds from the point cloud blocks to obtain a boundary voxel list; Obtaining the neighborhood voxel set of each voxel in the boundary voxel list, and calculating the distance between each neighborhood voxel of each voxel and the fitting plane to obtain a voxel distance value. When the voxel distance value is less than a preset distance threshold, adding the neighborhood voxel to the boundary voxel list to obtain an updated boundary voxel list, wherein the fitting plane is the plane constructed when fitting the point cloud plane model; Performing secondary segmentation on the segmented three-dimensional point cloud image based on the boundary voxel list to obtain a target three-dimensional point cloud image.
3. The method according to claim 1, wherein before calculating the normal vector of each sample point in the three-dimensional point cloud image, further comprising: Searching each sample point in the three-dimensional point cloud image based on the neighborhood point search algorithm to determine the local neighborhood of each sample point; Obtaining the neighborhood point set of each sample point based on the local neighborhood, wherein M neighborhood points are stored in the neighborhood point set, and M is a positive integer.
4. The method according to claim 3, wherein the step of calculating the local weighted curvature of each sample point based on the normal vector comprises: Calculating the normal curvature of the sample point relative to each neighborhood point based on the normal vector of the sample point and the normal vectors of the neighborhood points corresponding to the sample point; Calculating the first principal curvature and the second principal curvature of the sample point relative to each neighborhood point based on the normal curvature, and calculating the average curvature of the sample point relative to each neighborhood point based on the first principal curvature and the second principal curvature; Calculating the weighted curvature of the sample point relative to each neighborhood point based on the first principal curvature, the second principal curvature, the normal curvature and the average curvature; Calculating the local weighted curvature of each sample point based on the weighted curvature of the sample point relative to each neighborhood point and the weighted curvature of the neighborhood points corresponding to the sample point.
5. The method according to claim 4, wherein the step of calculating the weighted curvature of the sample point relative to each of the neighborhood points based on the first principal curvature, the second principal curvature, the normal curvature, and the mean curvature includes: Calculating the absolute value of the curvature difference between the first principal curvature and the second principal curvature of the sample point relative to each of the neighborhood points; Taking the exponent of the absolute value of the curvature difference as the weighting value; Calculating the weighted curvature of the sample point relative to each of the neighborhood points based on the weighting value, the normal curvature, and the mean curvature.
6. The method according to claim 1, wherein the step of fitting a point cloud plane model based on the set of boundary feature points, performing iterative calculations on the point cloud plane model, and obtaining a set of target inlier points includes: Step 1, selecting two sample points from the set of boundary feature points; Step 2, constructing a point cloud plane model based on the coordinate values of the two sample points and the normal vectors of the two sample points; Step 3, calculating the distance value of each sample point to the point cloud plane in the point cloud plane model; Step 4, comparing the distance value with a preset distance threshold to obtain a comparison result. In the case where the comparison result indicates that the distance value of the sample point to the point cloud plane is less than the preset distance threshold, taking the sample point as an inlier, obtaining an inlier set based on all comparison results, and counting the number of inliers in the inlier set; Repeating Step 1 to Step 4 for iterative calculations until the number of iterations reaches a threshold number of times, stopping the iteration, and selecting the point cloud plane model with the largest number of inliers as the target point cloud plane model, and obtaining the set of target inlier points of the target point cloud plane model.
7. The method according to claim 1, wherein the step of calculating the normal vector of each sample point in the three-dimensional point cloud image includes: Establishing a fitting function for each sample point in the three-dimensional point cloud image based on the sample point and the neighborhood points corresponding to the sample point; Obtaining the normal vector of the sample point based on the fitting function.
8. A three-dimensional point cloud segmentation device based on local weighted curvature and two-point method, comprising: A calculation unit for calculating the normal vector of each sample point in the three-dimensional point cloud image; A comparison unit for calculating the local weighted curvature of each sample point based on the normal vector, and comparing the local weighted curvature with a preset curvature threshold to obtain a comparison result; A marking unit for, in the case where the comparison result indicates that the local weighted curvature of the sample point is less than the preset curvature threshold, marking the sample point as a boundary feature point to obtain a set of boundary feature points; A fitting unit for fitting a point cloud plane model based on the set of boundary feature points, performing iterative calculations on the point cloud plane model, and obtaining a set of target inlier points; A segmentation unit for segmenting the three-dimensional point cloud image based on the set of boundary feature points and the set of target inlier points.
9. A computer-readable storage medium, the computer-readable storage medium comprising a stored computer program, wherein, When the computer program runs, controlling the device where the computer-readable storage medium is located to execute the three-dimensional point cloud segmentation method according to any one of claims 1 to 7 based on local weighted curvature and two-point method.
10. An electronic device includes one or more processors and a memory, where the memory is used to store one or more programs, and wherein, When the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the three-dimensional point cloud segmentation method based on local weighted curvature and two-point method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Adaptive point cloud simplification method based on point cloud feature partitioning
CN115294272A
Method for extracting local curved surface features of point cloud based on morphology
CN116012600A
Three-dimensional point cloud segmentation method and device based on local weighted curvature and two-point method
CN117934846A
System and method of detecting objects in scene point cloud
US20150003723A1
Cited By
BIM-based curtain wall simulation design method and system
CN120910972A
Method and device for extracting point cloud data of beam body structure
CN121095264A
Lithium battery shell defect detection method based on machine vision
CN121169917A
Two-step deformation method suitable for colored lamp three-dimensional model
CN121213830A
A two-step morphing method for color light three-dimensional model
CN121213830B