Pipeline detection method, device and equipment and storage medium

By rotating and slicing the 3D point cloud of the pipeline using a non-contact inspection method to determine the set of feature points, the problem of poor detection compatibility and cumbersome operation in the existing technology is solved, and rapid and effective pipeline inspection is achieved.

CN121504835APending Publication Date: 2026-02-10SICHUAN TUOPULE TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511571816.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-30
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

Existing technologies suffer from poor compatibility and cumbersome operation in pipeline inspection, making it difficult to quickly and effectively inspect pipelines of different sizes and types.

Method used

A non-contact detection method is adopted. The three-dimensional point cloud of the pipeline is acquired, the target pipeline point cloud is rotated so that its axis vector is in the same direction as the X-axis of the standard coordinate system, sliced, and a set of feature points is determined. Detection is then performed based on the set of feature points.

Benefits of technology

It enables rapid and effective inspection of pipes of different types and sizes, improves inspection efficiency, and can uniformly inspect pipes with multiple characteristics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121504835A_ABST
    Figure CN121504835A_ABST
Patent Text Reader

Abstract

The invention provides a pipeline detection method and device, equipment and a storage medium, and relates to the technical field of pipeline data processing.The method comprises the steps that a target pipeline point cloud is obtained by processing a pipeline three-dimensional point cloud, the target pipeline point cloud is rotated, and the rotation error between the device for obtaining the pipeline three-dimensional point cloud and the pipeline three-dimensional point cloud is eliminated; and slicing the rotated target pipeline point cloud in the Y-axis direction, carrying out feature point classification on the sliced point cloud to obtain a plurality of feature point sets, and carrying out pipeline detection according to the detection condition corresponding to each feature point set. According to the method, different types of pipelines can be detected through the three-dimensional point cloud, pipelines including different pipeline combinations can be detected through feature point classification, multi-feature pipelines can be detected in a unified manner on the basis of rapid detection, and the detection efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of pipeline data processing technology, specifically to a pipeline inspection method, apparatus, equipment, and storage medium. Background Technology

[0002] During pipeline production, strict quality control is required for pipelines leaving the factory. Traditional quality monitoring typically involves using specific instruments or devices to directly measure various pipeline parameters through contact measurement. This method has two drawbacks: first, it requires the design of specific mechanical devices, often necessitating a redesign of the corresponding measurement structure when the pipeline model changes, resulting in poor compatibility; second, mechanical measurement requires continuous adjustment of the measuring mechanism based on different measurement items, making the operation cumbersome and the method inefficient. Summary of the Invention

[0003] This application provides a pipeline inspection method, apparatus, equipment, and storage medium, which can inspect pipelines of different sizes and types. The non-contact inspection method provided by this application can inspect pipelines relatively quickly.

[0004] This application provides a pipeline inspection method, including: Obtain the 3D point cloud of the pipeline and the region of interest (ROI) of the pipeline; the ROI represents the shape of the pipeline. The target pipeline point cloud is determined based on the pipeline's 3D point cloud and the pipeline's region of interest. Rotate the target pipe point cloud so that the axis vector of the target pipe point cloud is in the same direction as the X-axis of the standard coordinate system, and make the normal vector of the target plane of the target pipe point cloud in the same direction as the Y-axis of the standard coordinate system; the target plane is the plane obtained by fitting the axis vector of the target pipe point cloud with the centroid. The rotated target pipe point cloud is sliced ​​along the Y-axis to obtain the sliced ​​point cloud. Multiple feature point sets are determined based on sliced ​​point clouds; the feature points in each feature point set are of the same type, and each feature point set includes at least one feature point; the feature points in different feature point sets are of different types. The pipeline is detected based on the set of feature points and the corresponding detection conditions.

[0005] Optionally, the pipeline is detected based on each set of feature points and the corresponding detection conditions, including: The corresponding detection conditions are determined based on the type of feature points in each feature point set; the detection conditions include the target diameter range. For each set of feature points: determine the interval distance between each feature point in the set and the axis vector; determine the point cloud diameter based on the interval distance; compare the relationship between the point cloud diameter and the target diameter range to obtain the detection result.

[0006] Optionally, rotating the target pipe point cloud so that the axis vector of the target pipe point cloud is in the same direction as the X-axis of the standard coordinate system, and so that the normal vector of the target plane of the target pipe point cloud is in the same direction as the Y-axis of the standard coordinate system, includes: Determine the axisymmetric vector and centroid of the target pipeline point cloud; The target plane is obtained by fitting the axis center vector and centroid of the target pipeline point cloud, or by determining the plane coplanar with the axis center vector as the target plane; Based on the normal vector, axis vector, and standard coordinate system of the target plane, determine the rotation and translation matrices, and rotate the target pipeline point cloud based on the rotation and translation matrices.

