You are on page 1of 12

JID: CAEE

ARTICLE IN PRESS [m3Gsc;January 11, 2016;10:25]

Computers and Electrical Engineering 000 (2016) 1–12

Contents lists available at ScienceDirect

Computers and Electrical Engineering


journal homepage: www.elsevier.com/locate/compeleceng

Image de-noising using noise ratio estimation, K-means


clustering and non-local means-based estimatorR
Asifullah Khan a, Muhammad Waqas a, Muhammad Rizwan Ali b,
Abdulrahman Altalhi c, Saleh Alshomrani d, Seong-O Shim d,∗
a
Pattern Recognition Lab, Department of Computer and Information Sciences, Pakistan Institute of Engineering and Applied Sciences,
Nilore, Islamabad
b
Department of Nuclear Engineering, Pakistan Institute of Engineering and Applied Sciences, Nilore, Islamabad
c
Faculty of Computing and IT, King Abdulaziz University, Jeddah, Saudi Arabia
d
Faculty of Computing and IT, University of Jeddah, Jeddah, Saudi Arabia

a r t i c l e i n f o a b s t r a c t

Article history: One of the key issues in removing random-valued impulse noise from digital images using
Received 12 March 2015 switching filters is the impulse noise detection. Impulse noise is a random, spiked varia-
Revised 23 December 2015
tion in the brightness of the image. In this paper, a new impulse noise detection algorithm
Accepted 23 December 2015
is presented that is based on Noise ratio Estimation and a combination of K-means clus-
Available online xxx
tering and Non-Local Means based filter (NEK-NLM). Luo-statistic is employed as a non-
Keywords: local means based estimator. The novelty of this work lies in the introduction of a pre-
Image denoising processing step of noise ratio estimation before noise detection, this estimation allows us
K-means to select suitable parameters for the noise detection algorithm. In noise filtering stage,
Non-local means nonlocal-means estimator is applied for restoring noisy pixels to their actual values. Using
NEK-NLM real world datasets, this paper shows that the impulse noise can be removed effectively.
Noise filtering Extensive comparison of simulation results with the already published results show that
Image restoration the proposed method outperforms most of the existing impulse noise removal techniques
both in terms of noise detection and image restoration.
© 2015 Elsevier Ltd. All rights reserved.

1. Introduction

An image often gets corrupted by impulse noise while being acquired and transmitted over a channel [1]. Impulse noise
not only deteriorates the visual quality of the image, but in practical applications, it degrades the performance of various
subsequent image processing operations such as image segmentation and object classification etc. Therefore, to reduce the
degradation in performance, denoising and restoration of the image from its corrupted version becomes an integral part of
almost all image processing applications.
Highly non-linear nature of impulse noise requires non-linear filtering mechanisms. Standard Median Filter (SMF) is
one of the most widely used techniques is standard median (SM) filter [2]. Median filter has gained popularity due to its
computational efficiency and robustness to large noise ratios. However, since the median filter is uniformly applied to the
whole image, it unnecessarily alters the noise-free pixels too. This causes blurring and may remove desirable fine structures

R
Reviews processed and recommended for publication to the Editor-in-Chief by Associate Editor Dr. J. Tian.

Corresponding author. Tel.: +966 50 684 7399.
E-mail address: seongo@gmail.com, sshim@uj.edu.sa (S.-O. Shim).

http://dx.doi.org/10.1016/j.compeleceng.2015.12.019
0045-7906/© 2015 Elsevier Ltd. All rights reserved.

Please cite this article as: A. Khan et al., Image de-noising using noise ratio estimation, K-means clustering and non-local
means-based estimator, Computers and Electrical Engineering (2016), http://dx.doi.org/10.1016/j.compeleceng.2015.12.019
JID: CAEE
ARTICLE IN PRESS [m3Gsc;January 11, 2016;10:25]

2 A. Khan et al. / Computers and Electrical Engineering 000 (2016) 1–12

Estimate
Impulse Applying K-
Noise Ratio Detection Map
Noise means (1s and 0s) Nonlocal
Ratio clustering, Means
Luo-statistic Median Estimator
Noisy Image Restored Image
based
Detector and
Noisy Image
Median Filter

Fig. 1. Block diagram of the proposed image denoising technique (NEK-NLM).

