Tunnel point cloud noise automatic removal method based on slice concave hull contour constraint
Patent Information
- Application Number
- CN202611173964.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-04
- Publication Date
- 2026-10-27
AI Technical Summary
[0007]本发明所要解决的技术问题是:在不规则断面隧洞中,如何在保护洞壁结构完整性的前提下精准剔除位于横截面内部的非结构噪声点
本发明先对原始隧洞点云数据进行姿态对齐,再沿隧洞轴向进行等间距切片,将三维点云处理问题转化为各切片二维断面上的轮廓约束处理问题。然后基于切片断面的凹包轮廓及其向内收缩形成的判别边界,对位于隧洞横截面内部的非结构噪声点进行识别和剔除,并对保留点进行合并和坐标系恢复,从而在不依赖规则断面假设的情况下,实现对不规则断面隧洞点云中内部噪声点的自动剔除,同时保留洞壁结构点云,为后续的断面分析、变形监测和三维重建提供去噪后的点云数据基础。
Smart Images

Figure CN122989462A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of point cloud data processing and tunnel engineering monitoring, specifically to a method for automatic noise removal from tunnel point clouds based on slice concave hull contour constraints. Background Technology
[0002] Three-dimensional laser scanning technology has been widely applied in tunnel engineering, mining, and underground space planning, enabling the rapid acquisition of dense three-dimensional point cloud data of tunnel structures. This provides crucial data support for tunnel deformation monitoring, support design, and construction quality assessment. However, during the acquisition process, non-structural noise points such as those from construction personnel, support components, and measuring equipment inevitably become present in the tunnel point cloud. These noise points interfere with the accurate extraction of the tunnel contour, leading to distorted cross-sectional models and negatively impacting the reliability of subsequent analysis and evaluation. Therefore, effectively removing noise points while maintaining the integrity of the tunnel's main structure has become a critical issue in tunnel point cloud post-processing.
[0003] To address the aforementioned issues, various point cloud denoising methods have been developed in the existing technology. Among them, statistical filtering-based methods (such as statistical outlier removal, SOR) identify noise by analyzing the local neighborhood distance distribution, which is simple to implement, but prone to misclassification in scenarios with complex structures or large variations in point cloud density. Density clustering-based methods (such as DBSCAN) can effectively identify discrete noise, but their performance is sensitive to neighborhood parameters, and it is difficult to balance global consistency and local adaptability in large-scale tunnel point clouds. Model fitting-based methods (such as RANSAC) can accurately extract regular structures, but their applicability is often limited in complex tunnel environments with deformations or attached structures.
[0004] To address the structural characteristics of tunnel point clouds, some methods utilize centerline distance or ellipse fitting for noise reduction. For example, the tunnel centerline can be determined through bidirectional projection, and noise removal can be achieved based on the distance from points to the centerline; alternatively, the point cloud can be sliced along the centerline, and ellipse fitting can be used to identify noise points. These methods have achieved good results in tunnels with regular cross-sections, but their performance depends to some extent on the assumption of a circular or elliptical cross-section. When applied to irregular cross-sections such as horseshoe or arch shapes, the accuracy of contour fitting may decrease, thus affecting the accuracy of noise removal.
[0005] Furthermore, the concave hull algorithm, as a commonly used tool for point cloud contour extraction, can accurately describe the boundary morphology of complex point sets and has mature applications in fields such as ground object extraction and building contour recognition. However, in tunnel point cloud processing, existing research mainly focuses on using concave hulls for contour extraction or geometric modeling, while research on how to systematically remove noise based on slice contour constraints remains relatively insufficient. At the same time, with the improvement of 3D laser scanning accuracy, point cloud data often reaches the hundreds of millions, and the computational efficiency of existing methods in processing large-scale point clouds still needs improvement, making it difficult to fully meet the data processing speed requirements of practical engineering applications.
[0006] In summary, how to accurately eliminate non-structural noise points located inside the cross-section of tunnels with irregular cross-sections while protecting the structural integrity of the tunnel walls is a technical problem that needs to be solved. Summary of the Invention
[0007] The technical problem this invention aims to solve is: how to accurately remove non-structural noise points located inside the cross-section of tunnels with irregular cross-sections while protecting the structural integrity of the tunnel walls. The objective is to provide an automatic noise removal method for tunnel point clouds based on slice concave hull contour constraints. This solves the aforementioned technical problem.
[0008] This invention is achieved through the following technical solution: In a first aspect, the present invention provides an automatic noise removal method for tunnel point clouds based on slice concave hull contour constraints, comprising: Obtain raw tunnel point cloud data; Principal component analysis was performed on the original tunnel point cloud data. The principal direction of the point cloud was rotated to be parallel to the Y-axis to obtain the aligned point cloud, and the rotation matrix was recorded. The aligned point cloud is sliced at equal intervals along the Y-axis to obtain multiple slice point sets; For each slice point set, project it onto the XZ plane and use the concave hull contour extraction algorithm to extract the concave hull contour of the cross section; Shrink the concave hull contour inward by a preset distance to obtain the shrunken contour; For each point in each slice point set, determine the positional relationship between its projection point on the XZ plane and the shrinkage contour, remove the points located inside the shrinkage contour, and retain the points located outside the shrinkage contour to obtain the denoised slice point set. All denoised slice points are merged and then inversely transformed using a rotation matrix to restore the original coordinate system, resulting in denoised tunnel point cloud data.
[0009] Furthermore, the steps of performing principal component analysis on the original tunnel point cloud data, rotating the principal direction of the point cloud to be parallel to the Y-axis to obtain an aligned point cloud, and recording the rotation matrix include: Extract the projection coordinates of the point cloud onto the XY plane; Calculate the covariance matrix of the projected coordinates; The covariance matrix is subjected to eigenvalue decomposition to obtain the principal component directions corresponding to the tunnel axial extension direction; Construct a rotation matrix to rotate the point cloud to be parallel to the Y-axis based on the principal component direction.
[0010] Further, the step of slicing the aligned point cloud at equal intervals along the Y-axis to obtain multiple slice point sets includes: Determine the minimum and maximum coordinates of the point cloud in the Y-axis direction after alignment; Obtain the slice thickness parameter; The total number of slices is calculated based on the minimum, maximum, and slice thickness parameters; wherein the total number of slices is the difference between the maximum and minimum values divided by the slice thickness parameter and then rounded up. For each point in the aligned point cloud, the slice index of the point is calculated based on the point's Y-axis coordinate, minimum value, and slice thickness parameter, and the point is assigned to the corresponding slice point set according to the slice index; wherein, the slice index is the difference between the point's Y-axis coordinate and minimum value divided by the slice thickness parameter and then rounded down.
[0011] Further, the step of projecting each slice point set onto the XZ plane and extracting the concave hull contour of the cross-section using a concave hull contour extraction algorithm includes: Delaunay triangulation is performed on the projected 2D point cloud to obtain a set of triangles; Calculate the radius of the circumcircle of each triangle in the set of triangles; Get the preset shape parameters; Triangles whose circumcircle radius is less than the reciprocal of the preset shape parameter are identified as valid triangles, thus obtaining a set of valid triangles. Extract the boundary edges of the valid triangle set and construct the concave hull profile; When the concave hull profile is a composite polygon that includes multiple sub-polygons, the sub-polygon with the largest area is selected as the main profile.
[0012] Further, the step of shrinking the concave contour inward by a preset distance to obtain the shrunken contour includes: Obtain the contraction parameters; An inward buffering operation is performed on the main contour according to the shrinkage parameters to obtain the shrinkage contour; When the shrinking contour degenerates into an empty set or breaks into multiple sub-polygons, the bounding rectangle of the slice point set is used as the alternative contour.
[0013] Further, the step of determining the positional relationship between the projection point of each point in each slice point set and the shrinkage contour, removing points located inside the shrinkage contour, and retaining points located outside the shrinkage contour to obtain the denoised slice point set includes: For each point in the slice point set, extract its projected coordinates on the XZ plane; A ray is emitted from the projected coordinates, and the number of intersections between the ray and the shrinkage contour boundary is calculated. When the number of intersection points is odd, the point is determined to be inside the contracted contour and is removed as a noise point. When the number of intersection points is even, the point is determined to be outside the contraction profile and is retained as a hole wall point; All retained points in the slice point set constitute the denoised slice point set.
[0014] Further, the step of combining all denoised slice points and performing an inverse transformation using a rotation matrix to recover the original coordinate system to obtain the denoised tunnel point cloud data includes: Read each denoised slice point set in the order of slice index, and stitch the denoised slice point sets into a complete point cloud. Apply a rotation matrix to the complete point cloud to perform an inverse transformation and restore the original coordinate system; The system employs a streaming write and dual-buffered parallel mechanism. The main thread performs color reconstruction on the point cloud data after restoring the original coordinate system, while the write thread performs disk writing. The main thread and the write thread work together through a buffer queue to output the denoised tunnel point cloud data.
[0015] In a second aspect, the present invention provides an automatic noise removal device for tunnel point clouds based on slice concave hull contour constraints, comprising: The acquisition module is used to acquire raw tunnel point cloud data; The analysis module is used to perform principal component analysis on the original tunnel point cloud data, rotate the principal direction of the point cloud to be parallel to the Y-axis, obtain the aligned point cloud, and record the rotation matrix. The slicing module is used to slice the aligned point cloud at equal intervals along the Y-axis to obtain multiple slice point sets. The extraction module is used to project each slice point set onto the XZ plane and extract the concave hull contour of the cross section using a concave hull contour extraction algorithm. The shrinkage module is used to shrink the concave contour inward by a preset distance to obtain the shrunken contour. The elimination module is used to determine the positional relationship between the projection point of each point in the XZ plane and the shrinkage contour for each point in each slice point set, eliminate the points located inside the shrinkage contour, and retain the points located outside the shrinkage contour to obtain the denoised slice point set. The recovery module is used to combine all the denoised slice points and perform an inverse transformation using a rotation matrix to restore the original coordinate system, thus obtaining the denoised tunnel point cloud data.
[0016] Thirdly, the present invention provides an electronic device, comprising: a memory, and one or more processors communicatively connected to the memory; the memory stores instructions executable by the one or more processors, the instructions being executed by the one or more processors to cause the one or more processors to implement the method described above.
[0017] Fourthly, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.
[0018] Compared with the prior art, the present invention has the following advantages and beneficial effects: This invention first aligns the original tunnel point cloud data by orientation, then slices it at equal intervals along the tunnel axis, transforming the 3D point cloud processing problem into a contour constraint processing problem on the 2D cross-sections of each slice. Then, based on the concave contour of the slice cross-sections and the discrimination boundary formed by their inward contraction, unstructured noise points located inside the tunnel cross-section are identified and removed. The retained points are then merged and their coordinate system restored. This achieves automatic removal of internal noise points from the point cloud of irregularly shaped tunnels without relying on the assumption of regular cross-sections, while preserving the tunnel wall structure point cloud, providing a denoised point cloud data foundation for subsequent cross-section analysis, deformation monitoring, and 3D reconstruction. Attached Figure Description
[0019] To more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of the present invention and should not be considered as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort. In the drawings: Figure 1 This is one of the flowcharts for an automatic noise removal method for tunnel point clouds based on slice concave hull contour constraints provided in the embodiments of this specification; Figure 2 The second flowchart illustrates an automatic noise removal method for tunnel point clouds based on slice concave hull contour constraints, as provided in the embodiments of this specification. Figure 3 This is a schematic diagram of a typical slice of a tunnel point cloud before denoising, provided in the embodiments of this specification. Figure 4 This is a schematic diagram of a typical slice of tunnel point cloud provided in the embodiments of this specification after denoising. Figure 5 This is a schematic diagram of the complete tunnel point cloud before noise reduction, provided in the embodiments of this specification. Figure 6 This is a schematic diagram of the complete tunnel point cloud after denoising, provided in the embodiments of this specification. Figure 7 This is a block diagram of an automatic noise removal device for tunnel point clouds based on slice concave hull contour constraints, provided in the embodiments of this specification.
[0020] Figure 8 This is a block diagram of the electronic device provided in the embodiments of this specification. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the embodiments and accompanying drawings. The illustrative embodiments and descriptions of the present invention are only used to explain the present invention and are not intended to limit the present invention.
[0022] like Figure 1 and Figure 2 As shown, this embodiment provides an automatic noise removal method for tunnel point clouds based on slice concave hull contour constraints, including: Step S11: Obtain the raw tunnel point cloud data.
[0023] In this embodiment, the original tunnel point cloud data can be obtained by scanning the tunnel with a three-dimensional laser scanning device.
[0024] Specifically, the data may include three-dimensional spatial information of the tunnel's main structure as well as three-dimensional spatial information of non-structural interference points such as construction personnel, support components, and measuring equipment.
[0025] More specifically, regarding data format, the raw tunnel point cloud data can be stored in LAS format, with each point record including its three-dimensional spatial coordinates and color information. After the system reads the raw data, it can uniformly represent the point cloud as a coordinate matrix and a normalized color matrix for use in subsequent steps.
[0026] In a specific implementation plan, the 3D laser scanning equipment includes stationary scanners, mobile scanners, or handheld scanners. The specific scanning and acquisition method can be determined based on the site conditions of the tunnel project. Specifically, in sections with regular tunnel cross-sections and good visibility, stationary scanners can be used for fixed-site scanning. In sections with winding tunnel runs or complex cross-sectional shapes, mobile scanning equipment can be used to scan along the tunnel. In areas where local details require supplementary measurement, handheld scanning equipment can be used for supplementary acquisition.
[0027] Step S12: Perform principal component analysis on the original tunnel point cloud data, rotate the principal direction of the point cloud to be parallel to the Y-axis to obtain the aligned point cloud, and record the rotation matrix.
[0028] In this embodiment, during the scanning of the original tunnel point cloud data, due to factors such as the mounting posture of the scanning equipment and the tunnel orientation, the main extension direction of the point cloud is often not parallel to any axis of the coordinate system. If the original point cloud is directly sliced axially, there will be a deviation between the slicing direction and the actual extension direction of the tunnel, resulting in distortion of the cross-sectional projection.
[0029] Therefore, this step achieves data-driven automatic attitude alignment through principal component analysis, rotating the principal direction of the point cloud to be parallel to the Y-axis, and recording the rotation matrix for subsequent coordinate system restoration.
[0030] Specifically, first, the projected coordinates of the point cloud on the XY plane are extracted, where the XY plane is the horizontal plane. Then, the covariance matrix is calculated based on these projected coordinates. Next, eigenvalue decomposition is performed on the covariance matrix to obtain multiple eigenvectors sorted by eigenvalue size. The eigenvector corresponding to the largest eigenvalue is the main extension direction of the point cloud on the horizontal plane, which physically corresponds to the axial extension direction of the tunnel. Next, a rotation matrix is constructed based on this main extension direction. The rotation matrix is a transformation matrix that transforms the point cloud from its original pose to a Y-axis aligned pose. Finally, the rotation matrix is applied to all original point cloud coordinates to obtain the aligned point cloud, and this rotation matrix is stored in memory for use in the inverse transformation of step S17.
[0031] Specifically, the construction method of the rotation matrix can include: determining the rotation angle by the angle between the main extension direction of the point cloud and the positive Y-axis, and generating the rotation matrix by combining it with the rotation axis (Z-axis). After attitude alignment, the tunnel axis of the point cloud is parallel to the Y-axis, and the XZ plane is the tunnel cross-sectional plane.
[0032] Step S13: Slice the aligned point cloud at equal intervals along the Y-axis to obtain multiple slice point sets.
[0033] In this embodiment, the aligned point cloud obtained in step S12 can be sliced at equal intervals along the Y-axis direction, and the three-dimensional point cloud can be decomposed into a series of two-dimensional slice point sets arranged sequentially along the tunnel axis, with each slice corresponding to a cross-sectional position of the tunnel.
[0034] In a specific implementation plan, the slicing process may include: First, traversing all points in the aligned point cloud to determine the minimum and maximum coordinate values along the Y-axis. These two values define the start and end range of the tunnel along the axial direction. Then, obtaining a preset slice thickness parameter. This parameter determines the axial thickness of each slice, and its value is determined comprehensively based on the point cloud density, the tunnel cross-section change rate, and processing accuracy requirements. Smaller thickness values retain more local details but increase the number of slices processed, while larger thickness values reduce processing volume but may blur local changes. Next, calculating the total number of slices based on the minimum and maximum coordinate values and the slice thickness parameter. The total number of slices is the difference between the maximum and minimum values divided by the slice thickness parameter, rounded up. Finally, for each point in the point cloud, calculating its slice index. The slice index is the difference between the point's Y-axis coordinate and the minimum coordinate value divided by the slice thickness parameter, rounded down. The point is then assigned to the corresponding slice point set based on this slice index; points with the same index value belong to the same slice.
[0035] After the slicing process is completed, each slice point set includes all points within a section thickness range at the corresponding axial position of the tunnel, and each slice is arranged in an orderly manner along the Y-axis direction.
[0036] Step S14: For each slice point set, project it onto the XZ plane and use the concave hull contour extraction algorithm to extract the concave hull contour of the cross section.
[0037] In this embodiment, contour extraction processing is performed on each slice point set obtained in step S13. Since the points in the slice point set are distributed within a thin layer along the tunnel axis, projecting them onto the XZ plane yields a two-dimensional point cloud distribution at that cross-section location. The concave hull contour extraction algorithm is then used to extract the concave hull contour of the cross-section from this two-dimensional point cloud. The concave hull contour is a closed polygon that closely fits the outer boundary of the cross-section point cloud.
[0038] In a specific implementation, firstly, the projected 2D point cloud is subjected to Delaunay triangulation, connecting all 2D points into a network of non-overlapping triangles to obtain a triangle set. Secondly, the circumcircle radius of each triangle in the triangle set is calculated; the circumcircle radius reflects the point cloud sparsity of the region spanned by the triangle. Then, preset shape parameters are obtained, which control the precision of contour extraction. Next, the circumcircle radius of each triangle is compared with the reciprocal of the preset shape parameter. Triangles with circumcircle radii smaller than the reciprocal are identified as valid triangles, while those with circumcircle radii greater than or equal to the reciprocal are excluded. All valid triangles constitute a valid triangle set. Then, the boundary edges of the valid triangle set are extracted; each boundary edge belongs to only one valid triangle, and all boundary edges are connected sequentially to form a concave hull contour. Finally, it is determined whether the concave hull contour is a composite polygon containing multiple unconnected sub-polygons. If so, the area of each sub-polygon is calculated, and the sub-polygon with the largest area is selected as the main contour, while the remaining sub-polygons are discarded.
[0039] In one specific implementation, preset shape parameters control the tightness of the fit between the concave hull profile and the point cloud boundary. Specifically, smaller shape parameter values relax the filtering criteria, retaining more triangles and resulting in a tighter profile fit, which can capture local concavity and protrusion details of the cross-section. However, when the point cloud has local sparseness or voids, the profile may appear fragmented or have internal voids. Larger shape parameter values tighten the filtering criteria, retaining only triangles with smaller circumcircle radii, resulting in a smoother and more regular profile, but potentially losing local features of the cross-section.
[0040] Step S15: Shrink the concave contour inward by a preset distance to obtain the shrunken contour.
[0041] In a specific implementation, firstly, a preset shrinkage parameter is obtained, which determines the inward shrinkage distance of the contour. Next, an inward buffering operation is performed on the concave contour. The buffering direction is that each boundary point of the contour is translated inward along the local inward normal direction of its corresponding contour segment. The translation distance is equal to the shrinkage parameter. After translation, the translated points are reconnected to form the shrunken contour, which is an equidistant, inwardly shrunken version of the original contour. Then, the result of the shrinkage operation is checked. If the shrinkage is successful and results in a non-empty and single closed polygon, this polygon is used as the shrunken contour for subsequent steps. If the shrinkage parameter is too large, causing the shrunken contour to degenerate into an empty set (i.e., the contour disappears) or break into multiple unconnected sub-polygons, the shrinkage result is discarded, and the bounding rectangle of the slice point set on the XZ plane is used as a replacement contour.
[0042] Specifically, the bounding rectangle is the smallest bounding rectangle of all projected points of the slice point set on the XZ plane, with its four sides parallel to the X-axis and Z-axis, respectively. Although the accuracy of the bounding rectangle is lower than that of the shrinkage contour, it can ensure that there is still a usable discrimination boundary in step S16 under extreme shrinkage parameters.
[0043] Specifically, the shrinkage parameter can be determined based on the actual thickness of the tunnel wall and the distribution characteristics of noise within the tunnel. In scenarios where the tunnel wall is thin and the noise mainly consists of isolated discrete point groups, a smaller shrinkage parameter is used to avoid mistakenly including tunnel wall points in the exclusion range. When the tunnel wall is thick and there are noises that need to be excluded, such as support structures attached to the tunnel wall, a larger shrinkage parameter is used to ensure that the shrinkage profile retreats to the inside of the support structure.
[0044] Step S16: For each point in each slice point set, determine the positional relationship between its projection point on the XZ plane and the shrinkage contour, remove the points located inside the shrinkage contour, and retain the points located outside the shrinkage contour to obtain the denoised slice point set.
[0045] In this embodiment, for each slice point set obtained in step S13, the internal and external positional relationship is determined point by point using the contraction contour corresponding to the slice obtained in step S15. Points located inside the contraction contour are identified as noise points and removed, while points located outside the contraction contour are identified as hole wall points and retained, thus forming a denoised slice point set.
[0046] In a specific implementation plan, the specific process of discrimination processing may include: For each point in the current slice point set, firstly, extract the projected coordinates of the point on the XZ plane, that is, take the X and Z components of the point's three-dimensional coordinates, ignoring the Y component. Then, using the projected coordinates as the starting point, emit a ray along a preset direction. Next, calculate the total number of intersections between the ray and each boundary of the contraction contour. Finally, determine the point based on the parity of the number of intersections; that is, if the number of intersections is odd, it means that the projected point is inside the contraction contour, and the point is judged as a noise point and removed from the slice point set. If the number of intersections is even (including 0), it means that the projected point is outside the contraction contour, and the point is judged as a hole wall point and retained.
[0047] Step S17: Combine all the denoised slice points and perform an inverse transformation using the rotation matrix to restore the original coordinate system, thus obtaining the denoised tunnel point cloud data.
[0048] In a specific implementation, firstly, the denoised slice point sets are read sequentially according to their slice indices from smallest to largest. Points from each slice point set are then added sequentially to the complete point cloud set. The slice index order corresponds to the spatial order along the tunnel axis from the start point to the end point, ensuring the merged complete point cloud is spatially continuous. Next, the rotation matrix stored in step S12 is retrieved, and its inverse (or transpose; if the rotation matrix is orthogonal, they are equivalent) is applied to all points in the complete point cloud, restoring the point cloud from its Y-axis aligned pose to its original scanning pose, resulting in point cloud data with the restored original coordinate system. Finally, the point cloud data is output, with the output file format corresponding to the input file format in step S11, recording the 3D spatial coordinates and color information of each point.
[0049] In this embodiment, a multi-threaded concurrency mechanism can be used during the output process to improve the output efficiency of large-scale point clouds. Specifically, the color reconstruction operation task can be assigned to one processing thread, and the disk writing task of the processed data can be assigned to another processing thread. The two threads pass data through a buffer queue. After the first thread completes the color reconstruction of a batch of points, it writes the result to the buffer queue. The second thread retrieves the data from the buffer queue and writes it to the disk. The two threads are executed in an overlapping pipeline manner.
[0050] Through steps S11 to S17, this embodiment achieves the precise removal of non-structural noise points such as construction workers and support components inside the tunnel cross-section while protecting the integrity of the tunnel wall structure, resulting in clean, denoised point cloud data.
[0051] In some implementations, the steps of performing principal component analysis on the original tunnel point cloud data, rotating the principal direction of the point cloud to be parallel to the Y-axis to obtain an aligned point cloud, and recording the rotation matrix include: Step S121: Extract the projection coordinates of the point cloud on the XY plane.
[0052] In this embodiment, after reading the original tunnel point cloud data, each point in the point cloud can be traversed. For each point, the X and Y components of its three-dimensional coordinates are extracted to form a two-dimensional coordinate pair, while the Z component is not retained. This two-dimensional coordinate pair is the projected coordinate of the point on the XY plane. The XY plane is a horizontal plane, and the projection operation vertically maps the three-dimensional spatial points onto the horizontal plane, preserving the spatial distribution information of the points on the horizontal plane and eliminating the interference of the elevation direction component on the calculation of the main direction. After traversal, a set of projected coordinates with the same number of points as the original point cloud can be obtained. This set of projected coordinates serves as the input data for the covariance matrix calculation in step S122.
[0053] Step S122: Calculate the covariance matrix of the projected coordinates.
[0054] In this embodiment, the covariance matrix can be calculated based on the set of projected coordinates obtained in step S121.
[0055] Specifically, the covariance matrix can be a 2x2 square matrix, where the elements in the first row and first column represent the variance of all projected coordinate X components, characterizing the data dispersion in the X direction. The elements in the second row and second column represent the variance of all projected coordinate Y components, characterizing the data dispersion in the Y direction. The elements in the first row and second column and the second row and first column represent the covariance of the X and Y components, characterizing the correlation between the data in the two directions.
[0056] In a specific implementation, the calculation process of the covariance matrix may include: first, calculating the mean of the X component and the mean of the Y component of all projected coordinates. Then, iterating through each two-dimensional coordinate pair in the projected coordinate set, calculating the difference between the X component and the X mean, and the difference between the Y component and the Y mean for that coordinate pair. Next, multiplying and summing these differences according to the definition of each element of the covariance matrix. After the iteration is complete, dividing each sum by the total number of projected coordinates yields the four element values of the covariance matrix.
[0057] Step S123: Perform eigenvalue decomposition on the covariance matrix to obtain the principal component directions corresponding to the tunnel axial extension direction.
[0058] In this embodiment, the covariance matrix obtained in step S122 can be subjected to eigenvalue decomposition to obtain eigenvectors sorted by eigenvalue size. The eigenvector corresponding to the largest eigenvalue is the principal component direction corresponding to the tunnel axial extension direction. This principal component direction is a two-dimensional unit vector, and its direction on the XY plane is the projection direction of the tunnel axial direction onto the horizontal plane.
[0059] Step S124: Construct a rotation matrix to rotate the point cloud to be parallel to the Y-axis based on the principal component direction.
[0060] In this embodiment, a rotation matrix can be constructed based on the principal component directions obtained in step S123.
[0061] Specifically, the construction of the rotation matrix may include: calculating the angle between the principal component direction and the positive Y-axis, using this angle as the rotation angle, and using the Z-axis as the rotation axis to generate a three-dimensional rotation matrix around the Z-axis. This rotation matrix can be applied to the three-dimensional coordinates of each point in the original point cloud to obtain an aligned point cloud, and the rotation matrix can be stored in memory.
[0062] In some embodiments, the step of slicing the aligned point cloud at equal intervals along the Y-axis to obtain multiple slice point sets includes: Step S131: Determine the minimum and maximum coordinates of the aligned point cloud in the Y-axis direction.
[0063] In this embodiment, all points in the aligned point cloud can be traversed, and their Y-axis coordinate values can be read point by point. The minimum and maximum Y-axis coordinate values encountered during the traversal are recorded. After the traversal is completed, the minimum and maximum values correspond to the starting and ending positions of the tunnel along the axial direction in the aligned coordinate system, respectively. The difference between the two is the span range of the tunnel along the axial direction.
[0064] Step S132: Obtain the slice thickness parameters.
[0065] In this embodiment, the slice thickness parameter can be read from a preset configuration. The value of this slice thickness parameter can be predetermined and stored in the configuration based on the point cloud density, the rate of change of the tunnel cross-section along the axial direction, and the processing accuracy requirements. When the value of the slice thickness parameter increases, the axial range covered by each slice increases, the total number of slices decreases, and the number of slices to be processed in subsequent steps decreases accordingly. However, the cross-sectional features within a single slice may become blurred due to excessive coverage. When the value of the slice thickness parameter decreases, the axial range covered by each slice decreases, the total number of slices increases, and the gradual changes in the cross-section along the axial direction can be captured more precisely. However, the processing time increases accordingly.
[0066] Step S133: Calculate the total number of slices based on the minimum value, maximum value, and slice thickness parameter; wherein the total number of slices is the difference between the maximum value and the minimum value divided by the slice thickness parameter and then rounded up.
[0067] In this embodiment, the total number of slices can be calculated based on the minimum and maximum values obtained in step S131 and the slice thickness parameter obtained in step S132. Specifically, the axial span is obtained by subtracting the minimum value from the maximum value, and the span is divided by the slice thickness parameter. The result of the division is then rounded up.
[0068] Understandably, when the decimal part of the division result is not zero, the integer part is incremented by 1 to obtain the final result; when the division result is exactly an integer, that integer is the final result. The purpose of rounding up is to ensure that when the length of the last axial interval is less than the thickness of a complete slice, it is still assigned an independent slice number, so that the point cloud is completely covered along the axial direction and no end omissions occur.
[0069] Step S134: For each point in the aligned point cloud, calculate the slice index of the point based on its Y-axis coordinate, minimum value, and slice thickness parameter, and assign the point to the corresponding slice point set according to the slice index; wherein, the slice index is the difference between the point's Y-axis coordinate and minimum value divided by the slice thickness parameter and then rounded down.
[0070] In this implementation, each point in the aligned point cloud can be traversed, and the following operations can be performed for each point: Read the Y-axis coordinate of the point, subtract the minimum value obtained in step S131 from the Y-axis coordinate, divide the difference by the slice thickness parameter obtained in step S132, and perform a floor operation on the division result to obtain the slice index of the point.
[0071] Understandably, the decimal part of the division result is discarded, retaining only the integer part. The purpose of rounding down is to start the slice indexing from zero; that is, the first valid slice (index zero) covers the axial range from the minimum value to the minimum value plus one slice thickness. After obtaining the slice index, the point is added to the slice point set corresponding to that index. All points with the same index value belong to the same slice point set, and the slice point sets are arranged sequentially along the Y-axis in ascending order of index value.
[0072] In some implementations, the step of projecting each slice point set onto the XZ plane and extracting the concave hull contour of the cross-section using a concave hull contour extraction algorithm includes: Step S141: Perform Delaunay triangulation on the projected 2D point cloud to obtain a set of triangles.
[0073] In this embodiment, Delaunay triangulation can be performed on the two-dimensional point cloud to connect the discrete two-dimensional points into a set of non-overlapping triangles.
[0074] Specifically, Delaunay triangulation has the property of an empty circle, meaning that the circumcircle of any triangle obtained by the triangulation does not include other points in the point set. At the same time, it has the property of maximizing the minimum angle, meaning that among all possible triangulation methods, Delaunay triangulation maximizes the minimum interior angle of all triangles, thereby avoiding the generation of overly long and narrow triangles.
[0075] Step S142: Calculate the circumcircle radius of each triangle in the triangle set.
[0076] In this embodiment, the circumcircle is the only circle that passes through all three vertices of the triangle. Its radius is determined by the two-dimensional coordinates of the three vertices of the triangle through geometric relationships. Specifically, for a triangle formed by the three vertices, the radius of its circumcircle is equal to the product of the lengths of the three sides of the triangle divided by four times the area of the triangle. In areas of high local density in the point cloud, the radius of the circumcircle of the triangle is often smaller, while the radius of the circumcircle of the triangle at the edge of the point cloud or in areas with internal holes is often larger.
[0077] Step S143: Obtain preset shape parameters.
[0078] Step S144: Determine the triangles whose circumscribed circle radius is less than the reciprocal of the preset shape parameter as valid triangles, and obtain the set of valid triangles.
[0079] In this embodiment, triangles with a circumcircle radius smaller than the reciprocal of a preset shape parameter are marked as valid triangles, while triangles with a circumcircle radius greater than or equal to the reciprocal are excluded. After traversal, all triangles marked as valid constitute a set of valid triangles.
[0080] Step S145: Extract the boundary edges of the valid triangle set and construct the concave hull profile.
[0081] In this implementation, all triangles in the valid triangle set can be traversed, the three sides of each triangle can be extracted, and the frequency of each side can be counted. In the triangle set, the inner edge belongs to two adjacent triangles and therefore appears twice, while the outer boundary edge belongs to only one triangle and therefore appears once. The edge that appears exactly once can be identified as a boundary edge, and all boundary edges constitute a set of edges.
[0082] After obtaining the set of boundary edges, a closed polygon can be constructed based on the endpoint connections of the edges. Specifically, select any edge from the boundary edge set as the starting edge, record the coordinates of its two endpoints, and remove the edge from the set. Find an edge in the boundary edge set whose starting or ending point has the same coordinates as the current ending point, add it to the polygon as the next edge, update the current ending point, and remove the edge from the set. Repeat this search and addition process until you return to the starting point coordinates of the starting edge, forming a closed polygon, which is the concave hull profile of the slice section.
[0083] If the boundary edges form multiple unconnected closed polygons during the connection process, then each closed polygon is a sub-polygon, and all sub-polygons together constitute the composite polygon outline of the cross section.
[0084] Step S146: When the concave hull contour is a composite polygon including multiple sub-polygons, select the sub-polygon with the largest area as the main contour.
[0085] In this embodiment, when the concave contour constructed in step S145 is a composite polygon including multiple sub-polygons, the area enclosed by each sub-polygon can be calculated separately, and the sub-polygon with the largest area can be selected as the main contour. If the concave contour constructed in step S145 is a single closed polygon, then that polygon is directly used as the main contour.
[0086] In some embodiments, the step of shrinking the concave contour inward by a predetermined distance to obtain the shrunken contour includes: Step S151: Obtain the shrinkage parameters.
[0087] In this embodiment, the shrinkage parameters can be read from a preset configuration. Specifically, the values of the shrinkage parameters can be predetermined and stored in the configuration based on the actual thickness of the tunnel wall and the distribution characteristics of noise inside the tunnel.
[0088] Step S152: Perform an inward buffering operation on the main contour according to the shrinkage parameters to obtain the shrinkage contour.
[0089] In this embodiment, when the concave hull contour constructed in step S145 is a single closed polygon, the main contour is the concave hull contour itself. When the concave hull contour is a composite polygon including multiple sub-polygons, the main contour is the sub-polygon with the largest area. This main contour can be used as the input contour for this step.
[0090] In this embodiment, the buffer direction is that each boundary point is translated inward along the local inward normal direction of its contour segment. The translation distance is equal to the shrinkage parameter obtained in step S151. After translation, each translated point is reconnected in sequence to form a closed polygon located inside the main contour and similar in shape to the main contour. This closed polygon is the shrinkage contour.
[0091] Step S153: When the shrinking contour degenerates into an empty set or breaks into multiple sub-polygons, the bounding rectangle of the slice point set is used as the alternative contour.
[0092] In this embodiment, it is possible to check whether the shrinkage contour output in step S152 is valid. Specifically, the determination criteria are: whether the shrinkage contour is a non-empty set and a single closed polygon. If the shrinkage contour fails to form a valid closed region after all boundary points are translated inward due to excessive shrinkage distance, it is determined that the shrinkage contour has degenerated into an empty set. If the shrinkage contour splits into multiple unconnected sub-polygons due to polygon self-intersection or other geometric reasons, it is determined that the shrinkage contour is broken.
[0093] When the shrinkage profile is determined to degenerate into an empty set or fragmentation, the shrinkage result can be discarded, and instead, the minimum bounding rectangle of all projection points of the slice point set on the XZ plane can be calculated as a substitute profile, with the four sides of the rectangle parallel to the X-axis and Z-axis, respectively. When the shrinkage profile is valid, it can be directly used as the discrimination boundary for subsequent steps.
[0094] In some implementations, the step of determining the positional relationship between the projection point of each point in the XZ plane and the shrinkage contour, removing points located inside the shrinkage contour, and retaining points located outside the shrinkage contour to obtain the denoised slice point set includes: Step S161: For each point in the slice point set, extract its projected coordinates on the XZ plane.
[0095] In this embodiment, each point in the current slice point set can be traversed, and for each point, its projected coordinates on the XZ plane can be extracted, that is, the X and Z components of the three-dimensional coordinates of the point are taken, while the Y component is ignored. The projected coordinates are used as the starting position for ray emission in step S162.
[0096] Step S162: Emit a ray from the projected coordinates and calculate the number of intersections between the ray and the shrinkage contour boundary.
[0097] In this embodiment, the projection coordinates extracted in step S161 can be used as the starting point of the ray, and a ray can be emitted along a preset fixed direction. All boundary edges of the contraction contour can be traversed, and for each edge, it is determined whether the ray intersects that edge. Specifically, the ray is represented as a parametric equation, and the boundary edges are represented as line segments. The intersection parameters of the parametric equation and the line segments are solved. If the intersection parameters fall within the positive direction of the ray and within the range of the line segment parameters, it is determined that the ray intersects the edge, and the intersection count is incremented. After traversing all boundary edges of the contraction contour, the total number of intersection points between the ray and the boundary of the contraction contour is obtained.
[0098] In this embodiment, during the intersection counting process, when a ray happens to pass through the vertex of the contracted contour, only one of the two edges belonging to that vertex can be counted as an intersection point to avoid double counting that could reverse the parity determination result.
[0099] Step S163: When the number of intersection points is odd, the point is determined to be inside the contracted contour and is removed as a noise point.
[0100] In this embodiment, if the number of intersection points is odd, the projection point is determined to be inside the contracted contour, the current point is determined to be a noise point, and the point can be removed from the slice point set.
[0101] Step S164: When the number of intersection points is even, it is determined that the point is located outside the contraction profile, and the point is retained as a hole wall point.
[0102] In this embodiment, if the number of intersection points is even (including 0), the projection point is determined to be outside the contraction contour, the current point is determined to be a hole wall point, and the point can be retained.
[0103] Step S165: The denoised slice point set is formed by collecting all the retained points in the slice point set.
[0104] In some implementations, the step of combining all denoised slice points and performing an inverse transformation using a rotation matrix to restore the original coordinate system to obtain denoised tunnel point cloud data includes: Step S171: Read each denoised slice point set in the order of slice index, and stitch the denoised slice point sets together to form a complete point cloud.
[0105] In this embodiment, the denoised slice point sets can be read sequentially in ascending order of slice index. Reading can begin with the slice at index 0, adding all points from that slice to the complete point cloud set, and then sequentially reading slices at indices 1, 2, and so on up to the maximum index. After reading each slice, the points in that slice can be appended to the end of the complete point cloud data structure in memory. After reading all slices, a complete point cloud including all retained tunnel wall points is formed in memory, with the order of points along the tunnel axis consistent with the axial order of the original point cloud.
[0106] Step S172: Apply a rotation matrix to the complete point cloud to perform an inverse transformation and restore the original coordinate system.
[0107] In this embodiment, the rotation matrix stored in step S124 can be retrieved. Each point in the complete point cloud obtained in step S171 is traversed, and the rotation matrix is applied to the three-dimensional coordinates of that point to perform an inverse transformation, obtaining the three-dimensional coordinates of that point in the original coordinate system. The calculated result replaces the original aligned coordinates of that point. After the traversal is complete, the coordinates of all points in the complete point cloud have been restored from the Y-axis aligned pose to the original scanning pose.
[0108] Step S173: Using a streaming write and double-buffered parallel mechanism, the main thread performs color reconstruction on the point cloud data after restoring the original coordinate system, and the write thread performs disk writing. The main thread and the write thread work together through a buffer queue to output the denoised tunnel point cloud data.
[0109] In this embodiment, two buffers can be created in memory and added to a buffer queue.
[0110] Specifically, the main thread is responsible for performing color reconstruction on the point cloud data after restoring the original coordinate system in step S172. More specifically, the main thread sequentially reads a batch of points from the complete point cloud, reconstructs the color information of each point according to the output format, and writes the 3D coordinate data and reconstructed color information of the batch of points into the currently active buffer. When a buffer is full, the main thread transfers the full buffer to the writing thread, and at the same time takes another free buffer from the buffer queue as the new currently active buffer to continue processing the next batch of points.
[0111] The write thread is responsible for disk writing. More specifically, the write thread receives a full buffer from the main thread, writes all point data in the buffer to disk according to the output file format, and clears the buffer and returns it to the buffer queue after writing is complete. After the main thread processes all points in the complete point cloud and hands over the last buffer, it waits for the write thread to complete the disk write. The final output is a denoised tunnel point cloud data file, which includes the 3D coordinates and color information of all preserved tunnel wall points in the original scan coordinate system.
[0112] In a specific implementation plan, see Figures 3-6 Taking the automatic noise removal from the point cloud of a powerhouse tunnel at a hydropower station in western Sichuan as an example, this paper illustrates the process. The tunnel has a horseshoe-shaped cross-section, a total length of approximately 94 meters, a net width of approximately 7.6 meters, and a net height of approximately 6.5 meters. The original point cloud contains approximately 247 million points. An automatic noise removal method based on slice concave hull contour constraints is applied to this tunnel point cloud. The steps are as follows: Step S1: Obtain raw tunnel point cloud data.
[0113] Point cloud data of the water diversion tunnel was acquired using a stationary 3D laser scanner. The data was stored in LAS format and included 3D coordinates and RGB color information. After reading, it was uniformly represented as a coordinate matrix and a normalized color matrix.
[0114] Step S2: Rotate the principal direction of the point cloud to be parallel to the Y-axis through principal component analysis.
[0115] Extract the projected coordinates of the point cloud onto the XY plane, calculate the covariance matrix, and perform eigenvalue decomposition to obtain the directions of the first principal components. Construct a rotation matrix R to rotate the point cloud to the Y-axis direction; the rotation matrix R is retained for subsequent coordinate reconstruction.
[0116] Step S3: Perform equidistant slices along the Y-axis.
[0117] Set slice thickness After calculating the total number of slices, each point is assigned to its corresponding slice point set. A multi-process parallel strategy is adopted, with the number of parallel processes... Each process independently processes the allocated slice and writes it to a new PLY file.
[0118] Step S4: Extract the concave hull contour for each slice.
[0119] Each slice is projected onto the XZ plane, employing an adaptive sampling strategy: if the number of points exceeds 8000, samples up to 8000 points; if the number is less than 2000, all points are retained. (Settings...) Shape parameters The concave hull profile is constructed by using Delaunay triangulation and circumcircle radius filtering. The aforementioned The value range is 0.1-2.0. In this embodiment, after multiple tests, when there are many local depressions in the cross-section and it is necessary to finely capture the boundary details, The preferred value is 0.1-0.6. In this embodiment, the cross-section has multiple local depressions, therefore, a value of 0.1-0.6 is used. .
[0120] Step S5: Shrink the concave hull contour inward.
[0121] Set shrinkage parameters Meters, apply inward buffering to the concave hull profile: The aforementioned The value range is 0.2-0.5 unit length. In this embodiment, after multiple tests, when the hole wall thickness is small (e.g., less than 0.3 meters) and the noise is mainly composed of isolated discrete point groups, A value of 0.2-0.25 can be used to avoid accidentally deleting tunnel wall points; when the tunnel wall thickness is large (e.g., greater than 0.4 meters) or there is noise from support structures attached to the tunnel wall, it is necessary to increase the value appropriately. To include the support structure in the elimination scope, at this time The preferred thickness is 0.4-0.5. In this embodiment, the tunnel wall thickness is approximately 0.35 meters, and a temporary support structure exists within the tunnel. Taking all factors into consideration, a thickness of 0.4-0.5 is used. When the contour shrinks due to When the value is too large and degenerates into an empty set, a slice point set is used. The enclosing rectangle is used as the alternative outline.
[0122] Step S6: Eliminate internal noise points and retain external cavity wall points.
[0123] For each point in the slice, the ray casting method is used to determine the relationship between the projection point and the contraction contour. Positional relationships: If the number of intersection points is odd, they are identified as noise points and removed; if the number is even, they are identified as cave wall points and retained. The retained points form the denoised slice point set. .
[0124] Step S7: Merge the denoised slices and restore the original coordinate system.
[0125] The denoised PLY files are read sequentially according to the slice index. The point sets of each slice are stitched together to form a complete point cloud. The rotation matrix R is applied to perform an inverse transformation to restore the original coordinate system. The LAS file is output using a streaming write and double-buffered parallel mechanism.
[0126] In this embodiment, processing 247 million point cloud data points took approximately 6 minutes, with stable memory usage. Figures 3-4 The image shows a comparison of the noise reduction effects before and after denoising a typical section of the tunnel. Figures 5-6The image showcases the overall effect of noise reduction for the complete tunnel point cloud before and after the process. As can be seen from the image, noise from workers and support structures inside the tunnel has been effectively eliminated, while the tunnel wall structure has been preserved intact.
[0127] like Figure 7 As shown, the present invention provides an automatic noise removal device for tunnel point clouds based on slice concave hull contour constraints, comprising: The acquisition module is used to acquire raw tunnel point cloud data; The analysis module is used to perform principal component analysis on the original tunnel point cloud data, rotate the principal direction of the point cloud to be parallel to the Y-axis, obtain the aligned point cloud, and record the rotation matrix. The slicing module is used to slice the aligned point cloud at equal intervals along the Y-axis to obtain multiple slice point sets. The extraction module is used to project each slice point set onto the XZ plane and extract the concave hull contour of the cross section using a concave hull contour extraction algorithm. The shrinkage module is used to shrink the concave contour inward by a preset distance to obtain the shrunken contour. The elimination module is used to determine the positional relationship between the projection point of each point in the XZ plane and the shrinkage contour for each point in each slice point set, eliminate the points located inside the shrinkage contour, and retain the points located outside the shrinkage contour to obtain the denoised slice point set. The recovery module is used to combine all the denoised slice points and perform an inverse transformation using a rotation matrix to restore the original coordinate system, thus obtaining the denoised tunnel point cloud data.
[0128] According to an embodiment of the present invention, an electronic device is provided; please refer to... Figure 8 The electronic device in this embodiment may include one or more of the following components: a processor, a network interface, memory, non-volatile memory, and one or more application programs, wherein the one or more application programs may be stored in non-volatile memory and configured to be executed by one or more processors, and the one or more programs are configured to perform the methods as described in the foregoing method embodiments.
[0129] According to an embodiment of the present invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a computer, causes the computer to perform the method described in any of the above embodiments.
[0130] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for automatic noise removal from tunnel point clouds based on slice concave hull contour constraints, characterized in that, include: Obtain raw tunnel point cloud data; Principal component analysis was performed on the original tunnel point cloud data. The principal direction of the point cloud was rotated to be parallel to the Y-axis to obtain the aligned point cloud, and the rotation matrix was recorded. The aligned point cloud is sliced at equal intervals along the Y-axis to obtain multiple slice point sets; For each slice point set, project it onto the XZ plane and use the concave hull contour extraction algorithm to extract the concave hull contour of the cross section; Shrink the concave hull contour inward by a preset distance to obtain the shrunken contour; For each point in each slice point set, determine the positional relationship between its projection point on the XZ plane and the shrinkage contour, remove the points located inside the shrinkage contour, and retain the points located outside the shrinkage contour to obtain the denoised slice point set. All denoised slice points are merged and then inversely transformed using a rotation matrix to restore the original coordinate system, resulting in denoised tunnel point cloud data.
2. The method according to claim 1, characterized in that, The steps of performing principal component analysis on the original tunnel point cloud data, rotating the principal direction of the point cloud to be parallel to the Y-axis to obtain an aligned point cloud, and recording the rotation matrix include: Extract the projection coordinates of the point cloud onto the XY plane; Calculate the covariance matrix of the projected coordinates; The covariance matrix is subjected to eigenvalue decomposition to obtain the principal component directions corresponding to the tunnel axial extension direction; Construct a rotation matrix to rotate the point cloud to be parallel to the Y-axis based on the principal component direction.
3. The method according to claim 1, characterized in that, The step of slicing the aligned point cloud at equal intervals along the Y-axis to obtain multiple slice point sets includes: Determine the minimum and maximum coordinates of the point cloud in the Y-axis direction after alignment; Obtain the slice thickness parameter; The total number of slices is calculated based on the minimum, maximum, and slice thickness parameters; wherein the total number of slices is the difference between the maximum and minimum values divided by the slice thickness parameter and then rounded up. For each point in the aligned point cloud, the slice index of the point is calculated based on the point's Y-axis coordinate, minimum value, and slice thickness parameter, and the point is assigned to the corresponding slice point set according to the slice index; wherein, the slice index is the difference between the point's Y-axis coordinate and minimum value divided by the slice thickness parameter and then rounded down.
4. The method according to claim 3, characterized in that, The step of projecting each slice point set onto the XZ plane and extracting the concave hull contour of the cross section using a concave hull contour extraction algorithm includes: Delaunay triangulation is performed on the projected 2D point cloud to obtain a set of triangles; Calculate the radius of the circumcircle of each triangle in the set of triangles; Get the preset shape parameters; Triangles whose circumcircle radius is less than the reciprocal of the preset shape parameter are identified as valid triangles, thus obtaining a set of valid triangles. Extract the boundary edges of the valid triangle set and construct the concave hull profile; When the concave hull profile is a composite polygon that includes multiple sub-polygons, the sub-polygon with the largest area is selected as the main profile.
5. The method according to claim 4, characterized in that, The step of shrinking the concave contour inward by a preset distance to obtain the shrunken contour includes: Obtain the contraction parameters; An inward buffering operation is performed on the main contour according to the shrinkage parameters to obtain the shrinkage contour; When the shrinking contour degenerates into an empty set or breaks into multiple sub-polygons, the bounding rectangle of the slice point set is used as the alternative contour.
6. The method according to claim 5, characterized in that, The step of determining the positional relationship between the projection point of each point in each slice point set and the shrinkage contour, removing points located inside the shrinkage contour, and retaining points located outside the shrinkage contour to obtain the denoised slice point set includes: For each point in the slice point set, extract its projected coordinates on the XZ plane; A ray is emitted from the projected coordinates, and the number of intersections between the ray and the shrinkage contour boundary is calculated. When the number of intersection points is odd, the point is determined to be inside the contracted contour and is removed as a noise point. When the number of intersection points is even, the point is determined to be outside the contraction profile and is retained as a hole wall point; All retained points in the slice point set constitute the denoised slice point set.
7. The method according to claim 6, characterized in that, The steps of combining all denoised slice points and performing an inverse transformation using a rotation matrix to restore the original coordinate system to obtain denoised tunnel point cloud data include: Read each denoised slice point set in the order of slice index, and stitch the denoised slice point sets into a complete point cloud. Apply a rotation matrix to the complete point cloud to perform an inverse transformation and restore the original coordinate system; The system employs a streaming write and dual-buffered parallel mechanism. The main thread performs color reconstruction on the point cloud data after restoring the original coordinate system, while the write thread performs disk writing. The main thread and the write thread work together through a buffer queue to output the denoised tunnel point cloud data.
8. An automatic noise removal device for tunnel point clouds based on slice concave hull contour constraints, characterized in that, include: The acquisition module is used to acquire raw tunnel point cloud data; The analysis module is used to perform principal component analysis on the original tunnel point cloud data, rotate the principal direction of the point cloud to be parallel to the Y-axis, obtain the aligned point cloud, and record the rotation matrix. The slicing module is used to slice the aligned point cloud at equal intervals along the Y-axis to obtain multiple slice point sets. The extraction module is used to project each slice point set onto the XZ plane and extract the concave hull contour of the cross section using a concave hull contour extraction algorithm. The shrinkage module is used to shrink the concave contour inward by a preset distance to obtain the shrunken contour. The elimination module is used to determine the positional relationship between the projection point of each point in the XZ plane and the shrinkage contour for each point in each slice point set, eliminate the points located inside the shrinkage contour, and retain the points located outside the shrinkage contour to obtain the denoised slice point set. The recovery module is used to combine all the denoised slice points and perform an inverse transformation using a rotation matrix to restore the original coordinate system, thus obtaining the denoised tunnel point cloud data.
9. An electronic device, characterized in that, include: A memory, and one or more processors communicatively connected to the memory; The memory stores instructions that can be executed by the one or more processors to cause the one or more processors to implement the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The readable storage medium stores a computer program that, when executed by a processor, implements the method of any one of claims 1 to 7.