[0007] Optionally, based on the normal vector, axisymmetric vector, and standard coordinate system of the target plane, the rotation and translation matrices are determined, and the target pipeline point cloud is rotated based on the rotation and translation matrices, including: Based on the axis vector and the X-axis of the standard coordinate system, determine the first rotation matrix and the first translation matrix; The target pipeline point cloud is rotated based on the first rotation matrix and the second translation matrix to obtain the first intermediate point cloud; the axis vector of the first intermediate point cloud is in the same direction as the X-axis of the standard coordinate system. Based on the normal vector of the target plane in the first intermediate point cloud and the Y-axis of the standard coordinate system, determine the second rotation matrix and the second translation matrix; The first intermediate point cloud is rotated based on the second rotation matrix and the second translation matrix to obtain the rotated target pipeline point cloud.

[0008] Optionally, multiple feature point sets are determined based on the sliced ​​point cloud, including: Projecting the sliced ​​point cloud onto the Y-axis of the standard coordinate system yields the projected point cloud; Euclidean distance clustering is performed on the projected point cloud to obtain the point of interest cloud; the point of interest cloud represents different types of pipes in the pipeline under test; The feature point set is obtained based on the point of interest cloud.

[0009] Optionally, a set of feature points is obtained based on the cloud of points of interest, including: For each set of points of interest, a straight line is fitted to obtain the straight line model corresponding to each set of points of interest; Feature points are extracted from each straight line model to obtain multiple feature point sets.

[0010] Optionally, the 3D point cloud of the pipeline is acquired, including: Obtain the initial 3D point cloud, which is the point cloud corresponding to the pipe to be measured; The initial 3D point cloud is filtered and downsampled to obtain the 3D point cloud of the pipeline.

[0011] To achieve the above and other related objectives, this application provides a pipeline inspection device, comprising: The data acquisition module is used to acquire the 3D point cloud of the pipeline and the region of interest (ROI) of the pipeline; the ROI represents the shape of the pipeline. The data processing module is used to determine the target pipeline point cloud based on the pipeline's 3D point cloud and the pipeline's region of interest. The rotation module is used to rotate the target pipe point cloud so that the axis vector of the target pipe point cloud is in the same direction as the X-axis of the standard coordinate system, and the normal vector of the target plane of the target pipe point cloud is in the same direction as the Y-axis of the standard coordinate system; the target plane is the plane obtained by fitting the axis vector of the target pipe point cloud with the centroid. The point cloud slicing module is used to slice the rotated target pipe point cloud in the Y-axis direction to obtain the sliced ​​point cloud. The feature point determination module is used to determine multiple feature point sets based on the sliced ​​point cloud; the feature points in each feature point set are of the same type, and each feature point set includes at least one feature point; the feature points in different feature point sets are of different types; The detection module is used to detect pipelines based on the set of feature points and the corresponding detection conditions.

[0012] To achieve the above and other related objectives, this application also provides an electronic device, including a memory and a processor, wherein the processor is configured to execute program instructions stored in the memory to implement one or more of the aforementioned pipe detection methods.

[0013] To achieve the above and other related objectives, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a computer's processor, causes the computer to perform one or more of the aforementioned pipe detection methods.

[0014] As described above, the pipeline inspection method, apparatus, equipment, and storage medium provided in this application have the following beneficial effects: This application discloses a pipeline inspection method. The method processes a 3D point cloud of a pipeline to obtain a target pipeline point cloud. The target pipeline point cloud is then rotated to eliminate rotational errors between the device acquiring the 3D point cloud and the actual pipeline point cloud. This facilitates slicing the rotated target pipeline point cloud along the Y-axis. The sliced ​​point cloud is then classified into multiple feature point sets. Pipeline inspection is performed using the detection conditions corresponding to each feature point set. This method can detect not only different types of pipelines using 3D point clouds but also pipelines with different combinations of pipelines through feature point classification. It enables unified detection of pipelines with multiple features while achieving rapid detection, thus improving detection efficiency.

[0015] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description

[0016] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings: Figure 1 This is a schematic diagram illustrating the implementation environment of a pipeline inspection method according to an exemplary embodiment of this application; Figure 2 This is a flowchart illustrating a pipeline inspection method in an exemplary embodiment of this application; Figure 3 This is a schematic diagram of the pipe structure shown in an exemplary embodiment of this application; Figure 4 Based on Figure 3 Feature points obtained from the pipeline shown; Figure 5 This is a structural block diagram of a pipeline inspection device illustrated in an exemplary embodiment of this application. Detailed Implementation

[0017] The embodiments of this application will be described below with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. This application can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. It should be understood that the preferred embodiments are only for illustrating this application and are not intended to limit the scope of protection of this application.