and details from the image. To preserve the details while effectively removing impulse noise, variants of standard median
filter such as weighted median filter [3] and center weighted median (CWM) filter [4] have been proposed. All these filters
are applied uniformly over the whole image.
The problem is addressed through the space-variant filtering technique which involves switching scheme concept [5].
This technique suggests a two-step filtering mechanism. First is the noise detection stage, in which all the pixels corrupted
with the impulse noise are detected. Afterwards, only the noisy pixels are filtered in the effort to restore the original im-
age. In the noise detection stage, thresholding is applied on some locally computed statistics. For example, adaptive center
weighted median (ACWM) filter [6] applies thresholding on CWM to mark impulses in the image. Tri-state median (TSM)
filter [7] applies thresholding on SM and CWM to detect strong and weak impulses. Various impulse noise filters with
improved detection performance have been proposed recently including the multi-state median (MSM) filter [8], peak-and-
valley filter [9,10], signal dependent rank ordered mean (SDROM) filter [11], progressive switching median (PSM) [12] filter,
conditional signal adaptive median (CASM) filter [13], pixel-wise MAD (PWMAD) filter [14], Luo-iterative median filter [15],
directional weighted median (DWM) filter, contrast enhancement based filter (CEF) [16] and optimal direction based median
(ODM) filter [17]. With the improved noise detection mechanism, these filters aim to target noisy pixels without altering
noise-free pixels present in the image. Simple structures of these detectors do not give satisfactory noise detection accuracy
and often fine structures present in the image are marked as noise and are filtered out. Also, the noisy pixels in textured
regions are sometimes falsely considered as image details and are left unchanged.
The more advanced and improved noise detectors proposed in [18] and [19] are based on rank-ordered statistics. In [18],
rank-ordered absolute difference (ROAD) statistics has been proposed for removing the mixture of Gaussian and impulse
noise. An improved version of ROAD statistic, called rank-ordered logarithmic difference (ROLD) was presented in [19] which
was combined with edge-preserving regularization (EPR) to give ROLD-EPR filter for removing random-valued impulse noise.
In [20], local outlier factor (LOF) has been presented to detect fixed-valued impulse noise. Robust outlyingness ratio (ROR)
has been proposed in [21] to identify outlyingness of each pixel. The drawback of these noise detectors is that they use fixed
thresholds to identify noisy pixels. Thresholds are determined through extensive experimentation and thus work well for
limited type of images. In [22], wavelet transform was used for image denoising employing a thresholding technique based
on local contrast and adaptive means. A very comprehensive comparison of different kinds of image denoising techniques
has been given in [23]. Here, spatial domain methods, transform based methods and learning based methods are extensively
discussed and compared. Another way of impulse noise removal is Standard Median Filter (SMF) [1]. Its main advantage is
that its implementation is easy. It has the disadvantage of removing fine details during noise removal process. This incurs
the penalty of reduced performance on images with high noise ratios [1]. Genetic Programming (GP) has been applied in
[24] for the noise removal. A two-stage detector and a two-stage estimator methodology is applied in [24].
In this paper, these issues are addressed and a mechanism to measure amount of impulse noise present in an image
is introduced. A novel impulse detection algorithm is proposed which is based on Luo-statistic and k-means clustering.
The proposed technique is given the name NEK-NLM. In the noise filtering stage, NL-means estimator is applied to restore
noisy pixels to their actual values. These results produced by extensive experimentation show that the proposed technique
performs better image restoration as compared to existing impulse noise filtering techniques.
The rest of this paper is organized as follows. Section 2 describes the proposed impulse filtering mechanism. In Section 3,
the experimental results are given for standard test images. Finally, the paper is briefly concluded in Section 4.

2. The proposed filtering technique (NEK-NLM)

The proposed impulse noise removal method has been structured as a three-step procedure. In the first step, the impulse
noise ratio is estimated by comparing corresponding square patches from noisy image and its median image. Subsequently,
based on impulse noise ratio, suitable parameters for noise detection algorithm are selected and finally, NL-means is applied
for the restoration of the image. Fig. 1 depicts the flow of the proposed approach for image restoration.

2.1. Pre-processing step

Impulse noise may corrupt only a certain portion of image or a certain number of pixels, leaving the remaining pix-
els intact. Corrupted pixels are significantly different from their neighboring pixels and exhibit no correlation with image

Please cite this article as: A. Khan et al., Image de-noising using noise ratio estimation, K-means clustering and non-local
means-based estimator, Computers and Electrical Engineering (2016), http://dx.doi.org/10.1016/j.compeleceng.2015.12.019
JID: CAEE
ARTICLE IN PRESS [m3Gsc;January 11, 2016;10:25]

A. Khan et al. / Computers and Electrical Engineering 000 (2016) 1–12 3

Fig. 2. Selected square patch of size 64 × 64 with the corresponding histogram, for image Lena (a) 30% corrupted image. (b) Median restored image. (c)
Original image.

content. The image model containing impulse noise with probability ρ (also referred to as noise ratio) can be described as
follows:

ni, j , with probability ρ
Xi, j = (1)
fi, j , with probability 1 − ρ
where Xi,j and fi,j denote noisy and noise-free pixels respectively at the location (i, j) in the image. Also, ni , j represents
a noisy pixel value at the location (i, j). Impulse noise can be classified as fixed-valued impulse noise and random-valued
impulse noise (also referred to as uniform impulse noise). For fixed-valued impulse noise, noisy pixels take only extreme
values from the dynamic grayscale range of pixel values. However, pixels contaminated by random-valued impulse noise can
take any values in the grayscale range.
An estimate of impulse noise ratio in the image can be made if histograms of both noisy and noise-free image are
obtained. Since, median filter performs well for smooth and low textured regions in the image, median filtering is applied
to the noisy image for estimating the noise-free image. From the filtered image, a square patch of size 64 × 64 having
minimum standard deviation is selected. The corresponding patch is also selected from the noisy image. The histograms of
these patches are compared to measure extent of impulse noise present in the image. For the Lena image having 30% noise
ratio, Fig. 2 shows the selected patches and respective histograms from median image, original image and the noisy image.

2.2. Estimation of impulse noise ratio

Given the noisy and noise-free histograms, following equation is used to obtain the impulse noise ratio ρ .
 n

N−N×ρ + N×ρ × =M (2)
256
where N is the total number of pixels in the selected patch, n represents number of gray levels present in the noise-free
patch, and M represents the number of pixels in the noisy patch that have gray levels among the set of gray levels present
in the noise free patch. Based on the impulse noise ratio, appropriate number of iterations will be decided for impulse noise
detector in the following section.

2.3. The impulse noise detector

The proposed impulse noise detector is an improved variation of noise detector presented in [15], with fixed thresholding
replaced by adaptive thresholding mechanism using the K-means clustering algorithm.

2.3.1. The Luo-statistic


Luo-statistic was proposed by Luo [15] to separate image details from noisy image and detect the impulses present in the
image. Luo-statistic is defined as the absolute deviation of input image from its linear function image. The linear function
image is obtained by weighted sum of median and immediate neighbors of the median. The pixel value of linear function
image F at location (i, j) is obtained by using following equation:
F (i, j ) = 0.25 × Ui, j (4 ) + 0.50 × Ui, j (5 ) + 0.50 × Ui, j (6 ) (3)

Please cite this article as: A. Khan et al., Image de-noising using noise ratio estimation, K-means clustering and non-local
means-based estimator, Computers and Electrical Engineering (2016), http://dx.doi.org/10.1016/j.compeleceng.2015.12.019
JID: CAEE
ARTICLE IN PRESS [m3Gsc;January 11, 2016;10:25]

