Tunnel inspection vehicle light adaptation and image enhancement method

CN122391217BActive Publication Date: 2026-10-16LIAONING JINYANG GROUP INFORMATION TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610839354.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-11
Publication Date
2026-10-16
Estimated Expiration
2046-06-11

AI Technical Summary

Technical Problem

[0003]隧道空间狭长且封闭,单一光源随拍摄距离增加呈非线性衰减,导致原始图像存在严重的局部低照度与强反光交替现象

Benefits of technology

1.本发明通过结合激光雷达点云数据与车辆里程计数据构建包含空间位置与光照衰减系数的二维光照估计矩阵,对明度通道分量进行分尺度光照补偿,从物理层面消除了隧道不同深度的光照畸变。在光照一致化的图像基础上,采用光束法平差策略结合隧道壁几何曲率先验信息作为正则化约束项求解投影变换参数,排除了光照残留差异对特征匹配的干扰,消除了全景图像的拼接错位与重影。光照自适应预处理与基于几何约束的图像拼接相互配合,阻断了光照误差向拼接环节的传递,保持了裂缝病害的几何形态连续性,为后续病害检测排除了错位干扰。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122391217B_ABST
    Figure CN122391217B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of image data processing, in particular to a tunnel inspection vehicle light self-adaption and image enhancement method. Obtain multi-camera original image, combine laser radar point cloud and odometer data to construct two-dimensional light estimation matrix, and perform light self-adaption preprocessing on the brightness channel; extract overlapping area feature points, combine beam method adjustment and geometric curvature prior to perform panoramic stitching; decompose the panoramic image into multiple frequency bands, and perform fusion reconstruction through adaptive gain and discrete wavelet transform denoising amplification; input the enhanced image into a detection network, extract multi-scale features, combine graph neural network to aggregate micro target features, and output disease detection results. From the physical level, eliminate light distortion of different depths, eliminate light residual interference to eliminate panoramic stitching misplacement, improve the detail contrast of low light area, and strengthen the micro disease feature expression ability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image data processing technology, specifically to a method for adaptive lighting and image enhancement for tunnel inspection vehicles. Background Technology

[0002] When existing tunnel inspection vehicles collect images of the tunnel interior walls, they typically use an array of multiple cameras to capture images simultaneously. The backend image processing workflow is generally executed independently in sequence: feature point extraction and matching are performed directly on the raw images captured by multiple cameras, the homography matrix is ​​calculated, and then image perspective transformation and fusion are performed to generate a panoramic image; to address the uneven lighting inside the tunnel, histogram equalization or global gamma correction methods are typically used to adjust the brightness of the panoramic image; the brightness-adjusted panoramic image is then input into a convolutional neural network, which extracts image features through multiple bottom-up convolutional layers, and then combines deep features with shallow features through upsampling operations to output the defect detection results.

[0003] The long, narrow, and enclosed space of a tunnel causes a single light source to non-linearly decay with increasing shooting distance, resulting in severe alternations of localized low illumination and strong reflections in the original image. Existing technologies, such as global gamma correction or histogram equalization, cannot adjust illumination compensation according to the spatial differences at different tunnel depths, leading to the simultaneous loss of detail in dark areas and overexposure in bright areas. When extracting feature points from images with severe illumination distortion, incorrect matching points tend to concentrate in bright reflective areas or areas affected by noise in dark areas, causing deviations in homography matrix calculations. This erroneous projection transformation caused by illumination distortion directly results in misalignment and ghosting during panoramic image stitching. Stitching misalignment disrupts the geometric continuity of defects such as cracks, causing subsequent convolutional neural networks to misidentify misaligned edges as defect features or miss real minor defects during feature extraction. This creates a vicious cycle where the three stages of illumination adaptive preprocessing, image stitching, and defect detection mutually hinder each other, leading to error accumulation. Summary of the Invention

[0004] The purpose of this invention is to provide a method for adaptive lighting and image enhancement for tunnel inspection vehicles, which can solve the problems mentioned in the background art.