[0018] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of this application. Therefore, the drawings only show the components related to this application and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.

[0019] In the following description, numerous details are explored to provide a more thorough explanation of embodiments of the present application. However, it will be apparent to those skilled in the art that embodiments of the present application may be practiced without these specific details. In other embodiments, well-known structures and devices are shown in block diagram form rather than in detail to avoid obscuring embodiments of the present application.

[0020] Please see Figure 1 This is a schematic diagram illustrating the implementation environment of a pipeline inspection method according to an exemplary embodiment of this application. The implementation environment may include a line laser 3D camera 110 and a mobile platform 120.

[0021] The line laser 3D camera 110 can be connected to the mobile platform 120, and the line laser 3D camera 110 can move back and forth along the mobile platform 120 to acquire the three-dimensional point cloud of the pipe 200.

[0022] A line laser 3D camera 110 can be made to scan the pipe 200 at a constant speed. During the scanning process, the line laser 3D camera 110 can repeatedly perform laser scanning detection on the pipe 200 at a high frequency (such as thousands of times per second). Then, the three-dimensional contour lines obtained from each frame are stitched together according to the motion trajectory of the line laser 3D camera 110 to finally form a dense three-dimensional point cloud of the pipe that describes the entire surface of the object.

[0023] Please see Figure 2 , Figure 2 This is a flowchart illustrating a pipeline inspection method in an exemplary embodiment of this application. This pipeline inspection method can be applied to… Figure 1 The implementation environment is shown. (Reference) Figure 2 It can be seen that this pipeline inspection method may include: Step S210: Obtain the 3D point cloud of the pipeline and the region of interest of the pipeline.

[0024] The region of interest for the pipeline characterizes the shape of the pipeline.

[0025] In one embodiment of this application, a 3D point cloud of a pipeline and a region of interest (ROI) can be obtained. Corresponding ROIs can be pre-defined according to different pipeline types. The ROI represents the portion of the 3D point cloud of the pipeline that the user is particularly interested in processing and analyzing. The ROI can also be a point cloud ROI, meaning it can be a 3D shape. The user can select the corresponding ROI based on the type of pipeline to be tested. After obtaining the 3D point cloud of the pipeline based on the pipeline to be tested, the 3D point cloud can be matched and associated with the ROI.

[0026] Based on Figure 1 The implementation environment shown is used to obtain the 3D point cloud of the pipeline.

[0027] It should be noted that the pipeline in this application embodiment can be an oil pipeline or other types of pipelines, and this application embodiment does not limit this.

[0028] Step S220: Determine the target pipeline point cloud based on the pipeline 3D point cloud and the pipeline region of interest.

[0029] In one embodiment of this application, a target pipeline point cloud can be obtained from the pipeline's 3D point cloud based on the pipeline's region of interest. That is, the target pipeline point cloud corresponding to the pipeline to be tested can be selected based on the pipeline's region of interest, and the target pipeline point cloud can represent the outer contour of the pipeline to be tested.

[0030] Step S230: Rotate the target pipe point cloud so that the axis vector of the target pipe point cloud is in the same direction as the X-axis of the standard coordinate system, and so that the normal vector of the target plane of the target pipe point cloud is in the same direction as the Y-axis of the standard coordinate system.

[0031] The target plane is the plane obtained by fitting the axis center vector and the centroid of the target pipeline point cloud. The target plane can also be a plane coplanar with the axis center vector.

[0032] In one embodiment of this application, the target pipe point cloud can be rotated so that the axis vector of the target pipe point cloud is in the same direction as the X-axis of the standard coordinate system, and the normal vector of the target plane of the target pipe point cloud is in the same direction as the Y-axis of the standard coordinate system. The Z-axis of the standard coordinate system is perpendicular to the X-axis and the Y-axis, and in this application, the Z-axis does not participate in the relevant data processing. Because the axis vector of the pipe may not be parallel to the camera's motion direction when acquiring the 3D point cloud of the pipe, a deviation occurs between the axis vector and the normal vector of the target plane in the 3D point cloud of the pipe and the standard coordinate system. Under this deviation, the 3D point cloud data of the pipe cannot be effectively processed, for example, effective slicing is impossible. Therefore, it is necessary to rotate the target pipe point cloud first. After rotation, the axis vector of the target pipe point cloud is in the same direction as the X-axis of the standard coordinate system, and the normal vector of the target plane of the rotated target pipe point cloud is in the same direction as the Y-axis of the standard coordinate system. Specifically, the axis vector of the rotated target pipe point cloud can coincide with the X-axis of the standard coordinate system, and the normal vector of the target plane of the rotated target pipe point cloud can coincide with the Y-axis of the standard coordinate system.