4 A. Khan et al. / Computers and Electrical Engineering 000 (2016) 1–12

Table 1
Number of iterations for approximate impulse noise ratio.

Approximate noise ratio (%) 10 20 30 40 50 60 Greater

Number of iterations 2 3 4 6 8 12 [15–20]

where U(i, j) represents array of pixel values sorted in ascending order for a 3 × 3 size window centered at location (i, j) on
the input image. Luo-statistic is defined as absolute deviation of noisy image from its linear function image and is obtained
as follows:
Luo(i, j ) = |X (i, j ) − F (i, j )| (4)
Luo-statistic image or simply Luo-image has smooth regions suppressed. Furthermore, it possesses higher amplitude for
details and impulses present in the image. After few iterations of Luo-statistic i.e. obtaining Luo image again for the image
that is obtained by applying (4), details are also suppressed and only impulses present in the image are left behind.

2.3.2. K-means clustering for impulse noise detection


Details and edges are subtracted from noisy image after few iterations of Luo-statistic and fixed thresholding is applied
on the residue image for detection of impulses. The prime issue with this technique is the choice of a fixed threshold; a
decision rule which can perform well for images of varying texture and illumination. Usually, fixed thresholds are selected
based on extensive experimentation. The problem with this method is the lack of generalization as it works well for limited
type of images
In this paper, K-means is employed for the classification of image pixels. K-means clustering is applied on Luo-statistic
residue image to divide image pixels into two clusters. Pixels belonging to the larger cluster are marked as impulses and
those belonging to the other cluster are marked as noise-free pixels. The application of K-means clustering is equivalent to
adaptive thresholding with selection of threshold governed by texture and illumination of the respective image.

2.3.3. The detection algorithm


The whole detection mechanism can be described in algorithmic form as follows:
Step 1. Compute impulse noise ratio for the input the image.
Step 2. Depending upon impulse noise ratio select Kmax the maximum number of iterations to be performed.
Step 3. Initialize the detection flag matrix Flag as all zeros, where “1s” and “0s” represent noisy and noise-free pixels,
respectively.
Step 4. Set K = 0(K is number of iterations).
Step 5. Obtain Luo-image Luoc (c is number of iterations of Luo-statistic).
Step 6. Apply k-means clustering and update the detection flag matrix Flag to 1 for the pixels mapped to cluster with
larger value of cluster centroid.
Step 7. Get the median based restored image I according to the detection result. If the detection flag is 1, replace the pixel
with the median value of its neighboring pixels.
Step 8. If, K < Kmax , K = K + 1 and go to Step 5, else the detection stage is complete.
The performance of the proposed impulse noise detector is controlled by the maximum number of iterations for given
impulse ratio and the parameter c i.e. number of iterations of Luo-statistic. The choice of number of iterations is more
critical; fewer iterations may leave the impulses present in the image undetected and unaltered, which may give unpleasing
effect and degrade the quality of the restored image, However, large number of iterations of the algorithm can cause blurring
by filtering out of image details. Optimum values of these parameters are determined empirically. For the given value of
impulse noise ratio, performance of noise detector was measured for Kmax in range [1,20] and c in range [1,10] for various
test images. Simulation results revealed that the optimum value of c is 4 irrespective to impulse noise and the number of
iterations for approximate impulse noise ratio is listed in Table 1.

2.4. NL-means for impulse noise filtering

Originally NL-means was used to denoise images corrupted with Gaussian noise. Extension of NL-means is presented
in [21] to remove impulse noise as well. In NL-means, value of each pixel in the noise-free image I can be represented as
weighed sum of all other pixels values in the image. Mathematically, it can be described as follows:
 
x (i ) = w(i, j )y( j ) w(i, j ) (5)
jε I jε I

where x(i) denotes the estimated value of denoised pixel and w(i, j) represents the weight of pixel y(j) involved to estimate
the pixel indexed as i. Weights are calculated on the basis of amount of similarity between the neighborhood of contributing
pixel and the neighborhood of pixel to be estimated.
  2  2 
w(i, j ) = exp −y(Ni ) − y(N j ) h (6)
a

Please cite this article as: A. Khan et al., Image de-noising using noise ratio estimation, K-means clustering and non-local
means-based estimator, Computers and Electrical Engineering (2016), http://dx.doi.org/10.1016/j.compeleceng.2015.12.019
JID: CAEE
ARTICLE IN PRESS [m3Gsc;January 11, 2016;10:25]

A. Khan et al. / Computers and Electrical Engineering 000 (2016) 1–12 5

Table 2
Estimation of impulse noise ratio for images corrupted with differ-
ent impulse noise ratio.

Actual noise ratio (%) Estimated noise ratio (%)

Bridge Baboon Lena Peppers

10 12.72 12.21 11.19 14.86


20 21.64 21.67 21.36 23.98
30 31.48 30.77 30.59 34.68
40 41.84 42.83 41.94 43.53
50 49.23 51.40 50.15 50.49
60 59.61 63.00 60.24 61.96
Max. error 2.72 3.00 1.94 4.86

where y(Ni ) represents the vector of pixel values of (2k + 1) × (2k + 1) size window centered at the pixel indexed i and h
is the smoothing parameter. The norm used in (6) is Euclidean difference weighted by Gaussian kernel of zero mean and
variance a.
Pixels corrupted with impulse noise are significantly different from their neighboring pixels and hence, weights calcu-
lated in the presence of impulses would be incorrect. Therefore, weights are calculated from median based restored image
with suppressed impulses. The output of the noise detection algorithm is a binary matrix of “1s” and “0s” representing noisy
and noise-free pixels, respectively, and the median based restored image. NL-means filter is applied in the filtering stage to
improve the quality of restored image.
NL-means is implemented as suggested in [21] with h = 5, k = 3 and W = 10. These are the same parameter as taken
in [21]. Searching the whole image for measuring similarity is computationally expensive, thus (2W + 1) × (2W + 1) search
window is selected around the pixel to be estimated. The proposed algorithm based on new detection mechanism and
NL-means estimator has been named as the NEK-NLM filter.

