Skip to main content

Fast restoration of natural images corrupted by high-density impulse noise


In this paper, we suggest a general model for the fixed-valued impulse noise and propose a two-stage method for high density noise suppression while preserving the image details. In the first stage, we apply an iterative impulse detector, exploiting the image entropy, to identify the corrupted pixels and then employ an Adaptive Iterative Mean filter to restore them. The filter is adaptive in terms of the number of iterations, which is different for each noisy pixel, according to the Euclidean distance from the nearest uncorrupted pixel. Experimental results show that the proposed filter is fast and outperforms the best existing techniques in both objective and subjective performance measures.


Images are often corrupted by impulse noise during acquisition and transmission; thus, an efficient noise suppression technique is required before subsequent image processing operations [1]. Median filter (MF) [2] is widely used in impulse noise removal methods due to its denoising capability and computational efficiency [3]. However, it is effective only for low noise densities. To overcome this drawback, many recent techniques [412] first detect the impulse locations and then filter the noisy pixels without processing the uncorrupted ones.

Various methods have been proposed to estimate the intensity values of noisy pixels. Some of the best existing methods are Opening-Closing Sequence (OCS) filter [4] based on mathematical morphology, Edge-Preserving Algorithm (EPA) [5] which adopts a directional correlation-dependent filtering technique, Switching-based Adaptive Weighted Mean filter (SAWM) [6] which replaces each noisy pixel with the weighted mean of its noise-free neighbors, Decision-based Average or Median filter (DAM) [7] which estimates the value of each noisy pixel using the average or median of the adjacent pixels, Cloud Model filter (CM) [8] which employs an uncertainty-based impulse detector and a weighted fuzzy mean filter and Fast and Efficient Median Filter (FEMF) [9] based on adaptive median filtering of noise-free pixels.

However, instead of two fixed values, impulse noise can be more realistically modeled by two fixed ranges that appear at both ends [1012]. In [10], the Boundary Discriminative Noise Detection (BDND) is proposed to classify the pixels according to their intensities. The image restoration is done by using the switching median filter. A Noise Fading Technique (NFT), presented in [11], first applies an impulse detector and then employs a pixel restoring median filter for denoising the corrupted pixels in an iterative manner. In [12], a Two-State Switching Median filter (TSSM) is proposed which uses a noise intensity identification scheme to detect the corrupted pixels. The filtering scheme is chosen from two different switching median filters.

In this paper, we suggest a general model for impulse noise which assumes that impulses can take any subset of the entire grey-values dynamic range. Noisy pixels are detected based on iterative measuring the image entropy and restored using an Adaptive Iterative Mean filter (AIM). The proposed filter alters the corrupted pixels in a different number of iterations according to their Euclidean distance from the nearest uncorrupted pixel.

The rest of this paper is organized as follows. Section II reviews the impulse noise models and describes the suggested one. Our algorithm is presented in Section III. The experimental results and comparisons are provided in Section IV and Section V concludes the paper.

Impulse noise model

Two common types of the impulse noise are the Fixed-Valued Impulse Noise (FVIN), also known as Salt-and-Pepper Noise (SPN), and the Random-Valued Impulse Noise (RVIN). They differ in the possible values which noisy pixels can take. The FVIN is commonly modeled by

y i , j = 0 , 255 with probabbility p x i , j with probabbility 1 - p

where x i,j and y i,j denote the intensity value of the original and corrupted images at coordinate (i,j), respectively and p is the noise density. This model implies that the pixels are randomly corrupted by two fixed extreme values, 0 and 255 (for 8-bit grey-scale images), with the same probability.

In [10], a model is considered as below:

y i , j = 0 , m x i , j 255 m , 255 with probability with probability with probability p 1 1 - p p 2

where p = p 1 + p 2. We refer to this model as Fixed-Range Impulse Noise (FRIN). In this model, instead of two fixed values, two fixed ranges at both ends with the length of m are assumed to be impulse noise values. Also the densities of low-intensity and high-intensity impulse noise might be unequal.

In real applications, impulse values can be any subset of the entire range of grey-values. Thus, we introduce a more general model, as:

y i , j = { S with probability p x i , j with probability 1 - p

where S is the set of impulse noise values with k elements chosen from the set [0 255]. The impulse probabilities don’t have to be equal. We refer to this model as General Fixed-Valued Impulse Noise (GFN) or Multi-Valued Impulse Noise (MVIN). Models described in Equations (1) and (2) are also included in the GFN model by choosing the appropriate set S as S 1 = {0,255} and S 2 = {0,1,…,m – 1,255 – m + 1,255 –m + 2,…,255}, respectively. The GFN can bridge the FVIN and the RVIN; if we choose s = [0 255] and all values have the same probability, the RVIN will be obtained.

The proposed method

Many recent image denoising techniques consist of two stages: first detecting the corrupted pixels and then estimating their original values. Traditional impulse detectors fail, when the impulses have few values, distributed in the entire range of grey-values. For the GFN model, we need an Impulse Value Detector (IVD) to determine the noise values. The method is described below:

A-Impulse Value Detector (IVD):

The entropy of the image y is defined as follows:

entropy y = i = 0 255 p i log p i

where p i is the probability of the grey-value i and can be interpreted as the normalized histogram of the image. In natural images, unlike the Gaussian noise, the impulse noise significantly decreases the image entropy.

The impulse value detector, iteratively, detects and removes the impulse grey-values. A grey-value is detected as an impulse if the corresponding pixels have the lowest correlation with their neighbors. After each iteration, by removing an impulse value, the image entropy increases. The process continues until the entropy becomes larger than the entropy threshold, thus it ensures that there are no more impulse values in the image.

The details of the Impulse Value Detector (IVD) are described below:

  1. 1.

    Construct the Mask matrix with the same size as the image. The Mask is zero in the corresponding image pixels, which are determined as corrupted and is one otherwise.

  2. 2.

    Construct the detailed part of the image as follows:

    y D = y * h Mask * h y

where the symbols (*) and |.| denote the convolution and the absolute value function, respectively and h is the filtering window defined as:

h = 0 1 0 1 0 1 0 1 0
  1. 3.

    The noisy part of the image is determined as below:

    y N i , j = 0 if y D i , j correlation threshold y i , j otherwise

Calculate the histogram of the positive elements of the image yN and declare the most frequent grey-value g max as an impulse value.

  1. 4.

    In the image y, replace all the pixels with values equal to g max with zero.

  2. 5.

    If the entropy of positive elements of the image y is larger than the entropy threshold, stop the iterations, otherwise go to step 1.

B. Image Restoration Using the AIM Filter:

Unlike many techniques which increase the size of the window, until all corrupted pixels are detected and restored, our approach is to employ a small filter, iteratively. This approach has two advantageous: 1) better results, because of stronger correlation among adjacent pixels and 2) less complexity, because of implementation using linear shift-invariant filters.

To restore noisy pixels, we first compute the Distance Transform (DT) of the image. Each element of DT contains the Euclidean distance of the corresponding image pixel with the nearest uncorrupted pixel. For Euclidean distance calculation, we employed the fast algorithm described in [13].

The image y0 is the input for the AIM filter. In this image, each noisy pixel takes the grey-value of its nearest uncorrupted pixel. In the AIM filter, the noisy pixels which their corresponding elements of DT have larger value, will be modified in more iterations. Also, Mask0 is the all one matrix with the same size as the image and p is the probability of corrupted pixels, which are determined by IVD.