[0033] It should be noted that the initial position of the line laser 3D camera can be set as the origin of the standard coordinate system, the motion path of the line laser 3D camera can be set as the X-axis of the standard coordinate system, the motion direction of the line laser 3D camera can be set as the positive direction of the X-axis, the laser direction of the line laser 3D camera can be set as the positive direction of the Y-axis of the standard coordinate system, and the direction that is perpendicular to both the X-axis and the Y-axis can be defined as the Z-axis of the standard coordinate system.

[0034] Step S240: Slice the rotated target pipe point cloud in the Y-axis direction to obtain the sliced ​​point cloud.

[0035] In one embodiment of this application, the rotated target pipe point cloud can be sliced ​​along the Y-axis to filter out the target pipe point cloud near the boundary, resulting in a sliced ​​point cloud. The sliced ​​point cloud is a set of point clouds obtained by slicing the target pipe point cloud with a plane parallel to the target plane. Slicing the target pipe point cloud can reduce the amount of data processed in subsequent steps, speed up data processing, and improve the efficiency of pipe detection.

[0036] When slicing a target pipeline point cloud, a pre-set distance interval can be used. The interval represents the distance between the sliced ​​position and the axis vector of the target pipeline point cloud. Alternatively, the target pipeline point cloud can be projected onto the Y-axis and then sliced ​​to obtain the sliced ​​point cloud.

[0037] Step S250: Determine multiple feature point sets based on the sliced ​​point cloud.

[0038] In each feature point set, the feature points are of the same type, and each feature point set includes at least one feature point; the feature points in different feature point sets are of different types.

[0039] In one embodiment of this application, a set of feature points can be determined based on a slice point cloud. The slice point cloud is a slice of the target pipe point cloud along the Y-axis, that is, the slice point cloud can include the edge of the cylindrical outer surface of the pipe.

[0040] Different sets of feature points correspond to different pipeline feature point types. Please refer to [reference needed]. Figure 3 This is a schematic diagram of a pipe structure shown in an exemplary embodiment of this application. Pipes produced are sometimes not standard cylindrical; they may include threaded pipes, flat-end pipes, grooved sections, and reducing sections. Different types of pipe feature points can correspond to different detection conditions. Therefore, the sliced ​​point cloud can be classified first to obtain multiple feature point sets, and then pipe detection can be achieved based on the detection conditions corresponding to different feature point sets.

[0041] Different testing conditions can be preset for different pipes, and the corresponding testing conditions can be selected after the pipe type is determined.

[0042] Step S260: Detect the pipeline based on each set of feature points and the corresponding detection conditions.

[0043] In one embodiment of this application, the pipeline can be detected based on the detection conditions corresponding to each set of feature points.

[0044] Optionally, the process of detecting the pipeline based on each set of feature points and the corresponding detection conditions in step S260 may include: determining the corresponding detection conditions based on the type of feature points in each set of feature points; the detection conditions include the target diameter range; for each set of feature points: determining the interval distance between each feature point in the set of feature points and the axis vector; determining the point cloud diameter based on the interval distance; comparing the relationship between the point cloud diameter and the target diameter range to obtain the detection result.

[0045] Different feature point sets can correspond to different detection conditions for cylindrical pipes. The types of feature points corresponding to a feature point set can include flat-end pipe ends, threaded pipe ends, turning points, and fault points. After determining the interval distance, the interval distance can be defined as the point cloud radius. Based on the relationship between diameter and radius, the point cloud diameter is determined. If the diameter of each point cloud is within the target diameter range, the detection result corresponding to that feature point set is considered normal; if any point cloud diameter is outside the target diameter range, the detection result corresponding to that feature point set is considered abnormal. If the detection result of any feature point set is abnormal, the pipe under test is abnormal, and the abnormal location can be accurately located using the feature points; if the detection results of each feature point set are normal, the pipe under test is normal.

[0046] Please see Figure 4 It is based on Figure 3 The diagram shows the feature points obtained from the pipe. Points A and B can belong to the set of threaded pipe endpoints, point C can belong to the set of flat-end pipe endpoints, points E and F can belong to the set of fault points, and points D and G can belong to the set of inflection points. Different sets of feature points can correspond to different target diameter ranges.

[0047] Optionally, the process of rotating the target pipe point cloud in step S230 to make the axis vector of the target pipe point cloud align with the X-axis of the standard coordinate system and the normal vector of the target plane of the target pipe point cloud align with the Y-axis of the standard coordinate system may include: determining the axis vector and centroid of the target pipe point cloud; fitting the axis vector and centroid of the target pipe point cloud to obtain the target plane, or determining the plane coplanar with the axis vector as the target plane; determining the rotation matrix and translation matrix based on the normal vector, axis vector, and standard coordinate system of the target plane, and rotating the target pipe point cloud based on the rotation matrix and translation matrix.

