Point cloud edge line extraction method for irregular wall
By using an adaptive clustering parameter and direction-guided edge point extraction method, the stability and integrity issues of edge line extraction on irregular walls are solved, achieving high-precision and robust edge line recognition, which is suitable for path tracking and modeling tasks in complex environments.
Patent Information
- Application Number
- CN202510986914.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-17
- Publication Date
- 2025-10-31
AI Technical Summary
Existing technologies struggle to extract edge lines with high precision and robustness on irregular walls, especially in cases of uneven density and multiple edge structures. Traditional methods are prone to edge breakage, misjudgment, or omission, and the output results lack directionality and continuity, making them unsuitable for practical applications.
By employing adaptive clustering parameter adjustment, a direction-guided edge point extraction mechanism, and a multi-structure parallel processing framework, edge lines of irregular walls can be extracted by dynamically adjusting the clustering threshold, estimating the main direction, and sorting the edge points.
It improves the stability and integrity of edge line extraction, and outputs an edge point set with directional consistency and spatial continuity, which is suitable for tasks such as path judgment, contour reconstruction and spatial segmentation.
Smart Images

Figure CN120876519A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of point cloud boundary recognition technology, and relates to a method for extracting the edge lines of point clouds of irregular walls. Background Technology
[0002] With the development of 3D modeling, spatial understanding, and robot perception technologies, structure recognition based on point cloud data has been widely applied in fields such as architectural surveying, environmental perception, and autonomous navigation. Especially when dealing with complex structures such as irregular walls, accurate edge extraction plays a crucial role in subsequent modeling, contour reconstruction, and spatial segmentation. However, due to the characteristics of irregular walls, such as nonlinear morphology, complex structure, and irregular surface, traditional edge recognition methods struggle to meet the requirements of high accuracy and robustness.
[0003] First, irregular structural surfaces often lack clear geometric boundaries. Wall edges may consist of continuous curved surfaces, geometric abrupt changes, or contour bends, making it difficult to directly extract edge points using simple height variations or gradient features. Especially when boundaries are ambiguous or lack significant corner points, traditional methods are prone to edge breakage, misjudgment, or omission.
[0004] Secondly, point cloud data typically exhibits uneven spatial distribution. Point clouds are denser in nearby areas and sparser in distant areas. Traditional methods using fixed clustering radii or neighboring point connection strategies struggle to balance accuracy and completeness when dealing with regions of varying density. Edge points are easily missed in sparse regions, while redundant information or even erroneous boundaries may be introduced in dense regions.
[0005] Third, in the process of edge line extraction, it is necessary not only to identify the edge points, but also to determine the arrangement direction of the edge points. Since the edge lines of irregular walls may extend in any direction, if the main extension trend of the edge cannot be obtained, the extraction results will be difficult to use for tasks such as path judgment, contour tracking, or spatial logic reasoning.
[0006] Furthermore, in practical applications, a point cloud scene may contain multiple edge structures simultaneously, such as multiple steps, intersecting walls, or occlusion gaps. Existing methods often can only identify a single main edge or cannot separate multiple edge clusters, resulting in incomplete boundary extraction and thus affecting the robustness of downstream models.
[0007] Finally, the output method of edge points is also a key factor affecting practicality. Many methods only output discrete sets of edge points, lacking spatial order or topological structure, making them difficult to use directly for engineering tasks such as modeling or boundary fitting. If the edge line structure lacks continuity and directionality, it is not conducive to efficient docking and use in practical systems.
[0008] Current point cloud data processing is generally based on Point Cloud Libraries (PCLs), and data reception, transformation, and distribution are handled through Robot Operating Systems (ROS). However, implementing structured, orientation-aware, and adaptive edge extraction algorithms on these platforms still faces numerous challenges. Therefore, there is an urgent need for a point cloud edge extraction technology that can adapt to irregular wall geometry and possesses both orientation recognition and multi-edge processing capabilities to improve the accuracy and practicality of structure perception. Summary of the Invention
[0009] In view of this, the purpose of the present invention is to provide a method for extracting the edge lines of point clouds of irregular walls.
[0010] (1) To address the issue of density differences in point cloud data across different regions, a clustering parameter adjustment method with adaptive capabilities is proposed.
[0011] This invention extracts the overall spatial location features of point clouds, establishes a mapping relationship between point cloud density and processing strategies, and dynamically adjusts the inter-point connectivity threshold during clustering. This method can automatically adjust clustering sensitivity according to changes in point cloud coverage, effectively preserving contour information in sparsely structured regions while avoiding over-subdivision in densely structured regions. It adapts to edge structure extraction needs at different sampling scales without requiring manual parameter setting.
[0012] (2) To address the problems of irregular edge structure shape and discontinuous outline, an edge point extraction mechanism based on direction guidance was designed.
[0013] This mechanism analyzes the distribution trend of local point sets, extracts the main arrangement direction, and projects the point set onto a one-dimensional structure using this direction as a reference. The projection range is then divided, and representative points are selected in each segment to construct an edge sequence. This method requires no pre-defined geometric model and can adapt to complex contours such as zigzag, bend, and breakage, enhancing the stability of edge point extraction while maintaining geometric continuity.
[0014] (3) To address the lack of directional information along the edge, a mechanism for estimating the direction of edge arrangement is introduced.
[0015] During edge point extraction, the extension direction of the edge line is estimated by combining the structural principal axis direction information and using symbol judgment or statistical trend. This mechanism can output the orientation markers of the edge arrangement to express the spatial trend of the structural lines, providing directional input for subsequent contour reconstruction, geometric analysis, or other direction-related modules.
[0016] (4) For the case where there are multiple edge targets in the scene, an edge extraction framework that supports the simultaneous recognition of multiple structures is proposed.
[0017] This framework does not limit the number of structures in the edge extraction process. It processes multiple point cloud subsets in parallel, performing direction determination, contour extraction, and result generation separately. The edge point results of all structures are finally merged into a unified output, ensuring the integrity and diversity of the overall edge information. It is suitable for processing irregular walls or boundary structures with complex shapes.
[0018] (5) To address the problem of disordered edge point outputs and difficulty in direct application, an edge point sequence reconstruction method based on direction sorting is constructed.
[0019] This invention sorts and numbers edge points by segment based on directional projection, thereby outputting an edge point set with sequential consistency and spatial continuity. This output format can be directly used for tasks such as contour mapping, edge fitting, or spatial segmentation, simplifying the calling process of subsequent processing modules, improving information transmission efficiency, and enhancing the practical value of edge data.
[0020] To achieve the above objectives, the present invention provides the following technical solution:
[0021] A method for extracting the edge lines of point clouds of irregular walls, the method comprising the following steps:
[0022] S1: Receive and convert the raw point cloud data into Point Cloud Library (PCL) format;
[0023] S2: Calculate the geometric center C of the point cloud set and estimate the distance D between the geometric center and the origin, specifically:
[0024]
[0025] Where N represents the number of center points of the point cloud, (x i ,y i ,z i () represents the three-dimensional coordinates of the i-th point;
[0026]
[0027] Where (x,y,z) represents the three-dimensional coordinates of the geometric center C, and ||·||2 represents the Euclidean norm;
[0028] S3: Calculate the distance threshold T based on the point cloud scale D, satisfying:
[0029] T = f(D)
[0030] Where f(D) is a monotonically increasing function of D, and T is the distance threshold for clustering.
[0031] S4: Project the point cloud onto a two-dimensional plane, retain only the x and y coordinates, and perform clustering and segmentation according to the threshold T to obtain multiple point cloud clusters;
[0032] S5: Calculate the principal direction vector u for each cluster, satisfying:
[0033]
[0034] Where n is the number of points in the current cluster, p i This represents the coordinates of the i-th two-dimensional point. Let u be the geometric center coordinates of the cluster, and u be the unit vector.
[0035] S6: For each point p in the cluster i A linear projection along the principal direction u yields a one-dimensional projection value s. i ,satisfy:
[0036] s i =p i ·u
[0037] and s i The area is divided into B segments, each segment having a length of:
[0038]
[0039] Where B represents the number of segments, and Δs represents the length of each segment on the projection axis;
[0040] S7: Within each segment, select the point with the largest vertical z-coordinate as the edge point E. j ,satisfy:
[0041]
[0042] Among them, bin j Let z represent the set of points within the j-th segment. p This represents the vertical coordinates of point p.
[0043] S8: Put all edge points E j Connect the segments in sequence to form the edge point sequence L. i ,Right now:
[0044] L i ={E1,E2,...,E B}
[0045] S9: Determine the arrangement direction of the edge lines based on the positive and negative signs of the components of the main direction vector u in the specified coordinate axis direction.
[0046] S10: Connect the edges L corresponding to multiple clusters i Merge into the final edge output:
[0047] Furthermore, the form of f(D) is:
[0048] f(D) = a·ln(b·D+1)
[0049] Where a and b are preset positive constants, and D is the point cloud scale.
[0050] Furthermore, in step S4, when projecting the three-dimensional point cloud onto a two-dimensional plane, only the x and y coordinates of each point are retained, while the z coordinate is discarded, in order to construct a two-dimensional point set and reduce computational complexity.
[0051] Furthermore, the clusters retain only the point sets that satisfy the following two conditions:
[0052] The proportion of points to total points is not less than a preset threshold;
[0053] The cluster size ranks among the top M clusters, where M is a set positive integer.
[0054] Furthermore, the number of segments B is calculated as follows:
[0055]
[0056] Where n is the number of points in the current cluster, and k is an empirically set positive integer. This indicates the floor function.
[0057] Furthermore, the edge point sequence L i Edge point E in j According to its projection value s i Sort them from smallest to largest.
[0058] Furthermore, when the component of the main direction vector u in the x-axis direction is positive, the arrangement direction of the edge line is determined to be from left to right; when the component is negative, it is determined to be from right to left.
[0059] Furthermore, the multiple clusters respectively perform principal direction estimation, edge point extraction and edge line generation, and finally merge the edge lines of each cluster into an edge line point set L for unified output.
[0060] Furthermore, the method is implemented in the Robot Operating System (ROS) platform, and the point cloud data is acquired and processed through the ROS message mechanism.
[0061] Furthermore, the edge point set L possesses spatial continuity and directional consistency, making it suitable for use as input data in boundary modeling, structural fitting, or spatial segmentation tasks.
[0062] The beneficial effects of this invention are as follows:
[0063] This invention provides a point cloud edge line extraction method suitable for irregular walls, which has the advantages of strong structure, clear direction, high robustness and strong adaptability. It can effectively overcome the problems of blurred boundaries, sparse data, incomplete structure recognition, missing direction and disordered output in the prior art.
[0064] First, this invention constructs a clustering parameter adaptive mechanism based on spatial scale perception, which can dynamically adjust the distance threshold for clustering processing according to the density differences of point clouds at different observation distances. This mechanism effectively improves the integrity of edge recognition in sparse regions and the boundary accuracy in dense regions, avoiding recognition bias caused by fixed parameters, and has good self-adjustment capability and versatility.
[0065] Secondly, this invention employs a main direction-driven edge point extraction strategy. By analyzing the extension trend of local point clouds, it extracts contour boundaries without requiring a pre-set geometric model, demonstrating strong adaptability to irregular structures. This method can handle edge structures with complex shapes and weak continuity, avoiding overfitting or failure problems caused by model dependence, and enhancing the stability and topological consistency of edge extraction.
[0066] Furthermore, this invention introduces an edge direction estimation mechanism, which automatically determines the arrangement direction of edge lines through the spatial components of the principal direction vector, providing clear directional information for subsequent path tracking, contour reconstruction, and spatial analysis. This direction perception capability requires no manual setting and has a high degree of automation and geometric interpretation capability.
[0067] Furthermore, this invention supports parallel processing and unified output of multiple edge structures, enabling the simultaneous identification of multiple independent or intersecting edge lines in complex scenes, ensuring the integrity of boundary extraction and scene coverage. The multi-structure fusion mechanism enhances the applicability and processing efficiency of the method in real-world scenarios.
[0068] Finally, this invention outputs a set of edge points with spatial continuity and ordered structure through a direction-guided segmented extraction and sequence sorting method. This output can be easily used directly for downstream tasks such as contour modeling, boundary fitting, or spatial segmentation, reducing additional processing steps and improving the practicality and engineering deployment efficiency of point cloud analysis.
[0069] Other advantages, objectives, and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination, or may be learned from practice of the invention. The objectives and other advantages of the invention can be realized and obtained through the following description. Attached Figure Description
[0070] To make the objectives, technical solutions, and advantages of the present invention clearer, the preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings, wherein:
[0071] Figure 1 This is a flowchart of the present invention;
[0072] Figure 2 Image showing the result of edge line extraction;
[0073] Figure 3 This describes the edge line extraction effect when there is occlusion. Detailed Implementation
[0074] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0075] The accompanying drawings are for illustrative purposes only and are schematic diagrams, not actual pictures. They should not be construed as limiting the invention. To better illustrate the embodiments of the invention, some parts in the drawings may be omitted, enlarged, or reduced, and do not represent the actual product dimensions. It is understandable to those skilled in the art that some well-known structures and their descriptions may be omitted in the drawings.
[0076] In the accompanying drawings of the embodiments of the present invention, the same or similar reference numerals correspond to the same or similar components. In the description of the present invention, it should be understood that if terms such as "upper," "lower," "left," "right," "front," and "rear" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, they are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, the terms used to describe positional relationships in the drawings are only for illustrative purposes and should not be construed as limiting the present invention. For those skilled in the art, the specific meaning of the above terms can be understood according to the specific circumstances.
[0077] Figure 1 This is a flowchart of the present invention; Figure 2 Image showing the result of edge line extraction; Figure 3 This describes the edge line extraction effect when there is occlusion.
[0078] 1. Data Preprocessing
[0079] To enhance the adaptability and stability of the edge line extraction method under different spatial conditions, this invention first performs preprocessing operations on the raw point cloud data. This step mainly focuses on analyzing the spatial distribution characteristics of the point cloud and optimizes the subsequent clustering and boundary structure recognition effects through a parameter adaptive mechanism.
[0080] 1.1 Point Cloud Reception and Conversion
[0081] The system subscribes to topics from sensors using types in the ROS framework, and first converts the received point cloud data into PCL format for subsequent geometric analysis and processing.
[0082] 1.2 Spatial Center Estimation
[0083] To determine the overall spatial distribution of the point cloud, the system calculates the geometric center of the point set. Suppose the point set contains N points with coordinates p. i =(x i ,y i ,z i If the geometric center is 0, then the geometric center is 0. The calculation method is as follows:
[0084]
[0085] The central location can be used for subsequent distance feature extraction and clustering parameter control.
[0086] 1.3 Point Cloud Scale Estimation
[0087] The spatial scale of the point cloud observation area can be estimated based on the distance between the geometric center and a spatial reference point (such as the origin), reflecting whether the current data is in the far field or near field conditions. This scale index is expressed as:
[0088]
[0089] Where ||·|| represents the Euclidean norm.
[0090] 1.4 Dynamic Adjustment of Clustering Threshold
[0091] Since the density of 3D point clouds varies significantly across different regions, this invention proposes a clustering radius adjustment method based on the spatial scale D to improve the consistency of clustering performance in sparse and dense regions. Specifically, a monotonic function T(D) is constructed based on D, causing the clustering tolerance parameter T to automatically adjust with distance.
[0092] T(D)=f(D) (3)
[0093] Here, f(D) represents a certain form of increasing or saturating function, the specific form of which can be flexibly set according to the characteristics of the scene. Through this mechanism, the system can appropriately relax the clustering threshold under long-distance low-density conditions, while maintaining fine boundary perception in close-range regions, thereby improving the overall stability of edge extraction.
[0094] 2D projection and clustering segmentation of point clouds
[0095] To reduce the computational complexity of three-dimensional spatial analysis and focus on the extraction of structural contours, this invention employs a strategy combining projection and clustering to divide the original point cloud data into regions.
[0096] First, the system projects the 3D point cloud onto a horizontal plane, retaining only its coordinate information in the horizontal and vertical directions to construct a 2D point set. This transformation simplifies the spatial structure, making subsequent clustering analysis more efficient and highlighting the horizontal distribution characteristics of the point cloud.
[0097] Next, a clustering operation is performed on the two-dimensional point set based on the spatial proximity analysis method. This step uses the aforementioned adaptively adjusted distance threshold as a key reference parameter to determine the connectivity between points, thereby forming several spatially close point clusters. Each point cluster can be regarded as a local structural unit for subsequent edge point extraction.
[0098] To ensure the representativeness and stability of the extracted structures, this invention sets validity screening criteria for the clustering results. Only clusters that reach a certain scale and have a significant proportion in the overall point cloud are retained for further processing. This strategy helps to eliminate isolated noise point sets or small invalid structures, improving the accuracy and consistency of overall edge line extraction. The clustering result screening criteria are as follows:
[0099] ① The number of points should account for an appropriate proportion of the overall point cloud;
[0100] ② Cluster size is relatively dominant among all clusters.
[0101] 3. Main Direction Analysis
[0102] After completing point cloud clustering, to obtain the extension trend of each structural unit on the plane, this invention estimates the principal direction for each effective point cloud subset. This process is used to determine the main arrangement direction of the local structure, providing a directional reference for the subsequent sorting and extraction of edge points.
[0103] Specifically, for each two-dimensional point set in a cluster region, its spatial distribution center (centroid) is first calculated, and then, based on this, the distribution changes of all points relative to this center are analyzed. By constructing a structural metric based on point coordinate deviation, the system can further determine that the point set has the strongest extension trend in a certain direction. Let the point set be {p}. i},in If the geometric center of the point set is represented by v, then the principal direction vector is... min It can be defined as the unit direction that maximizes the following indicators:
[0104]
[0105] Formula (4) means finding a direction that maximizes the variance of the point set distribution in that direction, which is the main arrangement direction of the structure. This main direction vector is not only used to guide the subsequent binning operation of edge points, but also as a criterion for the extension trend of the structure. For example, when the component of this vector in a certain axis (such as the X direction) is positive, it can be determined that the current edge line arrangement trend is "from left to right". This directional information will serve as an important input for the semantic analysis of the edge structure, supporting subsequent tasks such as sorting, reconstruction, or path determination.
[0106] 4. Projection of boxes along the main direction
[0107] After completing clustering and principal direction estimation, in order to extract a well-structured and orderly sequence of edge points, this invention further performs direction-guided projection analysis and segmentation operations on the point cloud within each cluster region. Assume the current cluster has a known principal extension direction v. min The system uses this direction as a reference axis and performs a linear projection on each point within the cluster to obtain its one-dimensional position scalar along the principal direction. This projection value is expressed as:
[0108] s i =p i ·v min (5)
[0109] Where, p i Let s be the plane coordinates of the point. i Let its projection position be on the linear axis. Then the system is over the entire projection range [s]. min ,s max The axis is evenly divided into several segments bin, each segment having a length of:
[0110]
[0111] Where B represents the number of segments, and its value can be dynamically set according to the cluster size or the number of points. The purpose of this segmentation operation is to extract a representative edge point within each local segment, thereby forming an ordered sequence of edge points composed of multiple representative points. This set of edge points has directional consistency and spatial continuity, and can serve as a simplified representation of the structural outline, facilitating subsequent processing.
[0112] This binning extraction mechanism does not depend on the specific density or distribution of point clouds, and is suitable for point cloud edge extraction tasks with complex structures and significant irregular contours. It has strong versatility and practicality.
[0113] 5 Edge line extraction
[0114] For the set of points within each bin Select the point with the largest Z value (i.e., the highest in the vertical direction):
[0115]
[0116] By concatenating the edge points of each bin in sequence, the edge lines of the current cluster are formed:
[0117]
[0118] Finally, the edges of all clusters are merged into a global edge point cloud:
[0119]
[0120] The edge line width is defined as the total length of the projection in the principal direction:
[0121] W = s max -s min (10)
[0122] After obtaining the total length, the extension direction of the edge line can be further determined by the sign of the components of the principal direction vector along a specific coordinate axis. For example, if the component of the vector on the horizontal coordinate axis is positive, the edge line can be considered to be arranged from left to right; otherwise, it is the opposite direction.
[0123] 6. Shortcomings of existing technologies and solutions improvement
[0124] In structural edge recognition tasks based on 3D point clouds, edge extraction is a crucial step in achieving environmental understanding, structural analysis, and spatial modeling. However, existing technologies still suffer from the following drawbacks when processing point cloud data with irregular structures, significant scale variations, or coexisting polygonal structures:
[0125] 6.1 Fixed processing parameters have poor adaptability to multi-scale point clouds.
[0126] Existing methods often employ static clustering parameters, such as fixed distance thresholds, to segment point cloud structures. However, point cloud density is significantly affected by observation distance; sparse point clouds at long distances are easily misclassified as isolated points, while dense point clouds at short distances are prone to over-segmentation. This processing strategy lacks adaptability to changes in spatial scale, limiting the consistency and robustness of edge recognition.
[0127] 6.2 Methods that rely on complex model fitting suffer from high computational cost and poor robustness.
[0128] Some traditional methods use explicit geometric models for fitting to extract boundary structures. However, this strategy has high requirements for continuity and regularity, making it difficult to adapt to irregular shapes or curved edges. Furthermore, it suffers from poor stability under conditions such as occlusion, local breaks, and noise points, and its real-time performance is also insufficient to meet engineering requirements.
[0129] 6.3 Lacks orientation awareness and cannot identify the orientation of edge arrangement.
[0130] Most edge detection methods only output the spatial coordinates of the edge points, without providing the edge arrangement direction or structural extension trend, which makes it impossible for downstream tasks to accurately use edge information for decision-making.
[0131] 6.4 Unable to handle scenarios with multiple edge structures combined.
[0132] Traditional methods typically extract only the "maximum cluster" or "significant edges." However, in complex real-world scenarios, such as intersecting walls, occlusions, and overlapping objects, multiple edge structures may appear simultaneously, resulting in weak multi-edge combination detection capabilities and incomplete results for traditional methods.
[0133] Example 1: Adaptive Adjustment of Clustering Parameters Based on Spatial Scale
[0134] This embodiment addresses the problem of significant differences in the spatial distribution density of point clouds by providing a workflow for dynamically adjusting clustering parameters.
[0135] The workflow is as follows:
[0136] The robot operating system receives 3D point cloud data and converts it into a point cloud library format for processing.
[0137] Traverse all points, calculate the geometric center of the point cloud set, and obtain the three-dimensional coordinates of the geometric center;
[0138] The Euclidean distance between the geometric center and the spatial origin is calculated and defined as the spatial scale of the point cloud.
[0139] A monotonically increasing function is constructed based on spatial scale to output the distance-related clustering radius;
[0140] In subsequent cluster analysis, the cluster radius parameter is dynamically applied to perform proximity analysis and region division on the point cloud.
[0141] The resulting clusters maintain good structural expression in regions with different densities, effectively avoiding the problems of connection failure in sparse regions or over-segmentation in dense regions.
[0142] Example 2: Edge point extraction and sorting guided by the main direction
[0143] This embodiment is based on the concept of direction awareness and designs a processing flow that can extract ordered and continuous edge points.
[0144] The workflow is as follows:
[0145] After completing the point cloud clustering, the principal direction is estimated for each cluster.
[0146] By statistically analyzing the coordinate deviations of each point relative to the cluster center, we find the direction vector that maximizes the projection variance and define it as the principal direction.
[0147] Using this direction as a reference axis, all points within the cluster are projected onto this direction to obtain a one-dimensional projection position;
[0148] Divide the projection axis into several continuous segments, and select the point with the largest vertical height in each segment as the edge point;
[0149] All edge points are arranged in segment order, forming an edge point sequence with spatial continuity and directional consistency.
[0150] Determine the direction of the edge lines based on the sign of the components of the principal direction vector on the coordinate axes;
[0151] The output edge point sequence can be used for subsequent tasks such as structural contour reconstruction and boundary fitting.
[0152] Example 3: Parallel Extraction and Fusion of Multi-Edge Structures
[0153] This embodiment addresses the problem of extracting multiple edge structures simultaneously in real-world scenarios, achieving complete boundary representation through parallel computing and result fusion.
[0154] The workflow is as follows:
[0155] When performing point cloud clustering and segmentation, no limit is set on the number of clusters, and multiple valid clusters that meet the conditions are retained;
[0156] For each cluster, perform the main direction estimation, projection segmentation, edge point extraction, and edge line construction process separately;
[0157] Record the edge lines generated for each cluster separately, along with structural orientation information;
[0158] All edge lines are integrated through spatial location and directional features to form a complete edge line output structure;
[0159] The output structure supports the simultaneous expression of multiple boundary contours, making it suitable for complex environments with staggered steps, obscured joints, or multiple wall segments.
[0160] The resulting edge data can be used as input for subsequent modeling, partitioning, or semantic recognition modules, exhibiting good structural integrity and clarity of expression.
[0161] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A method for extracting the edge lines of point clouds of irregular walls, characterized in that: The method includes the following steps: S1: Receive and convert the raw point cloud data into PCL format for point cloud library; S2: Calculate the geometric center C of the point cloud set and estimate the distance D between the geometric center and the origin, specifically: Where N represents the number of center points of the point cloud, (x i ,y i ,z i () represents the three-dimensional coordinates of the i-th point; Where (x,y,z) represents the three-dimensional coordinates of the geometric center C, and ||·||2 represents the Euclidean norm; S3: Calculate the distance threshold T based on the point cloud scale D, satisfying: T = f(D) Where f(D) is a monotonically increasing function of D, and T is the distance threshold for clustering. S4: Project the point cloud onto a two-dimensional plane, retain only the x and y coordinates, and perform clustering and segmentation according to the threshold T to obtain multiple point cloud clusters; S5: Calculate the principal direction vector u for each cluster, satisfying: Where n is the number of points in the current cluster, p i This represents the coordinates of the i-th two-dimensional point. Let u be the geometric center coordinates of the cluster, and u be the unit vector. S6: For each point p in the cluster i A linear projection along the principal direction u yields a one-dimensional projection value s. i ,satisfy: s i =p i ·u and s i The area is divided into B segments, each segment having a length of: Where B represents the number of segments, and Δs represents the length of each segment on the projection axis; S7: Within each segment, select the point with the largest vertical z-coordinate as the edge point E. j ,satisfy: Among them, bin j Let z represent the set of points within the j-th segment. p This represents the vertical coordinates of point p. S8: Put all edge points E j Connect the segments in sequence to form the edge point sequence L. i ,Right now: L i ={E1,E2,...,E B } S9: Determine the arrangement direction of the edge lines based on the positive and negative signs of the components of the main direction vector u in the specified coordinate axis direction. S10: Connect the edges L corresponding to multiple clusters i Combined into the final edge output.
2. The method for extracting point cloud edges of irregular walls according to claim 1, characterized in that: The form of f(D) is: f(D) = a·ln(b·D+1) Where a and b are preset positive constants, and D is the point cloud scale.
3. The method for extracting point cloud edges of irregular walls according to claim 1, characterized in that: In step S4, when projecting the three-dimensional point cloud onto a two-dimensional plane, only the x and y coordinates of each point are retained, while the z coordinate is discarded. This is used to construct a two-dimensional point set to reduce computational complexity.
4. The method for extracting point cloud edges of irregular walls according to claim 1, characterized in that: The cluster retains only the set of points that satisfy the following two conditions: The proportion of points to total points is not less than a preset threshold; The cluster size ranks among the top M clusters, where M is a set positive integer.
5. The method for extracting point cloud edges of irregular walls according to claim 1, characterized in that: The number of segments B is calculated as follows: Where n is the number of points in the current cluster, and k is an empirically set positive integer. This indicates the floor function.
6. The method for extracting point cloud edges of irregular walls according to claim 1, characterized in that: The edge point sequence L i Edge point E in j According to its projection value s i Sort them from smallest to largest.
7. The method for extracting point cloud edge lines of irregular walls according to claim 1, characterized in that: When the component of the principal direction vector u in the x-axis direction is positive, the arrangement direction of the edge line is determined to be from left to right; when the component is negative, it is determined to be from right to left.
8. The method for extracting point cloud edges of irregular walls according to claim 1, characterized in that: The multiple clusters perform principal direction estimation, edge point extraction, and edge line generation respectively, and finally merge the edge lines of each cluster into an edge line point set L for unified output.
9. The method for extracting point cloud edges of irregular walls according to claim 1, characterized in that: The method is implemented in the robot operating system ROS platform, and point cloud data is acquired and processed through the ROS message mechanism.
10. The method for extracting point cloud edge lines of irregular walls according to claim 8, characterized in that: The set of edge points L possesses spatial continuity and directional consistency, making it suitable as input data for boundary modeling, structural fitting, or spatial segmentation tasks.