## 3 Infrared and Visible Image Fusion
### Fusion Rules for High-Frequency Subbands  
The high-frequency component of an image contains important details such as target edges and texture information. The magnitude of the high-frequency coefficients reflects the richness of the detailed information in the image. In traditional multiscale fusion algorithms, the high-frequency coefficients with the maximum absolute values from both images are typically retained to preserve the detailed information from both sources. However, in the specific application scenario addressed in this paper, the visible image already contains nearly all valuable high-frequency information, including the details of the crack location. Additionally, the visible image also contains high-frequency disruption information, such as white noise on the left side of the crack and uneven structures on the lining surface. If the approach of directly retaining the high-frequency coefficients with the maximum absolute value from both images is followed, the fused image may exhibit high-frequency disruption information in the background region. This disruption information, due to its similarity in scale and brightness to the crack features, can potentially interfere with crack recognition. Similar to the fusion process for low-frequency subbands, it is essential to differentiate between cracks and background regions when dealing with high-frequency components. In this regard, the gradients of the decomposed image in the \(x\)- and \(y\)-directions are represented as \(G_{x}(x,y)\) and \(G_{y}(x,y)\), respectively. The fusion rule devised for high-frequency components at each scale is as follows:  
\[H_{F,d}(x,y)=\left\{ \begin{array}{l}H_{VISA}(x,y)\left|G_{VIS,d}(x,y)-G_{IR,d }(x,y)\right|\leq G_{th,d}(x,y)\text{ and }S(x,y)<0\\ H_{IR,d}(x,y)\text{ else }\end{array} \right. \tag{13}\]  
where \(H_{\star}(x,y)\) is the high-frequency coefficient of point \((x,y)\) in direction \(d\). The position where the difference between the gradients of the two images is less than \(G_{th}\) and the brightness is less than the mean value of the neighborhood is recognized as a crack, and \(H_{VIS}\) is directly used as the fused coefficients. The threshold value \(G_{th}\) plays a crucial role in detail restoration, considering the distinct original resolutions of the infrared and visible images, which results in non-overlapping pixels at the crack location. Selecting an appropriate \(G_{th}\) is essential to strike a balance between retaining image details and accurately recognizing the crack location. When \(G_{th}\) is excessively large, the background section retains an excessive amount of visible image information. Conversely, when \(G_{th}\) is too small, the crack location may not be accurately identified. A larger \(G_{th}\) results in more visible image components being retained, preserving image details to a greater extent. However, this can lead to high-frequency interference in the background region. On the other hand, a smaller \(G_{th}\) preserves more infrared image components, resulting in a purer background. However, an excessively small \(G_{th}\) may cause the fusion rule to be overly strict, potentially diminishing the importance of high-frequency fusion. In this paper, due to significant resolution and crack contrast differences between the two images, as well as the high degree of irregularity on the lining surface, a more conservative strategy is employed. Specifically, a larger \(G_{th}\) is selected to minimize high-frequency interference in the fused image. In this study, \(G_{th,d}\) is set as 0.7 times the maximum absolute difference between \(G_{VIS,d}\) and \(G_{IR,d}\).