[0048] In one possible implementation, the axisymmetric vector of the target pipeline can be obtained using the Random Sample Consensus (RANSAC) algorithm. RANSAC can randomly sample the smallest possible subset from the point cloud data of the target pipeline to fit the pipeline model, then select the number of data points that "agree" with this pipeline model. The data points that "agree" can be called inliers. Finally, the pipeline model with the most inliers is selected to obtain the axisymmetric vector.

[0049] For example, a cylinder can be represented by seven parameters: a point on the axis vector (x0, y0, z0), a unit vector (a, b, c) in the direction of the axis vector, and a radius r. Seven points are randomly selected from the target pipeline point cloud. The axis direction is obtained based on these seven points, and principal component analysis can be used to determine the first principal component as the axis direction. The centroids of these seven points are used as the initial estimates on the axis. The distance from each of the seven points to the axis is calculated, and the average value is used as the initial estimate of the radius. The distance from each point in the target pipeline point cloud to the cylinder surface is calculated (i.e., the absolute value of the distance from the point to the axis and the initial radius estimate can be used as the distance). If the distance is less than a threshold, the point is identified as an interior point. The number of interior points is counted. When the number of interior points in the current pipeline model is greater than the number of interior points in the previous best model, the current pipeline model is updated to the best pipeline model. The pipeline parameters are fitted using all the interior points of the best pipeline model to obtain the axis vector of the target pipeline point cloud.

[0050] In one possible implementation, the mean of all points in the target pipeline point cloud can be determined as the centroid of the target pipeline point cloud.

[0051] In another possible implementation, principal component analysis can be performed on the target pipeline point cloud to obtain its centroid. First, the mean of all points in the target pipeline point cloud can be used as the initial centroid. The initial centroid is then subtracted from the coordinates of each point in the target pipeline point cloud to obtain a decentralized point cloud. A 3×3 covariance matrix is ​​calculated based on the decentralized point cloud, and eigenvalues ​​are decomposed into three eigenvalues ​​and corresponding eigenvectors. The eigenvectors are sorted in descending order of eigenvalue, corresponding to the first, second, and third principal components, respectively. Since the point cloud has a large distribution along the first principal component (axial direction), while the distribution along the second and third principal components (radial direction) should be smaller and more uniform, a threshold can be set to remove points with excessively large radial projection distances as outliers. The centroid is then recalculated using the point cloud after removing outliers.

[0052] Principal Component Analysis (PCA) reduces data dimensionality and identifies the most important directions in the data, i.e., principal components. The first principal component represents the direction with the largest variance in the point cloud data, indicating the primary direction of the point cloud's extension. For the target pipeline point cloud, the first principal component is also the axis of the target pipeline point cloud. The second principal component is perpendicular to the first principal component and represents the direction with the largest variance among the remaining directions. The third principal component is perpendicular to both the first and second principal components and represents the direction with the smallest variance.

[0053] Since the target pipeline point cloud is obtained in the standard coordinate system, and the coordinates of the point cloud are based on the standard coordinate system, the rotation matrix and translation matrix can be determined based on the normal vector of the target plane, the axis vector, and the standard coordinate system, and the target pipeline point cloud can be rotated based on the rotation matrix and translation matrix.

[0054] Optionally, the process of determining the rotation and translation matrices based on the normal vector, axis center vector, and standard coordinate system of the target plane, and rotating the target pipeline point cloud based on the rotation and translation matrices, may include: determining a first rotation matrix and a first translation matrix based on the axis center vector and the X-axis of the standard coordinate system; rotating the target pipeline point cloud based on the first rotation matrix and the second translation matrix to obtain a first intermediate point cloud; the axis center vector of the first intermediate point cloud is in the same direction as the X-axis of the standard coordinate system; determining a second rotation matrix and a second translation matrix based on the normal vector of the target plane in the first intermediate point cloud and the Y-axis of the standard coordinate system; and rotating the first intermediate point cloud based on the second rotation matrix and the second translation matrix to obtain the rotated target pipeline point cloud.

[0055] The formulas for determining the first rotation matrix and the first translation matrix can be expressed as follows: ; in, This represents the axis vector before rotation. This represents the rotated axis center vector, which is in the same direction as the X-axis of the standard coordinate system. Let be the first rotation matrix. This is the first translation matrix.

[0056] The formulas for determining the second rotation matrix and the second translation matrix can be expressed as follows: ; in, This represents the normal vector of the target plane before rotation. This represents the normal vector of the rotated target plane, which is in the same direction as the Y-axis of the standard coordinate system. This is the second rotation matrix. This is the second translation matrix.