3. Experimental results

NEK-NLM filter has been evaluated and compared with some of the existing impulse noise filtering techniques. In or-
der to assess the performance of the proposed technique, extensive computer simulations are performed on 512 × 512,
8-bit grayscale standard test images Lena, Bridge, Baboon and Peppers. For comparison with the existing techniques, the av-
erage restoration and noise detection results (rounded off to suitable number of significant places) for multiple computer
simulations are compared with the results mentioned in [19].
The performance of NEK-NLM filter is also evaluated on the Kodak image dataset [25]. There are a total of 24 images in
this dataset and the size of images is 768 × 512 or 512 × 768. The simulations have been carried out for 8-bit grayscale
images and impulse noise ranging from 20% to 40%. The results were compared to those obtained from two contemporary
techniques: ROR-NLM and ROLD-EPR.

3.1. Impulse noise ratio estimation performance

Table 2 gives the impulse noise ratio estimation results for the technique discussed in Section 2. Experimental results
given in Table 2 prove that the proposed technique can effectively be applied to measure the extent of impulse noise present
in the image.

3.2. Noise detection performance

The detection accuracy is the most important factor for removing impulse noise using switching filters. The performance
measure for evaluating noise detector is the detection accuracy i.e. number of false positives (called false-hit) and false
negatives (called miss-term) generated by the algorithm. Table 3 lists the detection results for the proposed technique for
Lena image corrupted with various noise ratios, along with some of the existing techniques. The comparison shows that, for
each value of impulse noise under consideration, the proposed method gives minimum number of falsely classified pixels.
For example, for processing 50% corrupted image, the proposed technique misclassified 18,615 pixels, whereas the minimum
number of misclassified pixels among other techniques is 22,596 by ACWM. In some cases, ACWM generates lesser number
of false positives than the proposed technique but it misses a large number of impulses present in the image which severely
degrade the restoration performance at the noise filtering stage.
For analysis of the proposed methodology, Fig. 3 compares visually the noise detection performance of the proposed
technique with ROR-NLM filter, for images Lena and Bridge corrupted with 205 impulse noise. In Fig. 3 red dots denote false
detected pixels and blue dots denote the mis-detected pixels. It is clear that ROR-NLM filter frequently detects image details
and edges as noise, whereas the proposed technique separates image details and impulses more accurately and less often
the details are classified as noise.

Please cite this article as: A. Khan et al., Image de-noising using noise ratio estimation, K-means clustering and non-local
means-based estimator, Computers and Electrical Engineering (2016), http://dx.doi.org/10.1016/j.compeleceng.2015.12.019
JID: CAEE
ARTICLE IN PRESS [m3Gsc;January 11, 2016;10:25]

6 A. Khan et al. / Computers and Electrical Engineering 000 (2016) 1–12

Table 3
Comparison of noise detection for Lena image corrupted with various noise ratios.

Noise ratio 20% 30% 40% 50%

Filter Miss False-hit Total Miss False-hit Total Miss False-hit Total Miss False-hit Total

SWM 8836 3648 12,484 12,644 7922 20,566 16,773 8758 25,531 21,474 11,034 32,508
TRI 8995 2841 11,836 13,667 3567 17,234 18,154 4328 22,482 23,319 5793 29,112
MSM 8598 3162 11,760 12,973 3999 16,972 17,232 5104 22,336 22,202 7405 29,607
ACWM 6754 1523 8277 10,344 1904 12,248 12,322 2229 16,551 20,117 2470 22,596
Luo-IMF 8467 1225 9692 12,932 2470 15,412 17,289 4393 21,682 22,531 6882 29,413
DWM 8530 4497 13,027 10,586 7117 17,703 14,325 6521 20,846 12,841 9540 24,381
ROLD-EPR 9158 4321 13,670 11,133 7623 18,756 14,374 7158 21,532 16,682 7619 24,301
ROR-NLM 5863 5643 11,506 9064 5227 14,291 11,658 5952 17,610 14,602 6865 24,301
NEK-NLM 6684 1106 7790 8431 2415 10,846 7951 8207 16,158 10,809 7806 18,615

Fig. 3. Comparison of noise detection for 10% corrupted Lena and Bridge images. (a) NEK-NLM. (b) ROR-NLM.

3.3. Image restoration performance

The overall restoration performance for noise removal is quantitatively measured in terms of peak signal-to-noise ratio
(PSNR), which is defined as:

2552
PSNR = 10log10 M N (7)
1
MN i=1 j=1 (xi, j − Ii, j )

where Ii,j and xi,j denote the pixel values of the original and restored images at the location (i, j), respectively and the image
size is M × N.
In Table 4, the restoration results of the proposed technique are listed on four standard test images corrupted with
impulse noise ranging from 30% to 50%, along with the restoration results for some of the existing techniques [19].
It is observed from Table 4 that the proposed technique outperforms most of the existing random-valued impulse noise
removal techniques. Qualitative comparison of the proposed technique is presented in Fig. 4 for test images Lena and Bridge
corrupted with 50% impulse noise ratio and restored with the proposed technique and ROR-NLM filter. The quality of image
restored using the proposed technique is visibly better because of its more accurate noise detection mechanism. The results
clearly show that the proposed technique removes impulse noise and preserves the image details more effectively.

Please cite this article as: A. Khan et al., Image de-noising using noise ratio estimation, K-means clustering and non-local
means-based estimator, Computers and Electrical Engineering (2016), http://dx.doi.org/10.1016/j.compeleceng.2015.12.019
JID: CAEE
ARTICLE IN PRESS [m3Gsc;January 11, 2016;10:25]

A. Khan et al. / Computers and Electrical Engineering 000 (2016) 1–12 7

Table 4
Comparison of image restoration in PSNR (dB) for images corrupted with various noise ratios.

