A three-dimensional point cloud adaptive segmentation method based on structure guidance and density driving

The structure-guided and density-driven adaptive segmentation method for 3D point clouds solves the problems of easy missegmentation of key structural regions and the inability to adaptively adjust the segmentation granularity in existing technologies. It realizes structural protection and consistency verification of segmentation results, and improves processing efficiency and adaptability.

CN120997238BActive Publication Date: 2026-02-03NANJING CHANCE ENG TECH SERVICES INC
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511516221.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-23
Publication Date
2026-02-03
Estimated Expiration
2045-10-23

AI Technical Summary

Technical Problem

Existing technologies for processing complex industrial point clouds suffer from several problems, including the ease with which critical structural regions can be incorrectly segmented, the inability to adaptively adjust the segmentation granularity, and the lack of consistency verification of segmentation results. These issues lead to incorrect segmentation, resource mismatch, and data incompatibility.

Method used

An adaptive segmentation method for 3D point clouds based on structure guidance and density drive is adopted. By guiding the skeleton structure and driving the density adaptively, a structure protection region is constructed, the segmentation granularity is dynamically adjusted, and the consistency of the segmentation results is ensured by combining adjacency and normal consistency verification.

Benefits of technology

It effectively avoids erroneous segmentation of critical structural regions, improves processing efficiency and platform adaptability, enhances the quality of segmentation results and the availability of downstream applications, and is suitable for intelligent preprocessing of point clouds in large-scale process industries.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120997238B_ABST
    Figure CN120997238B_ABST
Patent Text Reader

Abstract

The application discloses a three-dimensional point cloud adaptive segmentation method based on structure guidance and density driving, and relates to the technical field of three-dimensional point cloud data processing. The three-dimensional point cloud adaptive segmentation method based on structure guidance and density driving constructs a point cloud segmentation method, establishes an over-limit point cloud sub-block point number control mechanism and a segmentation post-processing mechanism for performing adjacent small sub-block merging based on proximity checking, and formats and encodes the segmentation result; can construct a structure protection area on the basis of extracting a skeleton structure and key nodes, and avoid cutting key parts by mistake; adaptively adjusts the segmentation granularity through a density field analysis and a computing resource perception mechanism, improves processing efficiency and platform adaptability; realizes sub-block merging and quality improvement in combination with proximity and normal consistency checking, and enhances the consistency of the segmentation result and downstream availability through structured encoding in a unified format, and effectively solves problems such as structure damage, uneven segmentation, resource inadaptation and data incompatibility.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of 3D point cloud data processing technology, specifically to a 3D point cloud adaptive segmentation method based on structure guidance and density driving. Background Technology

[0002] In recent years, with the widespread application of surveying and mapping technologies such as laser scanning, oblique photography, and 3D modeling in the industrial field, a large amount of high-precision 3D point cloud data has been generated in the process industry. Especially in complex environments such as pipe corridors, petrochemical plants, and power grids, point cloud data serves as the foundation for digital twin construction and intelligent operation and maintenance, and the demand for automated processing is increasing.

[0003] Existing point cloud segmentation methods can be broadly categorized into four main technical approaches:

[0004] Partitioning methods based on spatial structure rules, such as voxel grids, octrees, and KD trees, rely on geometric space partitioning mechanisms to encapsulate data, but they lack the ability to understand complex structures and are prone to missegmentation. Segmentation methods driven by views or local geometric features, such as threshold clustering based on features like viewpoint, projection, normal, and curvature, are suitable for simple structures, but are prone to misjudgment in areas with structural abrupt changes or unclear features. Structured segmentation methods for specific tasks guide the segmentation process through process design and structural priors, adapting to the needs of a certain type of task, but the methods have poor versatility and are difficult to extend to other heterogeneous point cloud scenarios. Segmentation methods based on deep learning, such as PointNet++ and KPConv, can directly perform point-level classification and segmentation, but they are highly dependent on data annotation and model training, and have high inference overhead and are difficult to interpret and control the segmentation boundaries.

[0005] CN116091710A discloses an adaptive spatial segmentation method and apparatus based on 3D reconstruction. This method generates four candidate segmentation spaces by performing quadtree partitioning on the sparse point cloud corresponding to the target object. Then, it selects a suitable space for fusion based on specific conditions, ultimately achieving data block partitioning with balanced data volume. However, this method lacks a mechanism for judging the consistency of segmentation results and verifying the segmentation results.

[0006] CN119648901A discloses a method for generating, recognizing, and segmenting 3D point clouds. This method employs a device including a laser, a camera, a motor, and a controller. By precisely controlling the movements of the motor and laser, high-quality structured light photographs are generated, and combined with images captured by the camera, efficient point cloud generation and subsequent recognition and segmentation are achieved. The advantage of this method is that it effectively reduces the complexity of 3D point cloud recognition and segmentation, improving processing speed and accuracy. However, this method is primarily used for semantic segmentation of point clouds and lacks guidance for point cloud segmentation operations.

[0007] In summary, existing technologies still have significant shortcomings when processing complex industrial point clouds: on the one hand, they lack mechanisms for identifying and protecting critical structural regions, easily leading to incorrect segmentation; on the other hand, they cannot dynamically adjust according to point cloud density and computing resources, limiting their adaptability in large-scale point cloud scenarios. Furthermore, the segmentation results are usually not validated for consistency, resulting in inconsistent sub-block boundaries and formats, affecting subsequent data utilization and model compatibility. Therefore, there is an urgent need for a 3D point cloud segmentation method with structural protection, density / resource adaptation, and segmentation consistency validation capabilities to meet the practical needs of efficient segmentation and modeling in industrial applications. Summary of the Invention

[0008] To address the shortcomings of existing technologies, this invention provides a three-dimensional point cloud adaptive segmentation method based on structure guidance and density driving, which solves the problems in existing technologies such as the easy missegmentation of key structural regions, the inability of segmentation granularity to adaptively adjust with point cloud density and computing resources, and the lack of consistency verification of segmentation results.

[0009] To achieve the above objectives, the present invention provides the following technical solution: an adaptive segmentation method for 3D point clouds based on structure guidance and density driving, comprising the following steps:

