Point cloud-based underground pipeline extraction method, system, equipment and storage medium
By segmenting, fitting and reconstructing the underground pipeline point cloud data, the problem of low computing efficiency in the existing technology is solved, and accurate pipeline extraction is achieved in complex contexts.
Patent Information
- Application Number
- CN202411405570.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2044-10-10
AI Technical Summary
The prior art is inefficient in processing complex backgrounds and incomplete point cloud data of underground pipelines, making it difficult to accurately extract the geometric structure of the pipeline.
By obtaining pipeline point cloud data, performing scene object segmentation, using principal component analysis and random sampling consistency algorithm for cylindrical fitting and plane cutting, extracting pipeline centerline, and reconstructing the model based on feature point connection relationships.
In the absence of incomplete or noise, accurately capture the pipeline geometry, improve computing efficiency and extraction accuracy, and is suitable for complex application scenarios.
Smart Images

Figure CN119478390B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of point cloud spatial geometry extraction, and in particular to a point cloud-based underground pipeline extraction method, system, device and storage medium. Background Art
[0002] Detecting pipeline spatial locations and extracting information are crucial steps in the maintenance and updating of underground pipeline facility information systems. With the acceleration of urbanization, the complexity and scale of underground pipeline systems are increasing, placing higher demands on the accuracy and efficiency of pipeline information extraction. Due to the complex background of underground pipelines and the limitations of laser scanning technology for data acquisition, some data may be missing during pipeline information collection.
[0003] Currently, commonly used pipeline detection and information extraction methods mainly include region growing, Hough transform, Gaussian fitting, and the Random Sample Consensus (RANSAC) algorithm. However, most related technologies focus on information extraction from industrial plant pipelines, with relatively simple and uniform usage scenarios and high requirements for data acquisition quality. However, the data acquisition scenarios for underground pipeline facilities are more complex, the integrity of pipeline facility point cloud acquisition is low, and the geographic distribution area of pipelines is much larger. Although region growing and Hough transform can extract pipeline information, they are sensitive to noise and have high computational complexity. Although Gaussian fitting can provide accurate cylinder parameters, it requires high initial conditions and data quality. The RANSAC algorithm performs well when processing noisy data, but its main drawback is the uncertainty of parameter selection. Therefore, when point cloud data is incomplete, current information extraction methods have low computational efficiency and are difficult to extract underground pipelines. Summary of the Invention
[0004] The main purpose of the embodiments of this application is to propose a point cloud-based underground pipeline extraction method, system, equipment and storage medium, aiming to realize the automatic extraction of underground pipeline information, accurately capture the geometric structure of the pipeline when the point cloud data is incomplete, and improve computing efficiency.
[0005] To achieve the above objectives, one aspect of an embodiment of the present application provides a method for extracting underground pipelines based on point clouds, the method comprising:
[0006] Obtain underground pipeline point cloud data;
[0007] Performing scene object segmentation on the pipeline point cloud data to obtain a segmentation result, wherein the segmentation result includes a single-pipeline scene and a multi-pipeline scene;
[0008] When the segmentation result is a single-pipe scene, principal component analysis is performed based on all the pipeline point cloud data to obtain the normal vector of each data point in the pipeline point cloud data, and cylindrical fitting is performed on the pipeline point cloud data to obtain the pipeline radius;
[0009] Performing plane cutting according to the normal vector to obtain a tangent plane, and obtaining a pipeline centerline based on the tangent plane;
[0010] determining a distance threshold parameter according to the pipeline radius;
[0011] Based on the distance threshold parameter, performing piecewise straight line fitting on the pipeline centerline by a random sampling consistency algorithm to obtain a centerline point set;
[0012] Performing feature extraction on the centerline point set to obtain feature points of the pipeline centerline, wherein the feature points include endpoints and inflection points;
[0013] Determine the connection relationship between adjacent feature points according to the geometric relationship;
[0014] A pipeline reconstruction model is obtained based on the connection relationship.
[0015] In some embodiments, obtaining underground pipeline point cloud data includes the following steps:
[0016] Obtain underground spatial point cloud data;
[0017] The spatial point cloud data is semantically segmented through a deep learning semantic segmentation network to separate the pipeline from the background and obtain pipeline point cloud data.
[0018] In some embodiments, performing scene object segmentation on the pipeline point cloud data to obtain a segmentation result includes the following steps:
[0019] Dividing the pipeline point cloud data into several clusters of pipeline subset data through a clustering algorithm and pipeline prediction labels;
[0020] When the number of the pipeline subset data is equal to one cluster, determining that the segmentation result is a single-pipe scene;
[0021] Alternatively, when the number of the pipeline subset data is greater than one cluster, determining that the segmentation result is a multi-pipe scene;
[0022] Among them, in the process of clustering algorithm processing, clusters that do not meet the constraints are removed according to the volume threshold constraint and the number threshold constraint;
[0023] The underground pipeline extraction method based on point cloud also includes the following steps:
[0024] When the segmentation result is a multi-pipe scene, principal component analysis is performed on each cluster of the pipeline subset data to obtain the normal vector of each data point in the pipeline subset data.
[0025] In some embodiments, performing principal component analysis based on all the pipeline point cloud data to obtain the normal vector of each data point in the pipeline point cloud data includes the following steps:
[0026] For each data point in the pipeline point cloud data, determining neighboring points with the data point as the center to obtain a neighboring point set;
[0027] The covariance matrix of the neighboring point set is calculated, and the eigenvector corresponding to the minimum eigenvalue of the covariance matrix is used as the normal vector of the data point.
[0028] In some embodiments, performing plane cutting according to the normal vector to obtain a tangent plane, and obtaining a pipeline centerline based on the tangent plane, includes the following steps:
[0029] Performing plane cutting along a direction perpendicular to the normal vector to obtain a plurality of tangential planes;
[0030] Determine the center point of each of the tangential planes, and obtain the rotational symmetry axis based on the position information of all the center points;
[0031] The rotational symmetry axis is determined as the pipeline centerline.
[0032] In some embodiments, determining the distance threshold parameter according to the pipeline radius includes the following steps:
[0033] The distance threshold parameter of the random sampling consensus algorithm is set to β multiples of the pipeline radius, where β∈[0.1,1].
[0034] In some embodiments, before the step of obtaining the centerline point set, the method further includes the following steps:
[0035] The cylindrical neighborhood filtering method is used to take the pipeline centerline obtained by fitting as the axis, and the α multiple of the pipeline radius as the cylindrical neighborhood radius to remove noise points within the cylindrical range, where α∈[0.5,5].
[0036] To achieve the above objectives, another aspect of the present application provides a point cloud-based underground pipeline extraction system, the system comprising:
[0037] The first module is used to obtain underground pipeline point cloud data;
[0038] The second module is used to perform scene object segmentation on the pipeline point cloud data to obtain a segmentation result, wherein the segmentation result includes a single-pipe scene and a multi-pipe scene;
[0039] The third module is configured to, when the segmentation result is a single-pipe scene, perform principal component analysis based on all the pipeline point cloud data to obtain the normal vector of each data point in the pipeline point cloud data, perform cylindrical fitting on the pipeline point cloud data, and obtain the pipeline radius;
[0040] A fourth module is configured to perform plane cutting according to the normal vector to obtain a tangent plane, and obtain a pipeline centerline based on the tangent plane;
[0041] A fifth module is configured to determine a distance threshold parameter according to the pipeline radius;
[0042] A sixth module is configured to perform piecewise straight line fitting on the pipeline centerline using a random sampling consistency algorithm based on the distance threshold parameter to obtain a centerline point set;
[0043] A seventh module is used to extract features from the centerline point set to obtain feature points of the pipeline centerline, wherein the feature points include endpoints and inflection points;
[0044] An eighth module is used to determine the connection relationship between adjacent feature points based on geometric relationships;
[0045] The ninth module is used to obtain a pipeline reconstruction model based on the connection relationship.
[0046] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application provides an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the above-mentioned method when executing the computer program.
[0047] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program implements the above-mentioned method when executed by a processor.
[0048] The embodiments of the present application include at least the following beneficial effects: the present application provides a method, system, device and storage medium for underground pipeline extraction based on point cloud, which obtains underground pipeline point cloud data; performs scene object segmentation on the pipeline point cloud data to obtain segmentation results, wherein the segmentation results include single-pipe scenes and multi-pipe scenes; when the segmentation result is a single-pipe scene, principal component analysis is performed based on all pipeline point cloud data to obtain the normal vector of each data point in the pipeline point cloud data, and cylindrical fitting is performed on the pipeline point cloud data to obtain the pipeline radius; plane cutting is performed according to the normal vector to obtain a tangent plane, and the pipeline centerline is obtained based on the tangent plane, which can simplify the three-dimensional geometric shape into a one-dimensional center line, reducing data complexity and improving computing efficiency. Even when point cloud data is incomplete or noisy, it can still accurately capture the geometric structure of the pipeline and enhance robustness. The distance threshold parameter is determined according to the pipeline radius, and the parameter can be adaptively adjusted according to actual conditions to improve extraction accuracy and stability. Based on the distance threshold parameter, the pipeline centerline is segmented and fitted with a straight line through a random sampling consistency algorithm to obtain a centerline point set. Feature extraction is performed on the centerline point set to obtain feature points of the pipeline centerline. The connection relationship between adjacent feature points is determined based on the geometric relationship. Based on the connection relationship, a pipeline reconstruction model is obtained, which can be applied to complex application scenarios and realize the automatic extraction of underground pipeline information. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 This is a flow chart of the underground pipeline extraction method based on point cloud provided in an embodiment of the present application;
[0050] Figure 2 Schematic diagram of the original point cloud of a single-tube scene provided in an embodiment of the present application;
[0051] Figure 3 Schematic diagram of the segmentation results of the single-tube scene semantic segmentation provided in an embodiment of the present application;
[0052] Figure 4 Schematic diagram of the original point cloud of the multi-tube scene provided in the embodiment of the present application;
[0053] Figure 5 This is a schematic diagram of the segmentation results of the multi-channel scene semantic segmentation provided by the embodiment of the present application
[0054] Figure 6 This is a schematic diagram of the reconstruction results of the single-tube scene reconstruction pipeline provided in an embodiment of the present application;
[0055] Figure 7 Schematic diagram of the reconstruction result of the multi-tube scene reconstruction pipeline provided in an embodiment of the present application;
[0056] Figure 8 is a flow chart of a point cloud-based underground pipeline extraction method provided by another embodiment of the present application;
[0057] Figure 9 Schematic diagram of the structure of the underground pipeline extraction system based on point cloud provided in an embodiment of the present application;
[0058] Figure 10 This is a schematic diagram of the hardware structure of the electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0059] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. They are merely examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the appended claims.
[0060] It will be understood that the terms "first", "second", etc. used in this application may be used herein to describe various concepts, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0061] The terms "at least one", "plurality", "each", "any", etc. used in this application include "at least one", "two" or more, "plurality" or "each", "any" or "any one", "each" or "any one" as used herein.
[0062] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.
[0063] Before explaining the embodiments of the present application in detail, some of the nouns and terms involved in the embodiments of the present application are first explained. The nouns and terms involved in the embodiments of the present application are subject to the following explanations.
[0064] (1) Branch: The basic shape of the pipeline consists of a cylinder, which is called a branch in this article.
[0065] (2) Joint: The connecting part of a branch (such as a tee) is called a joint.
[0066] (3) Rotational axis of symmetry (ROSA): The axis of symmetry in which the overall shape and structure of the pipeline remain unchanged after it rotates around a certain axis at any angle in three-dimensional space.
[0067] Next, some related technologies involved in the embodiments of this application are explained.
[0068] The region growing method starts from one or more seed points and gradually merges adjacent pixels or voxels similar to the seed points to form a complete region, thereby detecting pipeline geometry.
[0069] Hough transform is a shape detection method based on parameter space. It converts points in space into parameter space and identifies parameters that conform to the pipeline model.
[0070] The Gaussian fitting method assumes that the data points follow a Gaussian distribution and fits the center line and radius of the cylinder through an optimization algorithm.
[0071] The RANSAC algorithm is an iterative method that finds the best pipeline model by randomly selecting a subset of data for model fitting. The maxDistance parameter in the algorithm defines the maximum distance threshold for a point to be considered an inlier, which is used to determine whether a data point conforms to the fitted model.
[0072] However, the region growing method is simple and intuitive, and the Hough transform is suitable for detecting obvious shapes. These two methods are definitely sensitive to noise and have high computational complexity. Gaussian fitting can provide accurate cylinder parameters, but it has high requirements for initial conditions and data quality. The RANSAC algorithm performs well when processing noisy data, but the uncertainty of parameter selection is its main disadvantage. For example, the inlier threshold maxDistance is the error threshold for determining whether a data point is an inlier. If the distance from the data point to the model is less than this threshold, the point is considered to be an inlier. If the threshold is set too large, many noise points may be mistakenly regarded as inliers, affecting the accuracy of the model; if it is set too small, the real inliers may be mistaken for noise points. Therefore, a more computationally efficient method is needed.
[0073] In view of this, an embodiment of the present application provides a point cloud-based underground pipeline extraction method, system, equipment and storage medium. The pipeline information extraction method based on the center line simplifies complex three-dimensional geometric shapes into one-dimensional defects, reduces the complexity of the data, and facilitates subsequent analysis and processing.
[0074] The underground pipeline extraction method based on point cloud provided in the embodiment of the present application relates to the technical field of point cloud spatial geometry extraction. The underground pipeline extraction method based on point cloud provided in the embodiment of the present application can be applied to a terminal, can be applied to a server, or can be software running in a terminal or a server. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and a car terminal, etc., but is not limited to this; the server side can be configured as an independent physical server, or as a server cluster or distributed system composed of multiple physical servers, or as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can also be a node server in a blockchain network; the software can be an application that implements the underground pipeline extraction method based on point cloud, etc., but is not limited to the above forms.
[0075] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and the like. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments in which tasks are performed by remote processing devices connected via a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media, including storage devices.
[0076] Figure 1 This is an optional flowchart of the underground pipeline extraction method based on point cloud provided in an embodiment of the present application. Figure 1 The method may include but is not limited to steps S101 to S109.
[0077] Step S101: Acquire underground pipeline point cloud data.
[0078] Specifically, step S101 may include but is not limited to steps S201 to S202.
[0079] Step S201: Acquire underground spatial point cloud data.
[0080] For example, a laser scanning device (such as a laser scanner or lidar) is used to emit a laser beam to measure the underground scene. Based on the time from the emission to the return of the laser beam, as well as the angle and intensity of the reflected beam, the three-dimensional coordinates and surface properties of the objects in the scene are calculated to generate underground spatial point cloud data.
[0081] Step S202: Perform semantic segmentation on the spatial point cloud data through a deep learning semantic segmentation network, separate the pipeline from the background, and obtain pipeline point cloud data.
[0082] Optionally, semantic segmentation is performed on spatial point cloud data using an advanced deep learning semantic segmentation network (such as PointNet, PointNet++, RandLA-Net, PointConv, etc.), and the acquired underground spatial point cloud data is input into the deep learning semantic segmentation network. For example, the point cloud data is processed using the RandLA-Net network. After training, the network can automatically segment underground pipelines from complex backgrounds. The segmentation result obtained contains all points belonging to the pipeline, thereby obtaining pipeline point cloud data.
[0083] In some embodiments, reference Figure 2 , the original point cloud data of the single-tube scene is input into the deep learning semantic segmentation network, and the semantic segmentation results of the single-tube scene are obtained as follows Figure 3 As shown, blue represents pipelines.
[0084] In another embodiment, referring to Figure 4 , the original point cloud data of the multi-tube scene is input into the deep learning semantic segmentation network, and the semantic segmentation results of the multi-tube scene are obtained as follows Figure 5 As shown, blue represents pipelines.
[0085] Step S102 : Segment the pipeline point cloud data into scene objects to obtain segmentation results, wherein the segmentation results include single-pipeline scenes and multi-pipeline scenes.
[0086] Specifically, scene object segmentation of pipeline point cloud data refers to the use of specific algorithms and techniques to divide pipeline point cloud data according to its spatial, geometric, and texture characteristics, so that the point cloud data within the same division have similar characteristics.
[0087] It can be understood that the single-pipe scene indicates that the pipeline point cloud dataset exhibits similar characteristics. When performing scene segmentation on the pipeline point cloud data, all pipeline point cloud data in this scenario are regarded as coming from one pipeline.
[0088] A multi-pipeline scene means that the pipeline point cloud data is divided into multiple independent areas. There are differences in spatial position, geometric shape, texture and other features between areas. When performing scene segmentation on the pipeline point cloud data, the pipeline point cloud data located in the same area in this scenario are regarded as the same pipeline, and the pipeline point cloud data located in different areas are regarded as coming from different pipelines.
[0089] In some embodiments, step S102 may include but is not limited to steps S301 to S303.
[0090] Step S301 : dividing pipeline point cloud data into several clusters of pipeline subset data using a clustering algorithm and pipeline prediction labels.
[0091] Specifically, based on the HDBSACN clustering algorithm and pipeline prediction labels, the pipeline point cloud data with similar characteristics are divided into a cluster of pipeline subset data according to the distribution characteristics, cluster shape and quantity of pipeline point cloud data, thereby obtaining several clusters of independent pipeline subset data.
[0092] Step S302: When the number of pipeline subset data is equal to one cluster, it is determined that the segmentation result is a single-pipe scene.
[0093] It is understandable that when there is only one cluster of pipeline subset data after division, it means that the pipelines exhibit similar characteristics and all pipeline point cloud data come from one pipeline. Therefore, the segmentation result is determined to be a single-pipeline scene.
[0094] Step S303 , or when the number of pipeline subset data is greater than one cluster, it is determined that the segmentation result is a multi-pipe scene.
[0095] Alternatively, when the number of pipeline subset data is greater than one cluster after division, for example, the pipeline point cloud data is divided into three clusters based on the characteristics of spatial distribution, it may mean that the pipeline point cloud data comes from three different pipelines. Therefore, the segmentation result is determined to be a multi-pipeline scene.
[0096] In the process of clustering algorithm processing, clusters that do not meet the constraints are removed according to the volume threshold constraint and the number threshold constraint.
[0097] Optionally, considering the presence of noise and incorrect segmentation in point cloud data, clusters that do not meet the constraints can be removed during the clustering algorithm processing based on the volume threshold constraint and the number threshold constraint. For example, if the volume threshold is set to 0.5 cubic meters and the number threshold is set to 500, clusters with a volume less than 0.5 cubic meters will be removed according to the preset volume threshold constraint, and clusters with a number less than 500 will be removed according to the number threshold constraint.
[0098] Furthermore, the underground pipeline extraction method based on point cloud may also include but is not limited to the following steps: performing principal component analysis on each pipeline subset data to obtain the normal vector of each data point in the pipeline subset data.
[0099] In step S103, when the segmentation result is a single-pipe scene, principal component analysis is performed based on all pipeline point cloud data to obtain the normal vector of each data point in the pipeline point cloud data, and cylindrical fitting is performed on the pipeline point cloud data to obtain the pipeline radius.
[0100] Specifically, when the segmentation result is a single-pipe scene, first, principal component analysis (PCA) is performed on the neighborhood point set of each data point in the pipeline point cloud data to estimate the normal vector of each data point in the pipeline point cloud data.
[0101] Then, a cylinder fitting is performed on the pipeline based on the RANSAC algorithm, and the radius parameter of the fitted cylinder is the pipeline radius. Optionally, when calculating the radius, a multiple iteration calculation method is used, and the multiple iteration mode with the largest number of occurrences is taken as the representative pipeline radius.
[0102] It is understandable that in order to further reduce the calculation errors introduced by noise points due to laser point cloud scanning, it is also possible to limit the reasonable range of pipe diameters based on the existing pipeline facility library, filter unreasonable radius parameters, reduce the errors introduced by underground pipeline laser scanning, and thus optimize the radius calculation of the pipeline and improve accuracy.
[0103] In some embodiments, the step of performing principal component analysis based on all pipeline point cloud data to obtain the normal vector of each data point in the pipeline point cloud data may include but is not limited to steps S401 and S402.
[0104] Step S401 : For each data point in the pipeline point cloud data, neighboring points are determined with the data point as the center to obtain a neighboring point set.
[0105] For example, a k-nearest neighbor algorithm may be used to search based on a fixed number, and for each data point in the pipeline point cloud data, k nearest neighbor points (eg, k=20) are selected with the data point as the center to obtain a neighbor point set.
[0106] Alternatively, a radius search method is used to search based on a preset radius. For each data point in the pipeline point cloud data, all points within a given radius are selected with the data point as the center to obtain a neighboring point set.
[0107] Step S402 : Calculate the covariance matrix of the neighboring point set, and use the eigenvector corresponding to the minimum eigenvalue of the covariance matrix as the normal vector of the data point.
[0108] For example, let the neighboring point set of a data point be N. For a three-dimensional point cloud, the coordinates of each neighboring point are (x i ,y i ,z i ), calculate the mean of the coordinates of each neighboring point in each dimension for the selected neighboring point set to obtain the centroid coordinates. Subtract the coordinates of each neighboring point from the centroid coordinates to obtain the corresponding offset vector, and then construct the covariance matrix based on all the offset vectors.
[0109] Next, the covariance matrix of the neighboring point set is calculated, and the eigenvector corresponding to the minimum eigenvalue of the covariance matrix is obtained through PCA analysis. Usually, the eigenvector corresponding to the minimum eigenvalue represents the direction with the least change in the data distribution, that is, the normal direction of the local surface. Therefore, this eigenvector is used as the normal vector of the data point.
[0110] Step S104: performing plane cutting according to the normal vector to obtain a tangent plane, and obtaining the pipeline centerline based on the tangent plane.
[0111] In some embodiments, step S104 may include but is not limited to steps S501 to S503.
[0112] Step S501 : performing plane cutting along a direction perpendicular to the normal vector to obtain a plurality of tangential planes.
[0113] Specifically, several local optimal cutting planes (ie, tangential planes) are obtained through continuous iteration and plane cutting along the direction perpendicular to the normal vector of each data point.
[0114] Step S502: determine the center point of each tangential plane, and obtain the rotational symmetry axis according to the position information of all the center points.
[0115] For example, when a tangent plane intersects the pipeline point cloud data, a series of intersection points are generated. These intersection points are roughly located on the pipeline's cross section and, in theory, should be distributed on the surface of a cylinder centered on the axis of rotational symmetry. Through continuous iteration and plane cutting, the center points of the tangent planes are determined. After determining the center point of each tangent plane, the center points of all the tangent planes are connected based on their positional information to obtain the rotational symmetry axis that reflects the pipeline's direction and shape.
[0116] Step S503: determine the rotational symmetry axis as the pipeline centerline.
[0117] It's understandable that the ROSA algorithm is an algorithm for extracting centerlines from incomplete point clouds. It's based on the generalized rotational symmetry of a set of directed points. Given a subset S of oriented points, the algorithm introduces a variational definition of the oriented point that is most rotationally symmetric with respect to that subset. Based on the ROSA concept, the algorithm effectively uses normal vector information to compensate for missing data, finding the axis that minimizes the change in subset S after rotation relative to a certain axis. This axis of rotational symmetry is then determined, becoming the pipeline centerline.
[0118] In this embodiment, even when the pipeline point cloud data is incomplete or noisy, the geometric structure of the pipeline can still be accurately captured. It has a certain degree of robustness against point cloud noise and data missing, and can reliably extract pipeline information even in the face of complex and imperfect data.
[0119] Step S105: determining a distance threshold parameter according to the pipeline radius.
[0120] Specifically, step S105 may include but is not limited to step S601.
[0121] Step S601 : Set the distance threshold parameter of the random sampling consensus algorithm to β multiples of the pipeline radius, where β∈[0.1,1].
[0122] Considering that the uncertainty of parameter selection in the RANSAC algorithm is its main drawback, if the distance threshold parameter for determining whether an inlier is set too large, it is easy for noise points to be mistakenly regarded as inliers, affecting the accuracy of the model; however, if the distance threshold is set too small, it is easy for true inliers to be mistaken for noise points. Therefore, in order to dynamically adjust the distance threshold parameter of the RANSAC algorithm according to actual conditions, the distance threshold parameter is adaptively adjusted based on the pipeline radius.
[0123] Specifically, the distance threshold parameter in the RANSAC algorithm is set to a multiple of β of the pipeline radius, where β∈[0.1,1]. It should be noted that β and the pipeline radius are two independent parameters. The setting of β is affected by the noise in the centerline point set. The more noise, the larger the β value. Optionally, the specific value of β can be set based on experience. By combining the empirical database to eliminate incorrect pipe diameter fitting results caused by noise, a more consistent pipeline radius under the mode is obtained.
[0124] It should be noted that in addition to the mode, the mean, median, etc. can also be used as long as the error caused by noise can be reduced.
[0125] Step S106 , based on the distance threshold parameter, a random sampling consistency algorithm is used to perform segmented straight line fitting on the pipeline centerline to obtain a centerline point set.
[0126] Specifically, a linear fit is first performed on every five consecutive points on the roughly extracted pipeline centerline to determine the orientation of the local line segment. Next, the cosine values between adjacent line segments are calculated, the angle between them is evaluated, and the fitted curve segments are optimized based on the cosine values. This operation is repeated multiple times as the point cloud data is traversed to gradually purify and smooth the entire curve, improving the accuracy and robustness of subsequent curve fitting. By fitting and optimizing local features, the system better adapts to the shape and noise of complex curves, resulting in more accurate results.
[0127] Next, based on a distance threshold parameter determined by the pipeline radius, the RANSAC algorithm is used to construct a candidate model by randomly sampling data points. The internal structure of the data is then estimated by identifying internal points (data points that fit the model well) and external points (noise or outliers) to find the best-fitting model. Its main goal is to find a model that can best describe the data in a dataset with noise and outliers, and eliminate the interference of outliers.
[0128] Finally, all identified internal points of the model are connected to obtain the centerline point set on the pipeline centerline.
[0129] In some embodiments, before the step of obtaining the centerline point set, the process may further include but is not limited to step S701.
[0130] Step S701: Using a cylindrical neighborhood filtering method, the pipeline centerline obtained by fitting is used as the axis, and the cylindrical neighborhood radius is α times the pipeline radius, to remove noise points within the cylindrical range, where α∈[0.5,5].
[0131] Specifically, considering the characteristics of on-site internal pipeline scanning, when extracting the pipeline centerline, the noise and abnormal points in the point cloud are mostly located in the space inside the pipeline. The closer to the pipeline's rotational symmetry axis, the denser the noise distribution. Therefore, a parameter adaptive adjustment strategy based on the pipeline radius can be used to adjust the parameter settings of the cylindrical neighborhood filter. During the iterative optimization process based on the RANSAC segmented extraction algorithm, the straight line obtained from each fitting is used as the axis, and the cylindrical neighborhood radius is a multiple of the pipeline radius α. The noise points within the cylindrical range are removed, where α∈[0.5,5].
[0132] Step S107 , performing feature extraction on the centerline point set to obtain feature points of the pipeline centerline, wherein the feature points include endpoints and inflection points.
[0133] Specifically, feature point extraction is performed on the centerline point set to obtain feature points whose geometric characteristics closely match the geometric properties of the pipeline's straight or broken lines. Given the pipeline's geometric characteristics, a start-end point extraction method, a filtering feature extraction method, and a feature point extraction method without filtering are proposed for the centerline point set to extract feature points (endpoints, inflection points, etc.) from the centerline point set. Furthermore, the number of feature points is considered a limiting factor in the feature point extraction calculation to avoid the situation where only a single feature point is extracted.
[0134] For example, the feature point extraction mode provides three options for users to choose according to actual conditions, including pipeline start and end point extraction method, noise filter extraction method, and filter-free feature point extraction method.
[0135] When the pipeline is a straight line, the start and end endpoint extraction method is used to extract the start and end endpoints of the pipeline as feature points.
[0136] When the number of feature points obtained after centerline point set feature extraction is greater than two, one case is that the pipeline is straight but the data is interfered by noise, and the other case is that there is a bend in the pipeline, so the feature points also include inflection points.
[0137] Considering that the filter can effectively remove noise from straight pipes, but will cause deviations in the pipeline trajectory for curved pipes, the system uses a filter-free feature point extraction method to avoid filtering the feature points in order to retain the inflection points in the feature points.
[0138] In case that the data may be interfered by noise, the noise filtering extraction method can be used to filter the feature points and remove the noise in the feature points.
[0139] It should be noted that when the noise filtering extraction method is used to filter the feature points, if there is only one feature point in the end, the pipeline information cannot be restored. Therefore, during the feature point extraction process, it is necessary to judge the number of feature points and introduce a quantity restriction condition. If the number of feature points after filtering is 1, the system automatically adjusts to the feature point extraction method without filtering.
[0140] Step S108: determining the connection relationship between adjacent feature points based on the geometric relationship.
[0141] For example, the main directions of the calculated feature points are determined by principal component analysis, and the adjacent relationships between the feature points are determined in sequence according to the main directions, and the lines between the feature points are connected.
[0142] Step S109: obtaining a pipeline reconstruction model based on the connection relationship.
[0143] Exemplarily, the spatial length of the pipeline is calculated based on the connection relationship to generate a pipeline reconstruction model.
[0144] In some embodiments, according to Figure 2 The pipeline centerline and pipeline radius are extracted from the original point cloud data of the single-pipe scene, and feature points are obtained based on the pipeline centerline and pipeline radius. The spatial length of the pipeline is calculated based on the connection relationship between adjacent feature points, and the pipeline reconstruction model after the single-pipe scene is reconstructed is obtained, as shown in the figure. Figure 6 As shown, the red lines represent the reconstructed pipeline. Figure 6 It can be seen that in the single-pipe scenario, even if some point cloud data is missing, the system can still re-establish a complete pipeline reconstruction model of a single-segment pipe after calculating the spatial length based on the connection relationship between adjacent feature points.
[0145] according to Figure 4 The pipeline centerline and pipeline radius are extracted from the original point cloud data of the multi-pipe scene, and the feature points are obtained according to the pipeline centerline and pipeline radius. The spatial length of the pipeline is calculated based on the connection relationship of adjacent feature points, and the pipeline reconstruction model after the multi-pipe scene is reconstructed is obtained, as shown in the figure. Figure 7 As shown, the red lines represent the reconstructed pipeline.
[0146] It should be noted that due to the limitations of laser scanning data in complex underground spaces, some single pipelines have intermittent scanning, resulting in incomplete point cloud data. In this case, there is a straight pipe that is mistakenly identified as a multi-pipe scene due to missing point cloud data. In order to reduce the impact of missing data on the accuracy of pipeline reconstruction, in some embodiments, when the segmentation result is a multi-pipe scene, when reconstructing the pipeline, the system will also provide a single-pipe scene reconstruction result that treats all pipeline point cloud data as a cluster. When multiple pipelines are identified, the system outputs pipeline reconstruction models for both single-pipe and multi-pipe scenes to the user, allowing the user to choose a reconstruction effect that is more in line with reality.
[0147] The following describes and explains the solution of the embodiment of the present invention in detail with reference to specific application examples.
[0148] Reference Figure 8 , Figure 8 A flowchart of a point cloud-based underground pipeline extraction method provided in another embodiment of the present application.
[0149] In this embodiment, semantic segmentation is first performed to segment the underground pipelines from the complex background through a deep learning semantic segmentation network.
[0150] Next, pipeline objects are clustered and the pipeline point cloud data is processed for scene object segmentation, including single-pipeline and multi-pipeline scenarios. When multiple pipelines exist in the same scene, the pipeline set can be divided into independent subsets using a clustering algorithm and pipeline prediction labels. During implementation, two processing methods are provided for users to choose from: single pipeline (no clustering) and multiple pipelines (clustering).
[0151] For multi-pipeline scenarios, certain threshold rules are also combined to remove the influence of noise clusters. After clustering, considering that incorrect segmentation often occurs during object segmentation, volume and number threshold constraints can be implemented to remove clusters that are too small or too sparsely distributed.
[0152] Then, the normal vector is estimated. Based on the analyzed single pipeline scene, the principal component analysis is performed on the neighborhood point set of each data point to estimate the normal vector of the pipeline point cloud data.
[0153] The radius of the pipeline point cloud data is then calculated. Multiple cylinder radius fits are performed on the pipeline using the RANSAC algorithm. This algorithm uses an empirical database to eliminate erroneous pipe diameter fitting results due to noise. A preset threshold library for underground pipeline facilities is introduced to remove outliers. Optionally, an iterative optimization process is performed to obtain the average value, ultimately determining the pipeline radius parameter.
[0154] The centerline extraction step mainly includes the centerline extraction of branches and the processing of joints.
[0155] Specifically, based on the normal vector of the pipeline point cloud data, the ROSA algorithm is used to extract the center line of the pipeline branch through continuous iteration and plane cutting.
[0156] The point cloud data at the joints is then smoothed using the Laplacian smoothing algorithm, which aims to reduce noise and enhance shape smoothness. The basic idea behind Laplacian smoothing is to iteratively optimize the position of a point so that it approaches the average position of its neighboring points. This results in a smoother point cloud surface and reduces high-frequency noise.
[0157] The smoothed point cloud data is then processed using the Moving Lest Squares (MLS) algorithm to determine the center point of the joint (i.e., the intersection point). Moving Least Squares is a technique for smoothing point cloud data by fitting a local surface within the neighborhood of each point to reduce noise and irregularities.
[0158] After extracting the pipeline centerline, noise removal is performed. Optionally, multiple noise removal methods are provided to improve the quality of the segmented pipeline data. These methods include statistical filtering, mean filtering, median filtering, and Gaussian filtering, allowing users to select between them based on the desired 3D reconstruction quality.
[0159] It should be noted that among the noise removal methods provided, Gaussian filtering, mean filtering, and median filtering have a smoothing effect. These filters can effectively remove noise from straight pipes, but they can cause deviations in the pipe trajectory for curved pipes. Therefore, the system provides two output methods for users to choose: filtering or not.
[0160] Based on the filtered pipeline centerline, the RANSAC piecewise straight line fitting algorithm is used to iteratively optimize the centering, thereby accurately extracting the centerline's feature points (endpoints, inflection points, etc.). To dynamically adjust the optimization process of the pipeline centerline feature points based on actual conditions, a parameter adaptive adjustment mechanism based on the pipeline radius is introduced. Based on the calculated pipeline radius, the maxDsitance parameter in the RANSAC algorithm is adaptively adjusted. After each fitting, cylindrical neighborhood filtering is used to remove noise points around the fitted line.
[0161] The calculated feature points are analyzed by principal component analysis to determine the main direction of the feature points, determine the connection relationship between the feature points, and realize the connection between the feature points.
[0162] Finally, the length is calculated based on the acquired centerline and radius parameters, and pipeline type attributes are assigned to generate a pipeline reconstruction model. To address the varying quality of on-site laser scans, two options are provided: multi-segment pipeline spatial information output using cluster analysis, and single-segment pipeline spatial information output assuming a single pipeline. This allows users to select the pipeline reconstruction model that best suits their needs and achieve underground pipeline extraction.
[0163] The underground pipeline extraction method based on point cloud provided in this embodiment obtains underground pipeline point cloud data; performs pipeline object identification and analysis on the scanning scene, including predetermined assumptions for single-pipeline scenes and predetermined assumptions for multi-pipeline objects. Then, principal component analysis is performed on the pipeline point cloud data of the single-pipeline scene to obtain the normal vector of each data point in the pipeline point cloud data, and cylindrical fitting is performed on the pipeline point cloud data. At the same time, the unreasonable pipeline radius judgment is filtered out by considering the combination of the pipeline radius experience library, and the pipeline radius is obtained by combining multiple iterative calculations using the majority analysis method. According to the normal vector, a plane is cut to obtain a tangent plane, and based on the tangent plane, the pipeline centerline is obtained; the distance threshold parameter is determined according to the pipeline radius; based on the distance threshold parameter, the pipeline centerline is segmented and linearly fitted by a random sampling consistency algorithm to obtain a centerline point set; the centerline point set is subjected to feature extraction to obtain feature points of the pipeline centerline, and different filtering models can be strategically proposed to implement feature point filtering analysis and reduce the influence of noise points on pipeline centerline extraction. The connection relationship between adjacent feature points is determined according to the geometric relationship; the pipeline reconstruction model is obtained based on the connection relationship, which overcomes the influence of the complex background of underground pipelines and the limitations of laser scanning technology in obtaining data. Through the adaptive parameter adjustment mechanism, it ensures that the algorithm can flexibly adapt to different pipe diameters and complex backgrounds, improves the overall extraction accuracy and stability, and thus efficiently and automatically extracts pipeline information from complex underground environments, and has strong robustness to noise and data missing.
[0164] Secondly, this embodiment uses the concept of ROSA and normal vector information to extract the centerline of the curve. Even when the point cloud data is incomplete or noisy, it can still accurately capture the geometric structure of the pipeline and has a certain degree of robustness against point cloud noise and data missing. This robustness ensures that in practical applications, in the face of complex and imperfect data, pipeline information can still be reliably extracted, thereby enhancing robustness.
[0165] At the same time, it can also realize the automatic extraction of underground pipeline information, and extract and optimize the pipeline centerline without human intervention, which improves efficiency and practicality and has a high degree of automation.
[0166] In addition, this embodiment simplifies the complex three-dimensional pipeline geometry into a one-dimensional centerline, which reduces data complexity, improves calculation efficiency, and is suitable for large-scale underground pipeline systems.
[0167] When dealing with challenges such as the complex background of underground pipelines, data noise and missing data, the method provided in this embodiment can demonstrate high adaptability and robustness, achieve efficient and automated extraction of pipeline information, and has significant application advantages.
[0168] See also Figure 9The present application also provides a point cloud-based underground pipeline extraction system, which can implement the above-mentioned point cloud-based underground pipeline extraction method. The system includes:
[0169] The first module is used to obtain underground pipeline point cloud data.
[0170] The second module is used to perform scene object segmentation on the pipeline point cloud data to obtain segmentation results, where the segmentation results include single-pipe scenes and multi-pipe scenes.
[0171] The third module is used to perform principal component analysis based on all pipeline point cloud data when the segmentation result is a single-pipe scene, obtain the normal vector of each data point in the pipeline point cloud data, perform cylindrical fitting on the pipeline point cloud data, and obtain the pipeline radius.
[0172] The fourth module is used to perform plane cutting according to the normal vector to obtain a tangent plane, and obtain the pipeline center line based on the tangent plane.
[0173] The fifth module is used to determine the distance threshold parameter according to the pipeline radius.
[0174] The sixth module is used to perform segmented straight line fitting on the pipeline centerline based on the distance threshold parameter through a random sampling consistency algorithm to obtain a centerline point set.
[0175] The seventh module is used to extract features from the centerline point set to obtain feature points of the pipeline centerline, wherein the feature points include endpoints and inflection points.
[0176] The eighth module is used to determine the connection relationship between adjacent feature points based on geometric relationships.
[0177] The ninth module is used to obtain a pipeline reconstruction model based on the connection relationship.
[0178] It can be understood that the contents of the above method embodiments are all applicable to the present system embodiments, the functions specifically implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0179] The present application also provides an electronic device comprising a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described point cloud-based underground pipeline extraction method. The electronic device can be any smart terminal, including a tablet computer and an in-vehicle computer.
[0180] It can be understood that the contents of the above method embodiments are applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0181] See also Figure 10 , Figure 10 The hardware structure of an electronic device according to another embodiment is shown. The electronic device includes:
[0182] The processor 111 may be implemented as a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is configured to execute relevant programs to implement the technical solutions provided in the embodiments of the present application.
[0183] The memory 112 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 112 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 112 and is called by the processor 111 to execute the point cloud-based underground pipeline extraction method of the embodiments of this application.
[0184] The input / output interface 113 is used to implement information input and output.
[0185] The communication interface 114 is used to realize communication interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0186] The bus 115 transmits information between various components of the device (eg, the processor 111 , the memory 112 , the input / output interface 113 , and the communication interface 114 ).
[0187] The processor 111 , the memory 112 , the input / output interface 113 and the communication interface 114 are connected to each other in communication within the device via a bus 115 .
[0188] An embodiment of the present application further provides a computer-readable storage medium storing a computer program, which implements the above-mentioned point cloud-based underground pipeline extraction method when executed by a processor.
[0189] It can be understood that the contents of the above method embodiments are all applicable to the present storage medium embodiment, the functions specifically implemented by the present storage medium embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0190] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0191] The embodiments described in the embodiments of this application are intended to more clearly illustrate the technical solutions of the embodiments of this application and do not constitute a limitation on the technical solutions provided by the embodiments of this application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
[0192] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0193] The system embodiment described above is merely illustrative. The units described as separate components may or may not be physically separate, i.e., they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.
[0194] Those skilled in the art will appreciate that all or some of the steps in the methods, systems, and functional modules / units in the devices disclosed above may be implemented as software, firmware, hardware, or appropriate combinations thereof.
[0195] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0196] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but are not intended to limit the scope of the present invention. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and essence of the present invention should be within the scope of the present invention.
Claims
1. A method for extracting underground pipelines based on point cloud, characterized in that: The method comprises the following steps: Obtain underground pipeline point cloud data; Performing scene object segmentation on the pipeline point cloud data to obtain a segmentation result, wherein the segmentation result includes a single-pipeline scene and a multi-pipeline scene; When the segmentation result is a single-pipe scene, principal component analysis is performed based on all the pipeline point cloud data to obtain the normal vector of each data point in the pipeline point cloud data, and cylindrical fitting is performed on the pipeline point cloud data to obtain the pipeline radius; Performing plane cutting according to the normal vector to obtain a tangent plane, and obtaining a pipeline centerline based on the tangent plane; determining a distance threshold parameter according to the pipeline radius; Based on the distance threshold parameter, performing piecewise straight line fitting on the pipeline centerline by a random sampling consistency algorithm to obtain a centerline point set; Performing feature extraction on the centerline point set to obtain feature points of the pipeline centerline, wherein the feature points include endpoints and inflection points; Determine the connection relationship between adjacent feature points according to the geometric relationship; Obtaining a pipeline reconstruction model based on the connection relationship; The process of performing plane cutting according to the normal vector to obtain a tangent plane, and obtaining a pipeline centerline based on the tangent plane, comprises the following steps: Performing plane cutting along a direction perpendicular to the normal vector to obtain a plurality of tangential planes; Determine the center point of each of the tangential planes, and obtain the rotational symmetry axis based on the position information of all the center points; Determining the rotational symmetry axis as the pipeline centerline; Determining the center point of each tangential plane and obtaining the rotational symmetry axis based on the position information of all the center points includes the following steps: Determining a subset of orientation points based on the tangent plane and the pipeline point cloud data, wherein the orientation points represent intersection points of the tangent plane and the pipeline point cloud data; A variational definition of an orientation point that is most rotationally symmetric relative to the orientation point subset is introduced, missing data is compensated according to the normal vector, and an axis that minimizes the change of the orientation point subset after rotation relative to a certain axis is found to obtain the rotational symmetry axis.
2. The method according to claim 1, characterized in that The step of obtaining underground pipeline point cloud data includes the following steps: Obtain underground spatial point cloud data; The spatial point cloud data is semantically segmented through a deep learning semantic segmentation network to separate the pipeline from the background and obtain pipeline point cloud data.
3. The method according to claim 1, characterized in that The step of segmenting the pipeline point cloud data into scene objects to obtain a segmentation result comprises the following steps: Dividing the pipeline point cloud data into several clusters of pipeline subset data through a clustering algorithm and pipeline prediction labels; When the number of the pipeline subset data is equal to one cluster, determining that the segmentation result is a single-pipe scene; Alternatively, when the number of the pipeline subset data is greater than one cluster, determining that the segmentation result is a multi-pipe scene; Among them, in the process of clustering algorithm processing, clusters that do not meet the constraints are removed according to the volume threshold constraint and the number threshold constraint; The underground pipeline extraction method based on point cloud also includes the following steps: When the segmentation result is a multi-pipe scene, principal component analysis is performed on each cluster of the pipeline subset data to obtain the normal vector of each data point in the pipeline subset data.
4. The method according to claim 1, wherein The principal component analysis is performed based on all the pipeline point cloud data to obtain the normal vector of each data point in the pipeline point cloud data, including the following steps: For each data point in the pipeline point cloud data, determining neighboring points with the data point as the center to obtain a neighboring point set; The covariance matrix of the neighboring point set is calculated, and the eigenvector corresponding to the minimum eigenvalue of the covariance matrix is used as the normal vector of the data point.
5. The method according to claim 1, wherein Determining the distance threshold parameter according to the pipeline radius includes the following steps: The distance threshold parameter of the random sampling consensus algorithm is set to β multiples of the pipeline radius, where β∈[0.1,1].
6. The method according to claim 1, characterized in that Before the step of obtaining the centerline point set, the method further includes the following steps: The cylindrical neighborhood filtering method is used to remove noise points within the cylindrical range by taking the pipeline centerline obtained by fitting as the axis and α times the pipeline radius as the cylindrical neighborhood radius, where α∈[0.5,5].
7. A point cloud-based underground pipeline extraction system, characterized in that: The system comprises: The first module is used to obtain underground pipeline point cloud data; The second module is used to perform scene object segmentation on the pipeline point cloud data to obtain a segmentation result, wherein the segmentation result includes a single-pipe scene and a multi-pipe scene; The third module is configured to, when the segmentation result is a single-pipe scene, perform principal component analysis based on all the pipeline point cloud data to obtain the normal vector of each data point in the pipeline point cloud data, perform cylindrical fitting on the pipeline point cloud data, and obtain the pipeline radius; A fourth module is configured to perform plane cutting according to the normal vector to obtain a tangent plane, and obtain a pipeline centerline based on the tangent plane; A fifth module is configured to determine a distance threshold parameter according to the pipeline radius; A sixth module is configured to perform piecewise straight line fitting on the pipeline centerline using a random sampling consistency algorithm based on the distance threshold parameter to obtain a centerline point set; A seventh module is used to extract features from the centerline point set to obtain feature points of the pipeline centerline, wherein the feature points include endpoints and inflection points; An eighth module is used to determine the connection relationship between adjacent feature points based on geometric relationships; A ninth module is configured to obtain a pipeline reconstruction model based on the connection relationship; The process of performing plane cutting according to the normal vector to obtain a tangent plane, and obtaining a pipeline centerline based on the tangent plane, comprises the following steps: Performing plane cutting along a direction perpendicular to the normal vector to obtain a plurality of tangential planes; Determine the center point of each of the tangential planes, and obtain the rotational symmetry axis based on the position information of all the center points; Determining the rotational symmetry axis as the pipeline centerline; Determining the center point of each tangential plane and obtaining the rotational symmetry axis based on the position information of all the center points includes the following steps: Determining a subset of orientation points based on the tangent plane and the pipeline point cloud data, wherein the orientation points represent intersection points of the tangent plane and the pipeline point cloud data; A variational definition of an orientation point that is most rotationally symmetric relative to the orientation point subset is introduced, missing data is compensated according to the normal vector, and an axis that minimizes the change of the orientation point subset after rotation relative to a certain axis is found to obtain the rotational symmetry axis.
8. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Cable reconstruction method based on machine learning
CN118397175A
Method and system for building information modeling (BIM) reconstruction for a piping system
WO2023096579A2