- Research
- Open access
- Published:

# Localizing and restoring clusters of impulse noise based on the dissimilarity among the image pixels

*EURASIP Journal on Advances in Signal Processing*
**volume 2012**, Article number: 161 (2012)

## Abstract

This article proposes a novel method for restoring images corrupted with clusters of impulse noise. It is a durable task to detect and restore clusters of impulse noise because the cluster pixels can meet many of the well-known thresholds. In the proposed technique, a hard decision threshold is proposed based on the dissimilarities among the cluster pixels and the original pixels in the noisy image. The analysis revealed that the dissimilarity values of the cluster pixels are significantly different from those of the original pixels. Results achieved by the proposed algorithm are superior to other methods. The given method effectively suppresses the noisy pixels, preserving the fine details, having low-computational complexity, and maintaining high level of visual quality.

## Introduction

Noise removal is a crucial task that should be performed before any advanced image-processing task. If noise is not removed, subsequent disruptions may surface. Therefore, image denoising is vital for satellite images, magnetic resonance imaging, surveillance images, and astronomic images. These images tend to be affected by one or more types of noise. The noise can be invisible or visible and shown as clusters or stains of noise. Unfortunately, the denoising process is always accompanied with the loss of image details. Thus, the challenge is to denoise the image while preserving as many details as possible. Impulse noise has significant influence on images, causing a change in the pixel values. Impulse noise is introduced in the image with imperfect devices, due to problems coming out during data acquisition or transmission, natural phenomenon, electrical sparks, and many other causes. There are two common types of impulse noise: (1) fixed-valued impulse noise, and (2) random-valued impulse noise. The former is easier to detect because it can take one or more fixed value, while the later type takes a random value uniformly distributed over the dynamic range of [0,255].

This article investigates the detection and the restoration processes of the random-valued impulse noise. The author focuses on one of the worst cases, where spots or clusters of noise corrupt the image. The existing literature introduces diverse algorithms to detect and restore the impulse noise. For example, median filtering is a well-known nonlinear filter used to suppress the impulse noise. It is efficient and easy to implement; nevertheless, it also results in the loss of details. The reason is that median filter is applied similarly on noisy and noise-free pixels. Many filters [1–15] have been proposed to enhance the performance of the median filter by restoring only the detected noisy pixels. However, these and many other filters [16–18] used for image quality improvement fail to restore clusters, lines, or any other geometric or random shape of impulse noise.

Restoring a group of random-valued impulse noise gathered in a stain is not trivial, because the stain pixels take on the same values as those of the original pixels. Therefore, the stain pixels can pass the detection process inherent in many known image improvement methods. As a result, the researcher is tasked with the responsibility to identify the factor that can be used as a differentiator between the pixels in the noisy clusters and noise-free pixels in the image. Thus, a new threshold is proposed in this article to make a distinction between the noisy pixels in the clusters and the original pixels in the image.

In this article, any form created from the impulse noise is modeled roughly as a cluster *C*. Pixels *x*'s that belong to the cluster *C* are deemed random-valued impulse noise *x*_{no}’s, while the remaining pixels in the image are deemed original pixels *x*_{or}’s. Thus, any pixel *x* in the image may be either noisy or original pixel based on its location as indicated below.

where *i*_{
o
} is the number of the clusters in the image.

The underlying research proposes a new algorithm based on the dissimilarities between the clusters and original pixels. The majority of pixels in an image are located in regions of uniform intensity, in which the pixels are similar or slightly different. However, the dissimilarities among the clusters pixels are high because the values in the noisy clusters are distributed uniformly over a wide dynamic range of [0,255]. As a result, a hard decision threshold is proposed and by which noisy clusters of different sizes are detected and restored effectively. This article is organized as the follows: The next section illustrates the new noise detection technique and the recovery process, Section “Simulation results” shows the numerical results and visual examples, and finally conclusion section is given.

### Algorithm description

In this section, the detection and restoration processes used in the proposed method are demonstrated. In the detection process, the cluster localization problem is described and in the restoration process, the detected noisy pixels are restored.

### Localization problem

