Tunnel surface disease visual measurement method, device, medium and equipment
By using binocular point cloud real-time surface fitting and active laser self-calibration, the problem of accuracy in measuring the absolute size of tunnel surface defects was solved, achieving high-precision quantitative measurement in deformed and weakly textured environments, and eliminating the ranging error of traditional methods.
Patent Information
- Application Number
- CN202611053428.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-15
- Publication Date
- 2026-08-25
AI Technical Summary
Existing technologies cannot accurately quantify the absolute size of surface defects in tunnels, especially under curved surfaces and perspective views where there is severe distortion. Furthermore, traditional methods rely on theoretical tunnel design drawings, resulting in large distance measurement errors and making it difficult to adapt to tunnel deformation and weak texture environments.
A method based on real-time surface fitting of binocular point clouds and active laser self-calibration is adopted. By actively projecting collimated laser spots through laser point light sources and combining stereo matching with images acquired by binocular cameras, three-dimensional coordinates are calculated. The least squares method is used to fit the real normal and incident angle to establish a pixel-physical scale and realize the absolute physical size measurement of the diseased area.
It eliminates the cumulative error caused by tunnel structural deformation, improves robustness in weak texture environments, and achieves low-cost, high-precision online quantitative measurement without relying on external ranging equipment and cumbersome calibration boards.
Smart Images

