The commitment to achieving carbon neutrality by 2060 makes the clean transition of fossil energy production inevitable in China. As the primary fossil energy source, China produced approximately 4.66 billion tons of raw coal in 2023. Among them, in the fields of mining engineering and environmental science, the accurate recognition of gangue (one of the environmental pollutants produced by coal combustion is black-gray solid waste) from coal is crucial because it is a key step in reducing resource waste and environmental pollution. Hence, coal and gangue automatic recognition with high accuracy is very important for intelligent longwall top coal caving (LTCC) mining. A novel approach of “liquid intervention + infrared detection” is introduced to enhance the recognition accuracy when the exterior color of coal and gangue is similar. This study focuses on the infrared image recognition of coal and gangue after liquid intervention under varying wind speed conditions, and optimizes the image processing path. The effect of varying wind speed conditions on the recognition accuracy of coal and gangue after liquid intervention was analyzed, and the optimal wind speed range was determined. The morphological evolution characteristics of droplets under varying wind field conditions were studied by COMSOL two-phase flow interface. The results show that with the increase of wind speed, the surface contour of coal is gradually clear, and the overall recognition accuracy is also improved. When the high wind speed is 1.55 m/s, the recognition accuracy reaches 99.89%, and the recognition accuracy of other wind speed regions is also above 90% (within 7s). In addition, the numerical simulation can maintain the volume fraction of the droplet in a short time under the constant flow wind flow field, thus inhibiting the phenomenon that the recognition accuracy decreases with time. The simulation results are in good agreement with the physical experimental phenomena, which proves the reliability of the numerical simulation. This study is of great significance to the recognition of coal gangue types with low identification characteristics in LTCC, so as to ensure the primary economic benefits, ecological environment safety and sustainable development of coal mines.