Tunnel quality safety detection system and method based on lidar data
By combining point cloud density and curvature change detection methods with image enhancement technology, efficient identification of tiny cracks in tunnels is achieved, solving the problem of insufficient tiny crack detection in existing technologies and improving the accuracy and completeness of tunnel detection.
Patent Information
- Application Number
- CN202411658787.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2044-11-20
AI Technical Summary
When using lidar to scan point cloud data for tunnel inspection, existing technologies have difficulty effectively identifying tiny cracks, especially cracks with subtle changes in point cloud density and curvature, resulting in insufficient detection accuracy and completeness.
Combining point cloud density change detection and curvature change detection, possible crack areas are preliminarily screened out, and tiny cracks are identified through image enhancement and edge detection methods. Local point cloud density change detection is used to quickly locate potential crack areas, combined with curvature change detection to accurately locate crack boundaries, and tiny cracks are identified through two-dimensional image processing.
It improves the accuracy and completeness of tunnel crack detection, can quickly identify crack characteristics at the macro and micro levels, and provide more comprehensive tunnel safety detection results.
Smart Images

Figure CN119599987B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of tunnel detection technology, and in particular to a tunnel quality and safety detection system and method based on laser radar data. Background Art
[0002] Tunnels (including highway and railway tunnels), as fundamental transportation infrastructure, play a vital role in ensuring efficient and rapid transit. As tunnel construction and commissioning progress, traffic volumes, and environmental and geological conditions evolve over time, tunnel operational management becomes crucial for ensuring safe transit. In particular, tunnel quality, risk detection, and assessment are key to ensuring safety and stability.
[0003] Currently, the main methods for tunnel inspection include ultrasonic testing, infrared testing, micro-wave detection, geological radar testing, and lidar scanning, with non-destructive testing being the primary approach. High-precision lidar scanning technology, in particular, offers advantages in high-resolution imaging, comprehensive data collection, rapid measurement, and precise measurement capabilities for tunnel internal structure inspection and assessment. Based on lidar scanning data (point cloud data), a 3D model of the tunnel interior is constructed to detect defects such as cracks, misalignment, detachment, and water leakage, enabling assessment of tunnel quality risks. This is crucial for improving tunnel safety and stability.
[0004] Currently, tunnel disease detection based on LiDAR scanned point cloud data primarily relies on image processing to identify and annotate tunnel surface defects, such as lining debonding and cracks. A typical approach in existing technology utilizes the geometric characteristics and spatial distribution of point cloud data, for example, identifying and detecting cracks based on changes in point cloud density and curvature. This method is effective for crack identification and screening in areas with large cracks or crack clusters (i.e., geometrically distinct crack features), where point cloud density changes are more pronounced, but is less effective for identifying small cracks, as subtle changes in point cloud density and curvature make them difficult to detect directly. Summary of the Invention
[0005] In view of the defects and shortcomings of the prior art, the purpose of the present invention is to provide a detection method that integrates and complements crack detection based on point cloud density changes and crack detection based on curvature changes, so as to achieve rapid identification and accurate detection of crack areas, quickly locate potential crack areas through point cloud density change detection, and further accurately locate the boundaries of cracks in combination with curvature change detection, thereby improving the accuracy and integrity of crack detection. As for small deformations, the changes in point cloud density and curvature are so subtle that they are difficult to detect directly. Based on the identified cracks, the present invention further determines the projection plane, proposes to project the point cloud data onto a two-dimensional plane, highlight the features of small cracks in the image through image enhancement, and then use edge detection algorithms to identify small cracks, so as to make up for the defects of the previous point cloud density and curvature detection methods in small crack detection, and further improve the accuracy and integrity of crack detection from a microscopic level.
[0006] According to a first aspect of the present invention, a method for tunnel quality and safety detection based on lidar data is proposed, comprising the following steps:
[0007] Step 1: Input the tunnel point cloud data obtained by laser radar scanning;
[0008] Step 2: pre-processing the tunnel point cloud data and performing coordinate transformation to obtain point cloud data in the tunnel global coordinate system;
[0009] Step 3: For the point cloud data in the tunnel global coordinate system, local point cloud density change detection is used to preliminarily screen crack defects and mark the point cloud data of possible crack areas;
[0010] Step 4: For the point cloud data marked as possible crack areas, accurate detection based on curvature changes is used to accurately determine and mark the crack boundary points to obtain the crack area and its boundary;
[0011] Step 5: Select a projection plane based on the position and direction of the identified crack area, project the point cloud data in the tunnel global coordinate system onto the selected projection plane, and analyze the microcracks based on the projected two-dimensional image to identify the microcracks and their edge information.
[0012] Step 6: Visually represent the crack areas and microcracks in the three-dimensional tunnel model.
[0013] In a further embodiment, in step 2, pre-processing the tunnel point cloud data includes:
[0014] Step 2.1: Based on statistical filtering, remove isolated points that deviate from the spatial distribution of the surrounding point cloud;
[0015] Step 2.2: Based on the spatial range and height information of the point cloud, remove the point cloud of objects outside the tunnel and the point cloud of non-target structures at the top or bottom of the tunnel.
[0016] In a further embodiment, in step 2, the coordinate change refers to converting the point cloud data acquired by the laser radar into a unified tunnel global coordinate system, including:
[0017] Based on the posture and position information of the mobile platform equipped with the lidar scanning device, the point cloud data in the local coordinate system of the lidar is converted to the global coordinate system of the tunnel using the homogeneous transformation matrix to obtain the point cloud data in the global coordinate system of the tunnel.
[0018] In a further embodiment, in step 3, for the point cloud data in the tunnel global coordinate system, local point cloud density change detection is used to preliminarily screen crack defects and mark the point cloud data of possible crack areas, including:
[0019] Step 3.1, dividing the point cloud data in the tunnel global coordinate system into several sub-regions, so that each point is divided into a sub-region;
[0020] Step 3.2: For any sub-area A, calculate its point cloud density ρ A , represents the point cloud density of sub-region A;
[0021] Step 3.3: Calculate the average density of sub-regions within a certain neighborhood around sub-region A ;
[0022] Step 3.4: Based on the point cloud density of sub-area A ρ A The average density of the sub-regions within a certain neighborhood around it ,if , then the sub-region A is determined as a possible crack region and marked, where k represents the set proportional coefficient;
[0023] Step 3.5: For each sub-area, perform traversal processing according to the above steps 3.2 to 3.4, preliminarily screen all possible crack areas in the point cloud data, and quickly locate the range where cracks may exist.
[0024] In a further embodiment, the sub-areas are configured as evenly divided square areas, each having a side length of l ;
[0025] Traverse each point in the point cloud data and determine the square area where it is located based on the coordinates of the point.
[0026] In a further embodiment, in step 3.3, the average density of sub-regions within a certain neighborhood around sub-region A is calculated:
[0027] ;
[0028] Where m represents the number of sub-regions in the neighborhood around sub-region A, Represents the sub-region within the neighborhood around sub-region A i Point cloud density;
[0029] ;
[0030] in, n i Indicates sub-area i The number of inliers, S i Indicates sub-area i The area of the sub-area is counted by traversing the points in the sub-area n i , and calculate the area based on the geometry of the subregion S i .
[0031] In a further embodiment, in step 4, for the point cloud data marked as a possible crack area, accurate detection based on curvature change is used to accurately determine and mark the crack boundary points to obtain the crack area and its boundary, including:
[0032] Step 4.1: Based on the point cloud data in each possible crack area, the local point cloud is fitted into a surface using the least squares method;
[0033] Step 4.2: For the surface obtained by fitting, calculate the curvature at each point;
[0034] Step 4.3: Based on the preset curvature threshold, traverse each point in the fitted surface area, compare and judge the curvature at each point, mark the point with a curvature greater than the preset curvature threshold as a crack boundary point, and use the marking data to record the marking status of each point;
[0035] Step 4.4: Based on the labeled data, a neighborhood search and connection algorithm is used to form continuous crack boundaries and construct the crack area.
[0036] In a further embodiment, in step 5, a projection plane is selected based on the position and direction information of the identified crack area, the point cloud data in the tunnel global coordinate system is projected according to the selected projection plane, and based on the projected two-dimensional image, micro-cracks are analyzed to identify micro-cracks and their edge information, including:
[0037] Step 5.1. Select a projection plane according to the position and direction information of the identified crack area, and project the point cloud data in the global coordinate system of the tunnel according to the selected projection plane to obtain a projected two-dimensional image; wherein the method of selecting the projection plane is: according to the position and direction of the crack area, selecting a plane perpendicular to the development direction of the crack as the projection plane;
[0038] Step 5.2. Traverse each pixel point in the projected two-dimensional image, and count the frequency of each gray level to obtain a gray histogram;
[0039] Step 5.3. Calculate the cumulative distribution function according to the gray histogram, and perform gray mapping according to the cumulative distribution function to obtain an enhanced image;
[0040] Step 5.4. Based on the enhanced image, calculate the gradients of the image in the horizontal and vertical directions, respectively;
[0041] Step 5.5. Traverse each pixel point in the enhanced image to perform non-maximum suppression, and compare the gradient amplitude of the pixel point with the gradient amplitudes of adjacent pixel points in the gradient direction: if the gradient amplitude of the pixel point is not the local maximum, mark it as a non-edge point,
[0042] Step 5.6. Traverse the image after non-maximum suppression, and determine non-edge points, strong edge points and weak edge points through high-low threshold detection;
[0043] Step 5.7. Connect the weak edge points to form continuous edges, and perform screening and identification of micro cracks to obtain micro crack and edge information.
[0044] In further embodiments, in step 5.7, the weak edge points are connected to form continuous edges, and the screening and identification of micro cracks are performed to obtain micro crack and edge information, including:
[0045] Step 5.7.1. For the continuous edge, obtain the pixel point set marked as edge to construct an edge point sequence, calculate the distance between adjacent points and accumulate to obtain the edge length;
[0046] Step 5.7.2. Based on the pixel point set, perform local curve fitting and calculate the curvature and curvature distribution of the fitted local curve;
[0047] Step 5.7.3. For adjacent points in the edge point sequence, calculate the adjacent point vector and the direction angle;
[0048] Step 5.7.4. For each point in the edge point sequence, according to the neighborhood of a predetermined pixel width on both sides of the edge, obtain the gray values on both sides of the edge and calculate the gray difference and the gray change rate;
[0049] Step 5.7.5: Screen out tiny cracks based on edge length, local curve curvature, edge direction angle change, and grayscale change rate.
[0050] According to a second aspect of the present invention, a computer system is provided, comprising:
[0051] one or more processors;
[0052] A memory stores operable instructions, which, when executed by the one or more processors, cause the one or more processors to perform operations, including the process of executing the aforementioned tunnel quality safety detection method based on lidar data.
[0053] According to the tunnel quality and safety detection method based on lidar data of the above embodiment of the present invention, crack defects are first preliminarily screened based on the tunnel point cloud data by detecting the change in local point cloud density, so as to realize the rapid positioning of possible crack areas, and then, in combination with the point cloud data of possible crack areas, accurate detection based on curvature changes is adopted to accurately judge and mark the crack boundary points; finally, based on the accurately identified and marked crack areas, a projection plane is selected according to their position and direction information, and the point cloud data in the tunnel global coordinate system is projected according to the selected projection plane, and based on the projected two-dimensional image, micro-cracks are analyzed and identified, thereby realizing the rapid detection and identification of crack features with macroscopic and relatively obvious geometric feature changes and the identification of micro-cracks with subtle changes in point cloud density and curvature, thereby improving the crack detection capability.
[0054] The tunnel quality and safety detection method based on lidar data according to the embodiment has the following significant advantages:
[0055] On the one hand, point cloud density change detection focuses on the proportional relationship between the number of points and the area of the region. Since cracks usually lead to a decrease in point cloud density, areas where cracks may exist can be quickly screened out from a macro perspective. Curvature change detection focuses on the geometric shape changes of the tunnel wall surface. Within the possible crack areas initially screened out, curvature change detection further analyzes the geometric characteristics of the point cloud and discovers surface mutation points by calculating the curvature of the surface. These mutation points are usually the boundaries of the cracks. Not only for narrow but deep cracks, the curvature changes will be more significant. Even if the point cloud density changes are not so obvious, curvature change detection can still play a role. In this way, the boundary position of the crack is determined more accurately, which plays a role in refinement and precision, and accurately locates the crack. Therefore, through the mutual complementation of point cloud density and curvature change detection, point cloud density change detection quickly locates potential crack areas, while curvature change detection further accurately locates the boundaries of the crack, thereby improving the accuracy and completeness of crack detection.
[0056] On the other hand, for tiny cracks that are still difficult to identify using the first two methods, image enhancement and edge detection methods for tiny cracks are used. In terms of projection plane selection, the optimized projection plane is selected based on the position and direction of the crack area determined by point cloud density and curvature change detection, thereby improving the efficiency and accuracy of tiny crack detection. The point cloud data is converted into a two-dimensional image for processing based on the selected projection plane, and the information of tiny cracks is deeply mined to ensure that tiny cracks are detected as comprehensively as possible, improve the quality and level of tunnel safety detection, and provide an accurate, comprehensive and scientific basis for tunnel maintenance.
[0057] It should be understood that all combinations of the foregoing concepts and the additional concepts described in more detail below, as long as such concepts are not mutually inconsistent, can be considered part of the inventive subject matter of this disclosure. In addition, all combinations of the claimed subject matter are considered part of the inventive subject matter of this disclosure.
[0058] The foregoing and other aspects, embodiments, and features of the present invention will be more fully understood from the following description in conjunction with the accompanying drawings. Other additional aspects of the present invention, such as features and / or beneficial effects of the exemplary embodiments, will become apparent from the following description or through practice of specific embodiments according to the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] The accompanying drawings are not intended to be drawn to scale. In the accompanying drawings, each identical or nearly identical component shown in various figures may be represented by the same reference numeral. For clarity, not every component is labeled in each figure. Embodiments of various aspects of the present invention will now be described by way of example and with reference to the accompanying drawings.
[0060] Figure 1 4 is a flowchart of a tunnel quality and safety detection method based on lidar data according to an embodiment of the present invention.
[0061] Figure 2 This is a flow chart of preliminary screening of crack defects using local point cloud density change detection according to an embodiment of the present invention.
[0062] Figure 3 This is a flow chart of accurately detecting, judging, and marking crack boundary points based on curvature changes according to an embodiment of the present invention.
[0063] Figure 4 4 is a flow chart of a method for image enhancement and edge detection of micro cracks according to an embodiment of the present invention.
[0064] Figure 5 4 is a flow chart of screening micro cracks according to an embodiment of the present invention. DETAILED DESCRIPTION
[0065] In order to better understand the technical content of the present invention, specific embodiments are given below in conjunction with the accompanying drawings.
[0066] Various aspects of the present invention are described in this disclosure with reference to the accompanying drawings, in which a number of illustrative embodiments are shown. The embodiments of the present disclosure are not necessarily intended to include all aspects of the present invention. It should be understood that the various concepts and embodiments introduced above, as well as those described in more detail below, can be implemented in any of many ways, because the concepts and embodiments disclosed herein are not limited to any embodiment. In addition, some aspects of the present disclosure may be used alone or in any appropriate combination with other aspects disclosed herein.
[0067] {Example 1}
[0068] Combine Figure 1 As shown, the tunnel quality safety detection method based on laser radar data according to an embodiment of the present invention includes the following steps:
[0069] Step 1: Input the tunnel point cloud data obtained by laser radar scanning;
[0070] Step 2: pre-processing the tunnel point cloud data and performing coordinate transformation to obtain point cloud data in the tunnel global coordinate system;
[0071] Step 3: For the point cloud data in the tunnel global coordinate system, local point cloud density change detection is used to preliminarily screen crack defects and mark the point cloud data of possible crack areas;
[0072] Step 4: For the point cloud data marked as possible crack areas, accurate detection based on curvature changes is used to accurately determine and mark the crack boundary points to obtain the crack area and its boundary;
[0073] Step 5: Select a projection plane based on the position and direction of the identified crack area, project the point cloud data in the tunnel global coordinate system onto the selected projection plane, and analyze the microcracks based on the projected two-dimensional image to identify the microcracks and their edge information.
[0074] Step 6: Visualize and characterize the crack areas and microcracks in the three-dimensional tunnel model.
[0075] It should be understood that during tunnel inspections, comprehensive evaluation and analysis of aspects including cracks, misalignment, delamination, and water leakage on the tunnel surface can be performed based on LiDAR scanning data and combined with data from other sensors. In tunnel quality and safety inspections in embodiments of the present invention, attention is focused on crack detection on the tunnel surface. For example, the method described in the above embodiment and the following specific implementation process analyzes and comprehensively evaluates this by processing LiDAR scanning point cloud data.
[0076] During the inspection process, comprehensive tunnel data collection is performed using mobile platforms such as track-mounted robots and trolleys equipped with LiDAR scanning equipment. The mobile platforms are controlled to move along pre-set tracks within the tunnel, precisely controlling their speed and position accuracy to ensure data collection density and scanning efficiency (completed within a reasonable timeframe). Furthermore, positional accuracy control ensures that each LiDAR scan area is accurately stitched together, eliminating data gaps or excessive rescans.
[0077] In an optional embodiment, in step 2, pre-processing the tunnel point cloud data includes:
[0078] Step 2.1: Based on statistical filtering, remove isolated points that deviate from the spatial distribution of the surrounding point cloud;
[0079] Step 2.2: Based on the spatial range and height information of the point cloud, remove the point cloud of objects outside the tunnel and the point cloud of non-target structures at the top or bottom of the tunnel.
[0080] Specifically, the raw point cloud data collected may contain noise points caused by factors such as the LiDAR's own electronic noise and stray light in the environment. These points appear as isolated points that deviate significantly from the spatial distribution of the surrounding point clouds. Preprocessing with a denoising algorithm can remove these noise points and improve the quality of the point cloud data.
[0081] For example, based on statistical analysis methods, a distance threshold is set to identify isolated points that significantly deviate from the spatial distribution of the surrounding point cloud as noise points and remove them. At the same time, abnormal fluctuations that appear in multiple scans can also be smoothed through filtering algorithms.
[0082] As an optional example, in step 2.1, based on statistical filtering, isolated points that deviate from the spatial distribution of the surrounding point cloud are removed, including:
[0083] For each point, calculate the average distance to other points in a certain neighborhood;
[0084] For the set distance threshold, if the average distance from a point to other points in its neighborhood is greater than the threshold, it is determined to be a noise point and removed.
[0085] To highlight the tunnel surface features, it's necessary to filter out irrelevant background information. For example, based on the spatial extent and height information of the point cloud, point clouds of objects outside the tunnel (such as passing vehicles and people) and non-target structures at the top or bottom of the tunnel can be removed. In this embodiment of the present invention, upper and lower limits for spatial coordinates are set to remove unnecessary background information and highlight the tunnel surface features.
[0086] As an optional example, in step 2.2, based on the spatial range and height information of the point cloud, the point cloud of objects outside the tunnel and the point cloud of non-target structures at the top or bottom of the tunnel are removed, including:
[0087] Set the upper and lower limits of the tunnel space coordinates, which can be determined based on the actual size of the tunnel and the installation location of the lidar equipment;
[0088] Traverse the point cloud data and remove any point whose coordinates exceed the set spatial range.
[0089] In step 2, since the coordinate system of the point cloud data collected by the LiDAR on the mobile platform is relative to the sensor's local coordinate system, it needs to be converted to the unified global coordinate system of the tunnel for subsequent analysis and processing. In an embodiment of the present invention, this is achieved by using a coordinate transformation algorithm (such as a homogeneous transformation matrix) based on the mobile platform's posture and position information and the LiDAR scanning data.
[0090] In a further embodiment, converting the point cloud data acquired by the laser radar into a unified tunnel global coordinate system includes:
[0091] Based on the posture and position information of the mobile platform equipped with the lidar scanning device, the point cloud data in the local coordinate system of the lidar is converted to the global coordinate system of the tunnel using the homogeneous transformation matrix to obtain the point cloud data in the global coordinate system of the tunnel.
[0092] For example, the attitude and position information of the mobile platform can be obtained by installing high-precision sensors such as inertial measurement units (IMUs) and odometers on the mobile platform.
[0093] For the laser radar local coordinate system, P The coordinates of x l , y l , z l ), the position of the mobile platform in the tunnel global coordinate system is ( x g , y g , z g), the attitude matrix is R (which can be obtained by sensors such as IMU); then the coordinates of point P in the tunnel global coordinate system are ( x g , y g , z g )+R( x l , y l , z l ).
[0094] The homogeneous transformation matrix is expressed as:
[0095] ;
[0096] Where t = ( x g , y g , z g ), then the homogeneous coordinates of point P in the tunnel global coordinate system are:
[0097] .
[0098] In a further embodiment, in combination Figure 2 As shown, in step 3, for the point cloud data in the tunnel global coordinate system, local point cloud density change detection is used to preliminarily screen crack defects and mark the point cloud data of possible crack areas, including:
[0099] Step 3.1, dividing the point cloud data in the tunnel global coordinate system into several sub-regions, so that each point is divided into a sub-region;
[0100] Step 3.2: For any sub-area A, calculate its point cloud density ρ A , represents the point cloud density of sub-region A;
[0101] Among them, the point cloud density of sub-area A ρ A The calculation process is as follows:
[0102] ;
[0103] in, S A Indicates sub-area A The area, n A Indicates sub-area A The number of internal points, counted by traversing the points in the sub-region nA and calculate the area according to the geometry of the sub-region S A ;
[0104] Step 3.3, calculate the average density of the sub-region within a certain neighborhood around the sub-region A ;
[0105] Step 3.4, according to the point cloud density of the sub-region A ρ A and the average density of the sub-region within its certain neighborhood, if then the sub-region A is determined as a possible crack region and marked, where k represents a set proportion coefficient;
[0106] Step 3.5, for each sub-region, the traversal processing according to the above steps 3.2-3.4 is performed, and all possible crack regions in the point cloud data are preliminarily screened to quickly locate the range where the crack may exist.
[0107] Thus, by calculating the density of the point cloud in the local region and comparing it with the average density of the surrounding region, the possible crack region is preliminarily and quickly located.
[0108] In further embodiments, the sub-regions are set as uniformly divided square regions, and the side length of the square region is l ;
[0109] Traverse each point in the point cloud data, and determine the square region where the point is located according to the coordinates of the point. For example, for any point Q(x, y, z), according to the coordinate position of the point in the x-y plane, the index i in the x direction is:
[0110] ; the index j in the y direction is: ;
[0111] where represents the floor function.
[0112] Thus, each point is divided into a certain square sub-region represented by the (i, j) index.
[0113] Further, for the uniformly divided square region, the area is: where l is the side length of the sub-region.
[0114] wherein the size of the sub-region division can be determined according to the size of the tunnel and the resolution of the laser radar to control the point cloud data in each sub-region to have a certain representativeness and the calculation amount is controllable.
[0115] In a further embodiment, in step 3.3, calculating the average density of sub-regions within a certain neighborhood around sub-region A includes:
[0116] ;
[0117] Where m represents the number of sub-regions in the neighborhood around sub-region A, Represents the sub-region within the neighborhood around sub-region A i Point cloud density;
[0118] in, ;
[0119] Where, n i Indicates sub-area i The number of inliers, S i Indicates sub-area i The area of the sub-area is counted by traversing the points in the sub-area n i , and calculate the area based on the geometry of the subregion S i .
[0120] Therefore, through the above-mentioned point cloud density change detection, the sub-region whose point cloud density is significantly lower than the surrounding average density is marked as a possible crack region.
[0121] In a further embodiment, in combination Figure 4 As shown, in step 3, for the point cloud data marked as possible crack areas, accurate detection based on curvature changes is used to accurately determine and mark the crack boundary points, and obtain the crack area and its boundary, including:
[0122] Step 4.1: Based on the point cloud data in each possible crack area, the local point cloud is fitted into a surface using the least squares method;
[0123] Step 4.2: For the surface obtained by fitting, calculate the curvature at each point;
[0124] Step 4.3: Based on the preset curvature threshold, traverse each point in the fitted surface area, compare and judge the curvature at each point, mark the point with a curvature greater than the preset curvature threshold as a crack boundary point, and use the marking data to record the marking status of each point;
[0125] Step 4.4: Based on the labeled data, a neighborhood search and connection algorithm is used to form continuous crack boundaries and construct the crack area.
[0126] As an optional embodiment, in step 4.1, based on the point cloud data marked as possible crack areas, which contains three-dimensional coordinate information, the least squares method is used for surface fitting. The goal of the least squares method is to find a surface function so that the sum of squared errors between the function and the actual point cloud data is minimized.
[0127] In this embodiment, depending on the tunnel wall shape and point cloud data, different types of surfaces can be selected for fitting, including quadratic surfaces (such as elliptical paraboloids and hyperbolic paraboloids) or polynomial surfaces. If the tunnel wall is roughly cylindrical, a parametric form of the cylindrical surface equation is used for fitting. If the shape is more complex and no prior model is available, a high-order polynomial surface is used.
[0128] In this example, taking the typical cylindrical wall shape of a tunnel as an example, cylindrical surface fitting is more appropriate for possible crack areas.
[0129] The equation of the cylindrical surface (for a cylinder with its axis parallel to the axis) can be expressed in rectangular coordinates as:
[0130] ;
[0131] in, is the coordinate of the center of the cylinder base, and r is the radius. In practical applications, it can be converted into a parametric equation form according to the local area where the possible crack area is located:
[0132] .
[0133] For each point in the point cloud data of the possible crack area, the least squares method is used to fit the point cloud data to minimize the error between the point cloud data and the fitted cylindrical surface, and the coefficient of the fitted surface is obtained.
[0134] In an optional embodiment, in step 4.2, for the surface obtained by fitting, the curvature at each point is calculated, including:
[0135] For the fitted surface equation, calculate its first-order partial derivative and second-order partial derivative;
[0136] Then, according to the curvature calculation formula and the first-order partial derivatives and second-order partial derivatives obtained above, the calculated partial derivatives are substituted into the formula to calculate the curvature value at each point.
[0137] For each point in the point cloud data of the possible crack area, the least squares method is used to fit the point cloud data to minimize the error between the point cloud data and the fitted cylindrical surface, and the coefficient of the fitted surface is obtained.
[0138] In an optional embodiment, in step 4.2, for the surface obtained by fitting, the curvature at each point is calculated, including:
[0139] For the fitted surface equation, calculate its first-order partial derivative and second-order partial derivative;
[0140] Then, according to the curvature calculation formula and the first-order partial derivatives and second-order partial derivatives obtained above, the calculated partial derivatives are substituted into the formula to calculate the curvature value at each point.
[0141] For example, for the surface equation obtained by fitting , use numerical differentiation method to calculate its first-order partial derivative and the second-order partial derivative .
[0142] For the first-order partial derivative , can be calculated using the central difference formula:
[0143] ;
[0144] Where h represents a small step value (selected according to the accuracy and density of the point cloud data, such as h=0.01).
[0145] Similarly, we can calculate .
[0146] Then according to the curvature formula , substitute the calculated partial derivative into the formula to calculate the curvature value K at each point.
[0147] Then, in step 4.3, based on the curvature value K of each point in the point cloud data of the possible crack area, each point in the fitting surface area is traversed and the points with curvature values greater than the curvature threshold K are selected. t The points are marked as crack boundary points, and a data structure (such as a marking array) can be used to record the marking status of each point.
[0148] The curvature threshold Kt is determined by analyzing sample data from known cracks and normal tunnel wall areas. For example, point cloud data from multiple areas with different types of cracks and crack-free areas is collected, their curvature distribution is calculated, and then an appropriate value is selected based on the statistical results.
[0149] Finally, in step 4.4, based on the labeled data, a neighborhood search and connection algorithm is used to form continuous crack boundaries and construct the crack area.
[0150] As an optional embodiment, in step 4.4, a neighborhood search and connection algorithm is used to form a continuous crack boundary, including: starting from a marked crack boundary point, searching for its adjacent marked points, and connecting them according to certain rules (such as the shortest distance or a specific geometric direction), gradually forming a continuous crack boundary and constructing a crack area.
[0151] In further embodiments, in combination with Figure 5 As shown in FIG. 4, in step 4, a projection plane is selected according to the position and direction information of the identified crack region, the point cloud data in the global coordinate system of the tunnel is projected according to the selected projection plane, and based on the projected two-dimensional image, the analysis of the micro crack is carried out to identify the micro crack and its edge information, including:
[0152] Step 5.1, according to the position and direction information of the identified crack region, a projection plane is selected, and the point cloud data in the global coordinate system of the tunnel is projected according to the selected projection plane to obtain a projected two-dimensional image; wherein the method of selecting the projection plane is: according to the position and direction of the crack region, a plane perpendicular to the development direction of the crack is selected as the projection plane;
[0153] Step 5.2, each pixel point in the projected two-dimensional image is traversed, and the frequency of each gray level is counted to obtain a gray histogram;
[0154] Step 5.3, the cumulative distribution function is calculated according to the gray histogram, and the gray mapping is carried out according to the cumulative distribution function to obtain an enhanced image;
[0155] Step 5.4, based on the enhanced image, the gradient of the image in the horizontal and vertical directions is calculated respectively;
[0156] Step 5.5, each pixel point in the enhanced image is traversed for non-maximum suppression, and the gradient amplitude of the pixel point is compared with the gradient amplitude of the adjacent pixel points in the gradient direction: if the gradient amplitude of the pixel point is not the local maximum, it is marked as a non-edge point,
[0157] Step 5.6, the image after non-maximum suppression is traversed, and the non-edge point, strong edge point and weak edge point are determined by high-low threshold detection;
[0158] Step 5.7, the weak edge points are connected to form continuous edges, and the micro cracks are screened and identified to obtain the micro crack and its edge information.
[0159] As an optional embodiment, in step 5.1, the projection plane is selected according to the position and direction information of the crack region obtained in the previous crack detection step, for example, if the crack mainly develops along the longitudinal direction of the tunnel wall, the point cloud data can be projected onto a plane perpendicular to the longitudinal direction; if the crack direction is complex, multiple projection directions can be selected, such as projecting onto three planes parallel to the tunnel coordinate axes (i.e. x-y plane, y-z plane and x-z plane).
[0160] For each point cloud data point, assuming that the projection is to the xy plane, the z coordinate is ignored and the coordinates of the projection point on the xy projection plane are obtained. For projection to other planes, the corresponding coordinate selection operation is performed.
[0161] As an optional embodiment, in step 5.2, each pixel in the projected two-dimensional image is traversed, and the frequency of occurrence of each gray level is counted to obtain a gray level histogram.
[0162] Assume that the grayscale range of the image is [0, L-1] (for example, for an 8-bit image, L = 256), create an array H of length L, where H[i] represents the number of pixels with grayscale level i.
[0163] As an optional embodiment, in step 5.3, the cumulative distribution function is calculated based on the grayscale histogram, and the cumulative distribution function is set to CDF(i) , the calculation formula is:
[0164] ;
[0165] Where N is the total number of pixels in the two-dimensional image.
[0166] On this basis, grayscale mapping is performed according to the cumulative distribution function to obtain the enhanced image. Specifically, let the grayscale value of the pixel in the original image be p and the enhanced grayscale value be s, then:
[0167] .
[0168] Therefore, the grayscale value of each pixel in the two-dimensional image is updated through the grayscale mapping relationship, thereby achieving histogram equalization and enhancing the contrast of the image.
[0169] As an optional embodiment, in step 5.4, based on the enhanced image, the Sobel operator is used to calculate the gradients of the two-dimensional image in the horizontal and vertical directions respectively, including:
[0170] For each pixel (x, y) in a two-dimensional image, the horizontal gradient The vertical gradient is obtained by convolving the horizontal template of the Sobel operator with the two-dimensional image. Similarly, it is obtained through convolution calculation.
[0171] Then according to the formula Compute the gradient magnitude, and Compute the gradient direction.
[0172] As an optional embodiment, in step 5.5, non-maximum suppression is performed on each pixel in the enhanced image, and its gradient magnitude is compared with the gradient magnitudes of adjacent pixels along the gradient direction. If the gradient magnitude of the pixel is not a local maximum, it is marked as a non-edge point, and its influence in subsequent processing is suppressed. For example, for a pixel with a gradient direction of 0° (horizontally), its gradient magnitude is compared with its left and right adjacent pixels; for a pixel with a gradient direction of 45°, its gradient magnitude is compared with its diagonally adjacent pixels, and so on.
[0173] As an optional embodiment, in step 5.6, the image after non-maximum suppression is traversed, and non-edge points, strong edge points, and weak edge points are determined by high and low dual threshold detection, including:
[0174] Set a high threshold and low threshold ( );
[0175] Traverse the image after non-maximum suppression and convert the gradient amplitude greater than Pixels with gradient amplitude less than The pixel points with gradient magnitude between and If the pixel point between them is adjacent to a strong edge point, it will be marked as a weak edge point.
[0176] Finally, the weak edge points are connected by checking the neighborhood around the weak edge points. If there are strong edge points, the weak edge points are connected to the edge where the strong edge points are located, thus forming a continuous edge.
[0177] Therefore, the distribution of geometric features such as edge length, curvature, and direction of continuous edges can be further analyzed to distinguish crack edges from other types of edges, and to screen out edges that do not meet the crack characteristics. That is, only when the edge length, curvature, direction angle, and grayscale characteristics all meet the crack characteristics can it be determined as a crack edge, thereby accurately determining the location of tiny cracks.
[0178] In a further embodiment, in combination Figure 5 As shown, in step 5.7, the weak edge points are connected to form a continuous edge, and the small cracks are screened and identified, thereby finally determining the small cracks and their edge information, including:
[0179] Step 5.7.1: For continuous edges, obtain the set of pixels marked as edges to construct an edge point sequence. Calculate the distances between adjacent points and accumulate them to obtain the edge length. For example, for a set of pixels with continuous edges, arrange the points in a certain order (e.g., along the direction of the edge) into a point sequence to be used as the edge point sequence. Further, calculate the distances between adjacent points using the Euclidean distance formula, and then add the distances between all adjacent points to obtain the edge length.
[0180] Step 5.7.2: Based on the pixel point set, perform local curve fitting and calculate the curvature and curvature distribution of the fitted local curve. Specifically, for each point in the edge point sequence, select several adjacent points before and after it (preferably 5-8 points) and use least squares to fit a quadratic curve. Solve the curve coefficients using least squares to obtain the curve equation, from which the curvature of each point in the edge point sequence can be calculated. After calculating the curvature for all points on the edge, a curvature sequence is obtained, which is used to determine the subsequent curvature change and distribution.
[0181] Step 5.7.3: For the adjacent points in the edge point sequence, calculate the adjacent point vectors and direction angles; specifically, based on the edge point sequence, the adjacent point pair p formed by any two adjacent points is i With p i+1 , calculate the adjacent point vector:
[0182] ;
[0183] Then use the inverse tangent function to calculate the direction angle of the vector, then the adjacent point vector The direction angle is:
[0184] ;
[0185] Based on this, the direction angle of each adjacent point pair in the edge point sequence can be calculated to obtain the direction angle sequence, which can be used to observe the changes in the direction angle sequence in the future to determine whether the direction of the edge has a certain degree of continuity and regularity, so as to distinguish cracks from other messy edges.
[0186] Step 5.7.4: For each point in the edge point sequence, obtain the grayscale values on both sides of the edge and calculate the grayscale difference and grayscale change rate based on the neighborhood of predetermined pixel width on both sides of its edge. Specifically, based on the edge point sequence, for each edge point, select a neighborhood of a certain pixel width (for example, 1-3 pixels) perpendicular to the edge direction (the vertical direction can be determined by the edge direction angle), obtain the grayscale values on both sides of the edge, and then calculate the difference of the grayscale values on both sides of the edge. Grayscale change rate ,in is the distance between adjacent points, such as Euclidean distance;
[0187] Step 5.7.5: Based on the edge length, curvature of the local curve, change in edge direction angle, and grayscale change rate, tiny cracks are screened out. That is, when the edge length, curvature, direction angle, and grayscale characteristics all meet the crack characteristics, it is determined to be a crack edge, thereby accurately determining the location of the tiny crack.
[0188] Specifically, in step 5.7.5, the edge length is judged by presetting the maximum and minimum thresholds of the crack length, and all continuous edges are traversed. If the length exceeds the maximum and minimum threshold range, it is deleted from the crack edge candidate set.
[0189] Similarly, by presetting a reasonable range of curvature changes and setting the maximum and minimum thresholds of curvature to judge curvature changes, all continuous edges are traversed. For the curvature values calculated for each point on the edge, if there are more than a certain number of curvatures that are less than the minimum curvature threshold (indicating that the edge is too smooth) or greater than the maximum curvature threshold (indicating that the edge is too curved and does not meet the crack characteristics), then the edge is excluded from the crack edge candidate set.
[0190] Similarly, by considering the reasonable range of grayscale feature variation, we set a lower threshold for the grayscale difference (e.g., 10, with a grayscale range of 0-255) and a lower threshold for the grayscale change rate (e.g., 0.1). This can be determined based on the projected 2D image of the point cloud data and the tunnel wall material. Based on this, for continuous edges, if the mean of their grayscale difference and grayscale change rate is less than the corresponding threshold, they are removed from the set of crack edge candidates.
[0191] For orientation angle screening, the range of edge orientation angle variation is calculated. The orientation of a crack edge typically exhibits a certain degree of continuity. By setting an orientation angle variation threshold, such as 33°, the edge orientation angle sequence is examined. If the number of points where the orientation angle variation between adjacent points exceeds the orientation angle variation threshold exceeds a certain number, the edge is considered to not meet the directional continuity characteristic of the crack and is removed from the candidate set of crack edges.
[0192] The above-mentioned crack edge feature screening and judgment based on edge length, curvature, orientation angle and grayscale characteristics can more accurately determine the true crack edge from the edge detection results, reduce misjudgment and improve the accuracy of small crack detection.
[0193] Combining steps 3, 4, and 5 above completes the complete crack detection process, from rapid point cloud density screening to precise curvature-based boundary determination and image detection of tiny cracks. By complementing and relying on each other, point cloud and crack feature data are increasingly analyzed during processing, improving the accuracy and comprehensiveness of crack detection.
[0194] {Example 2}
[0195] In combination with the tunnel quality and safety detection method based on laser radar data in the above embodiment, according to the present invention, a computer system is also proposed, including: one or more processors, and a memory.
[0196] The aforementioned memory is used to store operable instructions, which, when executed by the one or more processors, enable the one or more processors to perform operations, including the process of executing the tunnel quality safety detection method based on lidar data of the aforementioned embodiment.
[0197] While the present invention has been disclosed above with reference to preferred embodiments, this is not intended to limit the present invention. Persons skilled in the art will readily appreciate that various modifications and variations can be made without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present invention shall be determined by the claims.
Claims
1. A tunnel quality safety detection method based on laser radar data, characterized in that: The following steps are involved: Step 1: Input the tunnel point cloud data obtained by laser radar scanning; Step 2: pre-processing the tunnel point cloud data and performing coordinate transformation to obtain point cloud data in the tunnel global coordinate system; Step 3: For the point cloud data in the tunnel global coordinate system, local point cloud density change detection is used to preliminarily screen crack defects and mark the point cloud data of possible crack areas; Step 4: For the point cloud data marked as possible crack areas, accurate detection based on curvature changes is used to accurately determine and mark the crack boundary points to obtain the crack area and its boundary; Step 5: Select a projection plane based on the position and direction of the identified crack area, project the point cloud data in the tunnel global coordinate system onto the selected projection plane, and analyze the microcracks based on the projected two-dimensional image to identify the microcracks and their edge information. Step 6: Visually characterize the crack areas and microcracks in the three-dimensional tunnel model; In step 5, a projection plane is selected based on the position and direction information of the identified crack area, the point cloud data in the tunnel global coordinate system is projected according to the selected projection plane, and micro-cracks are analyzed based on the projected two-dimensional image to identify micro-cracks and their edge information, including: Step 5.1: Select a projection plane based on the location and orientation of the identified crack region, and project the point cloud data in the tunnel global coordinate system onto the selected projection plane to obtain a projected two-dimensional image. The projection plane is selected by selecting a plane perpendicular to the crack development direction based on the location and orientation of the crack region as the projection plane. Step 5.2, traverse each pixel in the projected two-dimensional image, count the frequency of each gray level, and obtain a grayscale histogram; Step 5.3, calculate the cumulative distribution function according to the grayscale histogram, and perform grayscale mapping according to the cumulative distribution function to obtain the enhanced image; Step 5.4: Based on the enhanced image, calculate the gradient of the image in the horizontal and vertical directions respectively; Step 5.5: Perform non-maximum suppression on each pixel in the enhanced image and compare the gradient magnitude of the pixel with the gradient magnitude of the adjacent pixels in the gradient direction. If the gradient magnitude of the pixel is not a local maximum, mark it as a non-edge point. Step 5.6: traverse the image after non-maximum suppression and determine non-edge points, strong edge points, and weak edge points through high and low double threshold detection; Step 5.7: Connect the weak edge points to form a continuous edge, and screen and identify small cracks to obtain information about the small cracks and their edges.
2. The tunnel quality and safety detection method based on laser radar data according to claim 1 is characterized in that: In step 2, preprocessing the tunnel point cloud data includes: Step 2.1: Based on statistical filtering, remove isolated points that deviate from the spatial distribution of the surrounding point cloud; Step 2.2: Based on the spatial range and height information of the point cloud, remove the point cloud of objects outside the tunnel and the point cloud of non-target structures at the top or bottom of the tunnel.
3. The tunnel quality and safety detection method based on laser radar data according to claim 1 is characterized in that: In step 2, the coordinate change refers to converting the point cloud data acquired by the laser radar into a unified tunnel global coordinate system, including: Based on the posture and position information of the mobile platform equipped with the lidar scanning device, the point cloud data in the local coordinate system of the lidar is converted to the global coordinate system of the tunnel using the homogeneous transformation matrix to obtain the point cloud data in the global coordinate system of the tunnel.
4. The tunnel quality and safety detection method based on laser radar data according to claim 1 is characterized in that: In step 3, for the point cloud data in the tunnel global coordinate system, local point cloud density change detection is used to preliminarily screen crack defects and mark the point cloud data of possible crack areas, including: Step 3.1, dividing the point cloud data in the tunnel global coordinate system into several sub-regions, so that each point is divided into a sub-region; Step 3.2: For any sub-area A, calculate its point cloud density ρ A , represents the point cloud density of sub-region A; Step 3.3: Calculate the average density of sub-regions within a certain neighborhood around sub-region A ; Step 3.4: Based on the point cloud density of sub-area A ρ A The average density of the sub-regions within a certain neighborhood around it ,if , then the sub-region A is determined as a possible crack region and marked, where k represents the set proportional coefficient; Step 3.5: For each sub-area, perform traversal processing according to the above steps 3.2 to 3.4, preliminarily screen all possible crack areas in the point cloud data, and quickly locate the range where cracks may exist.
5. The tunnel quality and safety detection method based on laser radar data according to claim 4 is characterized in that: The sub-areas are set to be evenly divided square areas, with a side length of l ; Traverse each point in the point cloud data and determine the square area where it is located based on the coordinates of the point.
6. The tunnel quality and safety detection method based on laser radar data according to claim 4 is characterized in that: In step 3.3, the average density of the sub-regions in a certain neighborhood around sub-region A is calculated. ,include: ; Where m represents the number of sub-regions in the neighborhood around sub-region A; Represents the sub-region in the neighborhood around sub-region A i Point cloud density; ; in, n i Indicates sub-area i The number of inliers, S i Indicates sub-area i The area of the sub-area is counted by traversing the points in the sub-area n i , and calculate the area based on the geometry of the subregion S i .
7. The tunnel quality and safety detection method based on laser radar data according to claim 1 is characterized in that: In step 4, for the point cloud data marked as possible crack areas, accurate detection based on curvature changes is used to accurately determine and mark crack boundary points, and obtain the crack area and its boundary, including: Step 4.1: Based on the point cloud data in each possible crack area, the local point cloud is fitted into a surface using the least squares method; Step 4.2: For the surface obtained by fitting, calculate the curvature at each point; Step 4.3: Based on the preset curvature threshold, traverse each point in the fitted surface area, compare and judge the curvature at each point, mark the point with a curvature greater than the preset curvature threshold as a crack boundary point, and use the marking data to record the marking status of each point; Step 4.4: Based on the labeled data, a neighborhood search and connection algorithm is used to form continuous crack boundaries and construct the crack area.
8. The tunnel quality and safety detection method based on laser radar data according to claim 1 is characterized in that: In step 5.7, the weak edge points are connected to form a continuous edge, and small cracks are screened and identified to obtain small cracks and their edge information, including: Step 5.7.
1. For continuous edges, obtain the pixel points marked as edges to construct an edge point sequence, calculate the distances between adjacent points, and accumulate them to obtain the edge length; Step 5.7.2: Based on the pixel point set, perform local curve fitting and calculate the curvature and curvature distribution of the fitted local curve; Step 5.7.3: For adjacent points in the edge point sequence, calculate the adjacent point vectors and direction angles; Step 5.7.4: For each point in the edge point sequence, obtain the grayscale values on both sides of the edge based on the neighborhood of predetermined pixel width on both sides of the edge and calculate the grayscale difference and grayscale change rate; Step 5.7.5: Screen out tiny cracks based on edge length, local curve curvature, edge direction angle change, and grayscale change rate.
9. A computer system, characterized in that: include: one or more processors; A memory storing operable instructions, wherein when the instructions are executed by the one or more processors, the one or more processors are caused to perform operations, wherein the operations include the process of executing the tunnel quality and safety detection method based on lidar data as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Surface defect detection method and device, medium and electronic equipment
CN116596886A
Mining method tunnel operation period deformation monitoring method and system
CN118096737A