[0010] Step 1: Construct a point cloud segmentation mechanism that combines skeleton structure guidance and density adaptive driving: First, preprocess the original point cloud, remove outliers by voxel filtering, and then project to generate a 2D image; obtain edge results through edge detection and morphological operations, and then fill the closed region mask; extract skeleton lines using a thinning algorithm, combine graph pruning and deep learning models to identify key structural regions, and introduce multi-scale analysis to enhance recognition; divide the point cloud into 3D voxels, and determine the adaptive segmentation unit size Δv according to the density distribution; set up protected areas around key nodes of the skeleton structure to avoid segmentation damage to the structure; for scenarios with limited computing resources, dynamically adjust Δv and the block strategy based on system computing and memory resources using a reinforcement learning model, while monitoring the point cloud density in real time to adjust the segmentation parameters.

[0011] Step 2, establish a post-segmentation processing mechanism: count the number of points in sub-blocks, and divide or merge sub-blocks with more or less points than the upper limit; construct an adjacency graph to verify the continuity of sub-block boundaries, and smooth out discontinuous boundaries.

[0012] Step 3: Format and encode the segmentation results, integrate them into a multidimensional array and store them in a binary file to ensure that the segmentation blocks meet the point count and size specifications and ensure data distribution consistency.

[0013] Preferably, step 1 specifically includes the following steps:

[0014] Step 1.1: Obtain the raw point cloud data and preprocess it. Use voxel filtering to remove outliers. Then determine the main projection direction according to the gravity direction or data acquisition posture. By default, project the 3D point cloud onto the XY plane along the Z-axis to generate a 2D image. The 2D image is bounded by the smallest bounding rectangle of the point cloud in the XY plane and its original aspect ratio is maintained.

[0015] Step 1.2: The gradient magnitude of the two-dimensional grayscale image generated by the point cloud projection is calculated using a gradient-based edge detection operator. Further, the gradient magnitude is thresholded to obtain a preliminary edge image. Further, morphological dilation and closing operations are performed on the edge image to fill edge breaks and suppress noise, thereby obtaining an edge result consistent with the visible outer contour and internal hole boundary of the point cloud.

[0016] Step 1.3: Automatically select a valid seed point within the closed region as the starting point for the region growing algorithm, fill the target region, and obtain a complete closed region mask;

[0017] Step 1.4: Iteratively refine the closed region mask based on the Zhang-Suen thinning algorithm, extract its single-pixel width skeleton line as a topological structure representation, and delete endpoint branches with a length less than the branch threshold L0 by combining graph structure pruning; further identify the intersection points, endpoints and corner nodes in the skeleton as structural key points; at the same time, introduce a deep learning model to further optimize the closed region mask, automatically identify and mark more refined structural key regions, and introduce multi-scale analysis to identify structural key regions at different resolutions;

[0018] Step 1.5: Perform 3D voxel partitioning on the point cloud, construct a voxel mesh and calculate the point cloud density value of each voxel unit, and construct an adaptive segmentation unit size Δv based on the density distribution characteristics to control the segmentation accuracy.

[0019] Step 1.6: For areas near critical nodes of the skeleton structure, based on the principle that the Euclidean distance is less than the structural protection radius R... k The judgment condition is to set the surrounding voxel units as the protection zone, with the smallest voxel unit size being Δv. These voxel units are excluded from the segmentation region during the segmentation process, thereby avoiding the destruction of the integrity of the key structural regions and improving the ability to identify and preserve structures.

[0020] Step 1.7: For application scenarios with limited computing resources, this invention provides a dynamic balancing mechanism based on system computing power and memory resources; based on the currently available memory and computing load, a maximum limit N for the number of nodes per block is set. block A reinforcement learning model is introduced to dynamically adjust Δv and the segmentation strategy, enabling optimal resource utilization of the segmented point cloud sub-blocks within the computational capacity; by controlling N... blockTo adapt to different computing power platforms and achieve flexible collaborative scheduling of point cloud segmentation; at the same time, to increase real-time monitoring of point cloud density, and to immediately adjust segmentation parameters when the density changes significantly.

[0021] Preferably, in step 1.4, deep learning optimization involves introducing a pre-trained deep learning model (such as U-Net or Mask R-CNN) to further optimize the closed region mask. Specifically, the closed region mask obtained in step 1.3 is used as input and fed into the deep learning model for fine segmentation to identify more subtle structural key regions. The model outputs an optimized mask, in which structural key regions (such as intersections, endpoints, corners, etc.) are more accurately marked.

[0022] The loss function used in deep learning models is cross-entropy loss, which measures the difference between the model's output mask and the real mask.

[0023] ;

[0024] Where C is the number of pixels, B is the number of categories (including background and structural key regions), b∈(1,B), c∈(1,C), y bc It's a real tag, p bc It is the model's predicted probability;

[0025] Multi-scale analysis: Structural identification is performed on point clouds at different resolutions to ensure effective protection of critical structural regions at different scales. The specific steps are as follows: downsample the original point cloud to generate multiple point cloud data at different resolutions; repeat steps 1.1 to 1.4 at each resolution to identify and mark critical structural regions; combine the identification results at each resolution to determine the final protection range of critical structural regions.

[0026] Preferably, in step 1.7, the reinforcement learning model incorporates: the Q-learning reinforcement learning algorithm to dynamically adjust the segmentation unit size Δv and the maximum number of points in a single block N. block The specific steps are as follows:

[0027] a1 defines the state space S, including the current point cloud density, available memory, and computational load;

[0028] a2 defines the action space A, including adjustments to Δv and N. block All possible actions;

[0029] a3 defines a reward function R, which gives a reward based on the quality of the sub-blocks after partitioning (such as the uniformity of point distribution and structural integrity) and computational efficiency (such as partitioning time and memory usage);

[0030] A4 is used to train a reinforcement learning model to select the optimal action in different states to maximize cumulative reward.

[0031] The formula for updating the Q-value in Q-learning is:

[0032] ;

[0033] Where s is the current state, a is the current action, r is the immediate reward, s′ is the next state, a′ is the possible action in the next state, α is the learning rate, and γ is the discount factor.

[0034] Preferably, the post-processing mechanism in step 2 includes the following processing strategies:

