摘要:Aiming at the problem that the quality of infrared image decreases due to the large amount of random noise in the process of collection and transmission of infrared image of electrical equipment, and the accuracy of automatic detection of electrical equipment decreases, based on the traditional adaptive median filter algorithm, the adaptive median filter is analyzed, which can filter only the salt and pepper noise below 25%. An improved mean adaptive median filtering algorithm is proposed to overcome the shortcomings of wave effect. Firstly, the filtering window is selected according to the decision setting condition, and then it is judged whether the K-mean value near the center point is a noise point, and if so, the window is increased, otherwise the average value is output. Finally, it is judged whether the value of the current pixel point is noise, and if so, the average value is output, otherwise, the current pixel value is output. The experimental results show that the algorithm can effectively filter salt and pepper noise and Gauss noise, while maintaining the image sharpness, and has good filtering performance on PSNR and MSE indicators.