Filter Bridge Baboon Lena Peppers

30% 40% 50% 30% 40% 50% 30% 40% 50% 30% 40% 50%

SWM 23.85 22.64 20.98 21.50 2.81 20.10 22.46 28.22 24.48 27.08 25.50 23.35
TRI 25.10 23.65 21.71 22.72 21.72 20.79 31.27 28.81 25.75 30.46 28.11 25.22
MSM 25.30 23.54 21.33 23.02 21.87 20.69 31.25 28.15 24.71 30.21 27.12 23.85
ACWM 25.22 23.76 22.18 22.74 21.69 20.76 32.17 29.97 27.09 29.90 28.27 26.09
Luo-IMF 25.40 23.98 22.313 22.90 21.67 20.72 32.39 30.30 27.57 29.95 28.38 26.33
DWM 8530 4497 13027 10586 7117 17703 14325 6521 20846 12841 9540 24381
ROLD-EPR 25.76 24.70 23.67 22.98 21.87 21.09 32.15 30.93 29.56 29.85 29.90 28.32
ROR-NLM 25.26 24.27 22.90 22.83 21.66 21.04 33.14 31.40 29.23 30.62 29.61 27.98
SMF 23.24 21.11 19.01 21.14 19.93 18.73 27.46 23.98 21.01 26.28 23.36 20.11
UINFGP 21.89 19.63 17.59 20.39 19.35 18.02 26.04 22.72 19.92 25.67 22.07 19.16
NEK-NLM 25.47 24.22 22.98 22.80 21.74 20.78 33.99 31.84 29.93 32.64 31.05 28.83

Fig. 4. Comparison of image restoration for 50% corrupted images Lena and Bridge. (a) Original images. (b) Noisy images. (c) Restored images for ROR-NLM
(PSNR, for Lena 26.65 and for Bridge 21.07). (d) Restored images for NEK-NLM (PSNR, for Lena 22.01 and for Bridge 28. 57).

3.4. Performance evaluation on Kodak dataset

The performance of the proposed technique was evaluated for the Kodak image suite as well. The results of the simula-
tions of the proposed technique are compared with two of the contemporary techniques .i.e. ROR-NLM and ROLD-EPR. The
impulse noise level was varied from 20% to 40%.
Fig. 5 shows the results obtained by using the proposed image restoration technique NEK-NLM. Fig. 5(a) shows three of
the original images of Kodak dataset. Introducing 40% noise ratio results in the corrupted images shown in Fig. 5(b). The
restored images obtained after NEK-NLM filtering is applied on the noisy images are shown in Fig. 5(c). It is evident from
the figure that the performance of the proposed filtering technique is satisfactory.
Table 5 presents the comparison based on the noise detection performance measures, .i.e., False-hit and Miss-term. PSNR
values are also compared which signifies the image restoration performance measure. The noise ratio used was 20%. From
this comparison, it is clear that on standard Kodak image dataset, the performance of the proposed technique is superior to
the other contemporary filtering techniques. PSNR is high for all the images filtered with NEK-NLM technique.
Fig. 6 shows the graphs of PSNR values for Kodak image dataset with 20% noise ratio. It is obvious from Fig. 5 that the
proposed filtering technique, .i.e., NEK-NLM outperforms ROR-NLM and ROLD-EPR filtering techniques. PSNR for NEK-NLM is
superior as compared to the other two contemporary techniques for all of the images in the Kodak image dataset.
Table 6 shows the comparison of the noise detection performance measures and PSNR values. The noise ratio was kept
30%. It is observed, that the proposed filtering technique provides high PSNR compared to ROR-NLM and ROLD-EPR.

Please cite this article as: A. Khan et al., Image de-noising using noise ratio estimation, K-means clustering and non-local
means-based estimator, Computers and Electrical Engineering (2016), http://dx.doi.org/10.1016/j.compeleceng.2015.12.019
JID: CAEE
ARTICLE IN PRESS [m3Gsc;January 11, 2016;10:25]

8 A. Khan et al. / Computers and Electrical Engineering 000 (2016) 1–12

Fig. 5. Comparison of image restoration for some of the images of Kodak dataset corrupted with 40% noise (a) Original images. (b) Noisy images. (c)
Restored images with the proposed technique (NEK-NLM).

Table 5
Comparison of noise detection and image restoration for images of Kodak dataset with a noise ratio of 20%.

20% noise ratio

Filter NEK-NLM ROR-NLM ROLD-EPR

Image False-hit Miss PSNR (dB) False-hit Miss PSNR (dB) False-hit Miss PSNR (dB)

im01 28,943 14,431 24.75407 55702 11,770 22.71359 6935 76,450 23.98082
im02 16,065 6470 32.09146 18,556 7097 30.92586 1724 77,252 32.13005
im03 8878 5682 34.51357 10,687 7141 32.56445 1972 77,157 33.67129
im04 14,228 6573 33.33486 12,791 8424 31.68461 2148 77,140 32.57909
im05 19,974 13,581 25.19247 43,207 12,046 23.07893 8162 76,110 23.83797
im06 21,713 11,665 26.72591 40,237 10,157 24.81389 5323 76,794 25.92228
im07 9695 6484 32.59554 10,806 8750 30.4396 3892 76,697 31.14722
im08 21,669 18,920 22.16176 64,254 12,343 20.06725 11,413 75,392 20.68497
im09 5228 9905 31.84816 13,141 7725 29.4544 3435 76,818 30.0919
im10 4396 10,082 31.27275 13,291 7773 29.15626 2628 76,967 29.82471
im11 17,827 9574 28.0276 27,353 9179 26.53887 3802 76,907 27.34434
im12 10,354 6866 32.80848 12,917 7526 31.09283 2701 77,009 31.97821
im13 30,808 17,687 22.49794 67,568 12,859 20.9629 8015 76,455 21.63604
im14 22,729 9946 27.95968 28,872 10,819 26.24519 4066 76,794 27.07147
im15 10,786 6914 32.32104 13,501 7734 30.8659 3266 77,009 31.52638
im16 18,404 8011 30.64688 22,448 8899 29.22067 2422 77,228 30.63192
im17 9670 7197 30.8621 11,542 8557 29.48239 2459 77,061 30.03015
im18 19,533 11,128 26.46301 33,247 10,723 24.90666 4148 76,884 25.65517
im19 12,016 12,575 26.55762 29,064 9233 24.62101 4916 76,501 25.3367
im20 7299 7329 31.33864 14,152 6551 29.33666 3895 77,103 29.38885
im21 17,386 10,384 27.1353 29,291 9166 25.46637 4482 76,812 26.29718
im22 18,380 8383 29.07266 22,304 9274 27.63254 2293 77,170 28.51518
im23 1817 9020 34.80128 7064 7119 31.39126 1554 77,134 31.53206
im24 19,609 10,931 25.01097 34,642 9707 23.86455 4567 76,750 24.46607