[0057] Optionally, the process of determining multiple feature point sets based on the slice point cloud in step S150 may include: projecting the slice point cloud onto the Y-axis of a standard coordinate system to obtain a projected point cloud; performing Euclidean distance clustering on the projected point cloud to obtain a set of points of interest; the set of points of interest represents different types of pipes in the pipe under test; and obtaining a set of feature points based on the set of points of interest. The projected point cloud can represent the edge of the pipe, and the set of feature points can be obtained by performing Euclidean distance clustering on the pipe edge.

[0058] For example, the process of obtaining a cloud of points of interest by Euclidean distance clustering may include: Step 1: First, find a point p10 in the space. Use kdTree to find the n nearest points to it. Determine the distance of these n points to p10. Place the points p11, p12, and p13 whose distance is less than the threshold r into class Q. At this point, Q = {p10, p11, p12, p13}. Step 2: Find a point in Q, such as p12, and repeat Step 1. Step 3: When no more points can be added to Q, the search is complete. Q is the set of points of interest.

[0059] Different sets of points of interest can characterize different types of pipes in the pipeline under test, such as threaded pipes or flat-end pipes.

[0060] Optionally, the process of obtaining a set of feature points based on a set of points of interest may include: performing line fitting on each set of points of interest to obtain a line model corresponding to each set of points of interest; and extracting feature points from each line model to obtain multiple sets of feature points.

[0061] A linear model can be obtained by fitting a straight line to each point cloud of interest using Random Sample Consensus (RANSAC). Specifically, some points are randomly selected and used to fit a straight line model. Then, the distances to the straight line model are calculated for each of the remaining points. Points whose distances are within the acceptable error range are added to the inlier, while those whose distances are outside the inlier are added to the outlier. This process is repeated until the number of inliers reaches a certain set threshold, at which point the iteration ends. The model obtained at this point is the optimal straight line model for the point cloud under these conditions.

[0062] Feature point extraction for each straight line model can be performed as follows: the point with the smallest X-direction coordinate and the point with the largest X-direction coordinate in the point cloud coordinates of each straight line model are determined as endpoints; the points between the two endpoints of each straight line model are determined as points to be divided; if the distance between the two points to be divided is within a preset distance range, the two points to be divided are determined as fault points, and the remaining points to be divided are determined as turning points.

[0063] It should be noted that the feature point types of the endpoints corresponding to different regions of interest are different. For example, the feature point type of the endpoint corresponding to a threaded pipe can be threaded pipe endpoint, and the feature point type of the endpoint corresponding to a flat-end pipe can be flat-end pipe endpoint.

[0064] Optionally, in step S210, the process of obtaining the three-dimensional point cloud of the pipeline may include: obtaining an initial three-dimensional point cloud, which is the point cloud corresponding to the pipeline to be measured; filtering and downsampling the initial three-dimensional point cloud to obtain the three-dimensional point cloud of the pipeline.

[0065] By based on Figure 1 The line laser 3D camera in the system can acquire an initial 3D point cloud, which can then be filtered to eliminate noise. Afterward, the filtered point cloud can be rapidly downsampled at a fixed digital interval, reducing the amount of point cloud data processing. Gaussian filtering, median filtering, or mean filtering can be used to filter the initial 3D point cloud.

[0066] Alternatively, the initial 3D point cloud can be directly defined as the pipeline 3D point cloud.

[0067] Figure 5 This is a block diagram illustrating a pipeline inspection device according to an exemplary embodiment of this application. Figure 5 As shown, the exemplary pipe inspection device 500 includes: Data acquisition module 510 is used to acquire the 3D point cloud of the pipeline and the region of interest of the pipeline; the region of interest of the pipeline represents the shape of the pipeline; Data processing module 520 is used to determine the target pipeline point cloud based on the pipeline 3D point cloud and the pipeline region of interest; The rotation module 530 is used to rotate the target pipe point cloud so that the axis vector of the target pipe point cloud is in the same direction as the X-axis of the standard coordinate system, and the normal vector of the target plane of the target pipe point cloud is in the same direction as the Y-axis of the standard coordinate system; the target plane is the plane obtained by fitting the axis vector of the target pipe point cloud with the centroid. The point cloud slicing module 540 is used to slice the rotated target pipe point cloud in the Y-axis direction to obtain the sliced ​​point cloud. The feature point determination module 550 is used to determine multiple feature point sets based on the sliced ​​point cloud; the feature points in each feature point set are of the same type, and each feature point set includes at least one feature point; the feature points in different feature point sets are of different types; The detection module 560 is used to detect pipelines based on the set of feature points and the corresponding detection conditions.

[0068] In one embodiment of this application, pipeline detection is performed based on each set of feature points and corresponding detection conditions, including: The corresponding detection conditions are determined based on the type of feature points in each feature point set; the detection conditions include the target diameter range. For each set of feature points: determine the interval distance between each feature point in the set and the axis vector; determine the point cloud diameter based on the interval distance; compare the relationship between the point cloud diameter and the target diameter range to obtain the detection result.

