## 3 Infrared and Visible Image Fusion
### Fusion Rules for High-Frequency Subbands
After obtaining the feature point matching pairs of the infrared image and the visible image, we selected four points with the largest encircled area among them and performed the perspective transformation according to Equations (4) and (5). In this paper, the infrared image is used as the source image, and the visible image is used as the target image. The result of the transformation is shown in Figure 7.

Figure 4: Keypoint matching result: red lines are wrong match pairs, and green lines are correct match pairs. Figure 5: RANSAC calculation results, where outliers are points that do not fit the model. Figure 6: Wrong match finding, where the orange dotted line is the judgment threshold (N/2), and the red bar is the false match pair. The fused lining surface image data are ultimately input into a semantic segmentation network for recognition. In this context, objective indicators and subjective evaluations based on conventional images have limited significance. Therefore, we assess the fusion algorithms by employing two enhanced U-Net networks and replicating other multiscale fusion algorithms for comparison purposes. The semantic segmentation network is implemented using Python 3.8. In this paper, we use two semantic segmentation networks, ResU-Net [32] and R2U-Net [33], which are both improved U-Net networks, to recognize cracks in images. ResU-Net adds a residual connection to the convolutional layer in U-Net and adds an attention mechanism; R2U-Net adds a recurrent module based on a residual connection. ResU-Net and R2U-Net improve the resolution recognition compared to that of U-Net. The recognition accuracy is significantly improved in images with low contrast, insufficient light, and overexposure. The purpose of using these two improved networks is to exclude the effect of the poor performance of semantic segmentation networks in crack recognition and to facilitate a side-by-side comparison of image fusion algorithms. The evaluation process uses the collected public dataset as a training sample for the semantic segmentation model. This dataset consists of 3100 images. Each image used for training is resized to \(512\times 512\) and converted to grayscale. To avoid overfitting, the original images and fused images used for evaluation are not added to the training set. Figure 8 shows the crack recognition results for each type of sample. It can be seen that the recognition results obtained by directly inputting visible or infrared images to the semantic segmentation model are poor. The background of the infrared images has a brightness similar to that of cracks due to the gullies on the lining surface, resulting in some areas in the background being recognized as cracks. In addition, the lack of contrast leads to the incomplete recognition of some small cracks. Visible images also have areas of misrecognition due to the high level of texture detail on the lining surface, and in low-intensity lighting environments, the characteristics of the gullies formed by the surface concavities are similar to those of the cracks. Algorithm A [34] is the classical low-pass pyramid fusion algorithm, and Algorithm B [35] is the process after DT-CWT decomposition using the absolute maximum rule for reconstruction. These two algorithms preserve the high-resolution features of cracks in the visible image and enhance crack resolution. However, based on their recognition results, it is evident that both algorithm A and algorithm B still struggle to eliminate the influence of gullies on the lining surface and exhibit a high false recognition rate. In contrast, the fused image produced using the proposed method maintains the high resolution of crack locations compared to the visible image. As a result, it enhances the background brightness, improves the contrast of crack positions, and suppresses texture details like pits and gullies on the lining surface. Figure 7: Perspective transform result, where A\({}_{1}\)–A\({}_{4}\) and B\({}_{1}\)–B\({}_{4}\) are the reference points for calculating the transformation matrix \(\mathbf{T}\).