Figure CN122631652A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of disease detection technology, and in particular to a method, device, medium and equipment for visual measurement of tunnel surface diseases, specifically a method, device, medium and equipment for visual measurement of tunnel surface diseases based on binocular point cloud real-time surface fitting and active laser self-calibration. Background Technology
[0002] The size of apparent defects in tunnel lining is a key quantitative indicator for assessing structural safety and developing maintenance plans. Currently, the industry mainly uses methods for observing the size of defects, including contact measurement, traditional non-contact visual measurement, and comprehensive inspection based on robotic platforms. However, all of these methods have significant limitations.
[0003] Contact-based manual measurement methods rely on inspectors using tools such as crack observation instruments and calipers for close-range measurements. Their drawbacks are obvious: low efficiency, high workload, safety risks associated with working at heights, and highly subjective measurement results that are difficult to digitize and trace. For hard-to-reach areas such as tunnel arches, measurement is extremely difficult and can no longer meet the demands of modern engineering projects requiring rapid and regular inspections of long tunnel complexes.
[0004] Traditional non-contact photogrammetry methods involve taking photographs of the tunnel surface with a digital camera and then using image processing techniques to identify and measure defects. While this method improves efficiency, it lacks a pixel-to-physical scale for absolute physical dimensions. Especially on curved surfaces and from perspective, it produces severe distortion, making it impossible to accurately quantify the absolute size of defects.
[0005] More critically, current spatial positioning and visual mapping ranging technologies for tunnel inspection vehicles (such as methods relying on multi-camera systems to establish a world coordinate system) heavily depend on the original theoretical design drawings of the tunnel for establishing ranging and mapping relationships. Due to long-term geological stress and external loads, tunnels inevitably experience overall settlement, radial convergence, and local creep deformation, leading to significant positional deviations between their actual inner contours and the "theoretical design drawings." Forcibly applying the theoretical contours for principal ray intersection calculations during measurement will result in substantial ranging errors. Furthermore, traditional passive vision methods are highly dependent on the natural texture of the tunnel surface, and stereo matching is prone to failure in dark, low-texture concrete lining environments.
[0006] Therefore, it is necessary to provide a new method, device, medium, and equipment for visual measurement of tunnel surface defects to solve the above-mentioned technical problems. Summary of the Invention
[0007] The main objective of this invention is to provide a method, apparatus, medium, and equipment for visual measurement of surface defects in tunnels, aiming to solve the problem that existing methods cannot accurately quantify the absolute size of defects.
[0008] To achieve the above objectives, the present invention proposes a visual measurement method for tunnel surface defects, comprising the following steps: Step S1: Control the laser point source to actively project a collimated laser spot onto the local neighborhood to be measured on the tunnel lining surface, and simultaneously trigger the first camera and the second camera to acquire a binocular image of the tunnel surface containing the laser spot. Step S2: Perform stereo matching on the laser spot in the acquired binocular image, and calculate the three-dimensional coordinates of the laser spot in space based on the principle of triangulation; Step S3: Based on the three-dimensional coordinates of the laser spot in space, use the standard method of least squares-point cloud plane fitting to solve for the true normal, the actual vertical distance L, and the actual incident angle α. Step S4: Calculate the theoretical physical size of the laser spot on the lining surface based on the actual vertical distance L, the actual incident angle α, and the inherent parameters of the laser point source. Extract the long axis pixel length of the laser spot from a single image acquired by the first or second camera. Compare the theoretical physical size with the long axis pixel length to construct a pixel-physical scale. Step S5: Analyze the same single image used in Step S4 to extract the long axis pixel length of the laser spot using the disease identification model, identify the disease area and obtain the pixel outline size of the disease area; multiply the pixel outline size of the disease area with the pixel-physical scale to obtain the absolute physical size of the disease area, and output the visual measurement results of the tunnel surface disease.
[0009] Optionally, step S1 includes: Step S1.1: Rigidly and fixedly connect the laser point source, the first camera, and the second camera to form an integrated disease measurement device; wherein: the optical axis of the laser point source is parallel to or at a fixed angle to the optical axis of the first camera; Step S1.2: Control the laser point source to actively project a collimated laser spot onto the local neighborhood to be measured on the tunnel lining surface; simultaneously trigger the first camera and the second camera to acquire binocular images of the tunnel surface including the laser spot and the surrounding defect area; wherein: the binocular images of the tunnel surface include a single image acquired by the first camera and a single image acquired by the second camera.
[0010] Optionally, step S2 includes: Step S2.1: Perform grayscale conversion, filtering and denoising, and adaptive threshold segmentation on the single image captured by the first camera and the single image captured by the second camera respectively to obtain the preprocessed images corresponding to the first camera and the second camera. Step S2.2: Based on the region where the laser spot is located, calculate the sub-pixel level coordinates of the center point of the laser spot corresponding to the first camera and the second camera respectively using the gray-scale centroid method or the ellipse fitting method; Step S2.3: Perform distortion correction and epipolar correction on the preprocessed images corresponding to the first and second cameras according to the binocular system parameters to obtain a corrected binocular image in which the center point of the laser spot is located on the same horizontal epipolar line; wherein, the binocular system parameters include the camera internal parameters and camera external parameters obtained by calibration. The camera internal parameters include focal length, principal point coordinates and distortion coefficients. The principal point coordinates are the coordinates of the intersection of the camera optical axis and the imaging plane in the image coordinate system. The camera external parameters include rotation matrix R and translation vector T. Step S2.4: Using the actively projected laser spot as the strong feature point for binocular matching, calculate the parallax between the first camera and the second camera based on the difference in the abscissa of the center point of the corresponding laser spot in the first camera and the second camera. Step S2.5: Based on the principle of triangulation, the three-dimensional coordinates of spatial points within the local neighborhood to be measured are calculated according to the parallax between the first and second cameras and the parameters of the binocular system, and a local 3D point cloud of the local neighborhood to be measured is generated; the specific formula for the three-dimensional coordinates of any spatial point within the local neighborhood to be measured is as follows: ; ; ; in: These are the subpixel-level coordinates of the center point of the laser spot corresponding to the first camera; These are the subpixel-level coordinates of the center point of the laser spot corresponding to the second camera; , and These are the X-axis, Y-axis, and Z-axis coordinates of any spatial point within the local neighborhood to be measured; Focal length; The baseline length is the distance between the optical centers of the first and second cameras. For parallax, ; and These are the principal point coordinates of the first camera, i.e., the coordinates of the intersection of the optical axis of the first camera and the imaging plane in the image coordinate system.
[0011] Optionally, step S2.2 specifically includes: Step S2.2.1: In the preprocessed images corresponding to the first camera and the second camera, candidate spot regions are determined based on the brightness characteristics, color characteristics, or wavelength response characteristics of the laser spot; Step S2.2.2: Perform connected component analysis on the candidate light spot regions, and filter them based on the area characteristics, geometric shape characteristics and optical response characteristics of each connected component to remove tunnel lining background texture, reflective noise and non-target bright spots; Step S2.2.3: Calculate the sub-pixel level coordinates of the center points of the laser spots corresponding to the first camera and the second camera respectively using the gray-scale centroid method or the ellipse fitting method; wherein, the gray-scale centroid method determines the center point of the laser spot based on the weighted average of the gray values of each pixel in the laser spot area, and the ellipse fitting method obtains the center of the ellipse by fitting the edge contour of the laser spot, and uses the center of the ellipse as the center point of the laser spot.
[0012] Optionally, step S3 includes: Step S3.1: Using the three-dimensional coordinates of the laser spot in space as the center, the real plane equation or real surface equation of the local neighborhood to be measured is obtained in real time by using the least squares method to fit the local 3D point cloud of the local area to be measured. Step S3.2: Based on the normal vector of the optical axis direction of the laser point source and the equation of the real plane or the equation of the real surface. The true angle of incidence is calculated. α Based on the optical center coordinates, the three-dimensional coordinates of the light spot, and the normal vector of the first camera, the actual perpendicular distance from the optical center to the fitting surface is calculated. L .
[0013] Optionally, step S4 includes: Based on actual vertical distance L Actual angle of incidence α And the laser spot size varies with the actual vertical distance of propagation. L and beam divergence angle θ The changing relationship is used to calculate the theoretical physical dimensions of the laser spot on the lining surface; where the inherent parameters of the laser point source include the initial beam diameter. D 0 and beam divergence angle θ ; The major axis pixel length of the laser spot in the corresponding preprocessed image is calculated using the ellipse fitting method based on the preprocessed image corresponding to the first camera or the second camera. The ellipse fitting method is a method of fitting an ellipse to the edge contour points of the laser spot and taking the major axis of the fitted ellipse as the major axis pixel length of the laser spot. The pixel-physical scale of the preprocessed image in a local region is obtained by comparing the theoretical physical size of the laser spot with the physical size of the pixel. .
[0014] Optionally, the theoretical physical dimensions of the laser spot on the lining surface are calculated, specifically including: ① Based on the actual vertical distance of laser spot size during propagation L and beam divergence angle θ The diameter of the laser spot after propagating the actual vertical distance L is calculated based on the changing relationship. The specific formula is as follows: ; ② Based on the diameter of the laser spot after traveling the actual vertical distance L. The major axis diameter of the elliptical laser spot on the tunnel lining surface is calculated from the actual incident angle α, and this major axis diameter is taken as the theoretical physical size of the laser spot on the lining surface. The specific formula is as follows: ; Calculate the physical pixel size of the laser spot in the corresponding preprocessed image, specifically including: ① Based on the preprocessed image corresponding to the first or second camera, an image containing the laser spot is identified and extracted using an image processing algorithm; ② Using the sub-pixel level coordinates of the center point of the laser spot calculated in step S2.2, determine the laser spot region to be fitted on the image containing the laser spot with the center point of the laser spot as the center; ③ Based on the laser spot region to be fitted, the long axis pixel length of the spot, i.e. the pixel physical size, is extracted using the ellipse fitting method.
[0015] Optionally, the visual measurement device for tunnel surface defects includes: A wall-climbing robot capable of walking along the surface of tunnel lining; A rigid mounting bracket is provided on the wall-climbing robot; A laser point source is mounted on the rigid mounting bracket and is used to project a collimated laser cursor onto the local neighborhood to be measured. The first camera and the second camera are respectively fixedly mounted on the rigid mounting bracket. The optical axes of the first camera and the second camera are parallel, and the optical axis of the laser point source is parallel to or at a fixed angle to the optical axis of the first camera. The data processing and control unit is electrically connected to the laser point source, the first camera, and the second camera, respectively, and is used to perform the visual measurement method for tunnel surface defects as described in any one of claims 1 to 7.
[0016] In addition, the present invention also provides a readable storage medium storing computer program instructions thereon, which, when executed by a processor, implement the visual measurement method for tunnel surface defects as described above.
[0017] In addition, the present invention also provides an electronic device, characterized in that it includes: at least one processor, at least one memory, and computer program instructions stored in the memory, wherein the computer program instructions are executed by the processor to perform the visual measurement method for tunnel surface defects as described above.
[0018] Compared with the prior art, the present invention has the following outstanding advantages: 1. Eliminating the cumulative error caused by tunnel structural deformation: Specifically, this invention does not rely on theoretical tunnel design drawings. Through dynamic fitting of local real point clouds, it directly captures the current real shape and spatial orientation of the lining. Even if the tunnel has undergone severe settlement or convergence deformation, the measured distance and normal are still absolutely accurate.
[0019] 2. It exhibits extremely high robustness in weak texture environments. Specifically, by actively projecting high-contrast laser spots onto the dark tunnel walls, sub-pixel-level strong matching features are artificially created, overcoming the bottleneck of frequent failures in stereo matching of traditional passive vision in weak texture environments.
[0020] 3. The optical self-consistent calibration with absolute physical scale is as follows: It abandons expensive external ranging equipment and cumbersome physical calibration plates, and innovatively combines the spatial divergence model of Gaussian beam with geometric projection distortion, so that the extracted elliptical light spot itself becomes a dynamic "physical ruler", realizing low-cost and high-precision online quantitative measurement. Attached Figure Description
[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without creative effort.
[0022] Figure 1 This is a schematic diagram of the structure of the visual measurement device for tunnel surface defects in Embodiment 2 of the present invention; Figure 2 This is a flowchart illustrating the visual measurement method for tunnel surface defects in Embodiment 1 of the present invention. Figure 3 This is a schematic diagram of the calculation in step S3 of embodiment 2 of the present invention; Figure 4 This is a schematic diagram illustrating the calculation of the diameter of the laser spot after propagating the actual vertical distance L in Embodiment 2 of the present invention; Figure 5 This is a schematic diagram illustrating the calculation of the theoretical physical dimensions in Embodiment 2 of the present invention.
[0023] Explanation of icon numbers: 1. Laser point source, 2. First camera, 3. Second camera.
[0024] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0025] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0026] It should be noted that all directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present invention are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indication will also change accordingly.
[0027] Furthermore, in this invention, descriptions involving "first," "second," etc., are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0028] In this invention, unless otherwise explicitly specified and limited, the terms "connection," "fixed," etc., should be interpreted broadly. For example, "fixed" can mean a fixed connection, a detachable connection, or an integral part; it can mean a mechanical connection or an electrical connection; it can mean a direct connection or an indirect connection through an intermediate medium; it can mean the internal communication of two components or the interaction between two components, unless otherwise explicitly limited. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0029] Furthermore, the technical solutions of the various embodiments of the present invention can be combined with each other, but only if they are based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such combination of technical solutions does not exist and is not within the scope of protection claimed by the present invention.
[0030] This invention proposes a method, apparatus, medium, and equipment for visual measurement of surface defects in tunnels, aiming to solve the problem that existing methods cannot accurately quantify the absolute size of defects. Without relying on any external calibration objects or prior theoretical drawings of the tunnel, it establishes a precise mapping relationship between image space and physical space in real time and online through a built-in active laser light source and binocular vision system. It automatically identifies surface defects such as cracks, spalling, and leakage, and accurately measures their absolute physical dimensions, particularly solving the challenge of dimensional measurement on the surface of deformed, curved tunnel linings. Example 1: See Figure 1 and Figure 2 This embodiment provides a method for visually measuring surface defects in tunnels, including the following steps: I. Synchronous image acquisition (projected laser) Step S1: Control the laser point source 1 to actively project a collimated laser spot onto the local neighborhood to be measured on the tunnel lining surface, and simultaneously trigger the first camera 2 and the second camera 3 to acquire a binocular image of the tunnel surface containing the laser spot. Step S1 includes: Step S1.1: Rigidly and fixedly connect the laser point source 1, the first camera 2, and the second camera 3 to form an integrated disease measurement device; wherein: the optical axis of the laser point source 1 is parallel to or at a fixed angle to the optical axis of the first camera 2; Step S1.2: Control the laser point source 1 to actively project a collimated laser spot onto the local neighborhood to be tested on the tunnel lining surface; simultaneously trigger the first camera 2 and the second camera 3 to acquire binocular images of the tunnel surface including the laser spot and the surrounding defect area; wherein: the binocular images of the tunnel surface include a single image acquired by the first camera 2 and a single image acquired by the second camera 3.
[0031] This embodiment actively injects high-contrast optically strong features to eliminate the interference of low-texture or low-light environments on the lining surface on image matching.
[0032] Step S2: Perform stereo matching on the laser spot in the acquired binocular image, and calculate the three-dimensional coordinates of the laser spot in space based on the principle of triangulation; II. Binocular matching to solve the 3D coordinates of the light spot Step S2 includes: Step S2.1: Perform grayscale conversion, filtering and noise reduction, and adaptive threshold segmentation on the single image acquired by the first camera 2 and the single image acquired by the second camera 3 respectively to obtain the preprocessed images corresponding to the first camera 2 and the second camera 3. Step S2.2: Based on the region where the laser spot is located, calculate the sub-pixel level coordinates of the center point of the laser spot corresponding to the first camera 2 and the second camera 3 respectively using the gray-scale centroid method or the ellipse fitting method; Step S2.2 specifically includes: Step S2.2.1: In the preprocessed images corresponding to the first camera 2 and the second camera 3, candidate spot regions are determined based on the brightness features, color features, or wavelength response features of the laser spot, respectively. In this embodiment, the extraction of candidate spot regions can be achieved by existing methods or combinations thereof, such as threshold segmentation, color space segmentation, wavelength response threshold screening, spot detection, and connected component analysis.
[0033] Step S2.2.2: Perform connected component analysis on the candidate light spot regions, and filter them based on the area characteristics, geometric shape characteristics and optical response characteristics of each connected component to remove tunnel lining background texture, reflective noise and non-target bright spots; Step S2.2.3: Calculate the sub-pixel level coordinates of the center points of the laser spots corresponding to the first camera 2 and the second camera 3 using either the gray-scale centroid method or the ellipse fitting method. The gray-scale centroid method determines the center point of the laser spot based on the weighted average of the gray values of each pixel within the laser spot area. The ellipse fitting method obtains the center of an ellipse by fitting the edge contour of the laser spot and uses the center of the ellipse as the center point of the laser spot.
[0034] Step S2.3: Perform distortion correction and epipolar correction on the preprocessed images corresponding to the first camera 2 and the second camera 3 according to the binocular system parameters to obtain a corrected binocular image in which the center point of the laser spot is located on the same horizontal epipolar line; wherein, the binocular system parameters include the camera internal parameters and camera external parameters obtained by calibration. The camera internal parameters include focal length, principal point coordinates and distortion coefficients. The principal point coordinates are the coordinates of the intersection of the camera optical axis and the imaging plane in the image coordinate system. The camera external parameters include rotation matrix R and translation vector T. Step S2.4: Using the actively projected laser spot as the strong feature point for binocular matching, the parallax between the first camera 2 and the second camera 3 is calculated based on the difference in the abscissa of the center point of the corresponding laser spot in the first camera 2 and the second camera 3, thereby reducing the impact of weak texture, low illumination or repetitive natural texture of the tunnel lining on the matching accuracy. Step S2.5: Based on the principle of triangulation, the three-dimensional coordinates of spatial points within the local neighborhood to be measured are calculated according to the parallax of the first camera 2 and the second camera 3 and the parameters of the binocular system, and a local 3D point cloud of the local neighborhood to be measured is generated; the specific formula for the three-dimensional coordinates of any spatial point P within the local neighborhood to be measured is as follows: ; ; ; in: O 2 These are the subpixel-level coordinates of the center point of the laser spot corresponding to the first camera 2; O 3 These are the subpixel-level coordinates of the center point of the laser spot corresponding to the second camera 3; , and These are the X-axis, Y-axis, and Z-axis coordinates of any spatial point P within the local neighborhood to be measured; Focal length; The baseline length is the distance between the optical centers of the first camera 2 and the second camera 3. For parallax, ; and These are the principal point coordinates of the first camera 2, that is, the coordinates of the intersection of the optical axis of the first camera 2 and the imaging plane in the image coordinate system.
[0035] III. Fitting a local surface to determine the normal and distance. L and angle of incidence α Step S3: Based on the three-dimensional coordinates of the laser spot in space, use the standard method of least squares-point cloud plane fitting to solve for the true normal, the actual perpendicular distance L, and the actual incident angle α; see [link to relevant documentation]. Figure 3 Step S3 includes: Step S3.1: Using the three-dimensional coordinates of the laser spot in space as the center, the real plane equation or real surface equation of the local neighborhood to be measured is obtained in real time by using the least squares method to fit the local 3D point cloud of the local area to be measured. Step S3.2: Based on the normal vector of the optical axis direction of laser point source 1 and the equation of the real plane or the equation of the real surface. The true angle of incidence is calculated. α Based on the optical center coordinates, three-dimensional coordinates of the light spot, and normal vector of the first camera 2, the actual perpendicular distance from the optical center to the fitting surface is calculated. L .
[0036] In actual tunnels in service, the actual contours often deviate from theoretical design drawings. This embodiment does not rely on theoretical models, but instead uses the extracted 3D coordinates of the light spot as the center and employs the least squares method to fit the true plane or surface equation of the region in real time using 3D point cloud data of the local neighborhood. In this embodiment, the fitted plane equation is: This directly determines the unit normal vector of the real surface. Based on the optical axis direction and normal vector of laser point source 1 The true angle of incidence, unaffected by structural deformation, is calculated. Simultaneously, based on the coordinates of the optical center, the three-dimensional coordinates of the light spot, and the normal vector, the actual vertical distance L from the optical center to the fitted surface is calculated.
[0037] IV. Calculate the theoretical physical size of the light spot; identify the light spot in the image and determine the pixel size; calculate the pixel-to-physical scale. See Figure 4 and Figure 5 When the laser beam strikes the planar wall perpendicularly or obliquely, the light spot appears as an ellipse. Step S4: Calculate the theoretical physical size of the laser spot on the lining surface based on the actual vertical distance L, the actual incident angle α, and the inherent parameters of the laser point source 1. Extract the major axis pixel length of the laser spot from a single image captured by the first camera 2 or the second camera 3. Compare the theoretical physical size with the major axis pixel length to construct a pixel-physical scale. Step S4 includes: Based on actual vertical distance L Actual angle of incidence α And the laser spot size varies with the actual vertical distance of propagation. L and beam divergence angle θ The changing relationship (i.e., the spatial propagation and diffusion mechanism of semiconductor lasers) is used to calculate the theoretical physical dimensions of the laser spot on the lining surface; wherein, the inherent parameters of the laser point source 1 include the initial beam diameter. D 0 and beam divergence angle θ ; Calculate the theoretical physical dimensions of the laser spot on the lining surface (in this embodiment, the theoretical major axis dimension), specifically including: ① Based on the actual vertical distance of laser spot size during propagation L and beam divergence angle θ The diameter of the laser spot after propagating the actual vertical distance L is calculated based on the changing relationship. The specific formula is as follows: ; ② Based on the diameter of the laser spot after traveling the actual vertical distance L. The major axis diameter of the elliptical laser spot on the tunnel lining surface was calculated from the actual incident angle α. The major axis diameter is taken as the theoretical physical size of the laser spot on the lining surface, and the specific formula is as follows: ; In this embodiment, the major axis diameter is taken. As a theoretical physical dimension used in subsequent scale calculations, it is more sensitive to changes in the incident angle and thus offers higher calibration accuracy. For applications requiring even higher precision, a Gaussian beam propagation model can be used for accurate calculations.
[0038] The length of the major axis pixel of the laser spot in the corresponding preprocessed image is calculated using an ellipse fitting method based on the preprocessed image corresponding to the first camera 2 or the second camera 3. The ellipse fitting method involves fitting an ellipse to the edge contour points of the laser spot and using the major axis of the fitted ellipse as the length of the major axis pixel of the laser spot. The calculation of the physical pixel size (the major axis size in this embodiment) of the laser spot in the corresponding preprocessed image specifically includes: ① The image containing the laser spot is obtained by identifying and extracting the preprocessed image corresponding to the first camera 2 or the second camera 3 through an image processing algorithm; ② Using the sub-pixel level coordinates of the center point of the laser spot calculated in step S2.2, determine the laser spot region to be fitted on the image containing the laser spot with the center point of the laser spot as the center; ③ Based on the laser spot region to be fitted, the major axis pixel length of the spot, i.e., the pixel physical size, is extracted using the ellipse fitting method. .
[0039] In this embodiment, the first camera 2 and the second camera 3 simultaneously acquire images, which are then used together to calculate the three-dimensional spatial coordinates of the laser spot based on the principle of binocular vision triangulation, without the need for external physical calibration objects, in order to obtain the actual vertical distance. L Compared with the actual angle of incidence α Based on this, a single image captured by the first camera 2 is selected as the main image for identifying the pixel size of the laser spot, establishing a pixel-physical scale, and subsequent disease identification and size quantization. The two cameras work together to complete "spatial positioning," while a single camera completes "two-dimensional measurement." Together, they achieve high-precision quantitative measurement without the need for external calibration objects.
[0040] The pixel-physical scale of the preprocessed image in a local region is obtained by comparing the theoretical physical size of the laser spot with the physical size of the pixel. The specific formula is as follows: .
[0041] V. Identify diseases and convert their physical dimensions, then output quantitative results. Step S5: Analyze the same single image used in Step S4 to extract the major axis pixel length of the laser spot using the defect identification model to identify the defect area and obtain the pixel outline size of the defect area; multiply the pixel outline size of the defect area by the pixel-physical scale to obtain the absolute physical size of the defect area, and output the visual measurement result of the tunnel surface defect. In this embodiment, the defect identification model uses an existing deep learning model.
[0042] In this embodiment, the laser point source 1 uses a collimated semiconductor laser with an initial beam diameter ofD 0 Typical value is 1-2mm, beam divergence angle θ Typical values are 1-2 mrad. These inherent parameters are determined during the system design phase and stored as known quantities in the data processing and control unit. In this embodiment, L =5m, α =30°, inherent parameters of the laser D 0 =1.5mm, θ =1.5mrad, the minor axis is calculated. D b =9mm, long axis D a =10.4mm. Meanwhile, in the camera image, the major axis of the ellipse fitted occupies 104 pixels (converted from the original example's scale), therefore the current dynamic scale is... =10.4mm / 104 pixels = 0.1mm / pixel. Assuming the maximum pixel width of the crack in the image is 23 pixels, multiplying it by the scale bar of 0.1mm / pixel gives the actual maximum width of the crack as 2.3mm.
[0043] This embodiment can achieve automated and high-precision quantitative measurement of surface defects in tunnel lining without any external calibration objects, and is especially suitable for detection scenarios of curved lining surfaces.
[0044] Example 2: This embodiment provides a visual measurement device for tunnel surface defects, which includes: A wall-climbing robot capable of walking along the surface of tunnel lining; A rigid mounting bracket is provided on the wall-climbing robot; Laser point source 1 is mounted on the rigid mounting bracket and is used to project a collimated laser cursor onto the local neighborhood to be measured. The first camera 2 and the second camera 3 are respectively fixedly mounted on the rigid mounting bracket. The optical axes of the first camera 2 and the second camera 3 are parallel, and the optical axis of the laser point source 1 is parallel to or at a fixed angle to the optical axis of the first camera 2. The data processing and control unit is electrically connected to the laser point source 1, the first camera 2, and the second camera 3, respectively, and is used to execute the visual measurement method for tunnel surface defects as described above. The data processing and control unit integrates a local point cloud adaptive surface fitting module, an active laser optical projection deformation analysis module, a deep learning defect identification module, and a physical scale conversion module. The tunnel surface defect visual measurement device is installed inside a wall-climbing robot, which takes pictures of the defects starting from the tunnel wall. The data processing and control unit is electrically connected to each component of the system via cables to control synchronous operation, execute the calculation algorithm, and output quantization results.
[0045] In this embodiment, the visual measurement device for tunnel surface defects may also include a carrier platform for mobile scanning, such as a rail-mounted inspection vehicle, a wall-climbing robot, or a drone, to achieve continuous automated inspection of long tunnels.
[0046] In this embodiment, the data processing and control unit can be integrated into an embedded computer on the carrier platform, or the collected data can be transmitted to a remote server for processing via wireless communication.
[0047] In this embodiment, to improve the matching accuracy of the system in areas with weak textures, an auxiliary lighting source can be added near the first camera 2 and the second camera 3.
[0048] In this embodiment, the laser point source 1 can use lasers of different wavelengths to enhance the contrast between the light spot and the tunnel background, which facilitates image recognition.
[0049] Since the tunnel surface defect visual measurement device includes the tunnel surface defect visual measurement method as described above, the tunnel surface defect visual measurement device has all the beneficial effects of the tunnel surface defect visual measurement method described above, which will not be elaborated here.
[0050] Example 3: This embodiment provides a readable storage medium storing computer program instructions, which, when executed by a processor, implement the visual measurement method for tunnel surface defects as described above.
[0051] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0052] Example 4: This embodiment includes an electronic device, comprising: at least one processor, at least one memory, and computer program instructions stored in the memory, wherein the computer program instructions are executed by the processor to perform the visual measurement method for tunnel surface defects as described above.
[0053] For example, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the electronic device.
[0054] The electronic device can be a mobile phone, desktop computer, laptop, handheld computer, cloud server, or other computing device. The electronic device may include, but is not limited to, processors and memory. For example, the electronic device may also include input / output devices, network access devices, buses, etc.
[0055] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the electronic device, connecting all parts of the electronic device via various interfaces and lines.
[0056] The memory can be used to store the computer program and / or modules. The processor implements the computer program by running or executing the computer program and / or modules stored in the memory, and by calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital card (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0057] If the modules / units integrated in the electronic device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. The above descriptions are merely preferred embodiments of the present invention and do not limit the scope of the present invention. Any equivalent structural transformations made based on the inventive concept of the present invention and the description and drawings of the present invention, or direct / indirect applications in other related technical fields, are included within the protection scope of the present invention.
Claims
1. A method for visually measuring surface defects in tunnels, characterized in that, Includes the following steps: Step S1: Control the laser point source (1) to actively project a collimated laser spot onto the local neighborhood to be measured on the surface of the tunnel lining, and simultaneously trigger the first camera (2) and the second camera (3) to acquire a binocular image of the tunnel surface containing the laser spot. Step S2: Perform stereo matching on the laser spot in the acquired binocular image, and calculate the three-dimensional coordinates of the laser spot in space based on the principle of triangulation; Step S3: Based on the three-dimensional coordinates of the laser spot in space, use the standard method of least squares-point cloud plane fitting to solve for the true normal, the actual vertical distance L, and the actual incident angle α. Step S4: Calculate the theoretical physical size of the laser spot on the lining surface based on the actual vertical distance L, the actual incident angle α and the inherent parameters of the laser point source (1), and extract the long axis pixel length of the laser spot from a single image acquired by the first camera (2) or the second camera (3). Compare the theoretical physical size with the long axis pixel length to construct a pixel-physical scale. Step S5: Analyze the same single image used in Step S4 to extract the long axis pixel length of the laser spot using the disease identification model, identify the disease area and obtain the pixel outline size of the disease area; multiply the pixel outline size of the disease area with the pixel-physical scale to obtain the absolute physical size of the disease area, and output the visual measurement results of the tunnel surface disease.
2. The method for visually measuring tunnel surface defects according to claim 1, characterized in that, Step S1 includes: Step S1.1: Rigidly and fixedly connect the laser point source (1), the first camera (2), and the second camera (3) to form an integrated disease measurement device; wherein: the optical axis of the laser point source (1) is parallel to or at a fixed angle to the optical axis of the first camera (2); Step S1.2: Control the laser point source (1) to actively project a collimated laser spot onto the local neighborhood to be tested on the tunnel lining surface; synchronously trigger the first camera (2) and the second camera (3) to acquire binocular images of the tunnel surface containing the laser spot and the surrounding disease area; wherein: the binocular images of the tunnel surface include a single image acquired by the first camera (2) and a single image acquired by the second camera (3).
3. The method for visually measuring tunnel surface defects according to claim 2, characterized in that, Step S2 includes: Step S2.1: Perform grayscale conversion, filtering and noise reduction, and adaptive threshold segmentation on the single image acquired by the first camera (2) and the single image acquired by the second camera (3) respectively to obtain the preprocessed images corresponding to the first camera (2) and the second camera (3); Step S2.2: Based on the region where the laser spot is located, calculate the sub-pixel level coordinates of the center point of the laser spot corresponding to the first camera (2) and the second camera (3) using the gray centroid method or the ellipse fitting method respectively; Step S2.3: Perform distortion correction and epipolar correction on the preprocessed images corresponding to the first camera (2) and the second camera (3) according to the binocular system parameters to obtain the corrected binocular image with the center point of the laser spot located on the same horizontal epipolar line; wherein, the binocular system parameters include the camera internal parameters and camera external parameters obtained by calibration, the camera internal parameters include focal length, principal point coordinates and distortion coefficients, the principal point coordinates are the coordinates of the intersection of the camera optical axis and the imaging plane in the image coordinate system, and the camera external parameters include rotation matrix R and translation vector T; Step S2.4: Using the actively projected laser spot as the strong feature point for binocular matching, calculate the parallax between the first camera (2) and the second camera (3) based on the difference in the abscissa of the center point of the corresponding laser spot in the first camera (2) and the second camera (3); Step S2.5: Based on the principle of triangulation, the three-dimensional coordinates of spatial points in the local neighborhood to be measured are calculated according to the parallax of the first camera (2) and the second camera (3) and the parameters of the binocular system, and a local 3D point cloud of the local neighborhood to be measured is generated; the specific formula for the three-dimensional coordinates of any spatial point in the local neighborhood to be measured is as follows: ; ; ; in: The subpixel-level coordinates of the center point of the laser spot corresponding to the first camera (2); The subpixel-level coordinates of the center point of the laser spot corresponding to the second camera (3); , and These are the X-axis, Y-axis, and Z-axis coordinates of any spatial point within the local neighborhood to be measured; Focal length; The baseline length is the distance between the optical centers of the first camera (2) and the second camera (3); For parallax, ; and These are the principal point coordinates of the first camera (2), that is, the coordinates of the intersection of the optical axis of the first camera (2) and the imaging plane in the image coordinate system.
4. The method for visually measuring tunnel surface defects according to claim 3, characterized in that, Step S2.2 specifically includes: Step S2.2.1: In the preprocessed images corresponding to the first camera (2) and the second camera (3), candidate spot regions are determined based on the brightness characteristics, color characteristics or wavelength response characteristics of the laser spot; Step S2.2.2: Perform connected component analysis on the candidate light spot regions, and filter them based on the area characteristics, geometric shape characteristics and optical response characteristics of each connected component to remove tunnel lining background texture, reflective noise and non-target bright spots; Step S2.2.3: Calculate the sub-pixel level coordinates of the center points of the laser spots corresponding to the first camera (2) and the second camera (3) using the gray-scale centroid method or the ellipse fitting method respectively; wherein, the gray-scale centroid method determines the center point of the laser spot based on the weighted average of the gray values of each pixel in the laser spot area, and the ellipse fitting method obtains the ellipse center by fitting the edge contour of the laser spot and takes the ellipse center as the center point of the laser spot.
5. The method for visually measuring tunnel surface defects according to claim 4, characterized in that, Step S3 includes: Step S3.1: Using the three-dimensional coordinates of the laser spot in space as the center, the real plane equation or real surface equation of the local neighborhood to be measured is obtained in real time by using the least squares method to fit the local 3D point cloud of the local area to be measured. Step S3.2: Based on the optical axis direction of the laser point source (1) and the normal vector of the real plane equation or the real surface equation... The true angle of incidence is calculated. α Based on the optical center coordinates, three-dimensional coordinates of the light spot, and normal vector of the first camera (2), the actual vertical distance from the optical center to the fitting surface is calculated. L .
6. The method for visually measuring tunnel surface defects according to claim 5, characterized in that, Step S4 includes: Based on actual vertical distance L Actual angle of incidence α And the laser spot size varies with the actual vertical distance of propagation. L and beam divergence angle θ The changing relationship is used to calculate the theoretical physical dimensions of the laser spot on the lining surface; where the inherent parameters of the laser point source (1) include the initial beam diameter. D 0 and beam divergence angle θ ; The length of the major axis pixel of the laser spot in the corresponding preprocessed image is calculated by ellipse fitting method based on the preprocessed image corresponding to the first camera (2) or the second camera (3); wherein, the ellipse fitting method is to fit the edge contour points of the laser spot to an ellipse and take the major axis of the fitted ellipse as the length of the major axis pixel of the laser spot. The pixel-physical scale of the preprocessed image in a local region is obtained by comparing the theoretical physical size of the laser spot with the physical size of the pixel. .
7. The method for visually measuring tunnel surface defects according to claim 6, characterized in that, Calculate the theoretical physical dimensions of the laser spot on the lining surface, specifically including: ① Based on the actual vertical distance of laser spot size during propagation L and beam divergence angle θ The diameter of the laser spot after propagating the actual vertical distance L is calculated based on the changing relationship. The specific formula is as follows: ; ② Based on the diameter of the laser spot after traveling the actual vertical distance L. The major axis diameter of the elliptical laser spot on the tunnel lining surface is calculated from the actual incident angle α, and this major axis diameter is taken as the theoretical physical size of the laser spot on the lining surface. The specific formula is as follows: ; Calculate the physical pixel size of the laser spot in the corresponding preprocessed image, specifically including: ① The image containing the laser spot is obtained by identifying and extracting the preprocessed image corresponding to the first camera (2) or the second camera (3) through an image processing algorithm; ② Using the sub-pixel level coordinates of the center point of the laser spot calculated in step S2.2, determine the laser spot region to be fitted on the image containing the laser spot with the center point of the laser spot as the center; ③ Based on the laser spot region to be fitted, the long axis pixel length of the spot, i.e. the pixel physical size, is extracted using the ellipse fitting method.
8. A visual measurement device for tunnel surface defects, characterized in that, The visual measurement device for tunnel surface defects includes: A wall-climbing robot capable of walking along the surface of tunnel lining; A rigid mounting bracket is provided on the wall-climbing robot; A laser point source (1) is set on the rigid mounting bracket and is used to project a collimated laser cursor onto the local neighborhood to be measured. The first camera (2) and the second camera (3) are respectively fixedly mounted on the rigid mounting bracket. The optical axes of the first camera (2) and the second camera (3) are parallel, and the optical axis of the laser point source (1) is parallel to or at a fixed angle to the optical axis of the first camera (2). The data processing and control unit is electrically connected to the laser point light source (1), the first camera (2) and the second camera (3) respectively, and is used to perform the visual measurement method for tunnel surface defects as described in any one of claims 1 to 7.
9. A readable storage medium, characterized in that, It stores computer program instructions, which, when executed by a processor, implement the visual measurement method for tunnel surface defects as described in any one of claims 1 to 7.
10. An electronic device, characterized in that, include: The method for visual measurement of tunnel surface defects as described in any one of claims 1 to 7 includes at least one processor, at least one memory, and computer program instructions stored in the memory, which are executed by the processor when the computer program instructions are executed.