Search for a command to run...
Random-valued impulse noise (RVIN) severely degrades image quality, particularly under high noise densities where conventional median-based filters fail to preserve fine structures. This paper presents EdgeGuard, an edge-preserving iterative switching framework that introduces a novel confidence-based fusion rule combining Rank-Ordered Absolute Difference (ROAD) and Median Absolute Deviation (MAD) for accurate impulse detection. The algorithm adaptively refines detection thresholds across iterations, while a Switching Trimmed Median Filter (TMF) restores corrupted pixels and a Directional Weighted Median (DWM) ensures edge-aligned smoothing. Unlike earlier hybrid cascades (e.g., TMF-DWM or DWM-MF), EdgeGuard integrates these stages through an iterative feedback mechanism that selectively reinforces reliable regions. A detailed complexity analysis confirms that the method maintains practical runtime with <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$O\left(N K^{2} T\right)$</tex> cost, suitable for moderate-resolution and near realtime applications. Extensive experiments on benchmark grayscale and color images demonstrate statistically significant gains in PSNR and SSIM (<tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$\mathbf{p}<0.01$</tex>) over state-of-the-art filters under noise levels up to 80 %. Visual gradient analyses and edge maps further validate the method's edge-preserving capability. The framework generalizes to color and mixed-noise scenarios, making it promising for high-fidelity restoration in medical and remote-sensing imagery even at noise densities as high as 80 %.