Introduction
Salt and pepper noise (SPN) is a common form of impulse noise that manifests as pixels with extreme values—pure black (0) or pure white (255). This corruption typically occurs during image acquisition or transmission due to bit errors. To mitigate this, researchers utilize "switching filters," which operate in two distinct phases: noise detection and image restoration.
While the standard Adaptive Gaussian Filter (AGF) has emerged as a high-performing solution, it suffers from two critical limitations. First, it employs a "false alarm" logic that assumes any pixel at the extreme ends of the grayscale spectrum is noise. This leads to the blurring of legitimate image features, such as deep shadows or bright highlights. Second, AGF utilizes a fixed 9x9 restoration window, which often lacks sufficient "clean" pixels to reconstruct images in high-noise environments. This paper presents a modified AGF designed to address these flaws through intelligent noise rectification and adaptive windowing.
Methodology
The proposed approach improves upon the standard AGF by introducing a more nuanced detection phase and a flexible restoration strategy.
1. Guided Noise Detection and Rectification
The primary innovation in the detection phase is the use of local context to distinguish between noise and signal. The algorithm divides the image into blocks to estimate local noise density. Crucially, it implements a "rectification" step based on connected component analysis.
Because salt and pepper noise is typically stochastic and scattered, it rarely forms large, contiguous structures. In contrast, natural image features (like the white grains in a "Rice" image) consist of connected groups of pixels. By identifying these connected components, the filter can "unmark" legitimate image data that was initially flagged as noise, thereby preserving sharp details and preventing unnecessary blurring.
2. Adaptive Restoration
Once a precise noise map is generated, the filter restores corrupted pixels using a Gaussian weighted mean. Unlike the original AGF, which uses a static window, this modified version employs an adaptive window size. The process begins with a 3x3 window and expands incrementally—up to a maximum of 21x21—until at least two noise-free pixels are identified.
This ensures that the restoration process always has access to valid reference data, even when noise density is extremely high (e.g., 90%). The Gaussian weighting ensures that closer neighbors influence the restoration more heavily, maintaining the natural statistics of the image better than simple median-based approaches.
Experimental Evaluation
The modified filter was tested against several state-of-the-art methods, including AM, BDND, and MDWF. The evaluation utilized:
- Standard Test Images: "Lena" (representing smooth gradients) and "Rice" (containing significant natural 0-value pixels).
- BSDS300: The Berkeley Segmentation Dataset, providing a broad range of natural textures and structures for grayscale testing.
Performance was measured using Peak Signal-to-Noise Ratio (PSNR) and Mean Structural Similarity (MSSIM).
Results and Discussion
The modified AGF demonstrated superior performance in both qualitative and quantitative assessments.
Visual Fidelity: On images like "Rice," which contain natural black pixels, the proposed filter successfully distinguished between noise and signal. While competing filters often blurred the boundaries of the rice grains or introduced artifacts, the modified AGF maintained sharp edges and structural integrity.
Quantitative Metrics: The filter achieved the highest average PSNR and MSSIM scores across the BSDS300 dataset. This indicates not only a reduction in error but also a better preservation of the perceived structural information compared to eight other modern filters.
Computational Efficiency: Efficiency is a key consideration for real-time image processing. While the rectification step adds some complexity compared to the original AGF, the proposed method remains highly efficient. It processed the BSDS300 dataset in approximately 26.9 seconds, significantly outperforming the MDWF filter, which required 81.1 seconds.
Conclusion
The modified Adaptive Gaussian Filter provides a robust solution for SPN removal by leveraging the spatial connectivity of natural image features. By replacing rigid assumptions with adaptive logic—both in noise detection and window sizing—the filter achieves a superior balance between noise suppression and detail preservation. While the rectification logic may face challenges at extreme noise levels (above 60%) where noise pixels may cluster and mimic natural features, the filter represents a significant advancement in the practical application of switching filters for complex natural images.
Summary updated