Abstract:To address the issues of long median search time, complex processing, and poor denoising performance of adaptive median filtering under high-density salt-and-pepper noise, a neighborhood-priority multi-level mean filtering algorithm is proposed. The algorithm uses switch filtering to classify pixels, constructs nine priority regions within a 7×7 neighborhood of noisy pixels, and progressively selects valid pixels for mean filtering. After searching the entire neighborhood, a misjudgment prevention mechanism is applied to restore normal pixels. Experimental results show that the proposed algorithm exhibits good denoising performance and robustness within the noise density range of 0% to 90%. Compared to AFMF, IMAF, NAMD and hybrid filtering algorithms, the proposed method achieves a peak PSNR improvement of over 3 dB at low noise densities, with a 20% improvement in SSIM at 90% noise density. The overall processing speed improves by more than 8 times, and the filtered SSIM remains above 87% even under extreme noise conditions. This algorithm requires no parameter tuning, is simple to implement, incurs low computational overhead, and has strong engineering applicability.