Please cite this article as: A. Khan et al., Image de-noising using noise ratio estimation, K-means clustering and non-local
means-based estimator, Computers and Electrical Engineering (2016), http://dx.doi.org/10.1016/j.compeleceng.2015.12.019
JID: CAEE
ARTICLE IN PRESS [m3Gsc;January 11, 2016;10:25]

A. Khan et al. / Computers and Electrical Engineering 000 (2016) 1–12 9

40

35

30
PSNR (dB)
NEK-NLM
25 ROR-NLM
ROLD-EPR
20

15
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

Kodak Images
Fig. 6. Comparison of PSNR of different filtering methods for all the Kodak images for a noise ratio of 20%.

Table 6
Comparison of noise detection and image restoration for images of Kodak dataset with a noise ratio of 30%.

30% noise ratio

Filter NEK-NLM ROR-NLM ROLD-EPR

Image False-hit Miss PSNR (dB) False-hit Miss PSNR (dB) False-hit Miss PSNR (dB)

im01 21,446 24,276 24.17067 50,721 17,563 22.41387 9000 114,192 22.92073
im02 7772 12,934 31.95357 16,533 10,821 30.45645 2688 115,944 31.03063
im03 4491 11,913 33.68478 10,256 10,733 31.71736 3326 115,474 32.18492
im04 5837 13,625 32.6519 12,088 12,720 30.84556 3498 115,424 31.34198
im05 14,509 23,412 24.52759 40,392 18,054 22.6735 10,619 113,124 22.90095
im06 13,043 21,158 26.12384 36,843 15,166 24.48044 7224 114,946 24.98427
im07 5379 13,406 31.72539 11,106 13,297 29.46446 7329 113,924 29.76047
im08 19,279 30,230 21.37504 59,091 18,790 19.68929 13,698 112,020 19.9526
im09 5882 13,595 30.78409 12,544 11,545 28.61202 4522 114,946 28.62614
im10 5568 13,721 30.22781 12,471 11,980 28.74907 3777 115,113 28.92736
im11 10,220 17,927 27.65297 25,506 14,031 26.07532 5357 114,976 26.42446
im12 5331 13,434 31.9652 12,104 11,447 30.59419 3849 115,291 30.7996
im13 25,196 28,475 21.99635 61,818 19,201 20.63838 10,234 114,141 20.96955
im14 12,679 18,384 27.42963 26,702 16,208 25.79684 6031 114,821 26.12003
im15 3853 15,723 31.06896 12,861 11,566 30.06212 4480 115,288 30.28759
im16 9997 15,100 30.3239 20,669 13,264 28.70895 3872 115,624 29.44591
im17 4125 15,201 30.38814 11,217 12,888 28.92746 3887 115,215 29.10854
im18 11,692 20,143 26.08894 30,817 16,306 24.4622 6352 115,018 24.829
im19 11,862 18,367 25.95601 27,222 14,286 24.31378 6405 114,443 24.50904
im20 2702 16,081 30.28512 13,462 9843 28.76153 5387 115,193 28.48999
im21 12,306 17,834 26.51337 27,109 13,982 25.01171 6388 114,602 25.44432
im22 10,040 15,928 28.60062 21,167 14,021 27.17268 3727 115,669 27.68413
im23 1038 19,618 32.84456 6797 10,738 30.93777 2174 115,725 30.65581
im24 13,089 19,417 24.68579 31,822 14,921 23.57619 6476 114,500 23.85581

Fig.7 shows the plots for PSNR values on Kodak image dataset with 30% noise ratio for NEK-NLM, ROR-NLM and ROLD-
EPR. Again, PSNR is highest for all images with NEK-NLM technique, whereas, ROR-NLM provides minimum PSNR. There is
an overlap between some of the PSNR values for ROR-NLM and ROLD-EPR techniques.
The comparison of noise detection performance measures and PSNR values for 40% noise ratio is presented in Table 7.
Although for most of the images, PSNR is high with NEK-NLM but there are some cases for which the other two techniques
give better results.
Fig. 8 shows the curves of PSNR for Kodak image dataset with a noise ratio of 40%. At 40% noise ratio, the performance
of NEK-NLM, ROR-NLM and ROLD-EPR is comparable.
Although the proposed technique has proved to be successful, there is still a room for improvement. It is clear from the
results on Kodak dataset that the proposed technique is superior to the contemporary techniques when noise ratio is below

Please cite this article as: A. Khan et al., Image de-noising using noise ratio estimation, K-means clustering and non-local
means-based estimator, Computers and Electrical Engineering (2016), http://dx.doi.org/10.1016/j.compeleceng.2015.12.019
JID: CAEE
ARTICLE IN PRESS [m3Gsc;January 11, 2016;10:25]

10 A. Khan et al. / Computers and Electrical Engineering 000 (2016) 1–12

35
33
31
29
27

PSNR (dB)
25 NEK-NLM
23 ROR-NLM
21 ROLD-EPR
19
17
15
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
Kodak Images