The problem of localizing the scattered clusters in the image is solved in this article by detecting the most, if not all, noisy pixels in the clusters while keeping the original pixels intact. To differentiate between the clusters pixels and the other pixels, we need to study both types. The pixels outside the clusters are located either in flat regions where the neighboring pixels are similar or on edges where the neighboring pixels are not similar at least in one direction. In addition, it is obvious that the number of edge pixels is very small compared to that of the flat regions pixels. Overall, most of the image pixels are located in flat regions and the remaining ones are generally small in number and located in abrupt areas, “edges”. Pixels inside a cluster have a variety of values distributed uniformly over the range of [0,255]. As a result, the deviations between the clusters pixels are higher than those between the pixels outside the clusters.

To demonstrate the above concepts, we determine the average dissimilarities *D*_{c} among the noisy pixels in different cluster sizes and the average dissimilarities *D* among the original pixels in different images. First, we compute the average dissimilarities among the pixels in several clusters of different sizes, by using different window sizes. Assume that *n × m*, *k × l*, and *n' × m'* denote to the clear image, window, and cluster size, respectively. For a window centered at the pixel *x*_{
ij
} in a cluster *C*, the average dissimilarities *d*_{
c,ij
} between the central pixel and all the pixels *y's* in the window are calculated as

where *k*' = (*k* – 1)/2 and *l*' = (** l** – 1)/2

Equation (4) is more accurate as the window size increases to 7 × 7 or more. The numbers a and b are the end points of the pixels y’s and equal to 0 and 255, respectively. The noisy values y’s are distributed uniformly with mean\overline{Y}. Since *x*_{
ij
} may take on any value in the range [0,255], we consider the worst case in which *x*_{
ij
} = 0,255. Substituting the values 0 and 255 in Equation (4), we get the bounds of *d*_{
c,ij
} as

On average *d*_{
c,ij
} = 63.75. Thus, we expect the values of *D*_{
c
} to be somewhere around the average, as displayed in Table 1.

For all pixels in the cluster, the average dissimilarities *D*_{
c
} are calculated as

Values of *D*_{
c
} for different cluster sizes are depicted in Table 1. It is clear that, these values are almost similar or constant for the different clusters.

Replace *n'* by *n*, *m*' by *m, d*_{
c
}*,*_{
ij
} by *d*_{
ij
}, and *D*_{
c
} by *D* in Equation (6), and *d*_{
c
}*,*_{
ij
} by *d*_{
ij
} in Equation (2). Then, the value of *D* for different original images is calculated and the results are shown in Table 2. One can observe that the difference between the values of *D* and *D*_{
c
}*,* as shown in Tables 1 and 2, respectively, is significant. Such as

The next step is vital and in which the threshold value *Th* is calculated. Threshold helps detecting whether the tested pixel is original or not. Equation (7) suggests that the threshold value should be somewhere between \overline{D} and, {\overline{D}}_{c} i.e,

{\overline{D}}_{c} and \overline{D} are the average values for different cluster sizes and different original images, respectively. Therefore, a hard decision threshold is proposed in this article to determine whether the tested pixel is an original or noisy pixel. It is calculated as

Thus, to detect any pixel *x*_{
ij
} in the noisy image, the value of *d*_{
ij
} or *d*_{
c,ij
} should be calculated to every pixel in the image. Pixel *x*_{
ij
} in the image is considered as a noisy pixel *x*_{no} and flagged as *f*_{
ij
} = 1 in a binary image *F*, if *d*_{
ij
} is more than the threshold value *Th*; otherwise is considered original pixel *x*_{or} and flagged as *f*_{
ij
} = 0, as shown below

If the threshold value Th=\left(\right(\overline{D}+{\overline{D}}_{c})/2) is selected, two cases should be considered. In the first case, the number of the noisy pixels or the clean pixels in the window is less than 50%. In this case, the tested pixel is very likely to be detected correctly, because the majority in the window will be either noisy or clean pixels. In the second case, the number of the noisy pixels in the window is around 50%. Therefore, the probability to detect the tested pixel is rather low. The latter case is more common for pixels located on the edges of the clusters or on the edges of the images. However, the edge pixels of the clusters and the images are small in number compared to the total number of the noisy pixels in the clusters and to the total clean pixels in the image.

### Estimation of the noisy pixels