[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A method for adaptive illumination and image enhancement for tunnel inspection vehicles includes the following steps: acquiring original image sequences collected by multiple cameras mounted on the tunnel inspection vehicle; performing adaptive illumination preprocessing on the original image sequences to obtain preprocessed image sequences; extracting feature points of overlapping regions from the preprocessed image sequences; performing panoramic image stitching on the preprocessed image sequences based on the feature points of overlapping regions to obtain a tunnel panoramic image; performing multi-band decomposition on the tunnel panoramic image; performing adaptive gain processing on each sub-image of the decomposed frequency bands; fusing and reconstructing the processed sub-images of the frequency bands to obtain an enhanced panoramic image; inputting the enhanced panoramic image into a preset target detection network; extracting multi-scale features of the enhanced panoramic image through the preset target detection network; aggregating the multi-scale features into small target features; and outputting tunnel defect detection results.

[0006] Preferably, the illumination adaptive preprocessing of the original image sequence includes: converting the original image sequence from RGB color space to HSV color space, extracting the V channel component in the HSV color space; constructing a two-dimensional illumination estimation matrix based on spatial location and illumination attenuation coefficient, performing a dot product operation between the V channel component and the two-dimensional illumination estimation matrix to generate an initial illumination compensation map; performing Laplacian pyramid downsampling decomposition on the initial illumination compensation map to obtain multiple illumination detail layers at different scales, performing convolution operations on the multiple illumination detail layers at different scales with preset Gaussian kernels of corresponding scales, and upsampling and reconstructing the multiple illumination detail layers at different scales after convolution operations to generate the final illumination compensation map.

[0007] Preferably, the panoramic image stitching of the preprocessed image sequence based on the feature points of the overlapping region includes: performing bidirectional fast feature point descriptor matching on the feature points of the overlapping region to extract matching feature point pairs; calculating the Hamming distance between the matching feature point pairs, and removing matching feature point pairs whose Hamming distance is greater than a preset distance threshold to obtain finely matched feature point pairs; calculating the homography matrix using the finely matched feature point pairs, and using the homography matrix as the initial projection transformation parameter; constructing a reprojection error cost function based on the initial projection transformation parameter, iteratively solving the reprojection error cost function using a bundle adjustment strategy, updating the initial projection transformation parameter to obtain the target projection transformation parameter, and performing perspective transformation and image fusion on the preprocessed image sequence based on the target projection transformation parameter.

[0008] Preferably, the step of performing multi-band decomposition on the tunnel panoramic image and adaptive gain processing on each sub-image obtained after decomposition includes: performing a fast Retinex transform on the tunnel panoramic image to decompose the tunnel panoramic image into a low-frequency illumination component and multiple high-frequency detail components; calculating the local mean and global mean of the low-frequency illumination component, generating an adaptive gain coefficient based on the ratio of the local mean to the global mean; performing linear stretching processing on the low-frequency illumination component using the adaptive gain coefficient, while obtaining the gradient magnitude of the multiple high-frequency detail components, constructing a nonlinear mapping function based on the gradient magnitude, and adjusting the contrast of the multiple high-frequency detail components through the nonlinear mapping function.

[0009] Preferably, the step of extracting multi-scale features of the enhanced panoramic image through the preset target detection network includes: inputting the enhanced panoramic image into the backbone network of the preset target detection network, performing convolution operations through multiple residual blocks connected in series in the backbone network to generate four initial feature maps at different scales; performing channel attention weight allocation and spatial attention weight allocation on the four initial feature maps at different scales respectively to generate attention-weighted feature maps; inputting the attention-weighted feature maps into a feature pyramid network, and transferring deep semantic information to shallow feature maps through top-down paths and lateral connections in the feature pyramid network to generate the multi-scale features.

[0010] Preferably, the step of aggregating the micro-target features of the multi-scale features includes: selecting a shallow feature map containing the highest resolution feature information and a deep feature map containing the richest semantic information from the multi-scale features; performing 1×1 convolution dimensionality reduction on the shallow feature map to generate shallow dimensionality-reduced features; performing bilinear interpolation upsampling on the deep feature map to generate upsampled features; concatenating the upsampled features and the shallow dimensionality-reduced features along the channel dimension to generate a concatenated feature map; and sequentially performing depthwise separable convolution operations and batch normalization on the concatenated feature map to generate micro-target aggregated features.

[0011] Preferably, the construction of the two-dimensional illumination estimation matrix based on spatial location and illumination attenuation coefficient includes: acquiring lidar point cloud data and vehicle odometer data from a tunnel inspection vehicle; performing time synchronization and coordinate transformation on the lidar point cloud data based on the vehicle odometer data to generate a three-dimensional point cloud map of the tunnel; extracting the three-dimensional spatial coordinates of points on the tunnel wall surface from the three-dimensional point cloud map of the tunnel, projecting the three-dimensional spatial coordinates onto the pixel plane of the original image sequence to generate a depth value for each pixel in the original image sequence; calculating the cosine value of the incident angle for each pixel based on the depth value and a preset light source position coordinate, calculating the illumination attenuation coefficient by combining a preset exponential attenuation model with the cosine value of the incident angle, and arranging the illumination attenuation coefficients in a matrix according to the coordinate positions in the pixel plane to generate the two-dimensional illumination estimation matrix.

[0012] Preferably, the iterative solution of the reprojection error cost function using a bundle adjustment strategy includes: obtaining the initial camera pose value when the tunnel inspection vehicle acquires the preprocessed image sequence; using the initial camera pose value and the initial projection transformation parameters as optimization variables, establishing a nonlinear equation system containing the optimization variables; extracting the geometric curvature a priori information of the tunnel wall, converting the geometric curvature a priori information into regularization constraint terms, adding the regularization constraint terms to the reprojection error cost function; using the Levenburg-Marquardt algorithm to perform nonlinear least squares solution on the reprojection error cost function with the added regularization constraint terms, calculating the update step size of the optimization variables, stopping the iteration when the update step size is less than a preset convergence threshold, and outputting the target projection transformation parameters.

[0013] Preferably, the contrast adjustment of the plurality of high-frequency detail components through the nonlinear mapping function includes: performing a discrete wavelet transform on the plurality of high-frequency detail components to decompose them into horizontal sub-bands, vertical sub-bands, and diagonal sub-bands; calculating the local variance of each wavelet coefficient in the horizontal sub-band, the vertical sub-band, and the diagonal sub-band; setting a variance threshold, identifying wavelet coefficients with local variance less than the variance threshold as noise coefficients, and setting the noise coefficients to zero; inputting wavelet coefficients with local variance greater than or equal to the variance threshold into the nonlinear mapping function, performing exponential transform amplification on the wavelet coefficients through the nonlinear mapping function, and performing an inverse discrete wavelet transform on the processed wavelet coefficients to generate the contrast-adjusted plurality of high-frequency detail components.

[0014] Preferably, the step of sequentially performing depthwise separable convolution and batch normalization on the stitched feature map to generate micro-target aggregated features includes: inputting the stitched feature map into a graph neural network to extract the topological connectivity between each pixel node in the stitched feature map; constructing an adjacency matrix based on the topological connectivity; performing graph convolution on the adjacency matrix and the node feature vectors of the stitched feature map to generate graph convolution features; sequentially performing the depthwise separable convolution and batch normalization on the graph convolution features; adding the residuals of the processed graph convolution features and the stitched feature map; and performing activation function operations on the feature map after residual addition to generate the micro-target aggregated features.

[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. This invention constructs a two-dimensional illumination estimation matrix containing spatial location and illumination attenuation coefficients by combining lidar point cloud data and vehicle odometer data. This matrix performs scaled illumination compensation on the brightness channel components, physically eliminating illumination distortion at different tunnel depths. Based on an image with consistent illumination, a bundle adjustment strategy combined with prior information on tunnel wall geometry curvature is used as a regularization constraint to solve for projection transformation parameters. This eliminates interference from residual illumination differences on feature matching and removes stitching misalignment and ghosting in panoramic images. The adaptive illumination preprocessing and geometrically constrained image stitching work together to prevent the propagation of illumination errors to the stitching stage, maintaining the geometric continuity of crack defects and eliminating misalignment interference for subsequent defect detection.

[0016] 2. This invention employs multi-band decomposition to divide images into low-frequency illumination components and high-frequency detail components. An adaptive gain coefficient is generated based on the ratio of the local mean to the global mean to adjust the low-frequency component. Discrete wavelet transform is combined to extract local variance, eliminating noise coefficients and amplifying effective wavelet coefficients, thereby improving the detail contrast in low-light areas. In the disease detection stage, multi-scale features are fused through top-down paths and lateral connections. Deep features are upsampled and concatenated with shallow, dimensionality-reduced features. A graph neural network is introduced to extract the topological connections between pixel nodes and construct an adjacency matrix for graph convolution operations. Residual summation fuses local and global structural features, enhancing the feature representation capability of small target diseases. Attached Figure Description

[0017] Figure 1 This is a flowchart of the tunnel inspection vehicle illumination adaptation and image enhancement method of the present invention; Figure 2 This is a detailed flowchart of the adaptive lighting preprocessing of the present invention; Figure 3 This is a detailed flowchart of the panoramic image stitching process of the present invention; Figure 4This is a flowchart of the multi-band decomposition and adaptive gain processing of the present invention; Figure 5 This is a detailed flowchart of the multi-scale feature extraction process of the present invention; Figure 6 This is a detailed flowchart of the micro-target feature aggregation of the present invention. Detailed Implementation

[0018] This specific embodiment is used to further describe the illumination adaptation and image enhancement method for tunnel inspection vehicles. The described embodiments are only some preferred implementations and are not intended to limit the scope of protection of this method. Other implementations obtained by those skilled in the art based on the core concept of this technical solution without creative effort are all within the scope of this method.

[0019] refer to Figure 1 In one embodiment, a sequence of original images synchronously acquired by multiple cameras mounted on a tunnel inspection vehicle is obtained. Each frame in the original image sequence corresponds to a local area of ​​the tunnel wall, and adjacent frames overlap within a predetermined range. The original image sequence undergoes adaptive illumination preprocessing to obtain a preprocessed image sequence. Specifically, each frame in the original image sequence undergoes pixel-by-pixel illumination consistency correction to eliminate local brightness differences caused by illumination attenuation in the tunnel space and suppress noise in dark areas and overexposure distortion in bright areas. During the correction process, for pixels at different spatial locations in the image, corresponding illumination compensation intensities are set based on the illumination attenuation characteristics of the tunnel space at that location. This ensures a uniform overall brightness distribution in the corrected image while preserving details such as texture and cracks in the tunnel wall, avoiding loss of detail or blurred edges during the correction process.

[0020] Furthermore, feature points in the overlapping regions of the preprocessed image sequence are extracted. Based on these feature points, panoramic image stitching is performed on the preprocessed image sequence to obtain a tunnel panoramic image. Specifically, for the overlapping regions of adjacent frames in the preprocessed image sequence, feature points with rotation and scale invariance are extracted. During feature point extraction, regions with drastic grayscale changes, such as edges and corners, are prioritized to ensure the stability and distinguishability of the feature points. A corresponding binary descriptor is generated for each extracted feature point. The descriptor contains the grayscale distribution features of the feature point's neighborhood and is rotation and illumination invariant. Matching between adjacent frames is performed based on the feature point descriptors. During matching, the difference between the descriptors of matched feature point pairs is ensured to be within a preset range, and incorrectly matched feature point pairs are discarded. The projection transformation relationship between adjacent frames is calculated based on the matching results. This projection transformation relationship describes the spatial coordinate mapping rules of corresponding pixels in two adjacent frames. Based on the projection transformation relationship, all preprocessed images are spatially aligned so that all image frames are mapped to the same global coordinate system, thus completing the fusion and stitching of multiple frames. During the stitching process, the overlapping areas of adjacent frames are weighted and fused to eliminate brightness differences at the stitching boundaries, generating a panoramic image covering a continuous area of ​​the tunnel wall.

[0021] Furthermore, the tunnel panoramic image is decomposed into multiple frequency bands. Adaptive gain processing is applied to each frequency band sub-image obtained after decomposition, and the processed frequency band sub-images are then fused and reconstructed to obtain an enhanced panoramic image. Specifically, the tunnel panoramic image is decomposed into multiple sub-images corresponding to different spatial frequencies. The low-frequency sub-image corresponds to the overall illumination distribution of the image, containing information on large-scale brightness variations, while the high-frequency sub-image corresponds to detailed information such as edges and textures, containing information on local grayscale variations. Corresponding adaptive gain processing strategies are set for the content characteristics of different frequency band sub-images. The low-frequency sub-image undergoes brightness distribution equalization processing to eliminate residual local brightness differences in the panoramic image, resulting in a uniform overall brightness distribution. The high-frequency sub-image undergoes detail contrast enhancement processing to amplify the detailed features corresponding to defects such as cracks and spalling in the tunnel walls, while suppressing noise interference. After processing, all frequency band sub-images are fused to reconstruct an enhanced panoramic image with clear details and uniform brightness.

[0022] Furthermore, the enhanced panoramic image is input into a pre-defined target detection network. This network extracts multi-scale features from the enhanced panoramic image and aggregates these features to identify small targets, outputting tunnel defect detection results. Specifically, the pre-defined target detection network includes a feature extraction branch, a feature aggregation branch, and a detection head branch. All branches are constructed based on convolutional operations, enabling end-to-end feature extraction and defect detection. After the enhanced panoramic image is input into the feature extraction branch, it undergoes multiple convolutional operations to generate multiple feature maps of different resolutions. These feature maps correspond to image content information at different scales. High-resolution shallow feature maps contain rich detail information, corresponding to small-sized target content, while low-resolution deep feature maps contain rich semantic information, corresponding to large-sized target content. These multiple feature maps of different resolutions together form multi-scale features. The multi-scale features are then input into the feature aggregation branch. For small targets within tunnel defects, the high-resolution shallow features and high-semantic deep features corresponding to the multi-scale features are fused and aggregated. This combines the semantic information from the deep features with the detail information from the shallow features, strengthening the feature representation of small targets and preventing the loss of small defect features during deep convolution. The aggregated features, along with the multi-scale features, are input into the detection head branch. The detection head branch performs convolution operations to classify and locate tunnel defects, and outputs tunnel defect detection results containing defect category, location, and bounding box information.

[0023] Table 1. Image brightness statistics before and after adaptive illumination preprocessing.

[0024] Table 1 compares the statistical parameters of the brightness components of the original image and the preprocessed image before and after the illumination adaptive preprocessing. The table clarifies the correction effect of the preprocessing operation on the brightness distribution of the image. After preprocessing, the local brightness standard deviation of the image is in a stable range, and the proportion of abnormal pixels in the dark and bright areas is effectively controlled, providing a consistent image basis for subsequent feature point extraction and matching, and avoiding the interference of illumination distortion on feature matching.

[0025] In this embodiment, by performing an adaptive lighting preprocessing step followed by panoramic image stitching, the interference of lighting distortion on feature point extraction and matching is eliminated, avoiding stitching misalignment and ghosting. Through adaptive gain processing of multi-band decomposition, brightness equalization and detail enhancement of the panoramic image are achieved simultaneously, preserving the detailed features of tunnel defects. Through multi-scale feature extraction and small target feature aggregation, the feature expression of small tunnel defects is strengthened, achieving accurate detection of tunnel defects.

[0026] refer to Figure 2In a preferred embodiment, when performing illumination-adaptive preprocessing on the original image sequence, each frame of the original image sequence is first converted from the RGB color space to the HSV color space. Specifically, the values ​​of the R, G, and B channel components of each pixel in the RGB color space are first normalized to the [0,1] interval. The conversion from RGB color space to HSV color space is completed based on a preset color space conversion matrix. During the conversion, the hue (H), saturation (S), and lightness (V) components of each pixel are calculated. After the conversion, the V channel component in the HSV color space is extracted. The V channel component corresponds to the lightness information of the image, contains all the illumination distribution features in the image, and is not affected by color information. It can be used to correct the illumination distribution separately, avoiding damage to the color information of the image during the correction process.

[0027] Furthermore, a two-dimensional illumination estimation matrix based on spatial location and illumination attenuation coefficient is constructed. The V-channel components are multiplied by the two-dimensional illumination estimation matrix to generate an initial illumination compensation map. Specifically, LiDAR point cloud data and vehicle odometer data from the tunnel inspection vehicle are acquired. Based on the vehicle odometer data, the LiDAR point cloud data is time-synchronized and coordinate-transformed to generate a three-dimensional point cloud map of the tunnel. The vehicle odometer data contains pose change information of the inspection vehicle during image acquisition. Based on the data acquisition timestamp, the LiDAR point cloud data is time-synchronized with the original image sequence acquired by the camera, ensuring that point cloud data acquired at the same time correspond to image frames, guaranteeing spatial consistency between point cloud data and image data. Based on the vehicle's vehicle coordinate system transformation relationship, the point cloud data acquired by the LiDAR in the vehicle coordinate system is transformed to the world coordinate system. This allows for the stitching and registration of multiple frames of point cloud data, generating a three-dimensional point cloud map of the tunnel covering the continuous space of the tunnel.

[0028] Furthermore, the 3D spatial coordinates of tunnel wall surface points are extracted from the tunnel's 3D point cloud map. These coordinates are then projected onto the pixel plane of the original image sequence to generate the depth value for each pixel. Specifically, based on the camera's intrinsic parameter matrix, a projection mapping relationship is established between the 3D spatial coordinates in the world coordinate system and the 2D pixel coordinates in the pixel plane. This projection mapping relationship maps the tunnel wall surface points in 3D space to the pixel plane of the image frame, obtaining the 3D spatial point corresponding to each pixel coordinate. The depth value is the straight-line distance between the tunnel wall surface point corresponding to that pixel and the camera's optical center, reflecting the spatial location of that pixel and the distance between it and the camera, providing a spatial basis for calculating the illumination attenuation coefficient.

[0029] Furthermore, based on the depth value and the preset light source position coordinates, the cosine of the incident angle is calculated for each pixel. Combining this with a preset exponential decay model and the cosine of the incident angle, a light attenuation coefficient is calculated. These attenuation coefficients are then arranged in a matrix according to their coordinate positions in the pixel plane to generate a two-dimensional lighting estimation matrix. The incident angle is the angle between the normal vector of a point on the tunnel wall surface and the incident ray from the light source. The cosine of the incident angle is calculated as follows:

[0030] in, Let be the cosine of the incident angle corresponding to the i-th pixel in the pixel plane. This is the spatial vector pointing from the light source position to the point on the tunnel wall surface corresponding to that pixel. Let be the normal vector of a point on the tunnel wall surface. For spatial vectors The modulus corresponds to the depth value of the corresponding pixel. Normal vector The length of the module.

[0031] Based on the exponential decay model, the illumination attenuation coefficient is calculated using the cosine of the incident angle, as follows:

[0032] in, Let i be the illumination attenuation coefficient corresponding to the i-th pixel. The preset illumination attenuation constant, It is a natural constant. This is the depth value corresponding to that pixel.

[0033] Based on the illumination attenuation coefficient corresponding to each pixel, a two-dimensional illumination estimation matrix is ​​constructed as follows:

[0034] in, This is a two-dimensional illumination estimation matrix. The height of the image. The width of the image. These are the pixel coordinates in the pixel plane. coordinates The light attenuation coefficient corresponding to the pixel.

[0035] Furthermore, the V-channel components are multiplied by the two-dimensional illumination estimation matrix to generate an initial illumination compensation map. The multiplication operation is performed as follows:

[0036] in, The initial illumination compensation map in coordinates Pixel value at that location, For the V channel components in coordinates Pixel value at that location, The two-dimensional illumination estimation matrix in coordinates The value at that location.

[0037] Furthermore, the initial illumination compensation image is decomposed using Laplacian pyramid downsampling to obtain multiple illumination detail layers at different scales. These layers are then convolved with corresponding preset Gaussian kernels. Finally, the resulting convolved layers are upsampled and reconstructed to generate the final illumination compensation image. Specifically, the initial illumination compensation image is first decomposed using a Gaussian pyramid. Each layer of the Gaussian pyramid is obtained by convolving and downsampling the previous layer. The number of layers in the Gaussian pyramid can be set according to the image size, and the resolution of each decomposed layer is half that of the previous layer. A Laplacian pyramid is then constructed based on the Gaussian pyramid. Each layer of the Laplacian pyramid corresponds to the difference between two adjacent layers in the Gaussian pyramid, containing illumination detail information at the corresponding scale. The decomposition method of the Laplacian pyramid is as follows:

[0038] in, This is the lighting detail layer for the nth layer of the Laplace Pyramid. This is an image of the nth level of the Gaussian pyramid. This is an upsampling operation; the resolution of the upsampled image is equal to... Consistent This is the image of the (n+1)th level of the Gaussian pyramid. This is the convolution operator. The default Gaussian kernel, denoted as the standard deviation of the Gaussian kernel.

[0039] After decomposing the image into multiple illumination detail layers at different scales, each detail layer is convolved with a Gaussian kernel of the corresponding scale to smooth the layers, suppressing noise interference while preserving effective edge detail information. Following convolution, all illumination detail layers at all scales are upsampled and reconstructed to ensure their resolution matches the original V channel components. All reconstructed detail layers are then superimposed to generate the final illumination compensation map. This final illumination compensation map replaces the V channel components in the original HSV image, and the HSV color space is converted back to RGB color space to obtain the preprocessed image sequence.

[0040] Table 2. Calculation parameters for illumination attenuation coefficient of two-dimensional illumination estimation matrix.

[0041] Table 2 shows the calculation parameters of the illumination attenuation coefficient under different depth values ​​and incident angles. This table clarifies the value logic of the illumination attenuation coefficient corresponding to pixels at different spatial locations in the two-dimensional illumination estimation matrix, providing a quantitative basis for illumination compensation operations, ensuring that the illumination compensation intensity and illumination attenuation degree match in different depth areas, and realizing accurate illumination compensation based on the spatial physical characteristics of the tunnel.

[0042] In this embodiment, by converting the original image to the HSV color space to extract the V channel component, the illumination information of the image can be processed separately, avoiding damage to the color information. By combining LiDAR point cloud data and odometry data, a two-dimensional illumination estimation matrix containing spatial location and illumination attenuation coefficient is constructed. Starting from the physical characteristics of illumination attenuation in tunnel space, pixel-by-pixel accurate illumination compensation is achieved. Through Laplacian pyramid decomposition, multi-scale detail optimization is performed on the initial illumination compensation map. While completing illumination consistency correction, the detail information in the image is preserved, avoiding detail loss and edge blurring during the illumination compensation process, and providing a high-quality image foundation for subsequent feature point extraction and matching.

[0043] refer to Figure 3 In a preferred embodiment, when performing panoramic image stitching on a preprocessed image sequence based on feature points in overlapping regions, bidirectional fast feature point descriptor matching is first performed on the feature points in the overlapping regions to extract matching feature point pairs. Specifically, for two adjacent frames in the preprocessed image sequence, feature points in the overlapping regions of the first frame and the second frame are extracted respectively. The feature point extraction uses a corner detection algorithm, selecting corner positions with drastic grayscale changes in the image as feature points. The detected feature points are assigned a principal direction to ensure rotation invariance. A corresponding binary fast feature point descriptor is generated for each feature point. The descriptor consists of the grayscale comparison results of multiple pixel pairs in the neighborhood of the feature point, exhibiting high computational efficiency and matching stability. During the matching process, the feature point descriptors of the first frame image are used as a reference, and the descriptor with the smallest Hamming distance in the feature point descriptors of the second frame image is searched as a candidate matching descriptor. Then, the candidate matching descriptors of the second frame image are used as a reference, and the descriptor with the smallest Hamming distance in the feature point descriptors of the first frame image is searched again. Only when the results of the two searches correspond to each other are the set of feature points determined as a matching feature point pair. By using bidirectional matching, erroneous feature point pairs that are matched in one direction are eliminated, thereby improving the accuracy of matching.

[0044] Further, the Hamming distance between matching feature point pairs is calculated, and matching feature point pairs with a Hamming distance greater than a preset threshold are removed to obtain finely matched feature point pairs. The Hamming distance measures the degree of difference between two binary descriptors; the smaller the Hamming distance, the higher the similarity between the two descriptors and the higher the matching accuracy. The Hamming distance is calculated as follows:

[0045] in, Feature point descriptor and Hamming distance between them The number of binary bits for the descriptor. For descriptor The value of the j-th binary bit, For descriptor The value of the j-th binary bit.

[0046] After calculating the Hamming distance of all matching feature point pairs, a preset distance threshold is set. Matching feature point pairs with a Hamming distance greater than the preset distance threshold are judged as incorrect matches and removed. Matching feature point pairs with a Hamming distance less than or equal to the preset distance threshold are retained to obtain fine-matching feature point pairs, which further improves the accuracy of matching feature point pairs and provides a reliable basis for subsequent projection transformation parameter calculation.

[0047] Furthermore, the homography matrix is ​​calculated using precisely matched feature point pairs, and this homography matrix is ​​used as the initial projection transformation parameter. The homography matrix describes the projection mapping relationship between two planes, enabling pixel coordinate transformation between two adjacent image frames. The homography matrix is ​​calculated as follows:

[0048] in, These are the pixel coordinates of the feature points in the first frame of the image. These are the pixel coordinates of the corresponding matching feature points in the second frame image. It is a homography matrix, a 3×3 homogeneous transformation matrix, containing 8 independent unknown parameters, which can be solved by at least 4 sets of non-collinear fine-matching feature point pairs.

[0049] Furthermore, a reprojection error cost function based on the initial projection transformation parameters is constructed. This cost function is iteratively solved using a bundle adjustment strategy to update the initial projection transformation parameters, resulting in the target projection transformation parameters. Perspective transformation and image fusion are then performed on the preprocessed image sequence based on these parameters. Specifically, the initial camera pose values ​​of the tunnel inspection vehicle during the acquisition of the preprocessed image sequence are obtained. These initial pose values ​​contain the camera's position and orientation information in the world coordinate system and can be calculated from vehicle odometer data and camera intrinsic parameters. Using the initial camera pose values ​​and initial projection transformation parameters as optimization variables, a system of nonlinear equations is established. The objective of solving this system is to minimize the reprojection error of all precisely matched feature point pairs.

[0050] Furthermore, the prior information of the geometric curvature of the tunnel wall is extracted. Tunnel walls are typically regular arc-shaped surface structures with fixed geometric curvature parameters. This prior information is transformed into regularization constraint terms, which are then added to the reprojection error cost function. These regularization constraints limit the solution range of the optimization variables, preventing overfitting and improving the accuracy of the projection transformation parameters. The reprojection error cost function with added regularization constraints is constructed as follows:

[0051] in, Let the reprojection error cost function be... These are the initial projection transformation parameters corresponding to the homography matrix. The initial values ​​for the camera pose. The number of feature point pairs for fine matching. Here are the measured pixel coordinates of the i-th feature point in the second frame image. The reprojected pixel coordinates of the i-th feature point are calculated based on the projection transformation parameters and camera pose. It is the L2 norm. These are the regularization weight coefficients. The regularization constraint term is constructed based on the prior information of the tunnel wall geometry. represents the geometric curvature parameter of the tunnel wall.

[0052] Furthermore, the Levenberg-Marquardt algorithm is used to perform nonlinear least squares solution on the reprojection error cost function with added regularization constraints. The update step size of the optimization variables is calculated, and iteration stops when the update step size is less than a preset convergence threshold. The target projection transformation parameters are then output. The Levenberg-Marquardt algorithm combines the advantages of the Gauss-Newton algorithm and gradient descent algorithm, exhibiting fast convergence speed and strong robustness. Its iterative update calculation method is as follows:

[0053] in, To optimize the update step size of variables, Let Jacobian matrix be the cost function relative to the optimization variables. The damping coefficient is... It is the identity matrix. This is the reprojection error vector.

[0054] During the iterative solution process, after each iteration, the update step size of the optimization variables is calculated. When the update step size is less than the preset convergence threshold, the iteration is considered converged, the iteration stops, and the optimized target projection transformation parameters are output. Based on the target projection transformation parameters, perspective transformation is performed on all image frames in the preprocessed image sequence to map all image frames to the same global coordinate system. Weighted linear fusion is then performed on the overlapping areas of adjacent image frames to eliminate brightness differences and structural misalignments at the stitching boundaries, generating a panoramic tunnel image.

[0055] refer to Figure 4 Furthermore, the tunnel panoramic image is decomposed into multiple frequency bands. When performing adaptive gain processing on the resulting sub-images, a fast Retinex transform is applied to the tunnel panoramic image, decomposing it into a low-frequency illumination component and multiple high-frequency detail components. The fast Retinex transform is based on the visual imaging principle of the human eye, decomposing the image into an illumination component and a reflectance component. The illumination component corresponds to the low-frequency information of the image, and the reflectance component corresponds to the high-frequency detail information. The decomposition method is as follows:

[0056] in, For the panoramic image of the tunnel in coordinates Pixel value at that location, The low-frequency illumination component corresponds to the illumination distribution in the image. The high-frequency detail component corresponds to the reflectivity information of the image, including details such as the image's edges and textures.

[0057] Furthermore, the local and global mean values ​​of the low-frequency illumination component are calculated, and an adaptive gain coefficient is generated based on the ratio of the local to the global mean. The global mean is the average value of all pixel values ​​in the low-frequency illumination component, reflecting the overall brightness level of the image; the local mean is the average pixel value within a preset-size window centered on the target pixel in the low-frequency illumination component, reflecting the local brightness level around the target pixel. The adaptive gain coefficient is calculated as follows:

[0058] in, coordinates Adaptive gain coefficient at the location, This represents the global mean of the low-frequency illumination component. For the low-frequency illumination component in coordinates The local window mean at that location.

[0059] Furthermore, an adaptive gain coefficient is used to linearly stretch the low-frequency illumination component, increasing the brightness of areas where the local brightness is lower than the global mean and suppressing the brightness of areas where the local brightness is higher than the global mean, thereby achieving brightness equalization of the low-frequency illumination component and eliminating residual local brightness differences in the panoramic image. Simultaneously, the gradient magnitudes of multiple high-frequency detail components are acquired, and a nonlinear mapping function is constructed based on these gradient magnitudes. This nonlinear mapping function is then used to adjust the contrast of multiple high-frequency detail components.

[0060] Furthermore, discrete wavelet transform is performed on multiple high-frequency detail components, decomposing them into horizontal, vertical, and diagonal sub-bands. The horizontal sub-band corresponds to the horizontal edge information of the image, the vertical sub-band to the vertical edge information, and the diagonal sub-band to the diagonal edge and texture information. The local variance of each wavelet coefficient in the horizontal, vertical, and diagonal sub-bands is calculated. Local variance reflects the texture richness of the region corresponding to the wavelet coefficient; a larger local variance indicates more effective detail information in the region, while a smaller local variance indicates a higher probability of noise. A variance threshold is set, and wavelet coefficients with local variance less than the threshold are identified as noise coefficients and set to zero, thus suppressing noise in the high-frequency detail components. Wavelet coefficients with local variance greater than or equal to the variance threshold are input to a nonlinear mapping function, which performs an exponential transform amplification process to enhance the contrast of effective details. The calculation method of the nonlinear mapping function is as follows:

[0061] in, The processed wavelet coefficients, The input are the original wavelet coefficients. The maximum absolute value of the wavelet coefficients. This is a preset nonlinear adjustment coefficient, with a value range of (0,1).

[0062] After magnification, all sub-band wavelet coefficients are subjected to inverse discrete wavelet transform to generate multiple high-frequency detail components with contrast adjustment. The processed low-frequency illumination components are then fused with the high-frequency detail components to reconstruct the enhanced panoramic image.

[0063] Table 3. Statistics of reprojection errors before and after projection transformation parameter optimization.

[0064] Table 3 shows the statistical data of reprojection error between adjacent image frames before and after bundle adjustment optimization. This table clarifies the optimization effect of the regularization constraint on the projection transformation parameters. After optimization, the average reprojection error between adjacent frames is stabilized within 1 pixel, which effectively improves the coordinate alignment accuracy of image perspective transformation, avoids misalignment and ghosting in the panoramic stitching process, and ensures the continuity of the geometric shape of tunnel defects.

[0065] In this embodiment, precisely matched feature point pairs are obtained through bidirectional fast feature point descriptor matching and Hamming distance filtering, effectively eliminating incorrectly matched feature point pairs. The projection transformation parameters are optimized by combining the bundle adjustment strategy with the regularization constraint of the tunnel wall geometric curvature a priori, improving the accuracy of the projection transformation parameter solution and achieving accurate coordinate alignment of multiple frames, eliminating misalignment and ghosting during panoramic stitching. Multi-band decomposition of the panoramic image is completed through fast Retinex transform, and low-frequency illumination components are adjusted based on adaptive gain coefficients, achieving image brightness equalization. The combination of discrete wavelet transform and nonlinear mapping function enhances the contrast of high-frequency detail components while suppressing noise, providing a high-quality panoramic image foundation for subsequent disease feature extraction.

[0066] refer to Figure 5 In a preferred embodiment, the enhanced panoramic image is input into a preset object detection network. When the preset object detection network extracts multi-scale features from the enhanced panoramic image, it is input into the backbone network of the preset object detection network. Convolution operations are performed on multiple residual blocks connected in series within the backbone network to generate four initial feature maps at different scales. Specifically, the backbone network consists of multiple residual blocks connected in series. Each residual block contains two 1×1 convolutional layers and one 3×3 convolutional layer. The first 1×1 convolutional layer is used to reduce the channel dimensionality of the input feature map, reducing the computational cost of the subsequent 3×3 convolutional layers. The 3×3 convolutional layer is used to extract spatial information from the feature map, capturing features such as edges and textures in the image. The second 1×1 convolutional layer is used to increase the channel dimensionality of the feature map, restoring the number of feature channels. The input and output ends of the residual blocks are connected via skip connections to achieve residual addition, directly transmitting the input features to the output end, avoiding the gradient vanishing problem during deep network training, and improving the network's feature extraction capability. After the enhanced panoramic image is input into the backbone network, it undergoes convolution operations through multiple residual blocks in sequence. The resolution of the feature map gradually decreases while the number of channels gradually increases. Four initial feature maps with different resolutions are output at four different network depths. The resolution of the four initial feature maps decreases sequentially while the number of channels increases sequentially, corresponding to image content information at different scales. The high-resolution feature map output from the shallow layer contains rich detail information, while the low-resolution feature map output from the deep layer contains rich semantic information.

[0067] Furthermore, channel attention weights and spatial attention weights are assigned to the initial feature maps at four different scales to generate attention-weighted feature maps. Channel attention weight assignment assigns weights to different channels of the feature map, increasing the weights of feature channels containing valid disease information and suppressing interference from irrelevant channels. Spatial attention weight assignment assigns weights to different spatial locations of the feature map, increasing the weights of regions containing disease targets and suppressing interference from background regions. The channel attention weights are calculated as follows:

[0068] in, Input feature map Channel attention weight map, It is the Sigmoid activation function. For multilayer perceptron computation, This is a global average pooling operation. This is a global max pooling operation.

[0069] The channel attention weight map is element-wise multiplied with the input feature map to complete the channel attention weighting process, resulting in a channel-weighted feature map. Spatial attention weights are then assigned to the channel-weighted feature map, and the calculation method for the spatial attention weights is as follows:

[0070] in, Input feature map Spatial attention weight map It is the Sigmoid activation function. For a 7×7 convolution operation, This is an average pooling operation based on the channel dimension. This is a max pooling operation based on the channel dimension.

[0071] The spatial attention weight map is multiplied element-wise with the channel-weighted feature map to complete the spatial attention weighting process, resulting in an attention-weighted feature map. Through this sequential weighting of channel and spatial attention, the feature map can be optimized simultaneously from both the channel and spatial dimensions, strengthening the expression of effective features, suppressing interference from irrelevant information, and improving the representational power of the feature map.

[0072] Furthermore, the attention-weighted feature map is input into the feature pyramid network. Through the top-down path and lateral connections in the feature pyramid network, deep semantic information is transferred to the shallow feature map, generating multi-scale features. Specifically, the feature pyramid network includes a top-down upsampling path and lateral connection branches. The top-down path starts from the deepest low-resolution attention-weighted feature map and gradually increases the resolution of the feature map through bilinear interpolation upsampling to obtain a feature map with the same resolution as the shallow feature map. The lateral connection branches add the upsampled deep feature map element-wise with the corresponding resolution shallow attention-weighted feature map, completing the fusion of deep semantic information and shallow detail information. The fused feature map undergoes a 3×3 convolution operation to eliminate the aliasing effect caused by upsampling, finally outputting multiple fused feature maps of different resolutions, forming multi-scale features. Each feature map in the multi-scale features integrates corresponding detail information and deep semantic information, which can simultaneously adapt to the detection needs of disease targets of different sizes.

[0073] refer to Figure 6 Furthermore, the multi-scale features are aggregated into small target features, including selecting shallow feature maps containing the highest resolution feature information and deep feature maps containing the richest semantic information from the multi-scale features. Shallow feature maps have the highest resolution and contain detailed features of minor tunnel defects, but lack sufficient semantic information, making it difficult to distinguish defect features from background interference. Deep feature maps have the richest semantic information and can accurately distinguish defects from the background, but have lower resolution, and detailed features of minor defects are lost during convolution. The shallow feature maps are subjected to 1×1 convolution dimensionality reduction processing to reduce the number of channels and subsequent computational cost, generating shallow dimensionality-reduced features. The deep feature maps are subjected to bilinear interpolation upsampling processing to increase their resolution to the same level as the shallow dimensionality-reduced features, generating upsampled features. The upsampled features and shallow dimensionality-reduced features are then concatenated along the channel dimension, so that the concatenated feature map contains both deep semantic information and shallow detailed information, generating a concatenated feature map. The concatenated feature maps are subjected to depthwise separable convolution operations and batch normalization processing in sequence. The depthwise separable convolution operation consists of depthwise convolution and pointwise convolution, which can extract spatial and channel information of the feature maps while reducing the amount of computation. Batch normalization processing is used to accelerate network convergence and improve network stability. After processing, small target aggregated features are generated.

[0074] Furthermore, the stitched feature map is input into a graph neural network to extract the topological connections between pixel nodes in the stitched feature map. Specifically, each pixel in the stitched feature map is treated as an independent node, and the feature vector of each node is the value of that pixel across all channels. Each pixel node establishes topological connections with its 8-neighborhood pixel nodes, forming an undirected graph structure. An adjacency matrix is ​​constructed based on the topological connections. The elements in the adjacency matrix correspond to whether there is a connection between two nodes; if there is a connection, the element is set to 1, otherwise it is set to 0. A graph convolution operation is performed between the adjacency matrix and the node feature vectors of the stitched feature map to extract the topological structure features between pixel nodes, generating graph convolution features. The graph convolution operation is performed as follows:

[0075] in, The graph convolution features are the output of the graph convolution operation. It is a non-linear activation function. To add self-loops to the adjacency matrix, This is an adjacency matrix constructed based on the topological connection relationships of pixel nodes. It is the identity matrix. for The degree matrix, To construct the node feature vector matrix of the feature map, Let be the trainable weight matrix of the graph convolutional layer.

[0076] Furthermore, depthwise separable convolution operations and batch normalization are sequentially performed on the graph convolution features. The processed graph convolution features and the stitched feature map are then added together by residual summation. This fuses the topological features extracted by graph convolution with the detailed semantic information of the original stitched features. An activation function operation is then performed on the feature map after residual summation to generate aggregated features for small targets. Through graph convolution operations, the topological features of small defects can be effectively extracted, the feature representation of linear defects such as cracks can be strengthened, and the detection capability of small defects can be improved.

[0077] Furthermore, the generated aggregated features of small targets and multi-scale features are input into the detection head branch. The detection head branch contains parallel classification and regression branches. The classification branch predicts the disease category of the region corresponding to each anchor point in the feature map through multi-layer convolution operations. The regression branch predicts the bounding box coordinates and confidence scores of the disease targets through multi-layer convolution operations. The output of the detection head branch is processed by non-maximum suppression to remove duplicate detection boxes, and the final output includes the tunnel disease detection results containing the disease category, bounding box position, and confidence score.

[0078] Table 4 Feature Output Parameters of Each Layer in the Preset Target Detection Network

[0079] Table 4 shows the feature output parameters of each network layer of the preset target detection network. This table clarifies the feature output specifications and uses of each network layer, and clearly presents the complete flow process of multi-scale features from extraction, weighting, fusion to aggregation. It provides quantitative parameter basis for the implementation and deployment of the network, ensuring the feasibility of the network structure.

[0080] In this embodiment, four initial feature maps at different scales are extracted through the backbone network. Channel attention and spatial attention are combined to perform feature weighting, enhancing the expression of effective features and suppressing interference from irrelevant information. The top-down path and lateral connections of the feature pyramid network achieve the fusion of deep semantic information and shallow detail information, generating multi-scale features adapted to targets of different scales. By splicing and fusing shallow high-resolution features with deep high-semantic features, and combining graph neural networks to extract the topological connections of pixel nodes to complete graph convolution operations, effective aggregation of small target features is achieved, enhancing the feature expression of minor tunnel defects and improving the accuracy and recall of minor defect detection.

Claims

1. A method for adaptive illumination and image enhancement for tunnel inspection vehicles, characterized in that, Includes the following steps: The original image sequence collected by multiple cameras mounted on the tunnel inspection vehicle is obtained, and the original image sequence is subjected to illumination adaptive preprocessing to obtain a preprocessed image sequence. Extract the feature points of the overlapping region of the preprocessed image sequence, and perform panoramic image stitching on the preprocessed image sequence based on the feature points of the overlapping region to obtain a panoramic image of the tunnel; The tunnel panoramic image is decomposed into multiple frequency bands, and the sub-images of each frequency band obtained after decomposition are subjected to adaptive gain processing. The processed sub-images of each frequency band are then fused and reconstructed to obtain an enhanced panoramic image. The enhanced panoramic image is input into a preset target detection network. The preset target detection network extracts multi-scale features of the enhanced panoramic image and performs micro-target feature aggregation on the multi-scale features to output tunnel defect detection results. The step of extracting multi-scale features of the enhanced panoramic image through the preset target detection network includes: inputting the enhanced panoramic image into the backbone network of the preset target detection network, performing convolution operations through multiple residual blocks connected in series in the backbone network, and generating four initial feature maps at different scales. Channel attention weights and spatial attention weights are assigned to the initial feature maps at the four different scales respectively to generate attention-weighted feature maps; The attention-weighted feature map is input into the feature pyramid network. Through the top-down path and lateral connection in the feature pyramid network, deep semantic information is transferred to the shallow feature map to generate the multi-scale features. The illumination-adaptive preprocessing of the original image sequence includes: converting the original image sequence from RGB color space to HSV color space, and extracting the V channel component in the HSV color space; A two-dimensional illumination estimation matrix based on spatial location and illumination attenuation coefficient is constructed. The V channel component is multiplied by the two-dimensional illumination estimation matrix to generate an initial illumination compensation map. The initial illumination compensation map is decomposed by Laplacian pyramid downsampling to obtain multiple illumination detail layers of different scales. The multiple illumination detail layers of different scales are convolved with the corresponding preset Gaussian kernels. The convolved illumination detail layers of different scales are then upsampled and reconstructed to generate the final illumination compensation map. The construction of the two-dimensional illumination estimation matrix based on spatial location and illumination attenuation coefficient includes: acquiring lidar point cloud data and vehicle odometer data on the tunnel inspection vehicle; Based on the vehicle odometer data, the lidar point cloud data is synchronized in time and transformed in coordinates to generate a 3D point cloud map of the tunnel. The three-dimensional spatial coordinates of the tunnel wall surface points are extracted from the tunnel three-dimensional point cloud map, and the three-dimensional spatial coordinates are projected onto the pixel plane of the original image sequence to generate the depth value of each pixel in the original image sequence. The cosine of the incident angle of each pixel is calculated based on the depth value and the preset light source position coordinates. The illumination attenuation coefficient is calculated by combining the preset exponential decay model with the cosine of the incident angle. The illumination attenuation coefficients are then arranged in a matrix according to their coordinate positions in the pixel plane to generate the two-dimensional illumination estimation matrix.

2. The method for adaptive illumination and image enhancement for tunnel inspection vehicles according to claim 1, characterized in that, The step of performing panoramic image stitching on the preprocessed image sequence based on the feature points of the overlapping region includes: performing bidirectional fast feature point descriptor matching on the feature points of the overlapping region and extracting matching feature point pairs; Calculate the Hamming distance between the matching feature point pairs, and remove the matching feature point pairs whose Hamming distance is greater than a preset distance threshold to obtain finely matched feature point pairs; The homography matrix is ​​calculated using the precisely matched feature point pairs, and the homography matrix is ​​used as the initial projection transformation parameter; A reprojection error cost function based on the initial projection transformation parameters is constructed. The reprojection error cost function is iteratively solved using a bundle adjustment strategy to update the initial projection transformation parameters and obtain the target projection transformation parameters. Based on the target projection transformation parameters, perspective transformation and image fusion are performed on the preprocessed image sequence.

3. The method for adaptive illumination and image enhancement for tunnel inspection vehicles according to claim 1, characterized in that, The step of performing multi-band decomposition on the tunnel panoramic image and adaptive gain processing on each sub-image of the decomposed frequency band includes: performing fast Retinex transform on the tunnel panoramic image to decompose the tunnel panoramic image into a low-frequency illumination component and multiple high-frequency detail components. Calculate the local mean and global mean of the low-frequency illumination component, and generate an adaptive gain coefficient based on the ratio of the local mean to the global mean; The low-frequency illumination component is linearly stretched using the adaptive gain coefficient, while the gradient magnitudes of the multiple high-frequency detail components are obtained. A nonlinear mapping function is constructed based on the gradient magnitudes, and the contrast of the multiple high-frequency detail components is adjusted using the nonlinear mapping function.

4. The method for adaptive illumination and image enhancement for tunnel inspection vehicles according to claim 1, characterized in that, The step of performing micro-target feature aggregation on the multi-scale features includes: selecting a shallow feature map containing the highest resolution feature information and a deep feature map containing the richest semantic information from the multi-scale features. The shallow feature map is subjected to 1×1 convolution dimensionality reduction processing to generate shallow dimensionality-reduced features; The deep feature map is subjected to bilinear interpolation upsampling to generate upsampled features; The upsampled features and the shallow dimensionality reduction features are concatenated along the channel dimension to generate a concatenated feature map. The stitched feature map is subjected to depthwise separable convolution operations and batch normalization processing in sequence to generate small target aggregate features.

5. The method for adaptive illumination and image enhancement for tunnel inspection vehicles according to claim 2, characterized in that, The iterative solution of the reprojection error cost function using the bundle adjustment strategy includes: obtaining the initial values ​​of the camera pose of the tunnel inspection vehicle when acquiring the preprocessed image sequence; Using the initial camera pose value and the initial projection transformation parameters as optimization variables, a system of nonlinear equations containing the optimization variables is established. Extract the prior information of the geometric curvature of the tunnel wall, convert the prior information of the geometric curvature into a regularization constraint term, and add the regularization constraint term to the reprojection error cost function; The Levenberg-Marquardt algorithm is used to perform nonlinear least squares solution on the reprojection error cost function with the added regularization constraint term, calculate the update step size of the optimization variable, stop the iteration when the update step size is less than the preset convergence threshold, and output the target projection transformation parameters.

6. The method for adaptive illumination and image enhancement for a tunnel inspection vehicle according to claim 3, characterized in that, The step of adjusting the contrast of the plurality of high-frequency detail components through the nonlinear mapping function includes: performing discrete wavelet transform on the plurality of high-frequency detail components to decompose the plurality of high-frequency detail components into horizontal sub-bands, vertical sub-bands and diagonal sub-bands; Calculate the local variance of each wavelet coefficient in the horizontal sub-band, the vertical sub-band, and the diagonal sub-band; Set a variance threshold, determine the wavelet coefficients whose local variance is less than the variance threshold as noise coefficients, and set the noise coefficients to zero; The wavelet coefficients with local variance greater than or equal to the variance threshold are input to the nonlinear mapping function. The wavelet coefficients are then subjected to exponential transform amplification through the nonlinear mapping function. The processed wavelet coefficients are then subjected to discrete wavelet inverse transform to generate the multiple high-frequency detail components with contrast adjustment.

7. The method for adaptive illumination and image enhancement for tunnel inspection vehicles according to claim 4, characterized in that, The step of sequentially performing depthwise separable convolution operations and batch normalization on the stitched feature map to generate small target aggregation features includes: inputting the stitched feature map into a graph neural network to extract the topological connection relationships between each pixel node in the stitched feature map; Based on the topological connection relationship, an adjacency matrix is ​​constructed, and graph convolution operation is performed between the adjacency matrix and the node feature vectors of the concatenated feature map to generate graph convolution features; The depthwise separable convolution operation and the batch normalization process are sequentially performed on the graph convolutional features. The processed graph convolutional features and the stitched feature map are then added together by residual addition. An activation function operation is performed on the feature map after residual addition to generate the micro-target aggregated features.

Citation Information

Patent Citations

  • Concrete structure surface crack detection method and system

    CN111242851A

  • Automobile sealing gasket appearance defect detection method and system based on deep learning

    CN121982033A