[0035] Step 2.1: Count the number of points in each sub-block. Let N be the number of points contained in each initial segmentation block. i If the number of points in a certain sub-block is N i Greater than the maximum number of points threshold N max This indicates that the sub-block has an excessive number of points, which affects the consistency of the distribution of training and inference data in downstream artificial intelligence products. Therefore, it is not suitable to retain it as an independent unit and the sub-block needs to be segmented.

[0036] Step 2.2: Generate the projection ray of each pixel center of the two-dimensional skeleton in the three-dimensional point cloud; construct a normal cylindrical neighborhood with the projection ray as the central axis and the width of the skeleton segmentation block on the image plane as the cylinder diameter; count the number of points in the neighborhood as the local density of the skeleton points; connect the density values ​​of each point in sequence to generate a one-dimensional density distribution curve along the skeleton.

[0037] Step 2.3: Locate the target voxel region with the highest density within the segmented block, and perform a cut along a plane passing through the centroid of the target voxel region and perpendicular to the tangent direction of the 2D skeleton at that point; repeat step 2.1 on the cut result to ensure that the point cloud of the sub-block is less than the maximum number of points threshold N. max ;

[0038] Step 2.4, if the number of points in a certain sub-block is N i Less than the minimum number of points threshold N min This indicates that the sub-block has insufficient density and weak geometric support, and should not be retained as an independent unit. In this case, it is necessary to further determine whether it meets the adjacent unit merging condition.

[0039] Step 2.5, if N i Greater than the maximum number of points threshold N max Then, locate the target voxel region with the highest density within the segmentation block, and perform a cut along a plane passing through the centroid of this region and perpendicular to the tangent direction of the 2D skeleton at that point. If N i Less than the minimum number of points threshold N minIf there exists an adjacent segment j that satisfies all three of the following conditions, then sub-block merging is performed:

[0040] Condition 1: Euclidean center distance D ij Less than D max ;

[0041] Condition 2: Angle θ between the normal vectors ij Satisfy cos(θ) ij ) ≥ cos(θ max ), θ max θ represents the maximum permissible angle threshold between normal vectors. ij Represented as a unit normal vector n i With n j The angle between them, in radians, ranges from [0, π], and is measured using cosine similarity. The calculation method is as follows:

[0042] ;

[0043] Condition 3: Number of adjacent partitioning points and N i +N j ≤ N max ; where D max The Euclidean distance threshold for determining the maximum adjacency between segmented blocks is set empirically in mm.

[0044] Step 2.6: Use graph theory algorithms to match and verify the segmented sub-blocks to ensure that the boundaries between sub-blocks are continuous and the format is uniform; perform smooth transition processing on the boundaries between sub-blocks to reduce geometric discontinuities caused by segmentation.

[0045] Preferably, the specific steps of matching and verifying using graph theory algorithms in step 2.6 are as follows:

[0046] b1 constructs an adjacency graph between sub-blocks, where nodes represent sub-blocks and edges represent the adjacency relationships between sub-blocks;

[0047] b2 traverses the adjacency graph and checks whether the boundaries of each pair of adjacent sub-blocks are continuous (e.g., by comparing the normal vectors and distances of the boundary points).

[0048] b3 performs local adjustments (such as smoothing or re-segmentation) for discontinuous boundaries.

[0049] The specific steps for smooth transition processing are as follows:

[0050] c1 identifies boundary points that require smoothing.

[0051] For each boundary point, c2 calculates the average position and normal vector of its neighborhood points;

[0052] c3 moves the boundary point to the average position of its neighborhood points and adjusts its normal vector to match the neighborhood points; the new position of the boundary point is calculated by a weighted average of the neighborhood points.

[0053] ;

[0054] Where p′ is the new position of the boundary point, p n It is the position of a point within its neighborhood, w n It is a weight (which can be set based on distance or density).

[0055] Preferably, step 3, which formats and encodes the segmentation result, specifically includes the following steps:

[0056] Step 3.1: All segmentation results are integrated into a multidimensional array and stored in a binary data file, including point cloud matrix, structure label, feature mask and sub-block identifier number, and field validity check and data structure consistency confirmation are performed.

[0057] Step 3.2: To ensure the consistency of data distribution for training and inference in downstream AI products, and to guarantee the consistency and usability of the segmentation results, the segmented blocks should meet the following indicators:

[0058] The number of points in each point cloud block does not exceed the upper limit N. max ;

[0059] The 3D bounding box size of each point cloud patch does not exceed the limit side length L. max That is, max(W, H, D) ≤ L max W, H, and D are the sub-block dimensions in the X, Y, and Z directions, respectively.

[0060] Preferably, in step 1.6, the protection radius R of the key nodes of the skeleton structure k It satisfies the following function form:

[0061] ;

[0062] Where d avg σ represents the average point distance in this area, in mm. local δ represents the standard deviation of the local point distance, and β represents empirical coefficients, which are usually set to δ∈ [0.5, 1.5] and β∈ [0.2, 1.0] to ensure effective avoidance of local structures.

[0063] Preferably, the criteria for merging point cloud blocks include Euclidean center distance, angle between normal vectors, number of adjacent segmentation points, and three types of threshold parameters, which are preset based on sample statistical characteristics or human experience.

[0064] This invention provides an adaptive segmentation method for 3D point clouds based on structure guidance and density-driven approaches. Compared with existing technologies, it has the following advantages:

[0065] 1. This adaptive segmentation method for 3D point clouds based on structure guidance and density drive can construct structural protection regions based on the extraction of skeleton structure and key nodes, avoiding accidental segmentation of key parts; it adaptively adjusts the segmentation granularity through density field analysis and computational resource awareness mechanism, improving processing efficiency and platform adaptability; it achieves sub-block merging and quality improvement by combining proximity and normal consistency verification, and enhances the consistency of segmentation results and downstream usability through structured coding in a unified format, effectively solving problems such as structural damage, uneven segmentation, resource mismatch and data incompatibility in existing technologies, and is suitable for intelligent preprocessing scenarios of point clouds in large-scale process industries.

