Long-term operation of tunnels is influenced by factors such as material degradation and variations in service loads, resulting in varying degrees of lining cracks and water leakage. Addressing the challenge of low target contrast and significant background interference in thermal imaging detection of tunnel lining cracks, this study established an experimental system capable of simulating tunnel operational humidity and temperature environments. The lining cracks were localized and the temperature field distribution on the cracked lining surface was characterized by computer vision techniques. Additionally, numerical simulations using thermal-flow coupling were employed to validate and extend the results of indoor experiments. Based on the distribution patterns of the temperature field, a gain transformation function for thermal images was established. The findings indicate that the processed images were 2–6 times better than the conventional algorithm in terms of SCRG (Signal Clutter Ratio Gain) and BSF (Background Suppression Factor) metrics. This research provides valuable insights and references for the practical application of thermal imaging detection in tunnel water leakage scenarios.