Tunnel detection method based on color image
Through lighting calibration, adaptive color correction and dynamic contrast enhancement technology, combined with edge detection and machine learning algorithms, the image color distortion problem under lighting conditions in tunnel detection is solved, and efficient and reliable tunnel defect recognition and report generation is achieved.
Patent Information
- Application Number
- CN202510168009.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-17
- Publication Date
- 2025-07-11
AI Technical Summary
Under different lighting conditions, image color distortion in tunnel detection leads to defect miss detection, affecting the stability of the tunnel structure and posing a risk of collapse.
Through lighting calibration, adaptive color correction and dynamic contrast enhancement technologies, combined with edge detection, color feature extraction and machine learning algorithms, automated identification and verification of tunnel defects are achieved, and high confidence defect detection reports are generated.
Improves the robustness and accuracy of defect detection, reduces misjudgment, and generates detailed defect detection reports, providing reliable data support for tunnel safety assessment and maintenance.
Smart Images

Figure CN120298873A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of tunnel detection, and particularly to a tunnel detection method based on color images. Background Art
[0002] Tunnel detection based on color images refers to the process of using computer vision technology to identify and detect tunnel structures, defects or abnormal conditions from the captured tunnel color images. By analyzing and processing the color information in the images, problems such as cracks, leaks, deformations, and surface damages in the tunnel can be accurately distinguished. This method can improve the detection accuracy and efficiency by extracting pixel features and pattern recognition technology in color images, reduce the time and cost of manual inspection, and has important application value in tunnel maintenance and safety assessment.
[0003] The existing technologies have the following deficiencies:
[0004] During the process of tunnel detection based on color images, color distortion of images under different lighting conditions can lead to serious problems of missed detection of defects. The lighting environment inside the tunnel is usually complex and changeable. For example, when natural light and artificial light sources alternate or there are light source failures, the images may have uneven brightness, color deviation or shadow coverage. In this case, the extraction of color features by image processing algorithms is easily interfered, so that actual cracks, leaks and other defects are identified as normal areas, or shadows are misjudged as defects. Once the defects in important structural parts are missed, they may gradually deteriorate over time, threatening the stability of the tunnel structure, and ultimately triggering the risk of collapse, causing significant property losses and casualties. Therefore, ensuring the robustness of the detection algorithm under different lighting conditions and avoiding the influence of color distortion on the detection effect is a key technical problem in tunnel safety monitoring.
[0005] The above information disclosed in the background art section is only used to enhance the understanding of the background of the present disclosure, and therefore it may include information that does not constitute the prior art known to those of ordinary skill in the art. Summary of the Invention
[0006] The object of the present invention is to provide a tunnel detection method based on color images. Through lighting calibration, adaptive color correction and dynamic contrast enhancement technologies, the problems of color distortion and detail loss of images under complex lighting conditions in tunnels are solved, ensuring the accurate extraction of color features and the clear presentation of details in each area, and significantly improving the robustness and accuracy of defect detection. Combining edge detection, color feature extraction, shape analysis and machine learning algorithms, the automated application of multi-modal recognition technology is realized, automatically filtering misjudged areas and generating a defect detection report with high confidence, including crack length, leakage area and deformation grading, providing accurate and comprehensive data support for tunnel safety assessment and maintenance decision-making to solve the problems in the above background art.
[0007] To achieve the above object, the present invention provides the following technical solutions: A tunnel detection method based on a color image, comprising the following steps:
[0008] Obtain color image data inside the tunnel, and calibrate the illumination conditions of the image data to identify illumination changes caused by natural light, artificial light sources, and light source failures;
[0009] Perform zoning processing on the calibrated color image data, divide it into high-brightness areas, low-brightness areas, and shadow areas, and perform color equalization using an adaptive color correction algorithm according to different zones;
[0010] Extract color features from the corrected color image, and combine edge detection algorithms to initially identify cracks, leaks, and deformation areas on the tunnel surface;
[0011] For the initially identified defect areas, use a dynamic contrast enhancement algorithm to enhance the local details of the image, and perform secondary identification on the enhanced image to verify the authenticity of the defects;
[0012] Classify the extracted defect areas based on a convolutional neural network model to distinguish different types of tunnel defects;
[0013] Use a deep learning algorithm based on illumination change robustness to comprehensively analyze the entire tunnel image data, generate a complete defect detection report, and output evaluation data on the defect location and severity according to the detection results.
[0014] Preferably, the specific steps of obtaining color image data inside the tunnel and calibrating the illumination conditions of the image data to identify illumination changes caused by natural light, artificial light sources, and light source failures are as follows:
[0015] Collect high-quality color images of different parts inside the tunnel through a mobile detection device to provide basic data for subsequent detection;
[0016] Deploy a light sensor to record changes in illumination intensity, color temperature, and light source type, and synchronize with the time of the image acquisition device to ensure that the illumination data corresponds to the image;
[0017] Classify and calibrate the image for natural light, artificial light, and light source failures according to the illumination data to select an image processing algorithm to improve the recognition accuracy;
[0018] Construct an illumination calibration model through machine learning to automatically adjust the white balance and color temperature of the image to reduce the impact of illumination changes on defect detection.
[0019] Preferably, the calibrated color image data is partitioned into a high-brightness area, a low-brightness area, and a shadow area, and the specific steps for color balance using an adaptive color correction algorithm according to different partitions are as follows:
[0020] Analyze the image brightness distribution through the image histogram and the data of the light sensor to identify the high-brightness area, the low-brightness area, and the shadow area, laying a foundation for regional segmentation;
[0021] Adopt edge detection and morphological operation methods to accurately segment the image into different brightness areas, ensuring accurate identification of the shadow area boundary and reducing misjudgment;
[0022] According to the segmented areas, adopt different adaptive color correction algorithms to dynamically adjust the brightness, contrast, and color to ensure color balance in each area;
[0023] Verify and optimize the correction result through image similarity analysis and deep learning models to ensure overall color balance of the image and light robustness.
[0024] Preferably, the specific steps for extracting color features from the corrected color image and preliminarily identifying cracks, leaks, and deformation areas on the tunnel surface in combination with the edge detection algorithm are as follows:
[0025] Convert the color image into a color space suitable for analysis, extract color features, and identify color abnormal areas through machine learning algorithms to mark potential defect areas;
[0026] Use the edge detection algorithm to identify the boundary lines with brightness or color changes in the image, and accurately extract the contours of cracks, leaks, and deformation areas;
[0027] Further distinguish real cracks, leaks, and deformations by analyzing the geometric shapes and texture features of the defect areas, and exclude misjudgments of non-defect areas;
[0028] Perform feature fusion on color features, edge information, and shape texture features to comprehensively verify the defect type and location, improving the accuracy and robustness of identification.
[0029] Preferably, for the preliminarily identified defect areas, the specific steps for using a dynamic contrast enhancement algorithm to enhance the local details of the image and performing secondary identification on the enhanced image to verify the authenticity of the defects are as follows:
[0030] Separate the potential defect areas from the identified image for local area segmentation to make the subsequent detail enhancement processing more accurate and efficient;
[0031] According to the lighting conditions in the defect areas, adaptively adjust the contrast parameters to make the image details clearer and improve the visibility of cracks, leaks, and deformation areas;
[0032] Perform edge detection and feature analysis again on the enhanced image to filter out misjudged areas and verify the authenticity of defects;
[0033] Comprehensively verify the defect area through a machine learning model, output the confidence score of defect recognition, and provide reliable analysis data for tunnel maintenance.
[0034] Preferably, classify the extracted defect areas based on a convolutional neural network model. The specific steps for distinguishing different types of tunnel defects are as follows:
[0035] After performing dynamic contrast enhancement and secondary recognition on the image of the defect area, preprocess the extracted defect area to generate an initial feature map for the convolutional neural network model. At the same time, normalize each pixel value and use an initial convolution operation to generate a feature map. The generation formula is as follows:
[0036]
[0037] , where is the feature map value after the l-th layer of convolution operation, representing the feature map value generated at the position (x, y), I i (x + p, y + q) is the pixel value of the i-th channel of the input image at the position (x + p, y + q), is the weight value of the i-th convolution kernel of the l-th layer in the convolution operation at the position (p, q), b (l) is the bias value of the l-th layer of convolution, C is the number of channels of the input image, and k is the radius size of the convolution kernel;
[0038] To improve the model's recognition ability for defects of different scales, use multi-scale convolution operations to extract features under different receptive fields. At the same time, to reduce the dimension of the feature map and lower the computational complexity, add a pooling operation to reduce the dimension of the feature map. Use the maximum pooling method to retain the maximum value within each pooling window to extract the most significant features,
[0039]
[0040] , where is the feature map matrix generated after the l-th layer of pooling operation, is the maximum value operation within the pooling window P.
[0041] Preferably, after multiple layers of convolution and pooling operations, flatten the feature map into a feature vector and input it into the fully connected layer for classification. In the fully connected layer, calculate the probability score of each defect category through a linear transformation of the weight matrix and bias vector. The calculation expression is as follows:
[0042]
[0043] , where z j is the score value of the j-th category output by the fully connected layer, is the value of the i-th feature vector after pooling, is the weight matrix of the fully connected layer, is the bias value of the fully connected layer, and N is the length of the feature vector;
[0044] After obtaining the probability values of each defect category, the final defect type is output through a classification decision function. To improve the robustness of the model, a confidence threshold is introduced to ensure that the classification result is only output under high confidence. The calculation expression is as follows:
[0045]
[0046] , where y is the output category of the final classification decision, is the maximum value index, and σ(z j ) is the probability value of the j-th category calculated by the softmax function.
[0047] Preferably, using a deep learning algorithm based on the robustness to illumination changes, the following are the specific steps for comprehensively analyzing the entire tunnel image data, generating a complete defect detection report, and outputting the evaluation data of the defect location and severity according to the detection results:
[0048] When using a deep learning algorithm to comprehensively analyze tunnel images, first preprocess the image data and extract feature vectors from it. The high-dimensional feature vectors of the image are extracted through a convolutional neural network. The calculation formula is as follows:
[0049]
[0050] , where F is the set of extracted feature vectors, W e is the weight matrix of the convolutional kernel, * is the convolution operator used to extract local image features, I(x, y) is the input tunnel image matrix representing the color value of the pixel point (x, y) in the image, and b e is the bias parameter in the convolution operation;
[0051] To ensure that the algorithm can still accurately identify defects under different illumination conditions, it is necessary to construct a feature matching model with robustness to illumination changes. Using the feature vectors F extracted from images under different illumination conditions, calculate the similarity between features, and introduce an illumination change compensation parameter for correction. The calculation expression is as follows:
[0052]
[0053] , where S(F1, F2) is the similarity score between feature vectors, and F1 and F2 respectively represent the sets of feature vectors extracted under different lighting conditions. represents the square of the difference between two feature vectors in the h-th dimension, ΔL is the lighting change compensation parameter, and m is the number of dimensions of the feature vector, that is, the number of feature items included in the feature vector.
[0054] Preferably, based on the results of the feature matching model, determine the specific position coordinates and severity of each defect area. The severity score calculation formula is as follows:
[0055] D = A·(1 + C depth )·S(F1, F2)
[0056] , where D is the defect severity score, A is the area of the defect area, and C depth is the color depth change score;
[0057] Finally, based on the defect severity score D, generate a complete defect detection report and output the evaluation data. The confidence score of the evaluation data is calculated by combining the severity score and the lighting change compensation parameter. The calculation expression is as follows:
[0058]
[0059] , where C conf is the confidence score of defect detection.
[0060] In the above technical solution, the technical effects and advantages provided by the present invention are:
[0061] The present invention solves the problems of image color distortion and detail loss caused by complex lighting conditions in the tunnel through technologies such as lighting calibration, adaptive color correction, and dynamic contrast enhancement. In the lighting calibration stage, by combining the data of the light intensity sensor and the color temperature sensor, the images under different lighting environments are classified and corrected, ensuring the accurate extraction of color features. The partition processing and dynamic contrast enhancement further perform fine adjustment on the high-brightness area, low-brightness area, and shadow area, making the image details in each area clearer. This multi-level optimization processing greatly improves the robustness of defect detection. Even under light source failures or shadow interference, the system can still stably identify key defect areas such as cracks, leaks, and deformations, ensuring the reliability and accuracy of the detection results.
[0062] The present invention adopts a multi-modal recognition technology that combines edge detection, color feature extraction, shape analysis, and machine learning algorithms, significantly reducing the need for manual intervention. Through feature fusion and defect verification models after partitioning, the system can automatically filter misjudged areas and output defect type and location data with high confidence. Especially in the secondary recognition stage after dynamic contrast enhancement, the authenticity of defects is further verified, significantly reducing the false detection rate. The finally generated defect detection report contains rich analysis data, such as crack length, leakage area, and deformation severity grading, providing a comprehensive and intuitive reference for tunnel maintenance. This automated and data-driven detection method not only improves efficiency but also provides strong support for tunnel safety assessment and repair decision-making. Brief Description of the Drawings
[0063] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required in the embodiments. Obviously, the drawings described below are only some embodiments recorded in the present invention, and those of ordinary skill in the art can also obtain other drawings based on these drawings.
[0064] Figure 1 It is a method flow chart of the tunnel detection method based on color images of the present invention. Detailed Embodiments
[0065] Now, the exemplary embodiments will be described more fully with reference to the accompanying drawings. However, the exemplary embodiments can be implemented in various forms and should not be construed as limited to the examples set forth herein; rather, these exemplary embodiments are provided so that the present disclosure will be more complete and comprehensive, and the concept of the exemplary embodiments will be fully conveyed to those skilled in the art.
[0066] The present invention provides a tunnel detection method based on color images as Figure 1 shown, including the following steps:
[0067] Obtain color image data inside the tunnel and calibrate the illumination conditions of the image data to identify illumination changes caused by natural light, artificial light sources, and light source failures;
[0068] The specific steps of obtaining color image data inside the tunnel and calibrating the illumination conditions of the image data to identify illumination changes caused by natural light, artificial light sources, and light source failures are as follows:
[0069] Collect high-quality color images of different parts inside the tunnel through a mobile detection device to provide basic data for subsequent detection;
[0070] During the tunnel detection process, it is first necessary to collect color image data through mobile detection devices (such as driverless vehicles or drones) installed in the tunnel. To ensure that the images cover the key parts of the tunnel (such as the walls, vaults, and joints), reasonable acquisition intervals and shooting angles should be set. During the acquisition process, the uneven illumination inside the tunnel needs to be considered to ensure that the details of the tunnel structure can be clearly captured under different lighting conditions. In addition, to reduce the impact of external environmental changes (such as vehicle flow, dust, etc.) on the image quality during shooting, dust-proof, shock-proof, and waterproof equipment should be equipped, and the acquisition should be carried out as much as possible during low-flow periods. The core goal of this step is to obtain high-resolution, low-noise color image data, laying a foundation for subsequent processing.
[0071] Deploy light sensors to record changes in light intensity, color temperature, and light source type, and synchronize with the time of the image acquisition device to ensure that the light data corresponds to the image;
[0072] To accurately identify the lighting conditions inside the tunnel, it is necessary to deploy light sensors near the image acquisition device, including light intensity sensors, color temperature sensors, and light source type identification devices. These sensors record the lighting changes inside the tunnel in real time, such as changes in light intensity and color temperature, as well as the switching of light source types (such as from natural light to artificial light). At the same time, the data of the sensors are recorded synchronously with the timestamps of the image acquisition device to ensure that each image can correspond to accurate lighting condition data. This synchronization mechanism is a key link in light calibration and can effectively avoid analysis errors caused by time mismatch. In addition, for light source failure situations (such as lamp damage, flickering, etc.), the sensors can feedback abnormal signals in real time to help the detection system exclude misjudgments caused by light source failures during image analysis.
[0073] Classify and calibrate the images into natural light, artificial light, and light source failure according to the light data to select image processing algorithms to improve the recognition accuracy;
[0074] After the image acquisition is completed, it is necessary to classify and calibrate the lighting conditions of each image according to the data recorded by the sensors. The calibration process can divide the images into three categories according to the lighting type: natural light images, artificial light images, and light source failure images. For natural light images, the sunlight irradiation at the tunnel entrance is mainly considered, and its characteristic is that the light intensity changes greatly with time; artificial light images are mostly in the internal area of the tunnel, and the light intensity is relatively stable; while light source failure images are characterized by local areas being too dark, too bright, or flickering. Through classification and calibration, the system can select appropriate image processing algorithms according to the lighting type to improve the recognition accuracy. In addition, this step can also identify the type of light source (such as LED lights, fluorescent lights, etc.) by comparing the color temperature changes in the images, thereby further improving the calibration accuracy.
[0075] Construct a lighting calibration model through machine learning to automatically adjust the white balance and color temperature of images, reducing the impact of lighting changes on defect detection;
[0076] To ensure the accuracy of the calibration results, it is necessary to establish a lighting calibration model using machine learning methods. By inputting a large number of classified images and lighting data, the model can learn the color change rules of images under different lighting conditions and automatically adjust parameters such as the white balance and color temperature of the images, making their performance consistent under different lighting conditions. This model can correct image data in real time, avoiding color distortion caused by lighting changes. In addition, the lighting calibration model can identify abnormal lighting conditions in complex environments, such as the superposition of multiple light sources or light source flickering, etc., and perform compensation during the image analysis process, thereby reducing the impact of lighting changes on defect recognition. This step significantly improves the robustness of the entire tunnel detection method, enabling it to maintain a high detection accuracy in complex lighting environments.
[0077] Partition the calibrated color image data into high-brightness areas, low-brightness areas, and shadow areas, and perform color balance using an adaptive color correction algorithm according to different partitions;
[0078] The specific steps for partitioning the calibrated color image data into high-brightness areas, low-brightness areas, and shadow areas and performing color balance using an adaptive color correction algorithm according to different partitions are as follows:
[0079] Analyze the image brightness distribution through image histograms and lighting sensor data to identify high-brightness areas, low-brightness areas, and shadow areas, laying the foundation for region segmentation;
[0080] After completing the lighting condition calibration, it is necessary to analyze the brightness distribution of the color image to identify high-brightness areas, low-brightness areas, and shadow areas in the image. First, analyze the distribution of brightness values through the image histogram, and classify the pixels in the image according to the brightness values. Pixel areas with higher brightness values are identified as high-brightness areas, pixel areas with lower brightness values are classified as low-brightness areas, and areas with extremely low brightness values and discontinuous distributions are usually shadow areas. In addition, to improve the analysis accuracy, the data of the lighting sensor can be combined, and the type, position, and intensity changes of the light source are used as supplementary information for the image brightness distribution. The core goal of this step is to accurately divide the image areas affected by different lighting according to the brightness differences in the image, laying the foundation for subsequent color correction.
[0081] Adopt edge detection and morphological operation methods to accurately segment the image into different brightness areas, ensuring accurate identification of the boundaries of shadow areas and reducing misjudgment;
[0082] Based on the brightness distribution analysis, it is necessary to perform region segmentation on the image to clarify the boundary positions of the high-brightness area, low-brightness area, and shadow area. Region segmentation usually adopts boundary detection algorithms based on image gradients, such as Canny edge detection or Sobel operator, combined with the change trend of brightness values, to accurately segment different brightness regions. In addition, according to the characteristics of tunnel images, morphological operations (such as dilation, erosion, etc.) can be used to correct the segmentation results, remove small noise regions, or fill incomplete segmentation gaps. To avoid over-segmentation, a threshold range can be set to ensure that the segmentation results match the actual structure of the tunnel. This segmentation process ensures that different regions of the image can be effectively identified, especially the accurate identification of the boundaries of shadow regions, which helps to reduce the situation of misjudging shadows as defects.
[0083] According to the segmented regions, different adaptive color correction algorithms are adopted to dynamically adjust brightness, contrast, and color to ensure color balance in each region;
[0084] For different regions after segmentation, it is necessary to use adaptive color correction algorithms for color balance processing. For the high-brightness area, overexposure can be avoided by reducing contrast and color saturation; for the low-brightness area, brightness enhancement and contrast enhancement algorithms should be adopted to make the details in the region clearer; while for the shadow area, a shadow removal algorithm is needed to remove the interference of shadows and restore the true color in the region. To ensure the accuracy of the correction results, the correction parameters can be dynamically adjusted based on the data in the light calibration stage to make it adapt to different lighting environments. This adaptive color correction model can effectively reduce the impact of lighting changes on the image, make the color performance of each region in the image closer to the actual situation, and improve the accuracy of subsequent defect recognition.
[0085] The correction results are verified and optimized through image similarity analysis and deep learning models to ensure overall color balance of the image and light robustness;
[0086] After completing the preliminary partition color correction, it is necessary to verify and optimize the correction results to ensure the overall color balance effect of the image. The verification stage usually adopts image similarity analysis, comparing the corrected image with the image under standard lighting conditions to calculate the color deviation. If the deviation value exceeds the preset threshold, it means that the correction effect is not ideal and the correction parameters need to be adjusted again. In addition, for the special situation of the shadow area, post-processing steps of the shadow removal algorithm can be adopted to further optimize the residual shadow area. In practical applications, the intelligent evaluation and adjustment of the correction results can be carried out through deep learning models to make the entire partition color correction process more accurate and efficient. The image after verification and optimization will have good light robustness, providing high-quality image data support for subsequent defect detection.
[0087] Extract color features from the corrected color image, and combine with edge detection algorithms to initially identify cracks, leaks, and deformation areas on the tunnel surface;
[0088] The specific steps for extracting color features from the corrected color image and combining with edge detection algorithms to initially identify cracks, leaks, and deformation areas on the tunnel surface are as follows:
[0089] Convert the color image into a color space suitable for analysis, extract color features, and identify color abnormal areas through machine learning algorithms, marking potential defect areas;
[0090] After completing the partition processing and adaptive color correction, color feature extraction needs to be performed on the corrected color image. By converting the image into a color space suitable for color analysis (such as HSV or Lab color space), color changes and abnormal areas in the image can be more intuitively identified. When extracting color features, first analyze the hue, saturation, and brightness of the pixels in the image, classify the pixels using machine learning algorithms (such as K-means clustering or support vector machines), and mark the pixels with abnormal colors as potential defect areas. The key to this step is to identify areas that are inconsistent with the normal color of the tunnel, such as dark cracks, dark leakage traces, or reflective areas caused by surface deformation, laying a foundation for subsequent edge detection and shape recognition.
[0091] Use edge detection algorithms to identify the boundary lines of brightness or color changes in the image, and accurately extract the contours of cracks, leaks, and deformation areas;
[0092] After extracting color features, the next step is to identify the boundaries of cracks, leaks, and deformation areas on the tunnel surface through edge detection algorithms. For the characteristics of tunnel images, classic methods such as Canny edge detection, Sobel operator, or Laplacian operator are usually used. These algorithms can detect obvious boundary lines by analyzing the change gradient of brightness or color in the image. In addition, to reduce the influence of image noise on edge detection, the image can be Gaussian blurred before detection, and an appropriate threshold range can be set to exclude irrelevant edges. Edge detection can effectively distinguish the lines of cracks, the diffusion boundaries of leaks, and the contours of surface deformations, providing accurate boundary information for further analysis of defect features.
[0093] Further distinguish real cracks, leaks, and deformations by analyzing the geometric shapes and texture features of the defect areas, and exclude misjudgments of non-defect areas;
[0094] After edge detection is completed, it is necessary to analyze the shape and texture features of the preliminarily identified defect areas to further verify whether these areas are real cracks, leaks, or deformations. By analyzing geometric features such as the length, width, area, and shape of the defect areas, different types of defects can be distinguished. For example, cracks usually appear as slender lines, while leakage areas appear as irregular diffusion areas. In addition, through texture analysis methods (such as gray-level co-occurrence matrix or wavelet transform), the roughness and detailed features of the area surface can be detected, thereby identifying uneven areas caused by deformation. Combining shape and texture feature analysis can effectively exclude misjudgments of non-defect areas (such as stains or shadows) and improve the accuracy of detection.
[0095] Fuse color features, edge information, and shape texture features to comprehensively verify the defect type and location, and improve the accuracy and robustness of recognition;
[0096] Finally, by fusing color features, edge information, and shape texture features, the identified defect areas are comprehensively verified. Feature fusion can adopt machine learning methods such as decision trees or random forests to reasonably allocate the weights of different features and form a comprehensive defect recognition model. By comprehensively analyzing the matching degree of different features, the system can further confirm the type and location of the defects. For example, the system can determine that it is a structural crack based on the color depth, length, and edge continuity of the crack, rather than surface stains or coating peeling. In addition, feature fusion can automatically filter out misjudged areas and improve the robustness and accuracy of the recognition results. This comprehensive verification process ensures that the detection system can still maintain efficient and accurate recognition effects under complex lighting environments and various defect types, providing reliable data support for subsequent defect report generation and repair plans.
[0097] For the preliminarily identified defect areas, adopt a dynamic contrast enhancement algorithm to enhance the local details of the image, and perform secondary recognition on the enhanced image to verify the authenticity of the defects;
[0098] The specific steps for adopting a dynamic contrast enhancement algorithm to enhance the local details of the image and perform secondary recognition on the enhanced image to verify the authenticity of the defects for the preliminarily identified defect areas are as follows:
[0099] Isolate the potential defect areas from the recognized image and perform local area segmentation to make the subsequent detail enhancement processing more accurate and efficient;
[0100] After completing color feature extraction and edge detection, extract the initially identified crack, leakage, and deformation areas in the image, and separately segment these areas for local detail processing. When extracting the defect areas, the potential defect areas can be separated from the overall image by setting the contour boundaries of edge detection or using shape analysis methods. The core purpose of region segmentation is to narrow the processing scope, concentrate resources on fine-tuning the key areas, thereby improving the processing efficiency and the clarity of image details. This step ensures that the dynamic contrast enhancement algorithm only targets the areas where defects may exist, thus avoiding unnecessary full-image processing and improving the pertinence and accuracy of image analysis.
[0101] According to the lighting conditions within the defect areas, adaptively adjust the contrast parameters to make the image details clearer and enhance the visibility of the crack, leakage, and deformation areas;
[0102] For each segmented defect area, adopt the dynamic contrast enhancement algorithm to improve the image details according to the lighting conditions within the area. In the tunnel environment, the lighting conditions vary greatly in different areas. Therefore, the contrast adjustment method with fixed parameters often has poor effects, while the dynamic contrast adjustment can adaptively adjust the parameters according to the brightness level of the area. For example, for high-brightness areas, reduce the contrast to prevent overexposure; for low-brightness or shadow areas, increase the contrast and brightness to make the image details clearer. This dynamic adjustment strategy can effectively enhance the edge contour of cracks, the diffusion texture of leaks, and the concave-convex structure of deformation areas, making the subsequent defect identification more accurate.
[0103] Perform edge detection and feature analysis again on the enhanced image to filter out misjudged areas and verify the authenticity of the defects;
[0104] After contrast enhancement, perform edge detection and feature analysis on the images of the defect areas again to verify whether the initially identified defects actually exist. Secondary edge detection can more accurately extract the boundary lines of cracks or leaks, avoiding misjudgments caused by image noise or shadow interference in the initial detection. In addition, by further analyzing the geometric shape, texture distribution, and color features of the area, it is possible to identify whether there are pseudo-defects. For example, real cracks usually have continuous linear features and specific dark textures, while stains or shadows often show irregular shapes and color distributions. The core purpose of secondary identification is to filter out misjudged areas through the enhanced image details and improve the reliability of the identification results.
[0105] Comprehensively verify the defect areas through a machine learning model, output the confidence score of defect identification, and provide reliable analysis data for tunnel maintenance;
[0106] To further verify the authenticity of the defects, a defect verification model can be established using machine learning algorithms to compare the initially identified defect features with the enhanced image detail features. This model can be based on decision trees, random forests, or deep learning algorithms, comprehensively analyzing the edge continuity, color consistency, and texture distribution patterns in the defect area to determine whether the defects actually exist. Meanwhile, according to the verification results output by the model, a confidence score for defect identification can be generated to grade and label each defect area (such as crack length, leakage area, deformation severity). This step ensures that the final output of defect identification results is not only accurate but also contains rich detailed information, providing reliable data support for the subsequent maintenance and safety assessment of the tunnel.
[0107] Classify the extracted defect areas based on a Convolutional Neural Network (CNN) model to distinguish different types of tunnel defects;
[0108] The specific steps for classifying the extracted defect areas based on a Convolutional Neural Network (CNN) model to distinguish different types of tunnel defects are as follows:
[0109] After dynamic contrast enhancement and secondary recognition of the images of the defect areas, preprocess the extracted defect areas to generate initial feature maps for the Convolutional Neural Network (CNN) model. At the same time, normalize each pixel value so that its value range is adjusted to the range of [0, 1]. To extract edge, texture, and color features in the image, use initial convolution operations to generate feature maps, and the generation formula is as follows:
[0110]
[0111] , where is the feature map value after the l-th layer of convolution operation, representing the feature map value generated at the position (x, y), I i (x + p, y + q) is the pixel value of the i-th channel of the input image at the position (x + p, y + q), is the weight value of the i-th convolutional kernel of the l-th layer in the convolution operation at the position (p, q), b (l) is the bias value of the l-th layer of convolution, used to adjust the output of the feature map to avoid the output always being zero when all values in the weight matrix of the convolutional kernel are zero. C is the number of channels of the input image, and k is the radius size of the convolutional kernel;
[0112] The output of this step is the feature map matrix As the input for the subsequent convolutional layers, representing the local features and edge information of the image.
[0113] To improve the model's ability to identify defects of different scales, multi-scale convolution operations are adopted to extract features under different receptive fields. At the same time, to reduce the dimension of the feature map and lower the computational complexity, pooling operations are added to perform dimensionality reduction on the feature map. The max pooling method is used to retain the maximum value within each pooling window to extract the most prominent features.
[0114]
[0115] , where is the feature map matrix generated after the l-th pooling operation, representing the local feature values of the image after pooling dimensionality reduction. is the maximum value operation within the pooling window P;
[0116] Multi-scale convolution and pooling operations can improve the model's ability to identify defect features of different sizes and positions, while reducing the computational amount and avoiding overfitting.
[0117] After multiple layers of convolution and pooling operations, the feature map is flattened into a feature vector and input into the fully connected layer for classification. In the fully connected layer, through the linear transformation of the weight matrix and bias vector, the probability scores of each defect category are calculated. The calculation expression is as follows:
[0118]
[0119] , where z j is the score value of the j-th category output by the fully connected layer, is the value of the i-th feature vector after pooling, is the weight matrix of the fully connected layer, representing the multiplication factor used to map the input feature values to the category scores, is the bias value of the fully connected layer, and N is the length of the feature vector;
[0120] By normalizing z j (for example, using the softmax function), the probability values of each defect category can be obtained, providing a basis for the final classification result.
[0121] After obtaining the probability values of each defect category, the final defect type is output through the classification decision function. The classification decision is usually implemented through the maximum probability decision rule, that is, the category with the highest probability value is selected as the final classification result. To improve the robustness of the model, a confidence threshold is introduced to ensure that the classification result is only output under high confidence. The calculation expression is as follows:
[0122]
[0123] , where y is the output category of the final classification decision, is the maximum value index, representing the index corresponding to the maximum value found from a set of numerical values, and σ(z j ) is the probability value of the j-th category calculated by the softmax function.
[0124] Through the above steps, the convolutional neural network (CNN) model can accurately classify the tunnel defect areas, distinguish different types of defects such as cracks, leaks, and deformations, and output classification results with high confidence, facilitating the subsequent generation of defect reports and maintenance decisions.
[0125] Using a deep learning algorithm based on the robustness to illumination changes, comprehensively analyze the entire tunnel image data, generate a complete defect detection report, and output the evaluation data of the defect location and severity according to the detection results;
[0126] The specific steps of using a deep learning algorithm based on the robustness to illumination changes to comprehensively analyze the entire tunnel image data, generate a complete defect detection report, and output the evaluation data of the defect location and severity according to the detection results are as follows:
[0127] When comprehensively analyzing the tunnel image using a deep learning algorithm, first preprocess the image data and extract various feature vectors such as color, edge, and texture from it. Image preprocessing includes color correction, denoising, and normalization operations. Extract the high-dimensional feature vectors of the image through a convolutional neural network (CNN). The calculation formula is as follows:
[0128]
[0129] , where F is the set of extracted feature vectors, including color, edge, and texture information, and W e is the weight matrix of the convolution kernel, * is the convolution operator used to extract local image features, I(x, y) is the input tunnel image matrix, representing the color value of the pixel point (x, y) in the image, and b e is the bias parameter in the convolution operation, used to adjust the convolution result so that the model can better adapt to the data distribution;
[0130] The result of this step is a multi-dimensional feature vector F, which is used to represent the potential defect areas in the tunnel image and serves as the input for the subsequent steps.
[0131] To ensure that the algorithm can still accurately identify defects under different illumination conditions, it is necessary to construct a feature matching model with robustness to illumination changes. Using the feature vectors F extracted from images under different illumination conditions, calculate the similarity between features, and introduce an illumination change compensation parameter for correction. The calculation expression is as follows:
[0132]
[0133] , where S(F1, F2) is the similarity score between feature vectors. The smaller the value, the more similar the two are, and the larger the value, the greater the difference. F1 and F2 respectively represent the sets of feature vectors extracted under different lighting conditions. represents the square of the difference between the two feature vectors in the h-th dimension. ΔL is the lighting change compensation parameter, which is calculated based on the real-time data of the light sensor to correct the impact of lighting differences on feature matching. m is the number of dimensions of the feature vector, that is, the number of feature items included in the feature vector.
[0134] This model can effectively match the same defect area under different lighting conditions, reducing misjudgment or missed detection caused by lighting changes.
[0135] Based on the results of the feature matching model, determine the specific position coordinates and severity of each defect area. The position coordinates are calculated through the centroid of the defect area, and the severity is determined through a comprehensive score of the defect area and color depth change. The severity score calculation formula is as follows:
[0136] D = A·(1 + C depth )·S(F1, F2)
[0137] , where D is the defect severity score, A is the area of the defect area, calculated through the number of pixels, and C depth is the color depth change score, reflecting the color abnormality degree of the defect area.
[0138] The severity score D combined with the position coordinates is used to generate complete defect annotation data, providing basic information for the subsequent generation of defect reports.
[0139] Finally, based on the defect severity score D, generate a complete defect detection report and output evaluation data. The evaluation data includes the coordinates, area, severity score of each defect area, and corresponding repair suggestions. The confidence score of the evaluation data is calculated by combining the severity score and the lighting change compensation parameter. The calculation expression is as follows:
[0140]
[0141] , where C conf is the confidence score of defect detection, indicating the credibility of the detection result.
[0142] The generated report includes the precise position, type, area, severity, and confidence score of the defect, providing comprehensive analysis data for tunnel maintenance personnel to help formulate a scientific repair plan.
[0143] Embodiment 1: During the tunnel detection process, different lighting conditions can lead to significant differences in the color and brightness of images, thus affecting the accuracy of defect recognition. In this embodiment, a lighting calibration system is deployed to perform lighting calibration and color correction on the collected tunnel images, so as to reduce the interference caused by lighting changes and improve the robustness and stability of detection.
[0144] First, high-definition camera devices and lighting sensors are arranged in the tunnel. The high-definition camera devices are responsible for real-time collection of color images in the tunnel, while the lighting sensors are used to record data such as light intensity, color temperature, and light source type. The arrangement positions of the lighting sensors should consider the structural characteristics of the tunnel to ensure that the sensors can cover each key area in the tunnel. For areas such as tunnel entrances, turning points, and areas with uneven lamp distribution, the number of sensors needs to be appropriately increased to accurately record the lighting changes at these positions.
[0145] During the image collection process, the lighting sensors are synchronized with the time stamps of the camera devices to ensure that each frame of image can be matched with the corresponding lighting data. The key to this step is to accurately calibrate the lighting conditions of the images, so as to classify the images into three situations: natural light, artificial light, and light source failure according to the light source type. For example, the tunnel entrance may be illuminated by natural light, while the interior of the tunnel mainly relies on artificial light sources. If the light source fails (such as lamp damage or strobing), the sensor can record the abnormal situation in real time, providing an important reference for subsequent image processing.
[0146] After completing the lighting calibration, the image data is divided into regions, and the image is divided into high-brightness regions, low-brightness regions, and shadow regions. High-brightness regions usually appear near the light source, low-brightness regions are located far from the light source, and shadow regions may be caused by tunnel structure occlusion or light source failure. For the lighting characteristics of different regions, an adaptive color correction algorithm is used for color balance processing. For example, for high-brightness regions, the brightness and saturation can be reduced to avoid overexposure; for low-brightness regions, the brightness and contrast can be appropriately increased to make the image details clearer; for shadow regions, shadow removal processing is required to restore the true color. This region-based processing method effectively reduces the interference caused by lighting changes and ensures that the color performance of each region is closer to the actual situation.
[0147] Finally, the corrected image data is verified to ensure that the color correction effect meets the expectations. If the corrected image has a large difference compared with the image under standard lighting conditions, the color correction parameters need to be readjusted until the image reaches an ideal color balance effect. Through lighting calibration and color correction, the tunnel detection system can operate stably in a complex lighting environment, avoid the problem of missed defect detection caused by lighting changes, and provide high-quality image data support for subsequent defect recognition.
[0148] Embodiment 2: After illumination calibration and color correction, it is necessary to identify defects in the corrected image. Defects such as cracks, leaks, and deformations in the tunnel usually appear as regions with abnormal colors. Therefore, extracting the color features of the image is a key step in defect identification. In this embodiment, the preliminary identification of tunnel defects is achieved by extracting color features and combining edge detection algorithms.
[0149] First, convert the corrected color image into a color space suitable for analysis, such as the HSV (hue, saturation, value) or Lab (luminance, a-axis, and b-axis) color space. Compared with the RGB color space, these color spaces can better reflect the color changes and contrast differences in the image, which is beneficial for identifying abnormal regions in the image. After converting the color space, extract the color features by analyzing parameters such as the hue, saturation, and luminance of the pixels in the image.
[0150] After extracting the color features, use machine learning algorithms to classify the pixels in the image. For example, the K-means clustering algorithm can be used to divide the pixels in the image into normal regions and abnormal regions. The pixels in the normal region usually have a uniform color distribution, while the abnormal region may show color mutations or irregular color distributions. Through this method, potential defect regions can be marked for subsequent processing by edge detection algorithms.
[0151] After marking the potential defect regions, apply edge detection algorithms to identify the boundary lines of cracks, leaks, and deformation regions. Commonly used edge detection algorithms include the Canny edge detection, Sobel operator, and Laplacian operator, etc. These algorithms can accurately detect the boundary lines in the image by analyzing the changes in luminance or color gradients in the image. To improve the accuracy of edge detection, the image can be subjected to Gaussian blur processing before detection to reduce the noise in the image. In addition, by setting an appropriate threshold range, irrelevant edges can be effectively filtered out to avoid false detection and missed detection.
[0152] After edge detection, it is also necessary to analyze the shape and texture features of the identified defect regions to verify the authenticity of the defects. For example, by analyzing the length, width, and continuity of the cracks, it can be determined whether the cracks are structural cracks. At the same time, through texture analysis methods (such as gray-level co-occurrence matrix or wavelet transform), the diffusion texture of the leakage region can be detected to exclude the interference of stains or shadows. This analysis process helps to improve the accuracy of defect identification and provides reliable data support for subsequent detail enhancement and verification steps.
[0153] Embodiment 3: After the preliminary identification of defects, it is necessary to further verify the authenticity of the defects. In this embodiment, the dynamic contrast enhancement algorithm is used to enhance the image details of the defect regions, and the enhanced image is subjected to secondary identification and verification to ensure the reliability of the detection results.
[0154] First, extract potential defect regions from the preliminarily recognized image and perform region segmentation. When extracting the defect regions, the defect regions can be separated from the overall image through the contour boundaries of edge detection or shape analysis methods. The core purpose of region segmentation is to narrow the processing scope so that the dynamic contrast enhancement algorithm can concentrate resources to perform refined processing on key regions.
[0155] After region segmentation, according to the lighting conditions of the defect regions, adopt a dynamic contrast enhancement algorithm to enhance the image details. For example, for high-brightness regions, the contrast and brightness can be reduced to prevent overexposure; for low-brightness or shadow regions, the contrast and brightness need to be increased to highlight the details of cracks, leaks, and deformation regions. This dynamic adjustment strategy can effectively enhance the edge contours and texture details of the defect regions, making the secondary recognition more accurate.
[0156] After enhancing the image details, perform edge detection and feature analysis on the defect regions again to verify whether the preliminarily recognized defects actually exist. The secondary edge detection can more accurately extract the boundary lines of cracks or leaks, avoiding misjudgments caused by noise or shadow interference in the initial detection. In addition, by comprehensively analyzing the geometric shape, color consistency, and texture features of the defect regions, the defect types can be further confirmed.
[0157] Finally, establish a defect verification system through a machine learning model, compare the preliminarily recognized defect features with the enhanced image detail features, and output the confidence score of defect recognition. This scoring system can grade and label the defects according to indicators such as the length, area, and boundary clarity of the defects, thereby providing reliable data support for tunnel maintenance and safety assessment.
[0158] The present invention solves the problems of image color distortion and detail loss caused by complex lighting conditions in the tunnel through technologies such as lighting calibration, adaptive color correction, and dynamic contrast enhancement. In the lighting calibration stage, by combining the data of the light intensity sensor and the color temperature sensor, the images in different lighting environments are classified and corrected, ensuring the accurate extraction of color features. The partition processing and dynamic contrast enhancement further perform refined adjustments on the high-brightness area, low-brightness area, and shadow area, making the image details of each area clearer. This multi-level optimization processing greatly improves the robustness of defect detection. Even under light source failures or shadow interference, the system can still stably identify key defect regions such as cracks, leaks, and deformations, ensuring the reliability and accuracy of the detection results.
[0159] The present invention adopts a multi-modal recognition technology that combines edge detection, color feature extraction, shape analysis, and machine learning algorithms, significantly reducing the need for manual intervention. Through feature fusion and defect verification models after partitioning, the system can automatically filter misjudged areas and output defect type and location data with high confidence. Especially in the secondary recognition stage after dynamic contrast enhancement, the authenticity of defects is further verified, significantly reducing the false detection rate. The finally generated defect detection report contains rich analysis data, such as crack length, leakage area, and deformation severity grading, providing a comprehensive and intuitive reference for tunnel maintenance. This automated and data-driven detection method not only improves efficiency but also provides strong support for tunnel safety assessment and repair decision-making.
[0160] The above formulas are all dimensionless and take their numerical values for calculation. The formulas are obtained by collecting a large amount of data for software simulation to get a formula closest to the actual situation. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.
[0161] Only some exemplary embodiments of the present invention have been described by way of illustration. Undoubtedly, for those of ordinary skill in the art, without departing from the spirit and scope of the present invention, the described embodiments can be modified in various different ways. Therefore, the above drawings and description are illustrative in nature and should not be construed as limiting the scope of protection of the claims of the present invention.
[0162] It should be noted that in this article, if there are relational terms such as first and second, they are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including the element.
[0163] It should be understood that in various embodiments of the present application, the magnitude of the sequence numbers of the above processes does not mean the order of execution. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
[0164] Those of ordinary skill in the art will realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or by a combination of computer software and electronic hardware. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled professionals can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of this application.
[0165] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.
[0166] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0167] In addition, the functional units in each embodiment of this application can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit.
[0168] The above is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in this application, and all should be covered by the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
[0169] Only some exemplary embodiments of the present invention have been described by way of illustration above. Undoubtedly, for those of ordinary skill in the art, the described embodiments can be modified in various different ways without departing from the spirit and scope of the present invention. Therefore, the above drawings and description are illustrative in nature and should not be construed as limiting the protection scope of the claims of the present invention.
Claims
1. A tunnel detection method based on color images, characterized in that It includes the following steps: Obtain the color image data inside the tunnel, and calibrate the illumination conditions of the image data to identify the illumination changes caused by natural light, artificial light sources, and light source failures; Perform zoning processing on the calibrated color image data, divide it into high-brightness areas, low-brightness areas, and shadow areas, and perform color equalization using an adaptive color correction algorithm according to different zones; Extract color features from the corrected color image, and combine with the edge detection algorithm to preliminarily identify the crack, leakage, and deformation areas on the tunnel surface; For the preliminarily identified defect areas, use the dynamic contrast enhancement algorithm to enhance the local details of the image, and perform secondary identification on the enhanced image to verify the authenticity of the defects; Classify the extracted defect areas based on the convolutional neural network model to distinguish different types of tunnel defects; Use the deep learning algorithm based on illumination change robustness to comprehensively analyze the entire tunnel image data, generate a complete defect detection report, and output the evaluation data of the defect location and severity according to the detection results.
2. The tunnel detection method based on a color image according to claim 1, wherein The specific steps for obtaining the color image data inside the tunnel and calibrating the illumination conditions of the image data to identify the illumination changes caused by natural light, artificial light sources, and light source failures are as follows: Collect high-quality color images of different parts inside the tunnel through a mobile detection device to provide basic data for subsequent detection; Deploy illumination sensors to record the changes in illumination intensity, color temperature, and light source type, and synchronize with the time of the image acquisition device to ensure the correspondence between the illumination data and the images; Classify and calibrate the images for natural light, artificial light, and light source failures according to the illumination data to select an image processing algorithm to improve the recognition accuracy; Construct an illumination calibration model through machine learning to automatically adjust the white balance and color temperature of the images to reduce the impact of illumination changes on defect detection.
3. The tunnel detection method based on a color image according to claim 1, wherein The specific steps for performing zoning processing on the calibrated color image data, dividing it into high-brightness areas, low-brightness areas, and shadow areas, and performing color equalization using an adaptive color correction algorithm according to different zones are as follows: Analyze the image brightness distribution through the image histogram and illumination sensor data to identify high-brightness areas, low-brightness areas, and shadow areas, laying a foundation for regional segmentation; Use edge detection and morphological operation methods to accurately segment the image into different brightness areas, ensure accurate identification of the boundaries of the shadow areas, and reduce misjudgment; According to the segmented areas, use different adaptive color correction algorithms to dynamically adjust the brightness, contrast, and color to ensure color equalization in each area; Verify and optimize the correction results through image similarity analysis and deep learning models to ensure overall color balance of the image and illumination robustness.
4. The tunnel detection method based on a color image according to claim 1, wherein The specific steps for extracting color features from the corrected color image and combining with the edge detection algorithm to preliminarily identify the crack, leakage, and deformation areas on the tunnel surface are as follows: Convert the color image into a color space suitable for analysis, extract color features, and identify color abnormal areas through machine learning algorithms to mark potential defect areas; Use the edge detection algorithm to identify the boundary lines with changes in brightness or color in the image, and accurately extract the contours of the crack, leakage, and deformation areas; By analyzing the geometric shape and texture features of the defect area, further distinguish real cracks, leaks, and deformations, and exclude misjudgments in non-defect areas; Fuse color features, edge information, and shape texture features, comprehensively verify the defect type and location, and improve the accuracy and robustness of recognition.
5. The tunnel detection method based on a color image according to claim 1, wherein For the initially identified defect area, the specific steps to enhance the local details of the image using the dynamic contrast enhancement algorithm and perform secondary recognition on the enhanced image to verify the authenticity of the defect are as follows: Isolate the potential defect area from the recognized image and perform local area segmentation to make the subsequent detail enhancement processing more accurate and efficient; According to the lighting conditions within the defect area, adaptively adjust the contrast parameters to make the image details clearer and improve the visibility of cracks, leaks, and deformation areas; Perform edge detection and feature analysis again on the enhanced image to filter out misjudged areas and verify the authenticity of the defect; Comprehensively verify the defect area through a machine learning model, output the confidence score of defect recognition, and provide reliable analysis data for tunnel maintenance.
6. The tunnel detection method based on a color image according to claim 1, wherein, The specific steps to classify the extracted defect area based on a convolutional neural network model and distinguish different types of tunnel defects are as follows: After performing dynamic contrast enhancement and secondary recognition on the image of the defect area, preprocess the extracted defect area to generate the initial feature map for the convolutional neural network model. At the same time, normalize each pixel value and use the initial convolution operation to generate the feature map. The generation formula is as follows: In the formula, is the feature map value after the l-th layer of convolution operation, representing the feature map value generated at the position (x, y), I i (x + p, y + q) is the pixel value of the i-th channel of the input image at the position (x + p, y + q), is the weight value of the i-th convolution kernel of the l-th layer in the convolution operation at the position (p, q), b (l) is the bias value of the l-th layer of convolution, C is the number of channels of the input image, and k is the radius size of the convolution kernel; To improve the model's recognition ability for defects of different scales, use multi-scale convolution operations to extract features under different receptive fields. At the same time, to reduce the dimension of the feature map and lower the computational complexity, add a pooling operation to reduce the dimension of the feature map. Use the maximum pooling method to retain the maximum value within each pooling window to extract the most significant features. wherein, is the feature map matrix generated after the l-th pooling operation, is the maximum value operation within the pooling window P.
7. The tunnel detection method based on a color image according to claim 6, characterized in that, After multiple layers of convolution and pooling operations, flatten the feature map into a feature vector and input it into the fully connected layer for classification. In the fully connected layer, calculate the probability score for each defect category through the linear transformation of the weight matrix and bias vector. The calculation expression is as follows: where z j is the score value of the j-th category output by the fully connected layer, is the value of the i-th feature vector after pooling, is the weight matrix of the fully connected layer, is the bias value of the fully connected layer, and N is the length of the feature vector; After obtaining the probability value for each defect category, output the final defect type through the classification decision function. To improve the robustness of the model, introduce a confidence threshold to ensure that the classification result is only output under high confidence. The calculation expression is as follows: where y is the output category of the final classification decision, is the maximum index, and σ(z j ) is the probability value of the j-th category calculated by the softmax function.
8. The tunnel detection method based on a color image according to claim 1, characterized in that, The specific steps to comprehensively analyze the entire tunnel image data using a deep learning algorithm based on the robustness to lighting changes, generate a complete defect detection report, and output the evaluation data of the defect location and severity according to the detection results are as follows: When comprehensively analyzing the tunnel image using the deep learning algorithm, first preprocess the image data and extract the feature vector from it. Extract the high-dimensional feature vector of the image through the convolutional neural network. The calculation formula is as follows: Where F is the set of extracted feature vectors, and W e is the weight matrix of the convolutional kernel, * is the convolution operator used to extract local image features, I(x, y) is the input tunnel image matrix representing the color value of the pixel point (x, y) in the image, and b e is the bias parameter in the convolution operation; To ensure that the algorithm can accurately identify defects under different lighting conditions, it is necessary to construct a feature matching model with robustness to lighting changes. Using the feature vectors F extracted from images under different lighting conditions, calculate the similarity between features, and introduce a lighting change compensation parameter for correction. The calculation expression is as follows: Wherein, S(F1, F2) is the similarity score between the feature vectors, and F1 and F2 respectively represent the sets of feature vectors extracted under different illumination conditions. represents the squared difference between the two feature vectors in the h-th dimension, ΔL is the illumination change compensation parameter, and m is the number of dimensions of the feature vector, that is, the number of feature items included in the feature vector.
9. The tunnel detection method based on a color image according to claim 8, wherein Based on the results of the feature matching model, determine the specific position coordinates and severity of each defect area. The calculation formula for the severity score is as follows: D = A·(1 + C depth )·S(F1, F2) Where D is the defect severity score, A is the area of the defective region, and C depth is the color depth change score; Finally, based on the defect severity score D, generate a complete defect detection report and output the evaluation data. The confidence score of the evaluation data is calculated by combining the severity score and the lighting change compensation parameter. The calculation expression is as follows: Where C conf is the confidence score for defect detection.
Citation Information
Cited By
Concrete crack leakage damage assessment method and system
CN120470452A
Tunnel portal dynamic light and signal control system based on vision algorithm
CN120751553A
Copper bar conducting layer welding defect detection method based on machine vision
CN120976142A
Underwear design parameter adjusting method and system based on image analysis
CN121392045A
Tunnel crack detection method based on image recognition
CN121415265A