[0066] 2. This structure-guided and density-driven adaptive segmentation method for 3D point clouds introduces a pre-trained deep learning model (such as U-Net) in step 1.4 to optimize the mask of closed regions. The cross-entropy loss function enables more accurate identification of key regions with fine structures. Multi-scale analysis identifies structures at different resolutions, effectively protecting key regions. Step 1.7 proposes a dynamic balancing mechanism for computationally limited scenarios. Using the Q-learning reinforcement learning algorithm, the state, action space, and reward function are defined based on point cloud density and memory, dynamically adjusting the segmentation parameters to achieve optimal resource utilization. It can also adapt to different computing power platforms by controlling the maximum number of points per block, while simultaneously monitoring point cloud density in real time to adjust segmentation parameters, improving structure recognition and preservation capabilities and enhancing system adaptability and flexibility.

[0067] 3. This adaptive segmentation method for 3D point clouds based on structure guidance and density-driven approaches includes the following steps: Step 2.1: Segmenting sub-blocks with more than a threshold number of points to ensure data distribution consistency; Step 2.2: Constructing a normal cylindrical neighborhood to generate a one-dimensional density distribution curve, providing a basis for subsequent segmentation; Step 2.3: Locating and segmenting the region with the highest density to ensure compliance of sub-blocks; Steps 2.4-2.5: Merging sub-blocks with insufficient points when the adjacency merging condition is met, making reasonable use of resources; Step 2.6: Matching and verifying sub-blocks using graph theory algorithms to ensure consistent and uniform boundaries. Furthermore, smooth transition processing reduces geometric discontinuities. Through operations such as constructing an adjacency graph, checking boundaries, local adjustments, and calculating new positions of boundary points, the quality and usability of the segmented sub-blocks are effectively improved, laying a solid foundation for subsequent processing and applications.

[0068] 4. This structure-guided and density-driven adaptive segmentation method for 3D point clouds integrates the segmentation results into a multi-dimensional array stored in a binary file and performs checks to ensure data standardization and accuracy. It sets point cloud block count and size indicators to ensure consistent data distribution. Point cloud block merging is based on three types of preset threshold parameters, which are flexible and reasonable, improving the quality and practicality of point cloud processing. Attached Figure Description

[0069] Figure 1 This is the overall flowchart of the present invention;

[0070] Figure 2 This is a flowchart illustrating steps 1 and 2 of the present invention;

[0071] Figure 3 This is a schematic diagram of the adaptive segmentation granularity adjustment mechanism of the present invention;

[0072] Figure 4 This is a flowchart of the sub-block merging judgment based on adjacency and normal consistency of the present invention. Detailed Implementation

[0073] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0074] See Figures 1-4 This invention discloses a three-dimensional point cloud adaptive segmentation method based on structure guidance and density driving, and provides the following four technical solutions:

[0075] The first implementation method includes the following steps:

[0076] Step 1: Construct a point cloud segmentation mechanism that combines skeleton structure guidance and density adaptive driving: First, preprocess the original point cloud, remove outliers by voxel filtering, and then project to generate a 2D image; obtain edge results through edge detection and morphological operations, and then fill the closed region mask; extract skeleton lines using a thinning algorithm, combine graph pruning and deep learning models to identify key structural regions, and introduce multi-scale analysis to enhance recognition; divide the point cloud into 3D voxels, and determine the adaptive segmentation unit size Δv according to the density distribution; set up protected areas around key nodes of the skeleton structure to avoid segmentation damage to the structure; for scenarios with limited computing resources, dynamically adjust Δv and the block strategy based on system computing and memory resources using a reinforcement learning model, while monitoring the point cloud density in real time to adjust the segmentation parameters.

[0077] Step 2, establish a post-segmentation processing mechanism: count the number of points in sub-blocks, and divide or merge sub-blocks with more or less points than the upper limit; construct an adjacency graph to verify the continuity of sub-block boundaries, and smooth out discontinuous boundaries.

[0078] Step 3: Format and encode the segmentation results, integrate them into a multidimensional array and store them in a binary file to ensure that the segmentation blocks meet the point count and size specifications and ensure data distribution consistency.

[0079] It can construct structural protection regions based on the extracted skeleton structure and key nodes to avoid erroneous cutting of key parts; it can adaptively adjust the segmentation granularity through density field analysis and computational resource awareness mechanism to improve processing efficiency and platform adaptability; it can achieve sub-block merging and quality improvement by combining proximity and normal consistency verification, and enhance the consistency of segmentation results and downstream usability through structured coding in a unified format. It effectively solves the problems of structural damage, uneven segmentation, resource mismatch and data incompatibility in existing technologies, and is suitable for intelligent preprocessing scenarios of point clouds in large-scale process industries.

[0080] The second implementation method differs from the first implementation method in that step 1 specifically includes the following steps:

[0081] Step 1.1: Obtain the raw point cloud data and preprocess it. Use voxel filtering to remove outliers. Then determine the main projection direction according to the gravity direction or data acquisition posture. By default, project the 3D point cloud onto the XY plane along the Z-axis to generate a 2D image. The 2D image is bounded by the smallest bounding rectangle of the point cloud in the XY plane and its original aspect ratio is maintained.

[0082] Step 1.2: Calculate the gradient magnitude G(x,y) of the 2D grayscale image I(x,y) generated by point cloud projection using a gradient-based edge detection operator.

[0083] ;

[0084] in and These are the gradients of the image in the x and y directions, respectively;

[0085] Furthermore, thresholding is performed on the gradient magnitude G(x,y) to obtain the preliminary edge image E(x,y):

[0086] ;

[0087] Where E(x, y) is a binary image matrix, where a pixel value of 1 represents an edge point and a pixel value of 0 represents a non-edge point, and T is the threshold for edge detection. The threshold T is adaptively determined based on the gradient magnitude histogram, and its unit is consistent with that of G(x, y).

[0088] Furthermore, morphological dilation and closing operations are performed on the edge image E(x,y) to obtain the edge result C(x,y) that is consistent with the visible outer contour and internal hole boundary of the point cloud:

[0089] ;

[0090] in, This indicates an expansion operation. The erosion operation is represented by O and Q, which are structural elements whose shape and size can be set according to the actual point cloud density. For example, they can be 3×3, 5×5, 7×7 or 7×7 square or circular structural elements.

[0091] Step 1.3: Automatically select a valid seed point within the closed region as the starting point for the region growing algorithm, fill the target region, and obtain a complete closed region mask;

