Crack recognition method based on tunnel surrounding rock images
Through dual-band image fusion and spectral compensation technology, the problems of dust obscuration and misjudgment in complex background in the identification of tunnel surrounding rock cracks were solved, high-reliability crack extraction and structure reconstruction were achieved, and the accuracy and stability of identification were improved.
Patent Information
- Application Number
- CN202511022844.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-24
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2045-07-24
AI Technical Summary
Existing image-based methods for identifying cracks in tunnel surrounding rocks suffer from problems such as local image distortion, complex structural textures leading to misjudgment, and difficulty in stably identifying real cracks in high-dust environments.
Dual-band image fusion technology is used to synchronously acquire visible light and near-infrared images, calculate the curvature gradient entropy map, construct the dust mask map, and perform spectral compensation. Combined with morphological skeleton extraction and breakpoint connection, crack identification is achieved.
Accurately identify dust-obstructed areas, improve image quality and processing robustness, stably identify cracks in tunnel surrounding rocks, and provide automatic identification solutions.
Smart Images

Figure CN120526153B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing and geotechnical engineering monitoring, and in particular to a crack recognition method for tunnel surrounding rock images. Background Art
[0002] Identifying cracks in the surrounding rock of roadways is a key step in geological hazard warning and support structure design in coal mines, hydropower tunnels, and underground projects. Traditional methods rely mainly on manual observation, point ultrasonic or electrical detection, but these methods suffer from limited coverage, low detection efficiency, and strong dependence on the working environment. With the development of image processing and multispectral imaging technologies, image-based crack identification has gradually become a mainstream trend, especially in low-light and high-dust environments. Dual-band image fusion methods that combine visible light and near-infrared imaging have shown good application prospects.
[0003] However, existing image-based crack recognition methods often face three key technical bottlenecks: first, they cannot accurately suppress local image distortion caused by dust obscuration, resulting in discontinuous crack structure extraction; second, the complex structural textures in the image make traditional edge detection sensitive to noise, which can easily lead to false crack detection; and third, it is difficult to stably identify real cracks in complex backgrounds. Therefore, to address these issues, a crack recognition method for tunnel surrounding rock images is proposed. Summary of the Invention
[0004] Based on the above objectives, the present invention provides a crack recognition method for tunnel surrounding rock images.
[0005] The crack recognition method of tunnel surrounding rock images includes the following steps:
[0006] S1: Synchronously acquire visible light and near-infrared images of the tunnel surrounding rock, and perform spatiotemporal alignment to generate a registered dual-band image;
[0007] S2: Based on the visible light image in the registered dual-band image, the multi-directional gradient distribution dispersion of each pixel is calculated to generate a curvature gradient entropy map;
[0008] S3: Based on the local extreme value distribution of the curvature gradient entropy map and the dust penetration characteristics of the near-infrared image, a dust mask map is constructed;
[0009] S4: Spectral compensation is performed on the area covered by the dust mask, and the crack confidence is calculated pixel by pixel based on the negative correlation between curvature gradient entropy and near-infrared penetration depth;
[0010] S5: Adaptive threshold segmentation is performed on the crack confidence to generate a primary crack binary map;
[0011] S6: Perform morphological skeleton extraction and breakpoint connection on the primary fracture binary image, and output the tunnel surrounding rock fracture identification map.
[0012] Optionally, the S1 specifically includes:
[0013] S11: A dual-channel imaging device is used to synchronously scan the surrounding rock area of the tunnel. By setting a coaxial beam splitter, the incident light is divided into the visible light band and the near-infrared band. The light enters the visible light sensor and the near-infrared sensor through the corresponding band filters, realizing the synchronous acquisition of visible light images and near-infrared images.
[0014] S12: Based on the pre-calibrated spatial reference control points, the spatial coordinate differences between the visible light image and the near-infrared image are corrected to make the two images consistent in spatial scale and position;
[0015] S13: Based on the synchronous clock signal during image acquisition, the visible light image and the near-infrared image are time-aligned by the timestamp interpolation method to achieve the spatiotemporal consistency of the dual-band images;
[0016] S14: The spatially corrected and temporally aligned visible light image and near-infrared image are fused pixel by pixel to output a registered dual-band image.
[0017] Optionally, the S2 specifically includes:
[0018] S21: Extract the grayscale channel of the visible light image from the registered dual-band image and perform blurring on it to suppress noise interference;
[0019] S22: With each pixel as the center, the Sobel operator is used to calculate the local gradient amplitude of the pixel in the four directions of 0°, 45°, 90° and 135° to form a multi-directional gradient vector set;
[0020] S23: normalizing the directional gradient magnitudes in the multi-directional gradient vector set to form a gradient probability distribution in each direction;
[0021] S24: Based on the normalized directional probability distribution, the information entropy formula is used to calculate the dispersion of the multi-directional gradient distribution of the corresponding pixel as an indicator of the complexity of the crack structure;
[0022] S25: Traverse all pixel points in the entire image, record the corresponding gradient entropy values, reconstruct the original image into a two-dimensional image matrix according to the pixel position, and output the curvature gradient entropy map.
[0023] Optionally, the S3 specifically includes:
[0024] S31: Based on the curvature gradient entropy map generated in S2, the curvature gradient entropy map is scanned by a local extreme value detection algorithm to determine all local maximum pixel positions in the entropy value space distribution to form a set of entropy extreme value candidate points;
[0025] S32: Perform spatial density cluster analysis on the set of entropy extreme value candidate points to screen out areas where the pixel density is higher than a set threshold and mark them as potential dust interference areas;
[0026] S33: utilizing the characteristic that the near-infrared image has high transmittance in the dust area, extracting the high transmittance pixel area in the near-infrared image, and generating an initial dust transmittance feature map by binarization processing;
[0027] S34: performing a logical AND operation on the potential dust interference area map and the dust transmission characteristic map to generate a superimposed dust area binary map;
[0028] S35: performing closed connected domain filling processing on the dust area binary image, and outputting the final dust mask image.
[0029] Optionally, the S33 specifically includes:
[0030] S331: Convert the near-infrared image in the registered dual-band image to grayscale, retaining its grayscale value information reflecting the brightness difference of different light-transmitting areas on the surface of the tunnel surrounding rock, and forming a near-infrared grayscale image.
[0031] S332: performing a local brightness normalization operation on the near-infrared grayscale image;
[0032] S333: Using the normalization result, determine that all pixels with brightness values higher than the average brightness area are potential high transmittance areas;
[0033] S334: Assign a value of 1 to the pixel positions that meet the high transmission judgment condition, and assign a value of 0 to the remaining pixel positions, thereby constructing a binary image of the initial dust transmission feature.
[0034] Optionally, the S34 specifically includes:
[0035] S341: Perform pixel-level registration on the potential dust interference area map obtained in S32 and the dust transmission feature map generated in S33 to ensure that the two maps are completely consistent in spatial dimension, resolution and coordinate system;
[0036] S342: Based on a pixel-by-pixel logic judgment mechanism, the two binary images are sequentially traversed, and a Boolean AND operation is performed on corresponding pixels, retaining only pixels that are identified as both extreme interference areas and high transmittance areas;
[0037] S343: Construct the result of the logical AND operation into a binary image with the same size as the input image to obtain a binary image of the dust area.
[0038] Optionally, the S4 specifically includes:
[0039] S41: Based on the dust mask image generated in S3, mark all positions where the pixel value is 1 as the area to be compensated;
[0040] S42: With the pixel in the area to be compensated as the center, select the near-infrared grayscale value of the pixel in the non-mask area in the neighborhood, and use the bilinear interpolation method to perform grayscale compensation on the area to be compensated to obtain the compensated local grayscale value ;
[0041] S43: Using the compensated near-infrared grayscale value , calculate the corresponding near-infrared penetration depth pixel by pixel and normalize it to a unified dimension; the calculation formula for the penetration depth is: ,in, is the near-infrared penetration depth; is the near-infrared grayscale value after spectral compensation; and are the maximum and minimum near-infrared grayscale values of the non-masked area in the image, respectively;
[0042] S44: Based on the negative correlation between the curvature gradient entropy value obtained in S2 and the near-infrared penetration depth calculated in S43, a pixel-level crack confidence evaluation model is established to calculate the crack confidence pixel by pixel;
[0043] S45: Combine the crack confidences of all pixels into a complete two-dimensional matrix to output a crack confidence map.
[0044] Optionally, the expression of the pixel-level crack confidence evaluation model is:
[0045] ,in, is the crack confidence; is the entropy value of the corresponding pixel in the curvature gradient entropy map; is the near-infrared penetration depth; 、 is the preset weight coefficient and satisfies .
[0046] Optionally, the S5 specifically includes:
[0047] S51: Based on the crack confidence map, the confidence values of all pixels in the entire image are counted to construct a confidence histogram;
[0048] S52: Based on the confidence distribution characteristics, the skewness coefficient and standard deviation are combined to dynamically adjust the threshold benchmark to generate an image-specific fissure confidence adaptive segmentation threshold. ;
[0049] S53: Traverse all pixels in the crack confidence map and segment according to the adaptive segmentation threshold , assign pixels with confidence greater than the threshold value to 1, and the rest to 0, forming the initial binary crack map;
[0050] S54: Perform an 8-neighborhood connected domain labeling operation in the initial binary image, identify all closed connected structures with a predetermined area, retain morphologically complete crack regions, and output a primary crack binary image.
[0051] Optionally, the S6 specifically includes:
[0052] S61: Perform morphological skeleton extraction on the primary crack binary image, gradually remove edge pixels of the crack area, retain the central skeleton pixels, and obtain the crack main axis with a single pixel width;
[0053] S62: Detecting pixel points with a connection number of 1 in the skeleton image as breakpoints, and using a shortest path search algorithm to connect adjacent breakpoints in the original crack area to form a breakpoint connection path;
[0054] S63: Superimpose the breakpoint connection path onto the skeleton diagram and output the tunnel surrounding rock crack identification map.
[0055] Beneficial effects of the present invention:
[0056] The present invention, by constructing and registering dual-band images and combining curvature gradient entropy analysis with near-infrared dust penetration characteristics, can accurately identify dust-obscured areas and perform spectral compensation and repair, effectively solving the problems of structural fractures and misjudgments in high-dust tunnels caused by traditional image crack recognition, and improving the integrity of image quality and the robustness of processing.
[0057] The present invention establishes a pixel-level crack confidence evaluation model and combines it with morphological skeleton extraction and breakpoint connection mechanism to achieve continuous extraction and structural reconstruction of high-confidence crack targets in complex structural backgrounds, providing a stable and reliable image recognition solution for the automatic identification of cracks in tunnel surrounding rocks. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only for the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0059] Figure 1 Schematic diagram of a crack identification method according to an embodiment of the present invention;
[0060] Figure 2 Schematic diagram of the process of constructing a dust mask according to an embodiment of the present invention. DETAILED DESCRIPTION
[0061] References in the specification to "one embodiment," "an embodiment," "exemplary embodiments," "some embodiments," etc. indicate that the described embodiments may include a particular feature, structure, or characteristic, but not every embodiment necessarily includes that particular feature, structure, or characteristic. In addition, when a particular feature, structure, or characteristic is described in conjunction with an embodiment, it is within the knowledge of persons skilled in the relevant art to implement that feature, structure, or characteristic in conjunction with other embodiments (whether or not explicitly described).
[0062] In general, terms can be understood, at least in part, from their use in context. For example, depending at least in part on the context, the term "one or more" as used herein can be used to describe any feature, structure, or characteristic in the singular sense, or can be used to describe a combination of features, structures, or characteristics in the plural sense. Additionally, the term "based on" can be understood as not necessarily intended to convey an exclusive set of factors, but can instead, depending at least in part on the context, allow for the presence of other factors that are not necessarily explicitly described.
[0063] like Figure 1-Figure 2 As shown in FIG, the crack recognition method of the tunnel surrounding rock image includes the following steps:
[0064] S1: Synchronously acquire visible light and near-infrared images of the tunnel surrounding rock, and perform spatiotemporal alignment to generate a registered dual-band image;
[0065] S1 specifically includes:
[0066] S11: A dual-channel imaging device is used to synchronously scan the surrounding rock area of the tunnel. By setting a coaxial beam splitter, the incident light is divided into the visible light band and the near-infrared band. The light enters the visible light sensor and the near-infrared sensor through the corresponding band filters, realizing the synchronous acquisition of visible light images and near-infrared images.
[0067] S12: Based on the pre-calibrated spatial reference control points, the spatial coordinate differences between the visible light image and the near-infrared image are corrected to make the two images consistent in spatial scale and position;
[0068] S13: Based on the synchronous clock signal during image acquisition, the visible light image and the near-infrared image are time-aligned by the timestamp interpolation method to achieve the spatiotemporal consistency of the dual-band images;
[0069] S14: The spatially corrected and temporally aligned visible light image and near-infrared image are fused pixel by pixel, and a registered dual-band image is output for subsequent analysis. Through the above method, the precise synchronous acquisition and high-precision registration of the visible light image and the near-infrared image are achieved, ensuring that the subsequent crack identification accuracy is effectively improved.
[0070] S2: Based on the visible light image in the registered dual-band image, the multi-directional gradient distribution dispersion of each pixel is calculated to generate a curvature gradient entropy map;
[0071] S2 specifically includes:
[0072] S21: Extract the grayscale channel of the visible light image from the registered dual-band image and perform blurring on it to suppress noise interference and enhance the continuity of the structure edge;
[0073] S22: With each pixel as the center, the Sobel operator is used to calculate the local gradient amplitude of the pixel in the four directions of 0°, 45°, 90° and 135° to form a multi-directional gradient vector set;
[0074] The above gradient amplitude calculation formula is as follows: ,in, Indicates the The gradient magnitude in each direction; Respectively represent the The gradient components of the image in the horizontal and vertical directions; direction Values include Four fixed directions;
[0075] S23: Normalize the directional gradient magnitudes in the multi-directional gradient vector set to form a gradient probability distribution in each direction; the corresponding normalization formula is as follows: ,in, Indicates the Gradient distribution probability in each direction; Indicates the The gradient magnitude in each direction; It is the sum of the gradient amplitudes in the four directions of the pixel, which is used for normalization processing;
[0076] S24: Based on the normalized directional probability distribution, the information entropy formula is used to calculate the dispersion of the multi-directional gradient distribution of the corresponding pixel as an indicator of the complexity of the crack structure; the corresponding entropy value calculation formula is as follows:
[0077] ,in, Represents the local curvature gradient entropy value of the pixel corresponding to the image; Indicates the Normalized gradient probability in each direction;
[0078] S25: Traverse all pixel points in the entire image, record the corresponding gradient entropy values, reconstruct the original image into a two-dimensional image matrix according to the pixel positions, and output the curvature gradient entropy map; the above steps extract local gradients in multiple fixed directions and calculate their distribution discreteness, introducing the information entropy mechanism to effectively measure the structural complexity of the pixel neighborhood in the surrounding rock image; the curvature gradient entropy map can accurately reflect the high directional uncertainty area of the crack edge, providing a highly robust and noise-tolerant image feature foundation for the subsequent crack identification process.
[0079] S3: Based on the local extreme value distribution of the curvature gradient entropy map and the dust penetration characteristics of the near-infrared image, a dust mask map is constructed;
[0080] S3 specifically includes:
[0081] S31: Based on the curvature gradient entropy map generated in S2, the curvature gradient entropy map is scanned by a local extreme value detection algorithm to determine all local maximum pixel positions in the entropy value space distribution to form a set of entropy extreme value candidate points;
[0082] The steps of scanning the curvature gradient entropy map by the local extreme value detection algorithm in S31 are as follows:
[0083] S311: For each pixel in the curvature gradient entropy map, a two-dimensional neighborhood window of a fixed size is constructed with the pixel as the center, and the window is used to determine the extreme value attribute of the pixel in the local range;
[0084] S312: extracting the entropy values of all pixels within the window where the pixel is located to form a local entropy value set including the central pixel and its neighborhood;
[0085] S313: Compare the entropy value of the current central pixel to see if it is the maximum value in the local entropy value set, and require that the entropy value must be greater than the set global entropy lower limit threshold to eliminate high-frequency noise in the background area;
[0086] S314: If the current pixel meets the maximum value judgment condition of S313 above, the pixel coordinate position is added to the local extreme point set as input for subsequent dust interference cluster analysis.
[0087] S32: Perform spatial density cluster analysis on the set of entropy extreme value candidate points to screen out areas where the pixel density is higher than a set threshold and mark them as potential dust interference areas;
[0088] S33: utilizing the characteristic that the near-infrared image has high transmittance in the dust area, extracting the high transmittance pixel area in the near-infrared image, and generating an initial dust transmittance feature map by binarization processing;
[0089] S34: performing a logical AND operation on the potential dust interference area map and the dust transmission characteristic map to generate a superimposed dust area binary map;
[0090] S35: Perform closed connected domain filling processing on the binary image of the dust area and output the final dust mask image; through the above method, the local extreme value spatial distribution characteristics of the curvature gradient entropy map and the spectral characteristics of the near-infrared band penetrating dust are fully combined to accurately identify and mark the actual dust area, thereby providing an effective masking area for the subsequent accurate calculation of the crack confidence.
[0091] S33 specifically includes:
[0092] S331: grayscale conversion is performed on the near-infrared image in the registered dual-band image, and grayscale value information reflecting the brightness difference of different light-transmitting areas on the surface of the tunnel surrounding rock is retained to form a near-infrared grayscale image, which is used as a basis for subsequent transmittance determination;
[0093] S332: To eliminate the overall brightness offset caused by uneven ambient lighting, perform local brightness normalization on the near-infrared grayscale image to make the same structure comparable at different locations. The brightness normalization formula is:
[0094] ,in, Indicates the normalized near-infrared grayscale image at pixel The brightness value at Indicates the original near-infrared image in pixels Gray value at ; 、 Respectively expressed as The mean and standard deviation of the brightness in the local window centered at ;
[0095] S333: Using the normalization result, all pixels with brightness values higher than the average brightness area are determined to be potential high transmittance areas. The corresponding determination conditions are as follows: ,in, is the set transmittance determination threshold; pixels that meet this condition are considered to have high transmittance and may be in an area that is obscured by dust but can transmit infrared light;
[0096] S334: Assign a value of 1 to the pixel positions that meet the high transmittance judgment condition and 0 to the remaining pixels to construct a binary map of the initial dust transmission characteristics. The above steps can effectively identify areas with strong light transmittance and eliminate background interference by normalizing the local brightness of the near-infrared image and judging the transmission intensity threshold. By leveraging the physical property of the near-infrared band that has high penetration ability for dust, image areas that may be obscured by dust can be reliably extracted, providing a stable basis for dust mask construction.
[0097] S34 specifically includes:
[0098] S341: Perform pixel-level registration on the potential dust interference area map obtained in S32 and the dust transmission feature map generated in S33 to ensure that the two maps are completely consistent in spatial dimension, resolution and coordinate system;
[0099] S342: Based on a pixel-by-pixel logic judgment mechanism, the two binary images are sequentially traversed, and a Boolean AND operation is performed on corresponding pixels, retaining only pixels that are identified as both extreme interference areas and high transmittance areas;
[0100] The corresponding logical AND operation formula is as follows: ,in, Indicates the superimposed dust area binary image in pixels The final value at Represents pixels in the potential dust interference area map The binary state of Represents the pixel in the dust transmission feature map The binary state of Represents Boolean logical AND operation;
[0101] S343: Construct the result of the logical AND operation into a binary image with the same size as the input image to obtain a binary image of the dust area. The above steps can effectively cross-verify the spatial consistency of the two types of features by performing logical AND operations on the dust interference extreme value area and the infrared transmission feature area, retaining only the areas with real physical obscuration and abnormal image response, thereby significantly improving the accuracy and robustness of dust area identification and laying a high-confidence foundation for subsequent mask construction.
[0102] S4: Spectral compensation is performed on the area covered by the dust mask, and the crack confidence is calculated pixel by pixel based on the negative correlation between curvature gradient entropy and near-infrared penetration depth;
[0103] S4 specifically includes:
[0104] S41: Based on the dust mask image generated in S3, mark all positions where the pixel value is 1 as the area to be compensated;
[0105] S42: With the pixel in the area to be compensated as the center, select the near-infrared grayscale value of the pixel in the non-mask area in the neighborhood, and use the bilinear interpolation method to perform grayscale compensation on the area to be compensated to obtain the compensated local grayscale value ; The corresponding bilinear interpolation compensation formula is as follows:
[0106] ;
[0107] in, Indicates the pixel to be compensated Gray value after compensation; 、 、 、 Respectively represent the grayscale values of the four adjacent non-mask area pixels in the pixel neighborhood; 、 is the interpolation weight coefficient, ranging from 0 to 1;
[0108] S43: Using the compensated near-infrared grayscale value , calculate the corresponding near-infrared penetration depth pixel by pixel and normalize it to a unified dimension to reflect the actual dust thickness at each position in the image; the calculation formula for the penetration depth is: ,in, is the near-infrared penetration depth; is the near-infrared grayscale value after spectral compensation; and are the maximum and minimum near-infrared grayscale values of the non-masked area in the image, respectively;
[0109] S44: Based on the negative correlation between the curvature gradient entropy value obtained in S2 and the near-infrared penetration depth calculated in S43, a pixel-level crack confidence evaluation model is established to calculate the crack confidence pixel by pixel;
[0110] S45: Combine the crack confidences of all pixels into a complete two-dimensional matrix to output a crack confidence map for subsequent segmentation. The above steps can effectively eliminate the image grayscale distortion caused by dust by performing spectral compensation processing on the dust-obscured area. At the same time, combined with the negative correlation between curvature gradient entropy and near-infrared penetration depth, a pixel-level crack confidence evaluation method that integrates structural information and physical transmittance information is proposed, achieving a significant improvement in the accuracy and robustness of crack recognition under complex backgrounds.
[0111] The expression of the pixel-level crack confidence evaluation model is:
[0112] ,in, is the crack confidence; is the entropy value of the corresponding pixel in the curvature gradient entropy map; is the near-infrared penetration depth; 、 is the preset weight coefficient and satisfies .
[0113] The reason why this pixel-level crack confidence evaluation model adopts a weighted combination of curvature gradient entropy and near-infrared penetration depth is that cracks have two observable characteristics in the image: structural mutation and obvious spectral penetration, which are both physical and image properties. Curvature gradient entropy reflects the directional complexity of the local structure of the image. The crack edge is often accompanied by high directional gradient discreteness. Therefore, the higher the entropy value, the more likely it is a crack area. In near-infrared images, the reflectivity of dust-obscured areas is low, and cracks often appear as low-penetration areas, so their penetration depth is negatively correlated. By introducing The penetration feature is enhanced inversely by combining the structural entropy Weighted fusion can effectively take into account both structural information and dust impact, and achieve a robust assessment of crack confidence.
[0114] S5: Adaptive threshold segmentation is performed on the crack confidence to generate a primary crack binary map;
[0115] S5 specifically includes:
[0116] S51: Based on the crack confidence map, the confidence values of all pixels in the entire image are counted, a confidence histogram is constructed, and its mean, standard deviation, and skewness are calculated to estimate the global distribution of the confidence;
[0117] S52: Based on the confidence distribution characteristics, the skewness coefficient and standard deviation are combined to dynamically adjust the threshold benchmark to generate an image-specific fissure confidence adaptive segmentation threshold. , which is used to segment high-confidence areas to avoid false detection or missed detection caused by fixed thresholds between different images; the calculation formula is: ,in, is the global mean of the crack confidence map; is the global standard deviation; is the skewness coefficient of the crack confidence distribution; is the set weight factor, which controls the threshold sensitivity and has a value range of 0.5-2.0;
[0118] S53: Traverse all pixels in the crack confidence map and segment according to the adaptive segmentation threshold , assign pixels with confidence greater than the threshold value to 1, and the rest to 0, forming the initial binary crack map;
[0119] S54: Perform an 8-neighborhood connected domain labeling operation in the initial binary image to identify all closed connected structures with a predetermined area, retain the morphologically complete crack areas, and output a primary crack binary image; the above steps adaptively set the segmentation threshold based on the statistical characteristics of the crack confidence map, and combine it with the connected domain screening strategy to effectively avoid the stability problem caused by the fixed threshold under different image conditions, improve the adaptability and continuity of crack recognition, and ensure that subsequent skeleton extraction is based on high-quality binary input.
[0120] S6: Perform morphological skeleton extraction and breakpoint connection on the primary fracture binary image, and output the tunnel surrounding rock fracture identification map;
[0121] S6 specifically includes:
[0122] S61: Perform morphological skeleton extraction on the primary crack binary image, gradually remove the edge pixels of the crack area, retain the central skeleton pixels, and obtain the main axis of the crack with a single pixel width; the corresponding skeleton extraction formula is as follows: ,in, For the Skeleton graph after iterations; For the The iterative image is initially a crack binary image; Represents a morphological erosion operation; It is a set structural element used to control the corrosion scale;
[0123] S62: Detecting pixel points with a connection number of 1 in the skeleton image as breakpoints, and using a shortest path search algorithm to connect adjacent breakpoints in the original crack area to form a breakpoint connection path to fill the broken position in the skeleton;
[0124] The breakpoint determination formula is as follows: ,in, Pixels The number of skeleton pixels in the 8-neighborhood of ; is the pixel point in the skeleton image The value of is 1 if it is a skeleton pixel, otherwise it is 0; is the binary state of the current center pixel, which takes the value of 0 or 1; when When , it is determined to be a skeleton breakpoint;
[0125] The calculation formula for the breakpoint connection path is as follows: ,in, Represents the shortest path connecting two breakpoints; is the set of all candidate paths; For path The length of is calculated based on the Euclidean distance between pixels;
[0126] S63: The breakpoint connection path is superimposed on the skeleton diagram to output a tunnel surrounding rock crack identification map with a continuous structure and a clear centerline. The above-mentioned skeleton extraction compresses the crack structure to the geometric centerline, and at the same time combines the breakpoint connection strategy to repair the crack fracture position, effectively improving the geometric continuity and analysis stability of the crack structure.
[0127] The present invention encompasses any alternatives, modifications, equivalents, and solutions that fall within the spirit and scope of the present invention. To provide a thorough understanding of the present invention, specific details are described in detail below in connection with the preferred embodiments of the present invention, but those skilled in the art will be able to fully understand the present invention without these detailed descriptions. Furthermore, to avoid unnecessary confusion regarding the essence of the present invention, well-known methods, processes, procedures, components, and circuits have not been described in detail.
[0128] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.
Claims
1. A crack recognition method for tunnel surrounding rock images, characterized in that: The following steps are involved: S1: Synchronously acquire visible light and near-infrared images of the tunnel surrounding rock, and perform spatiotemporal alignment to generate a registered dual-band image; S2: Based on the visible light image in the registered dual-band image, the multi-directional gradient distribution dispersion of each pixel is calculated to generate a curvature gradient entropy map; S3: Based on the local extreme value distribution of the curvature gradient entropy map and the dust penetration characteristics of the near-infrared image, a dust mask map is constructed; The S3 specifically includes: S31: Based on the curvature gradient entropy map generated in S2, the curvature gradient entropy map is scanned by a local extreme value detection algorithm to determine all local maximum pixel positions in the entropy value space distribution to form a set of entropy extreme value candidate points; S32: Perform spatial density cluster analysis on the set of entropy extreme value candidate points to screen out areas where the pixel density is higher than a set threshold and mark them as potential dust interference areas; S33: utilizing the characteristic that the near-infrared image has high transmittance in the dust area, extracting the high transmittance pixel area in the near-infrared image, and generating an initial dust transmittance feature map by binarization processing; S34: performing a logical AND operation on the potential dust interference area map and the dust transmission characteristic map to generate a superimposed dust area binary map; S35: performing closed connected domain filling processing on the dust area binary image, and outputting the final dust mask image; The S33 specifically includes: S331: grayscale conversion is performed on the near-infrared image in the registered dual-band image, retaining its grayscale value information reflecting the brightness difference of different light-transmitting areas on the surface of the tunnel surrounding rock, and forming a near-infrared grayscale image; S332: performing a local brightness normalization operation on the near-infrared grayscale image; S333: Using the normalization result, determine that all pixels with brightness values higher than the average brightness area are potential high transmittance areas; S334: Assigning a value of 1 to pixel positions that meet the high transmission determination condition and 0 to the remaining pixel positions, thereby constructing an initial binary image of dust transmission characteristics; The S34 specifically includes: S341: Perform pixel-level registration on the potential dust interference area map obtained in S32 and the dust transmission feature map generated in S33 to ensure that the two maps are completely consistent in spatial dimension, resolution and coordinate system; S342: Based on a pixel-by-pixel logic judgment mechanism, the two binary images are sequentially traversed, and a Boolean AND operation is performed on corresponding pixels, retaining only pixels that are identified as both extreme interference areas and high transmittance areas; S343: constructing the result of the logical AND operation into a binary image with the same size as the input image to obtain a binary image of the dust area; S4: Spectral compensation is performed on the area covered by the dust mask, and the crack confidence is calculated pixel by pixel based on the negative correlation between curvature gradient entropy and near-infrared penetration depth; S5: Adaptive threshold segmentation is performed on the crack confidence to generate a primary crack binary map; S6: Perform morphological skeleton extraction and breakpoint connection on the primary fracture binary image, and output the tunnel surrounding rock fracture identification map.
2. The crack identification method of tunnel surrounding rock image according to claim 1 is characterized in that: Said S1 specifically includes: S11: A dual-channel imaging device is used to synchronously scan the surrounding rock area of the tunnel. By setting a coaxial beam splitter, the incident light is divided into the visible light band and the near-infrared band. The light enters the visible light sensor and the near-infrared sensor through the corresponding band filters, realizing the synchronous acquisition of visible light images and near-infrared images. S12: Based on the pre-calibrated spatial reference control points, the spatial coordinate differences between the visible light image and the near-infrared image are corrected to make the two images consistent in spatial scale and position; S13: Based on the synchronous clock signal during image acquisition, the visible light image and the near-infrared image are time-aligned by the timestamp interpolation method to achieve the spatiotemporal consistency of the dual-band images; S14: The spatially corrected and temporally aligned visible light image and near-infrared image are fused pixel by pixel to output a registered dual-band image.
3. The crack identification method of tunnel surrounding rock image according to claim 1 is characterized in that: The S2 specifically includes: S21: Extract the grayscale channel of the visible light image from the registered dual-band image and perform blurring on it to suppress noise interference; S22: With each pixel as the center, the Sobel operator is used to calculate the local gradient amplitude of the pixel in the four directions of 0°, 45°, 90° and 135° to form a multi-directional gradient vector set; S23: normalizing the directional gradient magnitudes in the multi-directional gradient vector set to form a gradient probability distribution in each direction; S24: Based on the normalized directional probability distribution, the information entropy formula is used to calculate the dispersion of the multi-directional gradient distribution of the corresponding pixel as an indicator of the complexity of the crack structure; S25: Traverse all pixel points in the entire image, record the corresponding gradient entropy values, reconstruct the original image into a two-dimensional image matrix according to the pixel position, and output the curvature gradient entropy map.
4. The crack identification method of tunnel surrounding rock image according to claim 1, characterized in that: The S4 specifically includes: S41: Based on the dust mask image generated in S3, all positions where the pixel value is 1 are marked as areas to be compensated; S42: With the pixel in the area to be compensated as the center, select the near-infrared grayscale value of the pixel in the non-mask area in the neighborhood, and use the bilinear interpolation method to perform grayscale compensation on the area to be compensated to obtain the compensated near-infrared grayscale value ; S43: Using the compensated near-infrared grayscale value , calculate the corresponding near-infrared penetration depth pixel by pixel and normalize it to a unified dimension; the calculation formula for the penetration depth is: ,in, is the near-infrared penetration depth; is the compensated near-infrared grayscale value; and are the maximum and minimum near-infrared grayscale values of the non-masked area in the image, respectively; S44: Based on the negative correlation between the curvature gradient entropy value obtained in S2 and the near-infrared penetration depth calculated in S43, a pixel-level crack confidence evaluation model is established to calculate the crack confidence pixel by pixel; S45: Combine the crack confidences of all pixels into a complete two-dimensional matrix to output a crack confidence map.
5. The crack identification method of tunnel surrounding rock image according to claim 4 is characterized in that: The expression of the pixel-level crack confidence evaluation model is: ,in, is the crack confidence; is the entropy value of the corresponding pixel in the curvature gradient entropy map; is the near-infrared penetration depth; 、 is the preset weight coefficient and satisfies .
6. The crack identification method of tunnel surrounding rock image according to claim 1, characterized in that: The S5 specifically includes: S51: Based on the crack confidence map, the confidence values of all pixels in the entire image are counted to construct a confidence histogram; S52: Based on the confidence distribution characteristics, the skewness coefficient and standard deviation are combined to dynamically adjust the threshold benchmark to generate an image-specific fissure confidence adaptive segmentation threshold. ; S53: Traverse all pixels in the crack confidence map and segment according to the adaptive segmentation threshold , assign pixels with confidence greater than the threshold value to 1, and the rest to 0, forming the initial binary crack map; S54: Perform an 8-neighborhood connected domain labeling operation in the initial binary image, identify all closed connected structures with a predetermined area, retain morphologically complete crack regions, and output a primary crack binary image.
7. The crack identification method of tunnel surrounding rock image according to claim 1, characterized in that: The S6 specifically includes: S61: Perform morphological skeleton extraction on the primary crack binary image, gradually remove edge pixels of the crack area, retain the central skeleton pixels, and obtain the crack main axis with a single pixel width; S62: Detecting pixel points with a connection number of 1 in the skeleton image as breakpoints, and using a shortest path search algorithm to connect adjacent breakpoints in the original crack area to form a breakpoint connection path; S63: Superimpose the breakpoint connection path onto the skeleton diagram and output the tunnel surrounding rock crack identification map.