To estimate the noisy pixels *x*_{no}’s flagged as *f*_{
ij
} = 1, the median value of the good pixels among the neighboring ones in the filtering window is taken. This process runs recursively in the sense that the previously restored pixels may be used in the restoration of the current pixel. Consider the noisy pixel in the location *i,j*, then the restored pixel *x*_{ij, rest} is attained as

The sign · is a multiplication operator. Note that the closed eight or four pixels to the tested pixel in the filtering window may be used in the restoration process, particularly for images corrupted at low noise rate. In addition, different filters such as weighted median filter, center weighted median filter, Gaussian filter, and others may be used instead of the median filter, but all of them provide similarly good results.

### Simulation results

It is necessary to carry out extensive experiments to evaluate the performance of the proposed algorithm on different noisy images. The results of the new algorithm are achieved after *one* iteration for all the simulated experiments and compared with other well-known algorithms. The noisy images are produced by corrupting the original ones artificially with many clusters of different sizes and with continuous and disjoined lines. The readily available images of 512 × 512 size, 7 × 7 window size, MATLAB program, CPU of 1.73 GHz, and 1 GB RAM are used in the simulation experiments. Threshold value used in the simulation is equal to 49, which is very close to the average of the data computed through 7 × 7 window size in Tables 1 and 2, respectively.

Table 3 and Figure 1 show the performance results of different methods in restoring Lena image, which is corrupted with 40 noisy clusters of 20 × 20 size represented in two lines, 10 clusters of 20 × 20 size, and 10 clusters of 30 × 30 size. These noisy clusters represent 11.6% of all pixels in the image. The simulation proves that the proposed technique delivers the best results among the other methods either in terms of PSNR, as indicated in Table 3, or with regard to visual quality, as indicated in Figure 1. It is obvious that the proposed method has efficiently restored the noisy clusters, while the other methods have failed. Remarkably, 96.9% of the clusters pixels are detected correctly as noisy pixels, and 1.267% of the original pixels are detected wrongly as noisy pixels. Figure 2 shows the locations of the pixels that are detected wrongly. Apparently, these pixels are located either on the clusters edges or on the image edges.

While the number of the noisy pixels in the different clusters in Lena image is small compared to the total number of the pixels in the image, it should be added that detecting and restoring noisy clusters are more difficult than restoring noisy pixels spread over the image. In other words, restoring scattered noise, small-sized clusters, or thin lines of noisy pixels is easier than restoring clusters of larger size or thick lines.

Figure 3 and Table 4 show the restoration results in terms of visual quality and PSNR, respectively, for different algorithms in restoring images corrupted with 2,601 clusters each of 5 × 5 size. The ratio of the noisy pixels in all the clusters compared to the total number of the pixels in each image is 26%.

Table 5 shows the restoration performance in terms of Mean Structural Similarity (MSSIM) for different methods in restoring two groups of corrupted images. The first group includes Lena, bridge, and baboon images degraded by the same noisy clusters shown in the corrupted Lena image in Figure 1. Namely, 40 noisy clusters of 20 × 20 size represented in two lines, 10 clusters of 20 × 20 size and 10 clusters of 30 × 30 size corrupt the images. The other group includes images of boat, pepper, and lake, which are degraded by the same noisy clusters shown in the corrupted images in Figure 3. Figure 4 compares the restoration performance of different methods in restoring the corrupted images of Lena and lake depicted in Figures 1 and 3, respectively. Results are shown visually and numerically in terms of MSSIM.

As the previous figures and tables show, the proposed method illustrates superior results to other techniques either objectively in terms of PSNR and MSSIM, or subjectively as demonstrated in the restored images. The values of PSNR and MSSIM that are achieved by the new method are clearly better than the other known methods. In addition, the images restored with the help of the proposed algorithm are free of noise, stains, or spots. Therefore, the proposed method is efficient and shows high level of restoration performance. Furthermore, the proposed algorithm is very fast since during the first and second experiments (Figures 1 and 3), the new method consumes almost the same processing time that is consumed by well-known filters as ACWMF [8] and MSM [6].

## Conclusion

The novel algorithm proposed in this article is based on the differences in the illumination levels among the pixels in the noisy images. Illumination values make it possible to differentiate between the noisy and clear pixels. The new method allows the identification and elimination of the cluster pixels, and has proven to have a superior performance in terms of PSNR, MSSIM, and perceptual image quality. Finally, the new method is easy to implement and has low computational complexity.