The fast implementation of the AIM filter is described below:

  1. 1.

    Iteratively update the image and the Mask matrix. Start from k = 1 and continue until k 3 p is greater than the maximum element of DT.

    y k i , j = { y k 1 i , j if DT i , j < k 3 p y k 1 i , j * h otherwise
    Mask k i , j = { Mask k 1 i , j if DT i , j < k 3 p Mask k 1 i , j * h otherwise
  2. 2.

    Restored image is obtained by pixel-wise division of the final image and Mask matrix as below:

    Restored Image = y Final Mask Final

Some uncorrupted pixels which have one of impulse values are identified as corrupted by IVD. They are likely to be reproduced in the restoration stage. However, to avoid false alarms, at the end and for each pixel, if the difference between the estimated and original pixel values is lower than the correlation threshold, we replace it with the original value.

Simulation results

The proposed method is compared with the best existing techniques for SPN and FRIN removal. Comparisons include the quantitative evaluation, the visual quality and the time complexity. Simulations are carried out on 512 × 512 test images shown in Figure 1. In simulations, a color image is considered as three separate grey-scale images. The Peak Signal-to-Noise Ratio (PSNR) is employed for objective performance measurement. To make a reliable comparison, each method is run 20 times with different impulse noise patterns and the result is obtained by averaging over all experiments.

Figure 1
figure 1

Test images. (a) Baboon, (b) Barbara, (c) Boat, (d) Couple, (e) Hill, (f) Lena, (g) Man, (h) Peppers, (i) F16.

Table 1 lists the entropy of test images and Figure 2 shows the entropy of different images corrupted by SPN with various noise densities. Natural 8-bit grey-scale images have the entropy around 7. In simulations, the entropy threshold is set to 6 to avoid any miss detection and the correlation threshold is set to 8. We consider two cases: SPN and FRIN. The results are provided below:

Table 1 The entropy of test images
Figure 2
figure 2

The entropy of different images corrupted by various densities of SPN.

A. Salt & Pepper Noise (SPN):

Table 2 lists the restoration results of different techniques for image Lena corrupted by various densities of SPN. Figure 3 evaluates the results for different images. In Table 3, the comparisons are done for different images corrupted by 80% SPN. The results reveal that the AIM filter performs considerably better in high noise densities. Figures 4, 5 and 6 demonstrate reconstructed images Baboon, Lena and Peppers corrupted by 80%, 90% and 95% SPN, respectively. Apparently, the AIM filter outperforms other techniques in preserving the image details.

Table 2 Restoration results in PSNR (dB) for image Lena corrupted by various densities of SPN
Figure 3
figure 3

Comparison of restoration results in PSNR (dB) for different images corrupted by various densities of SPN. (a) Barbara, (b) Boat, (c) Couple, (d) Hill, (e) Man, (f) F16.

Table 3 Restoration results in PSNR (dB) for different images corrupted by 80% SPN
Figure 4
figure 4

Reconstructed images using different filters for image Baboon corrupted by 80% SPN. (a) Corrupted image (6.54 dB), (b) EPA [7] (21.33 dB), (c) SAWM [8] (20.92 dB) and (d) AIM [Proposed] (21.58 dB).

Figure 5
figure 5

Reconstructed images using different filters for image Lena corrupted by 90% SPN. (a) Corrupted image (5.91 dB), (b) EPA [7] (26.03 dB), (c) SAWM [8] (26.15 dB) and (d) AIM [Proposed] (27.45 dB).

Figure 6
figure 6

Reconstructed images using different filters for color image Peppers corrupted by 95% SPN. (a) Corrupted image (5.39 dB), (b) EPA [7] (20.41 dB), (c) SAWM [8] (21.89 dB) and (d) AIM [Proposed] (23.51 dB).

Also, Table 4 provides the running time of different filters in the MATLAB environment. For these filters, the computational complexity depends on the noise density, rather than the image. The time complexity can be measured with respect to the standard median filter implemented in the MATLAB software. The results show that the proposed filter is very efficient for high density impulse noise removal.

Table 4 Runtime in seconds for various densities of SPN in the MATLAB environment

B. Fixed-Range Impulse Noise (FRIN):

Traditional methods for SPN removal fail to restore images corrupted by FRIN. Thus, in this case we compare the proposed filter only with appropriate techniques, i.e. BDND, NFT and TSSM.

Table 5 compares the restoration results for image Lena corrupted by 80% FRIN with different low-intensity and high-intensity impulse ranges. It can be seen that the proposed method significantly outperforms other techniques. The AIM filter can remove FRIN, even if the low and high intensities have different probabilities.

Table 5 Restoration results in PSNR (dB) for image Lena corrupted by 80% FRIN


In this paper, we introduced a more realistic model for the impulse noise called General Fixed-Valued Impulse Noise (GFN). This model implies that, instead of fixed values or ranges, impulses can take any subset of the entire grey-values dynamic range. This model requires a more complex impulse detector, because the noise values do not necessarily locate at the low and high-intensities. We proposed a procedure for impulse value detection using the image entropy. For image restoration, an Adaptive Iterative Mean (AIM) filter is presented. In this filter, the noisy pixels which are farther than their nearest uncorrupted pixel, will be modified in more iterations. The AIM filter outperforms the best existing techniques for SPN and FRIN removal. The proposed method is fast and quite suitable for real-time applications.


  1. Bovik A: Handbook of image and video processing. Academic Press; 2000.

    Google Scholar 

  2. Astola J, Kuosmanen P: Fundamentals of nonlinear digital filtering. CRC Press Inc., Boca Raton; 1997.

    Google Scholar 

  3. Huang TS, Yang GJ, Tang GY: Fast two-dimensional median filtering algorithm. IEEE Trans. Acoustics, Speech. Signal Process 1979, 1(1):13-18.

    Google Scholar 

  4. Deng Z, Yin Z, Xiong Y: High probability impulse noise-removing algorithm based on mathematical morphology. IEEE Signal Process. Lett 2007, 14(1):31-34.

    Article  Google Scholar 

  5. Chen PY, Lien CY: An efficient edge-preserving algorithm for removal of salt-and-pepper noise. IEEE Signal Process. Lett 2008, 15: 833-836.

    Google Scholar 

  6. Zhang X, Xiong Y: Impulse noise removal using directional difference based noise detector and adaptive weighted mean filter. IEEE Signal Process. Lett 2009, 16(4):295-298.

    Article  MathSciNet  Google Scholar 

  7. Jourabloo A, Feghahati AH, Jamzad M: New algorithms for recovering highly corrupted images with impulse noise. Scientia Iranica 2012, 19(6):1738-1745. 10.1016/j.scient.2012.07.016

    Article  Google Scholar 

  8. Zhou Z: Cognition and Removal of Impulse Noise with Uncertainty. IEEE Trans. Image Process 2012, 21(7):3157-3167.

    Article  MathSciNet  Google Scholar 

  9. Hsieh MH, Cheng FC, Shie MC, Ruan SJ: Fast and efficient median filter for removing 1–99% levels of salt-and-pepper noise in images. Eng. Appl. Artif. Intel 2012. 10.1016/j.engappai.2012.10.012

    Google Scholar 

  10. Ng PE, Ma KK: A switching median filter with boundary discriminative noise detection for extremely corrupted images. IEEE Trans. Image Process 2006, 15(6):1506-1516.

    Article  Google Scholar 

  11. Indu S, Ramesh C: A noise fading technique for images highly corrupted with impulse noise. International Conference on Computing: Theory and Applications, (ICCTA) 2007, 627-632.

    Google Scholar 

  12. Xia J, Xiong J, Xu X, Zhang Q: An efficient two-state switching median filter for the reduction of impulse noises with different distributions. 3rd International Congress on Image and Signal Processing (CISP), vol. 2 2010, 639-644.

    Google Scholar 

  13. Maurer C, Rensheng Q, Vijay R: A linear time algorithm for computing exact Euclidean distance transforms of binary images in arbitrary dimensions. IEEE Trans. Pattern Anal. Mach. Intell 2003, 25(2):265-270. 10.1109/TPAMI.2003.1177156

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations


Corresponding author

Correspondence to Hossein Hosseini.

Additional information

Competing interests

The authors declare that they have no competing interests.

Authors’ original submitted files for images

Rights and permissions

Open Access This article is distributed under the terms of the Creative Commons Attribution 2.0 International License (, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Reprints and Permissions

About this article

Cite this article

Hosseini, H., Marvasti, F. Fast restoration of natural images corrupted by high-density impulse noise. J Image Video Proc 2013, 15 (2013).

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI:


  • Image denoising
  • Salt-and-pepper noise
  • General fixed-valued impulse noise
  • Image entropy
  • Adaptive iterative mean filter