[0069] In one embodiment of this application, rotating the target pipe point cloud so that the axis vector of the target pipe point cloud is in the same direction as the X-axis of the standard coordinate system, and so that the normal vector of the target plane of the target pipe point cloud is in the same direction as the Y-axis of the standard coordinate system, includes: Determine the axisymmetric vector and centroid of the target pipeline point cloud; The target plane is obtained by fitting the axis center vector and centroid of the target pipeline point cloud, or by determining the plane coplanar with the axis center vector as the target plane. Based on the normal vector, axis vector, and standard coordinate system of the target plane, determine the rotation and translation matrices, and rotate the target pipeline point cloud based on the rotation and translation matrices.

[0070] In one embodiment of this application, a rotation matrix and a translation matrix are determined based on the normal vector, axis vector, and standard coordinate system of the target plane, and the target pipeline point cloud is rotated based on the rotation matrix and the translation matrix, including: Based on the axis vector and the X-axis of the standard coordinate system, determine the first rotation matrix and the first translation matrix; The target pipeline point cloud is rotated based on the first rotation matrix and the second translation matrix to obtain the first intermediate point cloud; the axis vector of the first intermediate point cloud is in the same direction as the X-axis of the standard coordinate system. Based on the normal vector of the target plane in the first intermediate point cloud and the Y-axis of the standard coordinate system, determine the second rotation matrix and the second translation matrix; The first intermediate point cloud is rotated based on the second rotation matrix and the second translation matrix to obtain the rotated target pipeline point cloud.

[0071] In one embodiment of this application, determining multiple feature point sets based on sliced ​​point clouds includes: Projecting the sliced ​​point cloud onto the Y-axis of the standard coordinate system yields the projected point cloud; Euclidean distance clustering is performed on the projected point cloud to obtain the point of interest cloud; the point of interest cloud represents different types of pipes in the pipeline under test; The feature point set is obtained based on the point of interest cloud.

[0072] In one embodiment of this application, a feature point set is obtained based on a cloud of points of interest, including: For each set of points of interest, a straight line is fitted to obtain the straight line model corresponding to each set of points of interest; Feature points are extracted from each straight line model to obtain multiple feature point sets.

[0073] In one embodiment of this application, obtaining a 3D point cloud of a pipeline includes: Obtain the initial 3D point cloud, which is the point cloud corresponding to the pipeline to be measured; The initial 3D point cloud is filtered and downsampled to obtain the 3D point cloud of the pipeline.

[0074] It should be noted that the pipeline inspection device and the pipeline inspection method provided in the above embodiments belong to the same concept. The specific operation methods of each module and unit have been described in detail in the method embodiments and will not be repeated here. In practical applications, the pipeline inspection device provided in the above embodiments can be assigned to different functional modules as needed, that is, the internal structure of the system can be divided into different functional modules to complete all or part of the functions described above. This is not a limitation here.

[0075] Embodiments of this application also provide an electronic device, including: one or more processors; and a storage device for storing one or more programs, which, when executed by one or more processors, cause the electronic device to implement the pipeline detection method provided in the above embodiments.

[0076] Another aspect of this application provides a computer-readable storage medium storing a computer program thereon, which, when executed by a computer's processor, causes the computer to perform the pipeline detection method provided in the various embodiments described above. This computer-readable storage medium may be included in the electronic device described in the above embodiments, or it may exist independently and not assembled into the electronic device.

[0077] Another aspect of this application provides a computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the pipeline detection method provided in the various embodiments described above.

[0078] In the embodiments of this application, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance. The terms "comprising" and "including" as used throughout the specification and claims are open-ended terms and should therefore be interpreted as "comprising but not limited to".

[0079] The above embodiments are merely illustrative of the principles and effects of this application and are not intended to limit this application. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of this application. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in this application should still be covered by the claims of this application.

Claims

1. A pipeline inspection method, characterized in that, include: Obtain the 3D point cloud of the pipeline and the region of interest (ROI) of the pipeline; the ROI represents the shape of the pipeline. The target pipeline point cloud is determined based on the pipeline's 3D point cloud and the pipeline's region of interest. Rotate the target pipe point cloud so that the axis vector of the target pipe point cloud is in the same direction as the X-axis of the standard coordinate system, and make the normal vector of the target plane of the target pipe point cloud in the same direction as the Y-axis of the standard coordinate system; the target plane is the plane obtained by fitting the axis vector of the target pipe point cloud with the centroid, or the plane that is coplanar with the axis vector is determined as the target plane; The rotated target pipe point cloud is sliced ​​along the Y-axis to obtain the sliced ​​point cloud. Multiple feature point sets are determined based on sliced ​​point clouds; the feature points in each feature point set are of the same type, and each feature point set includes at least one feature point. The types of feature points in different feature point sets are different; The pipeline is detected based on the set of feature points and the corresponding detection conditions.