Fig. 7. Comparison of PSNR of different filtering methods for all the Kodak images for a noise ratio of 30%.

Table 7
Comparison of noise detection and image restoration for images of Kodak dataset with a noise ratio of 40%.

40% noise ratio

Filter NEK-NLM ROR-NLM ROLD-EPR

Image False-hit Miss PSNR (dB) False-hit Miss PSNR (dB) False-hit Miss PSNR (dB)

im01 12,039 41,190 23.07359 45,484 23,478 22.06443 9087 151,963 22.33128
im02 2774 26,657 30.02955 14,568 14,669 29.84521 3062 154,483 30.28069
im03 1364 27,109 30.53898 9628 14,369 30.91643 3770 153,731 31.13235
im04 1728 28,432 30.04269 11,637 17,166 29.98225 4094 153,685 30.28888
im05 7279 41,754 23.12785 38,047 24,439 21.99827 11,345 149,832 22.14811
im06 5633 38,616 24.51197 33,238 20,456 24.02014 7776 152,664 24.37811
im07 2123 28,085 29.30092 11,401 17,840 28.30325 8429 151,100 28.59865
im08 12,235 49,332 20.24141 54,059 25,216 19.25031 13,753 148,353 19.36748
im09 2617 27,551 28.58594 12,108 15,613 27.73908 4947 153,052 27.81977
im10 2304 27,646 28.60149 11,848 16,028 27.94542 4235 153,229 28.24829
im11 4281 34,081 26.05519 23,318 18,957 25.62488 6171 152,713 25.79661
im12 1841 28,534 29.23659 11,321 15,367 29.47899 4421 153,482 29.97638
im13 14,215 47,162 20.98676 55,308 26,384 20.30341 10,889 151,581 20.50275
im14 4918 35,058 25.867 24,906 21,971 25.05566 6801 152,571 25.28298
im15 1243 33,676 27.40131 12,319 15,774 28.55359 5123 152,791 29.01749
im16 3467 30,498 28.39386 19,141 17,516 28.08013 4410 154,101 28.6235
im17 1456 32,656 27.75743 11,064 17,632 27.96221 4209 153,271 28.24189
im18 4826 37,562 24.65592 28,636 21,711 24.03092 6930 152,811 24.20349
im19 5858 33,471 24.71863 25,623 19,307 23.75243 6875 152,186 23.89918
im20 905 35,724 25.573 12,694 13,692 27.90967 5825 152,570 27.75583
im21 5631 33,877 25.15891 24,881 18,778 24.5088 6788 152,311 24.68922
im22 4071 30,319 27.34647 19,748 18,758 26.67644 4572 153,901 26.95865
im23 1021 26,379 30.38354 6600 14,300 30.15401 2511 154,202 30.0791
im24 6426 35,654 23.6926 29,598 20,016 23.19515 7307 151,778 23.35953

33
31
29
27
PSNR (dB)

25
NEK-NLM
23
ROR-NLM
21
19 ROLD-EPR

17
15
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
Kodak Images

Fig. 8. Comparison of PSNR of different filtering methods for Kodak image dataset with 40% noise ratio.

Please cite this article as: A. Khan et al., Image de-noising using noise ratio estimation, K-means clustering and non-local
means-based estimator, Computers and Electrical Engineering (2016), http://dx.doi.org/10.1016/j.compeleceng.2015.12.019
JID: CAEE
ARTICLE IN PRESS [m3Gsc;January 11, 2016;10:25]

A. Khan et al. / Computers and Electrical Engineering 000 (2016) 1–12 11

40%. Hence the important point for the future research is how to improve the estimation and hence the restoration perfor-
mance when impulse noise ratio is even higher. In the light of the proposed technique, following areas can be improved
and addressed in future studies.

1. Instead of selecting a patch size of 64 × 64 for the histogram comparison, an adaptive methodology can be employed.
In such a methodology, patch size shall be selected based on the noise in the particular image as well as the size of
the image.
2. For the noise ratio greater than 40%, median filter introduces blurring in the image. Hence instead of using only
median filtering for all noise ratios, other filtering methods can also be tested e.g. center-weighted median filtering.

4. Conclusion

For effective restoration of the image corrupted by impulse noise, a two-stage impulse noise filter called NEK-NLM is pro-
posed. The main novelty of the proposed filter lies in the noise ratio estimation before noise detection. The use of NL-means
estimator at filtering stage significantly improves the quality of the restored image. The average PSNR for Kodak dataset with
20% noise ratio is 29.16 dB for NEK-NLM, 28.13 dB for ROLD-EPR and 27.35 dB for ROR-NLM. Similarly, the average PSNR for
30% noise ratio is 28.45 dB, 27.13 dB and 26.83 dB for NEK-NLM, ROLD-EPR and ROR-NLM, respectively. Average PSNR for
40% noise ratio is 26.47 dB, 26.37 dB and 26.13 dB for NEK-NLM, ROLD-EPR and ROR-NLM, respectively. From the results, it
concludes that the noise removal via NEK-NLM is superior to other contemporary techniques. The proposed technique can
be applied to different modalities after extensive simulations and hence adjustment of different parameters according to the
modality. In the future, the proposed technique can be improved by employing Deep Neural Networks for the restoration
stage.

References