## References

Wu J, Tang C: PDE-based random-valued impulse noise removal based on new class of controlling functions.

*IEEE Trans. Image Process.*2011, 20(9):2428-2438.Ghanekar U, Singh AK, Pandey R: A contrast enhancement-based filter for removal of random valued impulse noise.

*IEEE Signal Process. Lett.*2010, 17(1):47-50.Crnojevi’c V, Senk V, Trpovski Z: Advanced impulse detection based on pixel-wise MAD.

*IEEE Signal Process. Lett*2004, 11(7):589-592. 10.1109/LSP.2004.830117Awad AS: Standard deviation for obtaining the optimal direction in the removal of impulse noise.

*IEEE Signal Process. Lett.*2011, 18(7):407-410.Chan RH, Hu C, Nikolova M: An iterative procedure for removing random-valued impulse noise.

*IEEE Signal Process. Lett.*2004, 11(12):921-924. 10.1109/LSP.2004.838190Chen T, Wu HR: Space variant median filters for the restoration of impulse noise corrupted images.

*IEEE Trans. Circuits Syst. II*2000, 48(8):784-789.Chen T, Ma KK, Chen LH: Tri-state median filter for image denoising.

*IEEE Trans. Image Process.*1999, 8(12):1834-1838. 10.1109/83.806630Chen T, Wu HR: Adaptive impulse detection using center-weighted median filters.

*IEEE Signal Process. Lett.*2001, 8(1):1-3.Luo W, Dang D:

*An efficient method for the removal of impulse noise*. Proceedings of IEEE International Conference on Image (ICIP), Atlanta, Georgia, USA; 2006:2601-2604.Emin Yüksel M, Baştürk A, Beşdok E: Detail-preserving restoration of impulse noise corrupted images by a switching median filter guided by a simple neuro-fuzzy network.

*EURASIP J. Appl. Signal Process*2004, 16: 2451-2461.Luo W, Dang D: A new directional weighted median filter for removal of random-valued impulse noise.

*IEEE Signal Process. Lett.*2007, 14(3):193-196.Garnett R, Huegerich T, Chui C, He W-J: A universal noise removal algorithm with an impulse detector.

*IEEE Trans. Image Process.*2005, 14(11):1747-1754.Dong Y, Chan RH, Xu S: A detection statistic for random-valued impulse noise.

*IEEE Trans. Image Process.*2007, 16(4):112-1120.Yu H, Zhao L, Wang H: An efficient procedure for removing random-valued impulse noise in images. IEEE Signal Process.

*Lett*2008, 15: 922-925.Mélange T, Nachtegael M, Kerre EE: Fuzzy random impulse noise removal from color image sequences.

*IEEE Trans. Image Process.*2011, 20(4):959-970.Shao L, Wang J, Kirenko I, de Haan G: Quality adaptive least squares filters for compression artifacts removal using a no-reference block visibility metric.

*J. Visual Commun. Image Represent.*2011, 22(1):23-32. 10.1016/j.jvcir.2010.09.007Shao L, Zhang H, de Haan G: An overview and performance evaluation of classification based least squares trained filters.

*IEEE Trans. Image Process.*2008, 17(10):1772-1782.Shao L: Up-scaling images in presence of salt and pepper noise.

*IEE/IET Electron. Lett.*2007, 43(14):746-748. 10.1049/el:20070827

## Acknowledgments

I would like to express my gratitude to the reviewers and to the associated editor for their valuable comments and to anyone who helping me in producing this article.

## Author information

### Authors and Affiliations

### Corresponding author

## Additional information

### Competing interests

The author declares that he has no competing interests.

## Authors’ original submitted files for images

Below are the links to the 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 (https://creativecommons.org/licenses/by/2.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

## About this article

### Cite this article

Awad, A.S. Localizing and restoring clusters of impulse noise based on the dissimilarity among the image pixels.
*EURASIP J. Adv. Signal Process.* **2012**, 161 (2012). https://doi.org/10.1186/1687-6180-2012-161

Received:

Accepted:

Published:

DOI: https://doi.org/10.1186/1687-6180-2012-161