2. The pipeline inspection method according to claim 1, characterized in that, Based on the set of feature points and the corresponding detection conditions, the pipeline is detected, including: The corresponding detection conditions are determined based on the type of feature points in each feature point set; the detection conditions include the target diameter range. For each set of feature points: determine the interval distance between each feature point in the set and the axis vector; determine the point cloud diameter based on the interval distance; compare the relationship between the point cloud diameter and the target diameter range to obtain the detection result.

3. The pipeline inspection method according to claim 1, characterized in that, Rotate the target pipe point cloud so that its axis vector is aligned with the X-axis of the standard coordinate system, and the normal vector of its target plane is aligned with the Y-axis of the standard coordinate system, including: Determine the axisymmetric vector and centroid of the target pipeline point cloud; The target plane is obtained by fitting the axis center vector and centroid of the target pipeline point cloud, or by determining the plane coplanar with the axis center vector as the target plane. Based on the normal vector, axis vector, and standard coordinate system of the target plane, determine the rotation and translation matrices, and rotate the target pipeline point cloud based on the rotation and translation matrices.

4. The pipeline inspection method according to claim 3, characterized in that, Based on the normal vector, axis center vector, and standard coordinate system of the target plane, determine the rotation and translation matrices, and rotate the target pipeline point cloud based on the rotation and translation matrices, including: Based on the axis vector and the X-axis of the standard coordinate system, determine the first rotation matrix and the first translation matrix; The target pipeline point cloud is rotated based on the first rotation matrix and the second translation matrix to obtain the first intermediate point cloud; the axis vector of the first intermediate point cloud is in the same direction as the X-axis of the standard coordinate system. Based on the normal vector of the target plane in the first intermediate point cloud and the Y-axis of the standard coordinate system, determine the second rotation matrix and the second translation matrix; The first intermediate point cloud is rotated based on the second rotation matrix and the second translation matrix to obtain the rotated target pipeline point cloud.

5. The pipeline inspection method according to claim 1, characterized in that, Multiple feature point sets are determined based on sliced ​​point clouds, including: Projecting the sliced ​​point cloud onto the Y-axis of the standard coordinate system yields the projected point cloud; Euclidean distance clustering is performed on the projected point cloud to obtain the point of interest cloud; the point of interest cloud represents different types of pipes in the pipeline under test; The feature point set is obtained based on the point of interest cloud.

6. The pipeline inspection method according to claim 5, characterized in that, The feature point set is obtained based on the interest point cloud, including: For each set of points of interest, a straight line is fitted to obtain the straight line model corresponding to each set of points of interest; Feature points are extracted from each straight line model to obtain multiple feature point sets.

7. The pipeline inspection method according to any one of claims 1-6, characterized in that, Obtain the 3D point cloud of the pipeline, including: Obtain the initial 3D point cloud, which is the point cloud corresponding to the pipeline to be measured; The initial 3D point cloud is filtered and downsampled to obtain the 3D point cloud of the pipeline.

8. A pipeline inspection device, characterized in that, include: The data acquisition module is used to acquire the 3D point cloud of the pipeline and the region of interest (ROI) of the pipeline; the ROI represents the shape of the pipeline. The data processing module is used to determine the target pipeline point cloud based on the pipeline's 3D point cloud and the pipeline's region of interest. The rotation module is used to rotate the target pipe point cloud so that the axis vector of the target pipe point cloud is in the same direction as the X-axis of the standard coordinate system, and the normal vector of the target plane of the target pipe point cloud is in the same direction as the Y-axis of the standard coordinate system; the target plane is the plane obtained by fitting the axis vector of the target pipe point cloud with the centroid. The point cloud slicing module is used to slice the rotated target pipe point cloud in the Y-axis direction to obtain the sliced ​​point cloud. The feature point determination module is used to determine a set of multiple feature points based on the sliced ​​point cloud. Each set of feature points contains feature points of the same type, and each set of feature points includes at least one feature point. The types of feature points in different feature point sets are different; The detection module is used to detect pipelines based on the set of feature points and the corresponding detection conditions.

9. An electronic device, characterized in that, It includes a memory and a processor, the processor being configured to execute program instructions stored in the memory to implement the pipeline inspection method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by the computer's processor, causes the computer to perform the pipeline inspection method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Space prefabricated pipeline welding multi-degree-of-freedom adjusting method

    CN117687440A

  • High-precision small-caliber pipe groove detection method and device based on three-dimensional imaging

    CN118225794A

  • A geometric feature extraction method and system suitable for pipeline 3D reconstruction

    CN119741421A