Anti-interference object tunnel section extraction method and system based on three-dimensional point cloud data
By automatically removing interference from 3D point cloud data through a multi-level filtering mechanism, the problems of inaccurate and inefficient tunnel cross-section extraction are solved, achieving accurate reconstruction of tunnel cross-sections and improving measurement efficiency.
Patent Information
- Application Number
- CN202610006426.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-05
- Publication Date
- 2026-05-26
Smart Images

Figure CN122089766A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of laser point cloud measurement technology, and in particular to a method and system for extracting anti-interference tunnel cross-sections based on three-dimensional point cloud data. Background Technology
[0002] Traditional tunnel cross-section measurement mainly relies on total station operations. This method requires setting up stations through a complex multi-point intersection procedure, and then collecting cross-section data point by point in prism-free mode. This approach has significant drawbacks: the station setup process is cumbersome, the data acquisition speed is slow, and the obtained point information is scarce, resulting in low spatial resolution of the final tunnel model, making it difficult to accurately reflect the actual outline and subtle deformations of the tunnel.
[0003] In recent years, 3D laser scanning technology has been gradually applied to tunnel surveying. Taking station-based scanners as an example, they stitch together data using common points between adjacent stations and can convert the overall point cloud to the construction coordinate system using feature points. This method offers flexible station setup and can acquire millions of high-precision point cloud data points per second, with a data density far exceeding that of total stations, enabling a complete record of the actual conditions inside the tunnel.
[0004] However, while massive, high-density point cloud data brings informational advantages, it also presents challenges for data processing. The scanning process indiscriminately records information about the tunnel's actual cross-section and various internal obstructions (such as construction equipment, ventilation ducts, and reinforcing mesh). Currently, commercially available cross-section extraction software works effectively when there are few obstructions, but its automatic processing is inadequate in complex scenarios with numerous obstructions, often requiring extensive manual editing to remove noise. Especially for obstructions closely adhering to the tunnel wall (such as reinforcing mesh), manual noise reduction is not only time-consuming and laborious but also prone to accidentally deleting actual cross-section points or leaving residual obstructions, making it difficult to guarantee the accuracy and authenticity of the extracted cross-section results.
[0005] Therefore, the industry urgently needs an intelligent algorithm that can automatically and accurately filter out the true cross-sectional contour of tunnels from complex point cloud data in order to improve data processing efficiency and the reliability of results. Summary of the Invention
[0006] The main objective of this invention is to provide a method and system for extracting anti-interference tunnel cross sections based on three-dimensional point cloud data, thereby solving the technical problems of weak anti-interference capability, inaccurate cross section extraction results, and low efficiency in the prior art.
[0007] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is: a method for extracting anti-interference tunnel cross-sections based on three-dimensional point cloud data, comprising the following steps: S1: Point cloud data acquisition and preprocessing: Multiple station devices are deployed to scan and obtain three-dimensional point cloud data inside the target tunnel, and preprocessing is performed, including relative stitching of the three-dimensional point cloud data and conversion into coordinates under the construction coordinate system. S2: Point cloud data coordinate transformation: Based on the design parameters of the tunnel centerline, the three-dimensional coordinates of the preprocessed point cloud data are transformed into coordinates expressed in terms of station mileage, relative axis offset, and relative axis elevation; S3: Cross-section point acquisition: Based on the preset cross-section station number, extract the point cloud within the current station number range from the point cloud data converted in S2 according to the preset thickness to obtain the cross-section measurement point dataset; S4: Cross-section point sorting: Calculate the average center point of the cross-section measurement point dataset, use this center point as a reference to calculate the polar coordinate angle of each measurement point, and sort them in order according to the size of the polar coordinate angle so that the point set can be connected in sequence. S5: For the sorted cross-sectional points, perform anomaly detection and removal based on preset thresholds, including anomaly protrusion detection, convex hull detection, fragment filtering, and removal of wall-attached interference. First, points whose included angles point outward from the point set and whose angle values are less than the first set threshold are removed. Then, convex hull calculation is performed, and points whose distance from the current convex hull is greater than the second set threshold are removed. If the length of the line segment connecting the current cross-section point and its adjacent points is less than the third set threshold, or if the distance from one endpoint of the line segment to the average center point of the cross-section point is short, fragment filtering is performed. Finally, the angle and orientation of the included angle formed by the current measurement point and its preceding and following adjacent points are calculated, and points whose included angles point inward from the point set and whose angle values are less than the fourth set threshold are removed. S6: Connect the closed line: Connect the remaining cross-section measurement points after processing S5 in sequence according to their sorting order, and connect the first and last points to form the final tunnel cross-section closed line.
[0008] In the preferred embodiment, the coordinate transformation in S2 specifically includes: The point cloud data is converted to a coordinate system based on the tunnel axis to facilitate the accurate extraction of cross-sectional data points according to the station mileage.
[0009] In the preferred embodiment, the preset thickness in S3 is a finite value set according to the point cloud density and engineering accuracy requirements, and points within the preset thickness range are regarded as cross-sectional points of the same station number.
[0010] In the preferred scheme, the polar coordinate angle in step (4) The calculation is as follows: Let the x and y coordinates of the measurement point be respectively , ,but: (1); (2); like , ,but ; like , ,but ; Other cases meet the following conditions: (3); like , ,but The value range is 0 ~ , like , ,but The range of values is ~ , like , ,but The range of values is ~ , like , ,but The range of values is ~ ; Among them, coordinate angle sorting is to organize unordered point cloud data into an ordered sequence, and the ordered sorting includes clockwise or counterclockwise.
[0011] In the preferred embodiment, the abnormal protrusion detection in S5 specifically includes: Based on the sorted cross-sectional point data, the size and orientation of the angle formed by the measurement point and its two adjacent points are calculated. The calculation formula is: (4); The formula for calculating the angle orientation is as follows: (5); (6); (7); If k>0, the angle faces inward; if k<0, the angle faces outward; Points with outward-facing angles and angle values less than the first set threshold are removed. In the preferred embodiment, the convex hull detection in S5 is used to identify and remove obvious, independent interfering point clouds located inside the tunnel, specifically as follows: After detecting abnormal protrusions in the cross-sectional point data, convex hull detection is performed to obtain the approximate outer contour of the cross-section. Then, the distance from each measurement point to the outer contour of the convex hull is calculated. The calculation first calculates the distance from the measurement point to each edge of the outer contour of the convex hull, then takes the minimum value. The distance calculation formula is as follows: Let the coordinates of measurement point A be (x, y), and the coordinates of the endpoints of the convex hull segment a be (a, b) and (c, d). The formula for calculating the distance d is as follows: (8); (9); like <0, then ,like <0, then Other situations: (10); Finally, points whose distance from the current convex hull is greater than the second set threshold are removed.
[0012] In the preferred embodiment, the detail filtering in S5 is a data simplification strategy aimed at preserving the main shape features of the cross-section while reducing the amount of data, achieving a balance between data precision and processing efficiency. Specifically: Calculate the length of the line segment connecting each point to its next adjacent point in the sorted cross-section points. If the length is less than a third set threshold, mark the line segment for deletion. For the marked line segment, calculate the distance from its two endpoints to the average center point of the cross-section points, and mark the endpoint with the shorter distance as the point to be deleted. Finally, delete all marked line segments and points. In the preferred embodiment, the wall-attached interference removal in S5 is used to remove the point cloud generated by interference objects closely attached to the tunnel inner wall, specifically as follows: Calculate the angle and orientation of the angle formed by each measurement point and its adjacent points before and after it, and remove points whose angles are oriented towards the inside of the point set and whose angle values are less than the fourth set threshold; repeat this removal process until no new points are marked for deletion.
[0013] In the preferred embodiment, S5 uses the ConvexHull function of SciPy, and the underlying layer calls the Qhull library for convex hull detection.
[0014] A system for extracting tunnel cross-sections of interference-resistant objects based on 3D point cloud data, applicable to the aforementioned method for extracting tunnel cross-sections of interference-resistant objects based on 3D point cloud data, comprising: The data acquisition and preprocessing module is used to deploy multiple station devices to scan and obtain three-dimensional point cloud data inside the target tunnel, and to perform preprocessing, including relative stitching of the three-dimensional point cloud data and conversion into coordinates under the construction coordinate system. The coordinate transformation module is used to convert the three-dimensional coordinates of the preprocessed point cloud data into coordinates expressed in terms of station mileage, relative axis offset, and relative axis elevation, based on the design parameters of the tunnel centerline. The cross-section point acquisition module is used to extract the point cloud within the current station number range from the point cloud data converted by the coordinate transformation module according to the preset cross-section station number, and obtain the cross-section measurement point dataset. The cross-section point sorting module is used to calculate the average center point of the cross-section measurement point dataset, use this center point as a reference to calculate the polar coordinate angle of each measurement point, and sort them in order according to the size of the polar coordinate angle so that the point set can be connected sequentially. The detection and rejection module is used to perform anomaly detection and rejection on the sorted cross-sectional points according to preset thresholds, including anomaly protrusion detection, convex hull detection, fragment filtering, and removal of wall-attached interference. First, points whose included angles point outward from the point set and whose angle values are less than the first set threshold are removed. Then, convex hull calculation is performed, and points whose distance from the current convex hull is greater than the second set threshold are removed. If the length of the line segment connecting the current cross-section point and its adjacent points is less than the third set threshold, or if the distance from one endpoint of the line segment to the average center point of the cross-section point is short, fragment filtering is performed. Finally, the angle and orientation of the included angle formed by the current measurement point and its preceding and following adjacent points are calculated, and points whose included angles point inward from the point set and whose angle values are less than the fourth set threshold are removed. The cross-section point connection module is used to connect the closed line: the remaining cross-section measurement points after being processed by the detection and elimination module are connected in sequence according to their sorting order, and the first and last points are connected to form the final tunnel cross-section closed line.
[0015] This invention provides a method for extracting anti-interference tunnel cross-sections based on 3D point cloud data. The method comprises: S1: obtaining 3D point cloud data within the target tunnel and preprocessing it; S2: converting the 3D coordinates of the preprocessed point cloud data into coordinates expressed as station mileage, relative axis offset, and relative axis elevation; S3: extracting point cloud data within the current station range from the converted point cloud data according to a preset thickness to obtain a cross-section measurement point dataset; S4: calculating the average center point of the cross-section measurement point dataset, using this center point as a reference to calculate the polar coordinate angle of each measurement point, and sorting them in order according to the magnitude of the polar coordinate angle; S5: based on the preset... A threshold is set to perform anomaly detection and removal, including anomaly protrusion detection, convex hull detection, fragment filtering, and removal of wall-attached interference: S6: Connect the remaining cross-section measurement points in their sorted order, and connect the first and last points to form the final tunnel cross-section closure line; Through a multi-level filtering mechanism, the point cloud data generated by various interferences in the tunnel is effectively identified and automatically removed, thereby accurately restoring the true shape of the tunnel cross-section, improving contour fidelity, enhancing anti-interference ability, reducing the time and labor costs of indoor data processing, improving the efficiency of measurement page operations, and improving the speed and accuracy of 3D laser point cloud extraction of tunnel cross-sections under complex conditions. Attached Figure Description
[0016] The present invention will be further described below with reference to the accompanying drawings and embodiments: Figure 1 This is a flowchart of the algorithm of the present invention; Figure 2 This is a diagram illustrating the algorithm's performance in this invention; Figure 3 This is a partial diagram of the algorithm effect of the present invention. Detailed Implementation
[0017] Example 1 like Figure 1-3 As shown, this embodiment of the invention provides an algorithm for extracting anti-interference tunnel cross-sections based on three-dimensional point cloud data, including the following steps: S1: Preprocess the collected point cloud data, perform relative stitching, and convert it into construction coordinates.
[0018] S2: Point cloud data coordinate transformation. Based on the design parameters of the central axis, the three-dimensional coordinates of the preprocessed point cloud data are transformed into three parameters: station mileage, relative axis offset, and relative axis elevation.
[0019] S3: Cross-section point acquisition. Based on the cross-section station number required by the project, and the converted point cloud data obtained in the previous step, the data is truncated to a certain thickness (the truncated thickness is adjusted according to the specific situation) to obtain the cross-section measurement point data.
[0020] S4: Sorting of cross-section points, calculating the average axis offset and average axis elevation of the cross-section measurement points as the center of the calculation points; calculating the polar coordinate angle between each measurement point and the center point; sorting the cross-section measurement point data according to the polar coordinate angle (sorted from largest to smallest or smallest to largest).
[0021] S5: For the sorted cross-sectional points, perform anomaly detection and removal according to the preset threshold, including abnormal protrusion detection, convex hull detection, fragment filtering and removal of wall-attached interference.
[0022] Abnormal protrusion point detection involves calculating the size and orientation of the angle formed by the measurement point and its two adjacent points (the first adjacent point is the last point, and the last adjacent point is the first point). Points with outward-facing angles and small angles are then removed (the specific angles are adjusted according to the specific situation).
[0023] Convex hull detection is performed to obtain the approximate outer contour of the cross-section. The distance from each measurement point to the outer contour of the convex hull is calculated, and points with large distances are removed (the distance is adjusted according to the specific situation).
[0024] For fragment filtering, calculate the length of the line segment formed by the point and the next adjacent point (the next adjacent point of the last point is the first point). If the length is shorter (the length is adjusted according to the specific situation), the line segment is marked for deletion. Calculate the distance between the two endpoints of the line segment and the center point, and mark the point with the shorter distance as deleted. Perform the above steps in sequence, and finally delete all marked points.
[0025] For wall-mounted interference removal, calculate the size and orientation of the angle formed by the measurement point and its two adjacent points (the first adjacent point is the last point, and the last adjacent point is the first point). Remove points with inward-facing angles and smaller angles (the specific angles should be adjusted according to the specific situation). Repeat the current step until no new points are marked for deletion.
[0026] S6: Connect the closed lines, connecting the sections sequentially (the last point connects to the first point) to obtain the measurement data for each section, as shown in the image. Figure 2 and 3 As shown.
[0027] In this embodiment, the point cloud data collected through S1-S6 is preprocessed. After coordinate transformation, the cross-section points are obtained. The cross-section measurement point data are sorted according to polar coordinate angles (either from largest to smallest or smallest to largest). Anomaly detection and removal are performed according to preset thresholds, including abnormal protrusion detection, convex hull detection, fragment filtering, and removal of wall-attached interference. Finally, closed lines are connected sequentially according to the cross-sections to obtain the measurement data of each cross-section. Through a multi-level filtering mechanism, point cloud data generated by various interferences in the tunnel are effectively identified and automatically removed, thereby accurately restoring the true shape of the tunnel cross-section, improving contour fidelity, enhancing anti-interference ability, reducing the time and manpower costs of indoor data processing, improving work efficiency, and enhancing adaptability and robustness.
[0028] In this embodiment, point cloud preprocessing mainly involves two steps: relatively stitching together the acquired point cloud data and converting the point cloud coordinates into construction coordinates.
[0029] When the equipment acquires data, it uses the equipment as the coordinate system. The equipment coordinates need to be converted into construction coordinates. The tunnel excavation pre-designs the centerline, and different design support types are applied based on the centerline. The coordinates need to be converted into three parameters: station mileage, relative centerline offset, and relative centerline elevation.
[0030] Explanation of station mileage: Assuming the tunnel entrance is 0, the length along the design centerline is the station mileage (and the distance from the tunnel entrance). The design line is a three-dimensional curve, requiring segmented calculations.
[0031] Based on the design parameters of the central axis, the three-dimensional coordinates of the preprocessed point cloud data are converted into three parameters: station mileage, relative axis offset, and relative axis elevation.
[0032] Based on the required cross-section station numbers for the project, and using the converted point cloud data obtained in the previous step, the data is truncated to a certain thickness to obtain the cross-section measurement point data. In this embodiment, the truncated thickness is preferably 0.05m, but the specific value can be adjusted adaptively.
[0033] In the preferred embodiment, the preset thickness in step S3 is a finite value set according to the point cloud density and engineering accuracy requirements, and points within the preset thickness range are regarded as cross-sectional points of the same station number.
[0034] In the preferred embodiment, based on the cross-section measurement point data obtained in the previous step, step S4 first calculates the average axis offset and average axis elevation of the cross-section measurement points, using these as the center of the calculation points; then, it calculates the polar coordinate angles between each measurement point and the center point; finally, it sorts the cross-section measurement point data according to the magnitude of the polar coordinate angles, either from largest to smallest or smallest to largest. Polar coordinate angles The calculation is as follows: Let the x and y coordinates of the measurement point be respectively , ,but: (1); (2); like , ,but ; like , ,but .
[0035] Other cases meet the following conditions: (3); like , ,but The value range is 0 ~ .
[0036] like , ,but The range of values is ~ .
[0037] like , ,but The range of values is ~ .
[0038] like , ,but The range of values is ~ .
[0039] Among them, coordinate angle sorting is to organize unordered point cloud data into an ordered sequence, and the ordered sorting includes clockwise or counterclockwise.
[0040] Furthermore, there may be drilling holes or other issues inside the tunnel, which will appear as a series of points that clearly protrude from the tunnel on the 3D point cloud. In step S5, the abnormal protrusion point detection can effectively remove these points to avoid affecting the convex hull detection results.
[0041] A convex hull is a minimal convex polyhedron containing a set of points, with all points located either inside or on its surface. Convex hull detection can acquire the external contour of a point cloud, removing internal structural interference points such as ventilation ducts, thereby obtaining the tunnel's contour information. In this embodiment, the SciPy ConvexHull function is used, with the underlying Qhull library for convex hull detection.
[0042] The 3D point cloud data has a high density, and areas with dense cross-sectional points need to be filtered out. The fragmented filtering yields simplified cross-sectional points.
[0043] There may be some obstructions attached to the tunnel wall, such as steel mesh, which can cause the cross-sectional line to fluctuate frequently inward. Removing these obstructions can effectively filter out these obstructions.
[0044] In the preferred scheme, the detection of abnormal protrusions in step S5 specifically involves: Based on the sorted cross-sectional point data, abnormal protruding points are removed. First, the size and orientation of the angle formed by the measured point and its two adjacent points (the previous adjacent point of the first point is the last point, and the next adjacent point of the last point is the first point) are calculated. Then, points with outward-facing angles and small angles are removed (the specific angle is adjusted according to the specific situation). Angle size The calculation formula is as follows: (4); The value range is 0~ .
[0045] The formula for calculating the angle orientation is as follows: (5); (6); (7); If k>0, the angle faces inward; if k<0, the angle faces outward; Points with outward-facing angles and angle values less than the first set threshold are removed.
[0046] In the preferred embodiment, convex hull detection in step S5 is used to identify and remove obvious, independent interfering point clouds located inside the tunnel, based on the cross-sectional point data after deleting abnormal protrusions. First, convex hull detection is performed to obtain the approximate outer contour of the cross-section. Then, the distance from each measurement point to the outer contour of the convex hull is calculated. Finally, points with large distances are removed (the distance is adjusted according to specific circumstances). Calculating the distance from the measurement point to the outer contour of the convex hull first requires calculating the distance from the measurement point to each edge of the outer contour of the convex hull, and finally taking the minimum value. Specifically: Let the coordinates of measurement point A be (x, y), and the coordinates of the endpoints of the convex hull segment a be (a, b) and (c, d). The formula for calculating the distance d is as follows: (8); (9); like <0, then ,like <0, then Other situations: (10); Finally, points whose distance from the current convex hull is greater than the second set threshold are removed.
[0047] In the preferred scheme, the detail filtering in step S5 is a data simplification strategy aimed at reducing the amount of data while retaining the main shape features of the cross-section, achieving a balance between data precision and processing efficiency. Specifically, it involves: calculating the length of the line segment formed by the point and the next adjacent point (the next adjacent point of the last point is the first point); if the length is short (the length is adjusted according to the specific situation), that is, the length is less than the third set threshold, the line segment is marked for deletion; then, the distance between the two endpoints of the line segment and the center point is calculated, and the point with the shorter distance is marked for deletion; the above steps are performed in sequence, and finally, all marked points are deleted.
[0048] In the preferred embodiment, step S5, which involves removing wall-adhering interference, is used to remove point clouds generated by interference objects closely adhering to the tunnel wall. Specifically, it includes: Calculate the angle formed by the measurement point and its two adjacent points (i.e., the point preceding the first point is the last point, and the point following the last point is the first point), and determine the angle's size and orientation. Then, discard points with inward-facing angles and smaller angles (adjust the specific angles according to the specific situation). Repeat the current step until no new points are marked for deletion.
[0049] Furthermore, in step S5, the first set threshold is 90°; the second set threshold is 0.1m; the third set threshold is 0.05m; and the fourth set threshold is 90°. The specific values need to be adapted to the actual situation.
[0050] like Figure 2 and 3 As shown in the diagram, this embodiment presents the final result. Blue dots represent the original points, and red dots represent the final cross-sectional view. The nodes along the red lines are all derived from the blue dots. This achieves automatic filtering of points that are actually on the cavern wall.
[0051] Connect the points that have gone through all the above steps in sequence according to the cross-sections (connect the last point to the first point) to obtain the measurement data of each cross-section.
[0052] This embodiment achieves the effect of automatically removing interference data within the tunnel and restoring the true shape of the tunnel cross-section. It eliminates the problem of manual noise removal, which often yields unsatisfactory results, and improves the speed and accuracy of extracting tunnel cross-sections from 3D laser point clouds under complex conditions, thereby increasing the efficiency of measurement operations.
[0053] Example 2 Further illustrating with reference to Embodiment 1, an anti-interference tunnel cross-section extraction system based on 3D point cloud data is applicable to the anti-interference tunnel cross-section extraction method based on 3D point cloud data in Embodiment 1, comprising: The data acquisition and preprocessing module is used to deploy multiple station devices to scan and obtain three-dimensional point cloud data inside the target tunnel, and to perform preprocessing, including relative stitching of the three-dimensional point cloud data and conversion into coordinates under the construction coordinate system.
[0054] The coordinate transformation module is used to convert the three-dimensional coordinates of the preprocessed point cloud data into coordinates expressed in terms of station mileage, relative axis offset, and relative axis elevation, based on the design parameters of the tunnel centerline.
[0055] The cross-section point acquisition module is used to extract the point cloud within the current station number range from the point cloud data converted by the coordinate transformation module according to the preset cross-section station number, and obtain the cross-section measurement point dataset.
[0056] The cross-section point sorting module is used to calculate the average center point of the cross-section measurement point dataset, use this center point as a reference to calculate the polar coordinate angle of each measurement point, and sort them in order according to the magnitude of the polar coordinate angle so that the point set can be connected sequentially.
[0057] The detection and rejection module is used to perform anomaly detection and rejection on sorted cross-sectional points according to preset thresholds, including abnormal protrusion detection, convex hull detection, fragment filtering, and removal of wall-attached interference.
[0058] First, points whose included angles point outward from the point set and whose angle values are less than the first set threshold are removed. Then, convex hull calculation is performed, and points whose distance from the current convex hull is greater than the second set threshold are removed. If the length of the line segment connecting the current cross-section point and its adjacent points is less than the third set threshold, or if the distance from one endpoint of the line segment to the average center point of the cross-section point is short, fragment filtering is performed. Finally, the angle and orientation of the included angle formed by the current measurement point and its adjacent points are calculated, and points whose included angles point inward from the point set and whose angle values are less than the fourth set threshold are removed.
[0059] The cross-section point connection module is used to connect the closed line: the remaining cross-section measurement points after being processed by the detection and elimination module are connected in sequence according to their sorting order, and the first and last points are connected to form the final tunnel cross-section closed line.
[0060] This embodiment provides the working process, working details and technical effects of an anti-interference tunnel cross-section extraction system based on three-dimensional point cloud data, which can be referred to in Embodiment 1 and will not be repeated here.
[0061] The above embodiments are merely preferred technical solutions of the present invention and should not be considered as limitations on the present invention. The scope of protection of the present invention should be limited to the technical solutions described in the claims, including equivalent substitutions of the technical features described in the claims. That is, equivalent substitutions and improvements within this scope are also within the scope of protection of the present invention.
Claims
1. A method for extracting anti-interference tunnel cross-sections based on 3D point cloud data, characterized in that, Includes the following steps: S1: Point cloud data acquisition and preprocessing: Multiple station devices are deployed to scan and obtain three-dimensional point cloud data inside the target tunnel, and preprocessing is performed, including relative stitching of the three-dimensional point cloud data and conversion into coordinates under the construction coordinate system. S2: Point cloud data coordinate transformation: Based on the design parameters of the tunnel centerline, the three-dimensional coordinates of the preprocessed point cloud data are transformed into coordinates expressed in terms of station mileage, relative axis offset, and relative axis elevation; S3: Cross-section point acquisition: Based on the preset cross-section station number, extract the point cloud within the current station number range from the point cloud data converted in S2 according to the preset thickness to obtain the cross-section measurement point dataset; S4: Cross-section point sorting: Calculate the average center point of the cross-section measurement point dataset, use this center point as a reference to calculate the polar coordinate angle of each measurement point, and sort them in order according to the size of the polar coordinate angle so that the point set can be connected in sequence. S5: For the sorted cross-sectional points, perform anomaly detection and removal based on preset thresholds, including anomaly protrusion detection, convex hull detection, fragment filtering, and removal of wall-attached interference. First, points whose included angles point outward from the point set and whose angle values are less than the first set threshold are removed. Then, convex hull calculation is performed, and points whose distance from the current convex hull is greater than the second set threshold are removed. If the length of the line segment connecting the current cross-section point and its adjacent points is less than the third set threshold, or if the distance from one endpoint of the line segment to the average center point of the cross-section point is short, fragment filtering is performed. Finally, the angle and orientation of the included angle formed by the current measurement point and its preceding and following adjacent points are calculated, and points whose included angles point inward from the point set and whose angle values are less than the fourth set threshold are removed. S6: Connect the closed line: Connect the remaining cross-section measurement points after processing S5 in sequence according to their sorting order, and connect the first and last points to form the final tunnel cross-section closed line.
2. The method for extracting anti-interference tunnel cross-sections based on three-dimensional point cloud data according to claim 1, characterized in that, The coordinate transformation in S2 is specifically as follows: The point cloud data is converted to a coordinate system based on the tunnel axis to facilitate the accurate extraction of cross-sectional data points according to the station mileage.
3. The method for extracting anti-interference tunnel cross-sections based on three-dimensional point cloud data according to claim 1, characterized in that, The preset thickness in S3 is a finite value set according to the point cloud density and engineering accuracy requirements. Points within the preset thickness range are considered as cross-sectional points of the same station number.
4. The method for extracting anti-interference tunnel cross-sections based on three-dimensional point cloud data according to claim 1, characterized in that, Polar coordinate angle in step (4) The calculation is as follows: Let the x and y coordinates of the measurement point be respectively , ,but: (1); (2); like , ,but ; like , ,but ; Other cases meet the following conditions: (3); like , ,but The value range is 0 ~ , like , ,but The range of values is ~ , like , ,but The range of values is ~ , like , ,but The range of values is ~ ; Among them, coordinate angle sorting is to organize unordered point cloud data into an ordered sequence, and the ordered sorting includes clockwise or counterclockwise.
5. The method for extracting anti-interference tunnel cross-sections based on three-dimensional point cloud data according to claim 1, characterized in that, The abnormal protrusion detection in S5 specifically involves: Based on the sorted cross-sectional point data, the size and orientation of the angle formed by the measurement point and its two adjacent points are calculated. The calculation formula is: (4); The formula for calculating the angle orientation is as follows: (5); (6); (7); If k>0, the angle faces inward; if k<0, the angle faces outward; Points with outward-facing angles and angle values less than the first set threshold are removed.
6. The method for extracting anti-interference tunnel cross-sections based on three-dimensional point cloud data according to claim 1, characterized in that, The convex hull detection in S5 is used to identify and remove obvious, independent interfering point clouds located inside the tunnel, specifically: After detecting abnormal protrusions in the cross-sectional point data, convex hull detection is performed to obtain the approximate outer contour of the cross-section. Then, the distance from each measurement point to the outer contour of the convex hull is calculated. The calculation first calculates the distance from the measurement point to each edge of the outer contour of the convex hull, then takes the minimum value. The distance calculation formula is as follows: Let the coordinates of measurement point A be (x, y), and the coordinates of the endpoints of the convex hull segment a be (a, b) and (c, d). The formula for calculating the distance d is as follows: (8); (9); like <0, then ,like <0, then Other situations: (10); Finally, points whose distance from the current convex hull is greater than the second set threshold are removed.
7. The method for extracting anti-interference tunnel cross-sections based on three-dimensional point cloud data according to claim 1, characterized in that, The detail filtering in S5 is a data simplification strategy designed to reduce the amount of data while preserving the main shape features of the cross-section, achieving a balance between data precision and processing efficiency. Specifically: Calculate the length of the line segment connecting each point to its next adjacent point in the sorted cross-section points. If the length is less than the third set threshold, mark the line segment to be deleted. For the marked line segment, calculate the distance from its two endpoints to the average center point of the cross-section points, and mark the endpoint with the shorter distance as the point to be deleted. Finally, delete all marked line segments and points.
8. The method for extracting anti-interference tunnel cross-sections based on three-dimensional point cloud data according to claim 1, characterized in that, The wall-attached interference removal in S5 is used to remove point clouds generated by interference objects closely attached to the tunnel wall, specifically as follows: Calculate the angle and orientation of the angle formed by each measurement point and its adjacent points before and after it, and remove points whose angles are oriented towards the inside of the point set and whose angle values are less than the fourth set threshold; repeat this removal process until no new points are marked for deletion.
9. The method for extracting anti-interference tunnel cross-sections based on three-dimensional point cloud data according to claim 1, characterized in that, The S5 function uses the ConvexHull function of SciPy, and calls the Qhull library at the underlying level for convex hull detection.
10. A system for extracting anti-interference tunnel cross-sections based on three-dimensional point cloud data, characterized in that, The method for extracting anti-interference tunnel cross-sections based on three-dimensional point cloud data according to any one of claims 1-9 includes: The data acquisition and preprocessing module is used to deploy multiple station devices to scan and obtain three-dimensional point cloud data inside the target tunnel, and to perform preprocessing, including relative stitching of the three-dimensional point cloud data and conversion into coordinates under the construction coordinate system. The coordinate transformation module is used to convert the three-dimensional coordinates of the preprocessed point cloud data into coordinates expressed in terms of station mileage, relative axis offset, and relative axis elevation, based on the design parameters of the tunnel centerline. The cross-section point acquisition module is used to extract the point cloud within the current station number range from the point cloud data converted by the coordinate transformation module according to the preset cross-section station number, and obtain the cross-section measurement point dataset. The cross-section point sorting module is used to calculate the average center point of the cross-section measurement point dataset, use this center point as a reference to calculate the polar coordinate angle of each measurement point, and sort them in order according to the size of the polar coordinate angle so that the point set can be connected sequentially. The detection and rejection module is used to perform anomaly detection and rejection on the sorted cross-sectional points according to preset thresholds, including anomaly protrusion detection, convex hull detection, fragment filtering, and removal of wall-attached interference. First, points whose included angles point outward from the point set and whose angle values are less than the first set threshold are removed. Then, convex hull calculation is performed, and points whose distance from the current convex hull is greater than the second set threshold are removed. If the length of the line segment connecting the current cross-section point and its adjacent points is less than the third set threshold, or if the distance from one endpoint of the line segment to the average center point of the cross-section point is short, fragment filtering is performed. Finally, the angle and orientation of the included angle formed by the current measurement point and its preceding and following adjacent points are calculated, and points whose included angles point inward from the point set and whose angle values are less than the fourth set threshold are removed. The cross-section point connection module is used to connect the closed line: the remaining cross-section measurement points after being processed by the detection and elimination module are connected in sequence according to their sorting order, and the first and last points are connected to form the final tunnel cross-section closed line.