[0092] Let S = (x0, y0) be the seed point, F(x, y) be the filling result, and N(x, y) represent the eight neighbors of pixel (x, y):

[0093] ;

[0094] ;

[0095] Among them, F k (x, y) represents the filling state at the k-th iteration; B(x, y) indicates that the point can be filled. Represents logical OR, Indicates logical AND; iterates until... That is, until the fill no longer changes;

[0096] Step 1.4: Iteratively refine the closed region mask based on the Zhang-Suen thinning algorithm, extract its single-pixel width skeleton line as a topological structure representation, and delete endpoint branches with a length less than the branch threshold L0 by combining graph structure pruning; further identify the intersection points, endpoints and corner nodes in the skeleton as structural key points; at the same time, introduce a deep learning model to further optimize the closed region mask, automatically identify and mark more refined structural key regions, and introduce multi-scale analysis to identify structural key regions at different resolutions;

[0097] Step 1.5: Perform 3D voxel partitioning on the point cloud, construct a voxel mesh, and calculate the point cloud density value ρ for each voxel unit, in units of points / voxel volume. Based on the density distribution characteristics, construct an adaptive segmentation unit size Δv to control the segmentation accuracy.

[0098] If ρ∈[ρ l , ρ h Then Δv is calculated using linear interpolation according to the following formula:

[0099] ;

[0100] If ρ>ρ h Then Δv = Δv min ;

[0101] If ρ < ρ l Then Δv = Δv max ;

[0102] Where Δv refers to the unit voxel scale along the skeleton direction during the spatial segmentation of the point cloud, with units of mm; ρ h For high density threshold, ρ l For low density threshold, Δv min / Δv max These represent the minimum / maximum allowable voxel intervals, respectively.

[0103] Step 1.6: For areas near critical nodes of the skeleton structure, based on the principle that the Euclidean distance is less than the structural protection radius R... k The judgment criteria are used to designate the surrounding voxel units as protected areas, with a minimum voxel unit size of Δv, excluding them from the segmentation region during partitioning, thereby avoiding damage to the integrity of critical structural areas and improving the ability to identify and preserve structures; the protection radius R of critical nodes in the skeleton structure. k It satisfies the following function form:

[0104] ;

[0105] Where d avg σ represents the average point distance in this area, in mm. local The standard deviation of the local point distance is δ, and β are empirical coefficients, usually set as δ∈ [0.5, 1.5] and β∈ [0.2, 1.0] to ensure effective avoidance of local structures;

[0106] Step 1.7: For application scenarios with limited computing resources, this invention provides a dynamic balancing mechanism based on system computing power and memory resources; based on the currently available memory and computing load, a maximum limit N for the number of nodes per block is set. block A reinforcement learning model is introduced to dynamically adjust Δv and the segmentation strategy, enabling optimal resource utilization of the segmented point cloud sub-blocks within the computational capacity; by controlling N... block To adapt to different computing power platforms and achieve flexible collaborative scheduling of point cloud segmentation; at the same time, to increase real-time monitoring of point cloud density, and to immediately adjust segmentation parameters when the density changes significantly.

[0107] In step 1.4, deep learning optimization: a pre-trained deep learning model (such as U-Net or Mask R-CNN) is introduced to further optimize the closed region mask. The specific steps are as follows: the closed region mask obtained in step 1.3 is used as input and fed into the deep learning model for fine segmentation to identify more subtle structural key regions; the model outputs the optimized mask, in which the structural key regions (such as intersections, endpoints, corners, etc.) are more accurately marked.

[0108] The loss function used in deep learning models is cross-entropy loss, which measures the difference between the model's output mask and the real mask.

[0109] ;

[0110] Where C is the number of pixels, B is the number of categories (including background and structural key regions), b∈(1,B), c∈(1,C), y bc It's a real tag, p bc It is the model's predicted probability;

[0111] Multi-scale analysis: Structural identification is performed on point clouds at different resolutions to ensure effective protection of critical structural regions at different scales. The specific steps are as follows: downsample the original point cloud to generate multiple point cloud data at different resolutions; repeat steps 1.1 to 1.4 at each resolution to identify and mark critical structural regions; combine the identification results at each resolution to determine the final protection range of critical structural regions.

[0112] In step 1.7, the reinforcement learning model is introduced: Q-learning reinforcement learning algorithm is used to dynamically adjust the segmentation unit size Δv and the maximum number of points in a single block N. block The specific steps are as follows:

[0113] a1 defines the state space S, including the current point cloud density, available memory, and computational load;

[0114] a2 defines the action space A, including adjustments to Δv and N. block All possible actions;

[0115] a3 defines a reward function R, which gives a reward based on the quality of the sub-blocks after partitioning (such as the uniformity of point distribution and structural integrity) and computational efficiency (such as partitioning time and memory usage);

[0116] A4 is used to train a reinforcement learning model to select the optimal action in different states to maximize cumulative reward.

[0117] The formula for updating the Q-value in Q-learning is:

[0118] ;

[0119] Where s is the current state, a is the current action, r is the immediate reward, s′ is the next state, a′ is the possible action in the next state, α is the learning rate, and γ is the discount factor.

[0120] In this embodiment, the key step 1.4 introduces a pre-trained deep learning model (such as U-Net) to optimize the mask of closed regions. The cross-entropy loss function is used to more accurately identify key regions with fine structures. Multi-scale analysis identifies structures at different resolutions, effectively protecting key regions. Step 1.7 proposes a dynamic balancing mechanism for scenarios with limited computing resources. Using the Q-learning reinforcement learning algorithm, the state, action space, and reward function are defined based on point cloud density and memory, dynamically adjusting the segmentation parameters to achieve optimal resource utilization. It can also adapt to different computing power platforms by controlling the maximum number of points per block, while simultaneously monitoring point cloud density in real time to adjust the segmentation parameters, improving structure recognition and preservation capabilities and enhancing system adaptability and flexibility.

[0121] The third implementation method differs from the first implementation method in that the post-processing mechanism in step 2 includes the following processing strategy:

[0122] Step 2.1: Count the number of points in each sub-block. Let N be the number of points contained in each initial segmentation block. i If the number of points in a certain sub-block is N i Greater than the maximum number of points threshold N max This indicates that the sub-block has an excessive number of points, which affects the consistency of the distribution of training and inference data in downstream artificial intelligence products. Therefore, it is not suitable to retain it as an independent unit and the sub-block needs to be segmented.

[0123] Step 2.2: Generate the projection ray of each pixel center of the two-dimensional skeleton in the three-dimensional point cloud; construct a normal cylindrical neighborhood with the projection ray as the central axis and the width of the skeleton segmentation block on the image plane as the cylinder diameter; count the number of points in the neighborhood as the local density of the skeleton points; connect the density values ​​of each point in sequence to generate a one-dimensional density distribution curve along the skeleton.

[0124] Step 2.3: Locate the target voxel region with the highest density within the segmented block, and perform a cut along a plane passing through the centroid of the target voxel region and perpendicular to the tangent direction of the 2D skeleton at that point; repeat step 2.1 on the cut result to ensure that the point cloud of the sub-block is less than the maximum number of points threshold N. max ;

[0125] Step 2.4, if the number of points in a certain sub-block is N i Less than the minimum number of points threshold N minThis indicates that the sub-block has insufficient density and weak geometric support, and should not be retained as an independent unit. In this case, it is necessary to further determine whether it meets the adjacent unit merging condition.

[0126] Step 2.5, if N i Greater than the maximum number of points threshold N max Then, locate the target voxel region with the highest density within the segmentation block, and perform a cut along a plane passing through the centroid of this region and perpendicular to the tangent direction of the 2D skeleton at that point. If N i Less than the minimum number of points threshold N min If there exists an adjacent segment j that satisfies all three of the following conditions, then sub-block merging is performed:

[0127] Condition 1 (Euclidean Adjacency): The Euclidean distance D between the current block and its adjacent blocks. ij Less than the maximum adjacency distance D max The unit is mm, used to constrain spatial proximity;

[0128] Condition 2 (Normal Consistency): Angle θ between normal vectors ij Satisfy cos(θ) ij ) ≥ cos(θ max ), θ max θ represents the maximum allowable angle threshold between normal vectors, in radians, set within the range [0.26, 0.52], to ensure continuous transition of the geometric surface on local curved surfaces and avoid incorrectly merging structural blocks with obvious morphological differences; ij Represented as a unit normal vector n i With n j The angle between them, in radians, ranges from [0, π], and is measured using cosine similarity. The calculation method is as follows:

[0129] ;

[0130] Condition 3: Number of adjacent partitioning points and N i +N j ≤ N max ; where D max The Euclidean distance threshold for determining the maximum adjacency between segmented blocks is set empirically in mm.

[0131] Step 2.6: Use graph theory algorithms to match and verify the segmented sub-blocks to ensure that the boundaries between sub-blocks are continuous and the format is uniform; perform smooth transition processing on the boundaries between sub-blocks to reduce geometric discontinuities caused by segmentation.

[0132] The specific steps of matching and verifying using graph theory algorithms in step 2.6 are as follows:

[0133] b1 constructs an adjacency graph between sub-blocks, where nodes represent sub-blocks and edges represent the adjacency relationships between sub-blocks;

[0134] b2 traverses the adjacency graph and checks whether the boundaries of each pair of adjacent sub-blocks are continuous (e.g., by comparing the normal vectors and distances of the boundary points).

[0135] b3 performs local adjustments (such as smoothing or re-segmentation) for discontinuous boundaries.

[0136] The specific steps for smooth transition processing are as follows:

[0137] c1 identifies boundary points that require smoothing.

[0138] For each boundary point, c2 calculates the average position and normal vector of its neighborhood points;

[0139] c3 moves the boundary point to the average position of its neighborhood points and adjusts its normal vector to match the neighborhood points; the new position of the boundary point is calculated by a weighted average of the neighborhood points.

[0140] ;

[0141] Where p′ is the new position of the boundary point, p n It is the position of a point within its neighborhood, w n It is a weight (which can be set based on distance or density).

[0142] Step 2.1 Segment sub-blocks with more points than the threshold to ensure data distribution consistency; Step 2.2 Construct a normal cylindrical neighborhood to generate a one-dimensional density distribution curve, providing a basis for subsequent segmentation; Step 2.3 Locate and segment the region with the highest density to ensure sub-block compliance; Steps 2.4-2.5 Merge sub-blocks with insufficient points when the adjacency merging condition is met, making reasonable use of resources. Step 2.6 Use graph theory algorithms to match and verify sub-blocks, ensuring boundary continuity and uniformity. Smooth transition processing reduces geometric discontinuities. Through operations such as constructing an adjacency graph, checking boundaries, local adjustments, and calculating new boundary point positions, the quality and usability of the segmented sub-blocks are effectively improved, laying a solid foundation for subsequent processing and applications.

[0143] The fourth implementation method differs from the first implementation method in that step 3 formats and encodes the segmentation result, specifically including the following steps:

[0144] Step 3.1: All segmentation results are integrated into a multidimensional array and stored in a binary data file, including point cloud matrix, structure label, feature mask and sub-block identifier number, and field validity check and data structure consistency confirmation are performed.

[0145] Point cloud matrix: Records the seven-dimensional attribute information of all points in a sub-block. The data format is an N×7 floating-point matrix, and the columns are as follows:

[0146] x, y, z: three-dimensional spatial coordinates;

[0147] i: Reflection intensity;

[0148] e, g, f: Color information;

[0149] If the scanning device does not have RGB or Intensity acquisition capabilities, the relevant fields can be set to default values ​​or set to zero vectors;

[0150] Structural labels: Assign structural category labels to each point, in the format of an N×1 integer array, supporting structural semantic modeling;

[0151] Feature mask: In Boolean matrix form, each point is marked as to indicate whether it is enabled for subsequent modeling tasks, supporting feature point filtering and data simplification;

[0152] Sub-block identification number: Each sub-block is assigned a unique Block_ID code to ensure data traceability;

[0153] Step 3.2: To ensure the consistency of data distribution for training and inference in downstream AI products, and to guarantee the consistency and usability of the segmentation results, the segmented blocks should meet the following indicators:

[0154] The number of points in each point cloud block does not exceed the upper limit N. max ;

