Distance-weighted approach based on self-adaptive windows to remove salt and pepper noise in images

Y. K. Lin, Zuoyong Li, Ge XuJournal of Image and Graphics 2015 · DOI

TL;DR

This paper introduces a switching filter that uses self-adaptive windows and distance-weighted interpolation to remove salt-and-pepper noise. Its standout feature is a "majority rule" strategy that prevents the algorithm from accidentally erasing legitimate black or white pixels in high-contrast images, significantly outperforming standard filters in complex scenes like snowy landscapes.

What Problem Does This Paper Address?

Salt-and-pepper noise (SPN) is a common form of image degradation where pixels randomly take on the maximum (255) or minimum (0) intensity values. While many "switching filters" exist—which first detect noise and then restore only those pixels—they face a major hurdle: ambiguity.

If a pixel is 0 or 255, is it noise, or is it a legitimate part of a white cloud or a dark shadow? Most algorithms struggle when the original image contains many extreme values (e.g., a photo of a snowy mountain). Standard median filters often blur these regions or fail to remove noise effectively at high densities. The authors aim to bridge this gap by creating a filter that can distinguish between true noise and high-contrast image features.

Methods

The authors propose a two-stage adaptive filtering process:

  1. Noise Detection: Any pixel with a value of 0 or 255 is flagged as a potential noise candidate.
  2. Adaptive Window Expansion: For each flagged pixel, the algorithm starts with a small window (beginning with a cross-shaped template) and expands it until it finds "clean" (non-0/255) pixels.
  3. Restoration Strategy:
    • Distance-Weighted Filtering: If clean pixels are found within a reasonable window size (below a threshold $T$), the pixel is restored using a weighted average of its clean neighbors. Closer pixels are given more weight, preserving local texture better than a simple median filter.
  4. The "Majority Rule": If the window expands beyond the threshold $T$ without finding enough clean pixels, the algorithm assumes the pixel is actually part of a legitimate black or white region in the original image. It then performs a "majority vote" among the pixels in the window to decide whether to set the value to 0 or 255.
  5. Adaptive Thresholding: The maximum window size $T$ isn't fixed. The authors use a training phase to determine the optimal $T$ based on the estimated noise density and the image's inherent "extremeness" (how many 0/255 pixels it naturally contains).

Datasets

The researchers utilized the Berkeley Segmentation Dataset, which consists of 300 natural images.

  • Training Set: 150 images were used to build a look-up table for the adaptive threshold $T$.
  • Testing Set: The remaining 150 images were used to evaluate performance against seven other state-of-the-art methods (including MDBA, MDBUTMF, and SAWM).

Key Insights and Ideas

  • Spatial Context Matters: Standard median filters treat all pixels in a window equally. By using inverse Euclidean distance weighting, this method ensures that the restored value is more representative of its immediate surroundings, leading to sharper results.
  • Handling the "Snow" Problem: The "Majority Rule" is the paper’s most clever insight. By acknowledging that a large cluster of 0s or 255s is likely a real feature rather than a massive patch of noise, the filter avoids the "graying out" effect seen in other algorithms when processing high-contrast areas.
  • Dynamic Thresholding: Instead of a "one size fits all" approach, the algorithm adapts to the specific noise level of the image, making it robust across different levels of corruption (from 10% to 90% noise).

Key Results

The proposed method was tested against seven other algorithms across various noise densities.

  • Quantitative: In terms of Peak Signal-to-Noise Ratio (PSNR), the method consistently outperformed competitors. For example, at 90% noise density, it achieved a PSNR of ~22.76 dB, while most other methods trailed significantly.
  • Qualitative: Visual results (shown in Figures 7 and 8 of the paper) demonstrate that while other filters leave "smudges" or artifacts in snowy regions, this method preserves the crisp boundaries of white and black areas even under heavy noise.

Limitations and Future Work

While the method is highly effective for salt-and-pepper noise, it is specifically designed for pixels that hit the absolute 0 or 255 rails. It may not be as effective for "random-valued" impulse noise where the noise values fall anywhere in the 0–255 range.

The authors suggest that future work will focus on integrating this "majority rule" logic with more sophisticated noise detection algorithms to further reduce the false-positive rate in identifying noise pixels.

Summary updated

BibTeX
@article{lin2015distance,
  author = {Y. K. Lin and Zuoyong Li and Yuanhua Lin and Ge Xu},
  title = {{Distance-weighted approach based on self-adaptive windows to remove salt and pepper noise in images}},
  journal = {Journal of Image and Graphics},
  year = {2015},
  doi = {10.11834/jig.20150803},
}
Figure