[1] Gozalez RC, Woods RE. Digital image processing. Engle-wood Cliffs, NJ: Prentice-Hall; 2002.
[2] Pratt WK, “Median filtering,” Image Processing Institute, University of California, Los Angeles, Technical Report, 1975.
[3] Brownrigg D. The weighted median filter. Commun Assoc Comput 1984;27(8):807–17.
[4] Ko S-J, Lee S-J. Center weighted median filters and their applications to image enhancement. IEEE Trans Circuits Syst 1991;15:984–93.
[5] Sun T, Neuvo Y. Detail-preserving median based filters in image processing. Pattern Recognit Lett 1994;15:341–7.
[6] Chen T, Wu HR. Adaptive impulse detection using center weighted median filters. IEEE Signal Process Lett 2001;8:1–3.
[7] Chen T, Ma KK, Chen LH. Tri-state median filtering for image, denoising. IEEE Trans Image Process 1999;8(12):1834–8.
[8] Chen T, Wu HR. Space variant median filters for restoration of impulse noise corrupted images. IEEE Trans Circuits Syst II, Analog Digit Signal Process
2001;48(8):784–9.
[9] Windyga PS. Fast impulse noise removal. IEEE Trans Image Process 2001;10:173–9.
[10] Alajlan N, Kamel M, Jernigan E. Detail preserving impulse noise removal. Signal Process: Image Commun 2004;19:193–1003.
[11] Abreu E, Lightstone M, Mitra SK, Arakawa K. A new efficient approach for removal of impulse noise from highly corrupted images. IEEE Trans Image
Process 1996;5:1012–25.
[12] Wang Z, Zhang D. Progressive switching median filter for the removal of impulse noise from highly corrupted images. IEEE Trans Circuits Syst II,
Analog Digit Signal Process 1999;46(8):78–80.
[13] Pok G, Liu J-C, Nasir AS. Selective removal of impulse noise based on homogeneity level information. IEEE Trans Image Process 2003;12:85–92.
[14] Crnojevic V, Senk V, Tropvski Z. Advanced impulse detection based on pixe-wise MAD. IEEE Signal Process Lett 2004;11:589–92.
[15] Luo W. A new efficient impulse detection algorithm for the removal of impulse noise. IEICE Trans Fundam Electron Commun Comput Sci 2005;E88-
A(10):2579–86.
[16] Ghanekar U, Singh AK, Panday R. A contrast enhancement based filter for removal of random-valued impulse noise. IEEE Signal Process Lett
2010;17(1):47–50.
[17] Awad AS. Standard deviation for obtaining optimal direction in removal of impulse noise. IEEE Signal Process Lett 2011;18(7):407–10.
[18] Garnett R, Hugerich T, Chui C, He W-J. A universal noise removal algorithm with an impulse detector. IEEE Trans Image Process 2005;4:1747–54.
[19] Dong Y, Chan RH, Xu S. A detection statistics for random-valued impulse noise. IEEE Trans Image Process 2007;16(4):1112–20.
[20] Breuing MM, Kriegel HP, Ng RT, Sander J. LOF: identifying density based local outliers. In: Proceedings of ACM SIGMOD conference; 2000. p. 427–38.
[21] Xiong B, Yin Z. A universal denoising framework with a new impulse detector and nonlocal means. IEEE Trans Image Process 2012;21(4):1663–75.
[22] Sharma P, Khan K, Ahmad K. Image denoising using local contrast and adaptive mean in wavelet transform domain. Int J Wavelets Multiresolut Inf
Process 2014;12(6).
[23] Shao L, Yan R, Li X, Liu Y. From heuristic optimization to dictionary learning: a review and comprehensive comparison of image denoising algorithms.
IEEE Trans Cybern 2014;44(7):1001–13.
[24] Petrovic NI, Crnojevic V. Universal impulse noise filter based on genetic programming. IEEE Trans Image Process 2008;17:1109–20.
[25] “Kodak Losless True Color Image Suite”, 2013; http://r0k.us/graphics/kodak/.

Asifullah Khan completed his M.S . and Ph.D. in computer systems engineering from GIK Institute, Pakistan (2003 and 2006).
He completed two years of postdoc- research at SIPL, GIST, South Korea. He has 17 years of research experience and works as
an Associate Professor in DCIS, PIEAS. His research interests include Pattern Recognition, Digital Watermarking, Medical Image
processing, and Machine Learning.

Please cite this article as: A. Khan et al., Image de-noising using noise ratio estimation, K-means clustering and non-local
means-based estimator, Computers and Electrical Engineering (2016), http://dx.doi.org/10.1016/j.compeleceng.2015.12.019
JID: CAEE
ARTICLE IN PRESS [m3Gsc;January 11, 2016;10:25]

12 A. Khan et al. / Computers and Electrical Engineering 000 (2016) 1–12

Muhammad Waqas completed his Bachelors in Computer Sciences from PIEAS in 2011. He then sought out admission in Masters,
again at PIEAS and completed his Master’s degree in 2013. His areas of interest include Digital Image Processing, Machine Learning
and Signal Processing.

Muhammad Rizwan Ali was awarded Bachelors in Computer Science from PIEAS in the year 2012. After it, he completed his
Masters from PIEAS in 2014. Now he serves as a lecturer in PIEAS. His areas of interest include Digital Image Processing and
Scientific Computing.

Abdulrahman Altalhi is an associate professor in Faculty of Computing and IT at King Abdulaziz University. He has obtained his
Ph.D. in Engineering and Applied Sciences from University of New Orleans in 2004. Currently, he is serving as the dean of the
Faculty of Computing and IT. His research interests include Wireless Networks, Software Engineering and Computing Education.

Saleh Alshomrani is an associate professor in Faculty of Computing and IT at University of Jeddah. He is serving now as the
Vice-Dean of Faculty of Computing and IT. He earned his Ph.D. in Computer Science from Kent State University 2008, Ohio, USA.
His research areas include Data Mining, Computing Education, E-Learning, E-Government, Web Programming and Technologies.

Seong-O Shim received his Ph.D. degree in information and mechatronics from Gwangju Institute of Science and Technology,
Korea, in 2011. He is currently working as an assistant professor in Faculty of Computing and Information Technology, University
of Jeddah, Saudi Arabia. His research interests include Computer Vision, Data Mining, 3D Shape Recovery and Medical Imaging.

Please cite this article as: A. Khan et al., Image de-noising using noise ratio estimation, K-means clustering and non-local
means-based estimator, Computers and Electrical Engineering (2016), http://dx.doi.org/10.1016/j.compeleceng.2015.12.019

You might also like