A Hybrid Decision-Making Adaptive Median Filtering Algorithm with Dual-Window Detection and PSO Co-Optimization
Jing Mao, Lianming Sun, Jie Chen · Modelling—International Open Access Journal of Modelling in Engineering Science · 2025
Traditional median filtering with a fixed window easily leads to edge blurring and adaptive median filtering requires manual presetting of the maximum window parameter and has insufficient retention of details when dealing with high-density salt-and-pepper noise. Aiming at these problems, this paper proposes a hybrid decision-making adaptive median filtering algorithm with dual-window detection in collaboration with particle swarm optimization (PSO). The algorithm quickly locates suspected noise points through a 3 × 3 small window and enhances noise identification accuracy by using a PSO dynamically optimized 5–35-pixel large window. Meanwhile, a hybrid decision-making mechanism based on local statistical properties was introduced to dynamically select median filtering, weighted average based on spatial distance, or pixel preservation strategy to balance noise suppression and detail preservation, and the PSO algorithm was used to automatically find the optimal parameters of the large window’s size to avoid the manual parameter-tuning process. Experiments were conducted on standard grayscale and color images and compared with four traditional methods and two more advanced methods. The experiments showed that the algorithm improved the peak signal-to-noise ratio (PSNR) value by 2–4 dB and the structural similarity index measure (SSIM) metric by 0.05–0.2 under high salt-and-pepper noise density compared with the traditional methods, which effectively improved the contradiction between noise suppression and detail retention in traditional filtering algorithms and provided a highly efficient and intelligent solution for image denoising in high-noise scenarios.