[0155] The 3D bounding box size of each point cloud patch does not exceed the limit side length L. max That is, max(W, H, D) ≤ L max W, H, and D are the sub-block dimensions in the X, Y, and Z directions, respectively.

[0156] The criteria for merging point cloud blocks include Euclidean center distance, angle between normal vectors, number of adjacent segmentation points, and three types of threshold parameters, which are preset based on sample statistical characteristics or human experience.

[0157] The segmentation results are integrated into a multidimensional array, stored in a binary file, and checked to ensure data standardization and accuracy. Point cloud block count and size parameters are set to ensure consistent data distribution. Point cloud block merging is based on three preset threshold parameters, which are flexible and reasonable, improving the quality and practicality of point cloud processing.

[0158] Furthermore, any content not described in detail in this specification is existing technology known to those skilled in the art.

[0159] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.

[0160] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A three-dimensional point cloud adaptive segmentation method based on structure guidance and density-driven approach, characterized in that, Includes the following steps: Step 1: Construct a point cloud segmentation mechanism combining skeleton structure guidance and density adaptive driving: First, preprocess the original point cloud, remove outliers by voxel filtering, and then project to generate a 2D image; obtain edge results through edge detection and morphological operations, and then fill to obtain a closed region mask; extract skeleton lines using a thinning algorithm, combine graph pruning and deep learning models to identify key structural regions, and introduce multi-scale analysis to enhance recognition; divide the point cloud into 3D voxels, and determine the adaptive segmentation unit size Δv according to the density distribution; set up protection zones around key nodes of the skeleton structure to avoid segmentation damage to the structure; for scenarios with limited computing resources, dynamically adjust Δv and block strategy based on system computing and memory resources using a reinforcement learning model, while monitoring point cloud density in real time to adjust segmentation parameters; Step 2: Establish a post-segmentation processing mechanism: Count the number of points in the point cloud block, and segment or merge point cloud blocks with more or less points than the upper limit or the adjacent block is judged and merged; construct an adjacency graph to verify the continuity of the point cloud block boundary, and smooth the discontinuous boundary. Step 3: Format and encode the segmentation results, integrate them into a multidimensional array and store them in a binary file to ensure that the point cloud blocks meet the point count and size specifications and ensure data distribution consistency.

2. The adaptive segmentation method for 3D point clouds based on structure guidance and density driving according to claim 1, characterized in that, Step 1 specifically includes the following steps: Step 1.1: Obtain the raw point cloud data and preprocess it. Use voxel filtering to remove outliers. Then determine the main projection direction according to the gravity direction or data acquisition posture. By default, project the 3D point cloud onto the XY plane along the Z-axis to generate a 2D image. The 2D image is bounded by the smallest bounding rectangle of the point cloud in the XY plane and its original aspect ratio is maintained. Step 1.2: The gradient magnitude of the two-dimensional image generated by the point cloud projection is calculated using a gradient-based edge detection operator. Further, the gradient magnitude is thresholded to obtain a preliminary edge image. Further, morphological dilation and closing operations are performed on the preliminary edge image to fill edge breaks and suppress noise, thereby obtaining an edge result consistent with the visible outer contour and internal hole boundary of the point cloud. Step 1.3: Automatically select a valid seed point within the closed region as the starting point for the region growing algorithm, fill the target region, and obtain a complete closed region mask; Step 1.4: Iteratively refine the closed region mask based on the Zhang-Suen thinning algorithm, extract its single-pixel width skeleton line as a topological structure representation, and delete endpoint branches with a length less than the branch threshold L0 by combining graph structure pruning; further identify the intersection points, endpoints and corner nodes in the skeleton as structural key points; at the same time, introduce a deep learning model to further optimize the closed region mask, automatically identify and mark more refined structural key regions, and introduce multi-scale analysis to identify structural key regions at different resolutions; Step 1.5: Perform 3D voxel partitioning on the point cloud, construct a voxel mesh and calculate the point cloud density value of each voxel unit, and construct an adaptive segmentation unit size Δv based on the density distribution characteristics to control the segmentation accuracy. Step 1.6: For areas near critical nodes of the skeleton structure, based on the principle that the Euclidean distance is less than the structural protection radius R... k The judgment condition is to set the surrounding voxel units as the protection zone, with the smallest voxel unit size being Δv. These voxel units are excluded from the segmentation region during the segmentation process, thereby avoiding the destruction of the integrity of the key structural regions and improving the ability to identify and preserve structures. Step 1.7: For application scenarios with limited computing resources, set the maximum number of nodes per block N based on the currently available memory and computing load. block A reinforcement learning model is introduced to dynamically adjust Δv and the block segmentation strategy, enabling optimal resource utilization of the segmented point cloud blocks within the computational capacity; by controlling N... block To adapt to different computing power platforms and achieve flexible collaborative scheduling of point cloud segmentation; at the same time, to increase real-time monitoring of point cloud density, and to immediately adjust segmentation parameters when the density changes significantly.

3. The adaptive segmentation method for 3D point clouds based on structure guidance and density driving according to claim 2, characterized in that, In step 1.4, deep learning optimization involves introducing a pre-trained deep learning model to further optimize the closed region mask. Specifically, the closed region mask obtained in step 1.3 is used as input and fed into the deep learning model for fine segmentation to identify more subtle key structural regions. The model outputs the optimized mask to more accurately label the key structural regions. The loss function used in deep learning models is cross-entropy loss, which measures the difference between the model's output mask and the real mask. ; Where C is the number of pixels, B is the number of categories, b∈(1,B), c∈(1,C), y bc It's a real tag, p bc It is the model's predicted probability; Multi-scale analysis: Structural identification of point clouds at different resolutions ensures effective protection of critical structural regions at different scales. The specific steps are as follows: downsample the original point cloud to generate multiple point cloud data at different resolutions; repeat steps 1.1 to 1.4 at each resolution to identify and mark critical structural regions. By combining the recognition results at various resolutions, the final protection range of the critical structural regions is determined.

4. The adaptive segmentation method for 3D point clouds based on structure guidance and density driving according to claim 2, characterized in that, In step 1.7, the reinforcement learning model introduces the following: Q-learning reinforcement learning algorithm is used to dynamically adjust the segmentation unit size Δv and the maximum number of points in a single block N. block The specific steps are as follows: a1 defines the state space S, including the current point cloud density, available memory, and computational load; a2 defines the action space A, including adjustments to Δv and N. block All possible actions; a3 defines a reward function R, which provides a reward based on the quality and computational efficiency of the segmented point cloud blocks; A4 is used to train a reinforcement learning model to select the optimal action in different states to maximize cumulative reward. The formula for updating the Q-value in Q-learning is: ; Where s is the current state, a is the current action, r is the immediate reward, s′ is the next state, a′ is the possible action in the next state, α is the learning rate, and γ is the discount factor.

5. The adaptive segmentation method for 3D point clouds based on structure guidance and density driving according to claim 1, characterized in that, The post-processing mechanism in step 2 includes the following processing strategies: Step 2.1: Count the number of points in the point cloud blocks. Let N be the number of points contained in each initial point cloud block. i If the number of points in a certain point cloud is N i Greater than the maximum number of points threshold N max This indicates that the point cloud block has an excessive number of points, which affects the consistency of the distribution of training and inference data for downstream artificial intelligence products. Therefore, it is not suitable to retain it as an independent unit and the point cloud block needs to be segmented. Step 2.2: Generate the projection ray of each pixel center of the two-dimensional skeleton in the three-dimensional point cloud; construct a normal cylindrical neighborhood with the projection ray as the central axis and the width of the skeleton point cloud block on the image plane as the cylinder diameter; count the number of points in the neighborhood as the local density of the skeleton points; connect the density values ​​of each point in sequence to generate a one-dimensional density distribution curve along the skeleton. Step 2.3: Locate the target voxel region with the highest density within the point cloud block, and perform a cut along a plane passing through the centroid of the target voxel region and perpendicular to the tangent direction of the 2D skeleton at that point; repeat step 2.1 on the cut result to ensure that the point cloud block's point count is less than the maximum point count threshold N. max ; Step 2.4, if the number of points in a certain point cloud block is N i Less than the minimum number of points threshold N min This indicates that the point cloud block has insufficient density and weak geometric support, and should not be retained as an independent unit. In this case, it is necessary to further determine whether the point cloud block satisfies the adjacent unit merging condition. Step 2.5, if N i Greater than the maximum number of points threshold N max Then, locate the target voxel region with the highest density within the point cloud block, and perform a cut along a plane passing through the centroid of this region and perpendicular to the tangent direction of the 2D skeleton at that point. If N i Less than the minimum number of points threshold N min If there exist adjacent point cloud blocks j that satisfy the following three conditions simultaneously, then point cloud block merging is performed: Condition 1: Euclidean center distance D ij Less than D max ; Condition 2: Angle θ between the normal vectors ij Satisfy cos(θ) ij ) ≥ cos(θ max ), θ max θ represents the maximum permissible angle threshold between normal vectors. ij Represented as a unit normal vector n i With n j The angle between them, in radians, ranges from [0, π], and is measured using cosine similarity. The calculation method is as follows: ; Condition 3: Number of adjacent point cloud blocks and N i +N j ≤ N max ; where D max The Euclidean distance threshold for determining the maximum adjacency between point cloud blocks, in mm, is set empirically. Step 2.6: Use graph theory algorithms to match and verify the segmented point cloud blocks to ensure that the boundaries between the point cloud blocks are continuous and the format is uniform; perform smooth transition processing on the boundaries between the point cloud blocks to reduce the geometric discontinuities caused by segmentation.

6. The adaptive segmentation method for 3D point clouds based on structure guidance and density driving according to claim 5, characterized in that, The specific steps of matching and verifying using graph theory algorithms in step 2.6 are as follows: b1 constructs an adjacency graph between point cloud blocks, where nodes represent point cloud blocks and edges represent the adjacency relationships between point cloud blocks; b2 traverses the adjacency graph and checks whether the boundaries of each pair of adjacent point clouds are continuous. b3 makes local adjustments for discontinuous boundaries; The specific steps for smooth transition processing are as follows: c1 identifies boundary points that require smoothing. For each boundary point, c2 calculates the average position and normal vector of its neighborhood points; c3 moves the boundary point to the average position of its neighborhood points and adjusts its normal vector to match the neighborhood points; the new position of the boundary point is calculated by a weighted average of the neighborhood points. ; Where p′ is the new position of the boundary point; p n It is the position of a point within its neighborhood; w n It is a weight, set according to distance or density.

7. The adaptive segmentation method for 3D point clouds based on structure guidance and density driving according to claim 1, characterized in that, Step 3 involves formatting and encoding the segmentation results, specifically including the following steps: Step 3.1: All segmentation results are integrated into a multidimensional array and stored in a binary data file, including point cloud matrix, structure label, feature mask and point cloud block identifier number, and field validity check and data structure consistency confirmation are performed. Step 3.2: To ensure the consistency of data distribution for training and inference required by downstream AI products, and to guarantee the consistency and usability of the segmentation results, the point cloud blocks should meet the following indicators: The number of points in each point cloud block does not exceed the upper limit N. max ; The 3D bounding box size of each point cloud patch does not exceed the limit side length L. max That is, max(W, H, D) ≤ L max W, H, and D are the point cloud block sizes in the X, Y, and Z directions, respectively.

8. The adaptive segmentation method for 3D point clouds based on structure guidance and density driving according to claim 2, characterized in that, In step 1.6, the protection radius R of the key nodes of the skeleton structure k It satisfies the following function form: ; Where d avg σ represents the average point distance in this area, in mm. local δ represents the standard deviation of the local point distance, and β represents empirical coefficients.

9. The adaptive segmentation method for 3D point clouds based on structure guidance and density driving according to claim 5, characterized in that, The criteria for merging point cloud blocks include Euclidean center distance, the angle between normal vectors, the number of adjacent point cloud blocks, and three types of threshold parameters, which are preset based on sample statistical characteristics or human experience.

Citation Information

Patent Citations

  • 3D point cloud generation, identification and segmentation method

    CN119648901A

  • Map construction method and map construction device

    CN119313842A

  • Self-adaptive mixed point cloud scene recognition method based on density

    CN119785341A