Multidim Syst Sign Process DOI 10.1007/s11045-014-0298-z
A robust noise removal algorithm with consideration of contextual information Qing-Qiang Chen · Chuan-Yu Chang
Received: 7 January 2014 / Revised: 26 August 2014 / Accepted: 9 September 2014 © Springer Science+Business Media New York 2014
Abstract This paper analyzes an image noise model of additive positive and negative impulses that often appear in practical applications. Based on the characteristic that any pixel in an undisturbed image is similar to its neighbors, a local pixel correlation coefficient is proposed. For a pixel, based on the number of similar pixels in its neighborhood, the probability of whether it is noisy or normal can be accurately calculated. An adaptive masking weighted mean filter with consideration of contextual information is proposed to filter noise while retaining the edge details of the image. The proposed algorithm does not require any initial parameters or threshold values to be set. Experimental results show that the proposed algorithm is applicable to the proposed noise model and that the proposed noise filtering is significantly better than that of existing algorithms. Keywords
Impulse noise · Image denoising · Contextual information · Median filter
1 Introduction Digital imaging often suffers from negative/positive impulses during acquisition and transmission. The intensity of some pixels is changed, with a positive (negative) impulse increasing (decreasing) intensity. Even a small amount of impulse noise greatly degrades image quality, and thus affects the efficiency of post-processing, such as image edge detection, segmentation, feature extraction, and feature analysis. Therefore, removing impulse noise during image preprocessing is important.
Q.-Q. Chen School of Information Science and Engineering, Fujian University of Technology, Fuzhou, China e-mail:
[email protected] C.-Y. Chang (B) Department of Computer Science and Information Engineering, National Yunlin University of Science and Technology, Yunlin, Taiwan e-mail:
[email protected]
123
Multidim Syst Sign Process
Many methods have been proposed for detecting and removing salt and pepper noise and random noise. For a256-level grayscale digital image, salt and pepper noise is composed of positive and negative saturation impulses with equal probability. The intensities of affected pixels are distributed over a narrow range in the vicinity of the minimum value (0) and the maximum value (255), producing bright or dark pixels. The intensity of random noise is usually distributed uniformly between the minimum value (0) and the maximum value (255). The standard median filter (SMF) proposed by Tukey is an effective nonlinear filter for removing salt and pepper noise (Tukey 1974). Under certain conditions, it preserves edges while removing noise. The weighted median (WM) filter (Brownrigg 1984), the centerweighted median (CWM) filter (Ko and Lee 1991; Sun et al. 1994), and the adaptive centerweighted median filter (Jin et al. 2008) are modifications of the traditional median filter algorithm that improve image detail preservation. However, these methods apply the same processes to noisy and noise-free pixels. Therefore, noise removal changes the intensity of noise-free pixels, blurring the image. Moreover, the quality of noise removal highly depends on the size of the mask.If the selected mask is too small, noise will not be effectively filtered; if the mask size is too large, image details will be lost. When the intensity of pixels is changed by more than 50 %, the quality of noise filtering decreases dramatically. In order to solve this problem, Sun and Neuvo proposed the switching median filter algorithm (Sun and Neuvo 1994). According to a criterion, pixels are classified as noisy or noise-free. The intensity of noise-free pixels is left unchanged and that of noisy pixels is replaced by the median value within a mask. Various modified median filters have been proposed, including the size-based adaptive median filter (SAMF) (Hwang and Haddad 1995), the noise adaptive soft-switching median filter (NASM) (Eng and Ma 2001), the extremum and median value (EM) filter (Xing et al. 2001), a decision-based algorithm (DBA) (Srinivasan and Ebenezer 2007), an improved filtering algorithm for removing salt and pepper noise (IFARSPN) algorithm (Li et al. 2008), the decision-based unsymmetric trimmed median (DBUTM) filter (Shekar and Srikanth 2011), and the removal of wide range impulse noise (RWRIN) filter (Wang and Wu 2009). These algorithms can retain more image details than can the SMF in certain circumstances. However, they have several drawbacks: (1) they require many precise thresholds, which are difficult to accurately estimate in practice; (2) extreme values of an image may be misjudged; (3) the noise is limited to the ranges 0 ∼ ξ or 255-ξ ∼ 255. However, it is difficult to determine the value of ξ. If the parameter is set inappropriately, the restoration results will be unsatisfactory (Li et al. 2008). Many algorithms have been proposed for removing random noise (Chan et al. 2004; Garnett et al. 2005; Dong et al. 2007; Awad 2010; Xu et al. 2014; Akkoul et al. 2014; Sun et al. 1994; Aizenberg and Butakoff 2004). The detection and removal of random noise is much more difficult than that of salt and pepper noise. Therefore, the quality of images whose random noise has been removed is lower than that of images whose salt and pepper noise has been removed. In addition, methods for removing random noise are unsuitable for removing salt and pepper noise. Various algorithms have been proposed to remove impulse noise. However, their restoration results are not ideal. In this paper, a robust noise removal algorithm called adaptive masking weighted mean filter with consideration of contextual information (AMWMF-CI) is proposed to remove non-saturated additive impulse noise. The proposed noise detection and filtering algorithms achieves high-quality restoration results even when images have serious impulse noise. The rest of this paper is organized as follows. Section 2 describes the impulse noise model and the probability density function (PDF) of the transformed noise. Section 3 presents the
123
Multidim Syst Sign Process
proposed noise detection and filtering algorithms. Section 4 gives the experimental results and compares the proposed method with existing methods. Finally, conclusions are given in Sect. 5.
2 Noise model In digital imaging, additive noise is used to describe the noise added to a signal during its transmission over a communication channel. A noisy image g(x, y)can be represented as: g(x, y) = f (x, y) + η (x, y)
(1)
where f (x, y) denotes the original image and η(x, y) represents the additive noise. In practice, the magnitude of the impulse noise usually has a large value. For an image with 256 gray levels, when the intensity is larger than 255, the pixel with positive impulse noise (+255) becomes saturated and is limited to a value of 255. Similarly, when the intensity is smaller than 0, the pixel with negative impulse noise (−255) becomes saturated and is represented by 0. Assume that the magnitudes of the positive and negative impulse noise are normally distributed over [a, 255] and [−255, −a], respectively. If a is sufficiently large and there is equal probability of positive and negative impulse noise, then the majority of intensities of the noisy pixels will be scattered on the two extremes (gray levels 0 and 255). Figure 1a shows an original grayscale Lena image with a size of 512 × 512 pixels. Figure 1b shows the Lena image with 60 % noise, in which the ranges of positive and negative impulse noise are [180, 255] and [−180, −255], respectively. The corresponding histogram of the noisy Lena is shown in Fig. 1c. As Fig. 1c shows, most of the noises have intensities of 0 or 255. For convenience, the histogram of the noise can be transformed using: z=
v, v < 128 v − 255, v ≥ 128
(2)
where v is the index of the histogram. The transformed histogram of Fig. 1c is shown in Fig. 2. The distribution of the transformed histogram can be approximately represented as: p(z) = αp1 (z) + (1 − α) p2 (z) where p1 (z) =
−
z2 2σ12
−
z2 2σ22
, σ2 is sufficiently small (σ2 < 0.001), and 0 < α < 1. p1 and p2 are Gaussian distributions with N 0, σ12 and N 0, σ22 , respectively. For convenience, the transformed histogram of the image with impulse noise is approximated as a Gaussian distribution, defined as: √ 1 e 2πσ1
, p2 (z) =
(3)
√ 1 e 2πσ2
2 1 − z e 2σ 2 p(z) = √ 2πσ
(4)
Figure 3 shows the approximated transformed histogram of the image with impulse noise with zero mean and standard deviation σ .
123
Multidim Syst Sign Process
Fig. 1 a Original Lena image, b noisy Lena image, and c histogram of the noisy Lena image
Fig. 2 Transformed histogram of Fig. 1c
123
Multidim Syst Sign Process Fig. 3 Approximated transformed histogram of image with impulse noise with zero mean and standard deviation σ
3 Noise detection and filtering 3.1 Basic concept of proposed algorithm In general, a smooth (homogenous) region has pixels with similar intensities. Similarity is usually measured as the intensity difference between two pixels, i.e.: | g(i, j) − g(s, t)| ≤ T, (s, t) ∈ Si, j
(5)
where g(i, j) and g(s, t) denote the intensities of pixels (i, j) and (s, t), respectively. T is a threshold value. Si, j denotes the elements within an m × n mask located at the center (i, j) , 2 ≤ i ≤ M − 1, 2 ≤ j ≤ N − 1. Assume that the sizes of image G with L gray levels is M × N and the mask is 3 × 3. The integral similarity of pixels in a mask of the whole image is defined as: M−1 −1 N n i, j ρ=
i=2 j=2
8 × (M − 2) × (N − 2)
(6)
where n i, j represents the number of pixels similar to the center pixel (i, j) in the mask. The ρ values for images Lena, Barbara, Baboon, Goldhill, and Peppers are in the range 0.65–0.95 under a 3 × 3 mask and a threshold value of 18 (Awad 2010). Assume that an image contains noise, and its corresponding histogram is similar to the distribution described by Eq. (4). If the intensity of pixel (i, j) is x, the probability that pixel (i, j) is noisy is estimated by: pi,n j = η · p (x) (7) where η is the noise level and p (x) denotes the PDF of the noise. If pixel (i, j) with intensity x is noisy, then the probability that the intensity of its neighboring pixel (s, t) is similar is defined as: n n s = p(s,t),(i, ps,t j) + p(s,t),(i, j)
(8)
n where p(s,t),(i, j) denotes the probability that pixel (s, t) is noisy and its intensity is similar s to that of pixel (i, j). p(s,t),(i, j) denotes the probability that pixel (s, t) is noise-free and its
123
Multidim Syst Sign Process n s intensity is similar to that of pixel (i, j). p(s,t),(i, j) and p(s,t),(i, j) are defined as: ⎧
x+R η× 0 p(x)d x, x ≤ R ⎪ ⎪ ⎨
x+R n p(s,t),(i, j) = η × x−R p(x)d x, R < x < (L − 1 − R) ⎪ ⎪ ⎩ η × L−1 p(x)d x, x ≥ (L − 1 − R) x−R ⎧ R+x ⎪ x≤R ⎪ L × (1 − η), ⎨ 2R s R < x < (L − 1 − R) p(s,t),(i, j) = L × (1 − η), ⎪ ⎪ ⎩ R+L−1−x × (1 − η), x ≥ (L − 1 − R)
(9)
(10)
L
where R is a threshold that denotes the tolerance of similarity. L denotes the number of gray level. In this paper, R and L is 18 and 256, respectively. According to the Bernoulli distribution, the probability of the existence of m pixels with intensities similar to that of center pixel (i, j) within the neighboring region S is defined as: n m n 8−m τi,mj = C8m × ps,t × 1 − ps,t (11) Based on Eqs. (7) and (11), the probability that pixel (i, j) is noisy and there exist m similar pixels in the neighboring region S is defined as: πi,mj = pi,n j × τi,mj
(12)
Assume that the intensity of pixel (i, j) is x. The probability that pixel (i, j) is noise-free is estimated by: pi,s j = 1 − pi,n j (13) where η is the noise level. If pixel (i, j) with intensity x is noise-free, then the probability that the intensity of its neighboring pixel (s, t) is similar is defined as: s n s ps,t = q(s,t),(i, j) + q(s,t),(i, j)
(14)
denotes the probability that pixel (s, t) is noisy and its intensity is similar where s to that of pixel (i, j). q(s,t),(i, j) denotes the probability that pixel (s, t) is noise-free and its intensity is similar to that of pixel (i, j).These probabilities are defined as: ⎧
x+R η× 0 p(x)d x, x ≤ R ⎪ ⎪ ⎨
x+R n q(s,t),(i, j) = η × x−R p(x)d x, R < x < (L − 1 − R) (15) ⎪ ⎪ ⎩ η × L−1 p(x)d x, x ≥ (L − 1 − R) n q(s,t),(i, j)
s q(s,t),(i, j)
=
⎧ ⎪ ⎨ ⎪ ⎩
x−R
R+x 2R
× (1 − η) × ρ,
(1 − η) × ρ, R+L−1−x 2R
x≤R R < x < (L − 1 − R)
(16)
× (1 − η) × ρ, x ≥ (L − 1 − R)
According to the Bernoulli distribution, the probability of the existence of m pixels with intensities similar to that of center pixel (i, j) within the neighboring region S is defined as: s m s 8−m ςi,mj = C8m × ps,t × 1 − ps,t (17) Based on Eqs. (13) and (17), the probability that pixel (i, j) is noise-free and there exist m similar pixels in the neighboring region S is defined as: ξi,mj = pi,s j × ςi,mj
123
(18)
Multidim Syst Sign Process
Let: k=
πi,mj πi,mj + ξi,mj
× 100
(19)
Pixel (i, j) is regarded as noisy if k is larger than a threshold TH; otherwise, pixel (i, j) is noise-free. Noisy pixels are replaced by the median value within the mask and noise-free pixels are left unchanged. 3.2 Adaptive masking weighted mean filter with consideration of contextual information (AMWMF-CI) The proposed method has two steps. First, the proposed noise detection algorithm is applied to detect noisy pixels in the image. Second, the intensities of the detected noisy pixels are replaced. The intensities of noise-free pixels are left unchanged. 3.2.1 Noise pixel detection The noisy pixel detection algorithm is summarized as follows: Step 1: For an M × N image G with L graylevels, initialize all the elements in the flag matrix F (M, N ) to 1. Define the threshold for tolerance of similarity R. Step 2: Calculate the number of pixels similar to center pixel (i, j) in the mask, n i, j . Step 3: Calculate πi,mj , ξi,mj , and k =
πi,mj m πi, j +ξi,mj
× 100.
Step 4: If k ≥ 5, set F (i, j) to 0. Step 4: Repeat Step 2 until all pixels have been processed.
3.2.2 Filtering In this paper, an adaptive masking weighted mean filter (AMWMF) is adopted to remove noisy pixels. The intensity of noisy pixel g(i, j) is replaced by: l l
f (i, j) =
F(i + s, j + t)w(s, t)g(i + s, j + t)
s=−l t=−l l l
(20) F(i + s, j + t)w(s, t)
s=−l t=−l
where F(x, y) is the label of pixel (x, y). If pixel (x, y) is noisy, F(x, y) = 0; otherwise, F(x, y) = 1. W is an L × L mask, and l = L/2. For convenience, the denominator of Eq. (20) is denoted by FW. A 7 × 7 mask is shown below. Table 1 PSNR values for restoration results for various σ 2 values σ2
0.001
1
50
100
150
200
250
300
Range of low values
0
0–5
0–31
0–43
0–55
0–62
0–68
0–74
Range of high values
255
250–255
224–255
213–255
205–255
198–255
194–255
177–255
PSNR
40.00
40.00
39.95
39.84
39.46
39.42
39.26
39.00
123
Multidim Syst Sign Process
Fig. 4 a Noisy Lena with σ 2 = 0.001 and η = 20 %, b noisy Lena with σ 2 = 300 and η = 20 %, c restoration result for a, and d restoration result for b
⎡
w(−3, −3) ⎢ w(−2, −3) ⎢ ⎢ w(−1, −3) ⎢ W =⎢ ⎢ w(0, −3) ⎢ w(1, −3) ⎢ ⎣ w(2, −3) w(3, −3)
w(−3, −2) w(−2, −2) w(−1, −2) w(0, −2) w(1, −2) w(2, −2) w(3, −2)
w(−3, −1) w(−2, −1) w(−1, −1) w(0, −1) w(1, −1) w(2, −1) w(3, −1)
w(−3, 0) w(−2, 0) w(−1, 0) 0 w(1, 0) w(2, 0) w(3, 0)
w(−3, 1) w(−2, 1) w(−1, 1) w(0, 1) w(1, 1) w(2, 1) w(3, 1)
w(−3, 2) w(−2, 2) w(−1, 2) w(0, 2) w(1, 2) w(2, 2) w(3, 2)
⎤ w(−3, 3) w(−2, 3) ⎥ ⎥ w(−1, 3) ⎥ ⎥ w(0, 3) ⎥ ⎥ w(1, 3) ⎥ ⎥ w(2, 3) ⎦ w(3, 3) (21)
The weighted coefficient w (s, t) is defined as:
w (s, t) = e4/d
123
(22)
Multidim Syst Sign Process Table 2 Quality assessment values of restored Lena for various methods and noise levels Noise level (%)
10
20
30
SFM PSNR
30.90
30.25
VSNR
23.23
22.33
40
50
60
70
80
29.53
27.97
21.30
19.76
90
24.32
19.17
14.42
10.57
7.70
16.16
10.50
5.26
1.17
−1.72
VIF
0.398
0.350
0.307
0.263
0.180
0.092
0.047
0.030
0.020
UQI
0.653
0.642
0.629
0.601
0.523
0.349
0.150
0.054
0.014
IFC
2.801
2.355
2.001
1.640
1.034
0.492
0.250
0.154
0.105
SSIM
0.858
0.850
0.840
0.817
0.735
0.513
0.227
0.071
0.020
DBA PSNR
41.15
37.02
34.21
32.38
30.62
29.27
27.77
26.51
24.99
VSNR
41.07
34.85
30.86
27.88
24.96
23.17
20.84
18.79
14.19
VIF
0.878
0.755
0.646
0.555
0.477
0.412
0.342
0.265
0.143
UQI
0.975
0.941
0.901
0.852
0.800
0.744
0.679
0.603
0.448
IFC
8.587
6.121
4.763
3.825
3.145
2.611
2.106
1.575
0.799
SSIM
0.988
0.972
0.951
0.927
0.899
0.869
0.832
0.786
0.652
DBUTM PSNR
41.82
37.71
35.07
33.02
31.25
29.78
28.24
26.61
24.12
VSNR
41.70
36.15
32.16
28.93
26.23
23.41
21.22
18.11
14.03
VIF
0.892
0.786
0.690
0.595
0.513
0.433
0.358
0.272
UQI
0.975
0.947
0.910
0.864
0.811
0.752
0.688
0.609
0.161 0.479
IFC
8.914
6.634
5.280
4.237
3.451
2.799
2.236
1.639
0.935
SSIM
0.989
0.975
0.957
0.934
0.907
0.874
0.839
0.791
0.710
IDFRWRIN PSNR
41.70
37.27
33.88
32.64
31.37
29.95
28.69
27.40
25.27
VSNR
41.37
35.45
31.61
28.45
26.29
24.43
22.36
19.98
16.25
VIF
0.885
0.764
0.666
0.576
0.513
0.453
0.384
0.307
0.192
UQI
0.975
0.943
0.905
0.856
0.807
0.755
0.695
0.630
0.517
IFC
8.727
6.279
4.947
3.989
3.405
2.908
2.390
1.858
1.120
SSIM
0.989
0.973
0.954
0.930
0.904
0.877
0.844
0.805
0.735
Proposed PSNR
43.53
40.00
37.62
35.64
33.98
32.43
30.91
29.16
26.65
VSNR
42.80
38.97
35.24
32.15
29.20
26.42
23.64
20.55
16.93
VIF
0.916
0.837
0.764
0.685
0.609
0.525
0.435
0.330
0.206
UQI
0.979
0.955
0.928
0.893
0.856
0.810
0.758
0.686
0.569
IFC
9.642
7.486
6.206
5.152
4.340
3.578
2.862
2.101
1.271
SSIM
0.991
0.981
0.969
0.954
0.936
0.915
0.889
0.851
0.784
where d is the city-block distance between pixel (s, t) and the center, defined as: d = |s − 0| + |t − 0| = |s| + |t|
(23)
Accordingly, the approximated coefficients of W are obtained as:
123
Multidim Syst Sign Process Table 3 Quality assessment values of restored Baboon for various methods and noise levels Noise level (%)
10
20
30
40
50
60
70
80
90
SFM PSNR
21.26
21.13
20.88
20.46
19.34
16.89
13.43
10.25
7.58
VSNR
12.39
12.07
11.64
10.77
9.34
6.40
2.77
−0.77
−3.30
VIF
0.170
0.151
0.132
0.109
0.077
0.045
0.024
0.015
0.011
UQI
0.440
0.432
0.421
0.399
0.353
0.254
0.131
0.053
0.015
IFC
1.760
1.545
1.331
1.083
0.748
0.430
0.224
0.144
0.104
SSIM
0.478
0.472
0.463
0.443
0.400
0.297
0.158
0.061
0.019
DBA PSNR
31.60
27.99
25.78
24.03
22.79
21.60
20.65
19.69
VSNR
27.33
22.32
18.87
16.46
14.55
12.79
11.32
9.62
18.56 7.55
VIF
0.676
0.528
0.415
0.337
0.276
0.224
0.175
0.124
0.073 0.351
UQI
0.966
0.924
0.869
0.805
0.738
0.665
0.584
0.483
IFC
7.847
5.653
4.276
3.390
2.730
2.194
1.702
1.196
0.705
SSIM
0.967
0.926
0.874
0.814
0.751
0.682
0.606
0.515
0.400
DBUTM PSNR
31.85
28.37
26.21
24.49
23.06
21.83
20.75
19.64
VSNR
27.38
22.78
19.37
17.15
15.16
13.27
11.32
9.47
18.31 7.01 0.072
VIF
0.689
0.549
0.446
0.366
0.299
0.241
0.184
0.131
UQI
0.968
0.928
0.878
0.820
0.751
0.675
0.587
0.489
0.345
IFC
8.069
5.961
4.654
3.717
2.989
2.378
1.794
1.270
0.692
SSIM
0.969
0.930
0.882
0.827
0.762
0.690
0.608
0.519
0.396
IDFRWRIN PSNR
32.01
28.36
26.04
24.39
23.09
22.02
21.00
19.96
VSNR
27.98
22.56
19.42
16.95
15.27
13.59
12.04
10.50
VIF
0.689
0.538
0.435
0.356
0.302
0.246
0.201
0.149
18.81 8.05 0.086
UQI
0.969
0.927
0.878
0.819
0.757
0.686
0.610
0.521
0.380
IFC
8.069
5.787
4.500
3.594
2.999
2.427
1.963
1.445
0.824
SSIM
0.970
0.930
0.883
0.826
0.768
0.700
0.629
0.546
0.423
Proposed PSNR
33.35
30.10
28.02
26.36
24.97
23.70
22.62
21.49
VSNR
30.05
25.00
21.74
19.51
17.37
15.46
13.65
11.71
VIF
0.732
0.608
0.511
0.434
0.361
0.300
0.236
0.171
20.08 9.29 0.094
UQI
0.976
0.947
0.913
0.872
0.820
0.761
0.686
0.584
0.423
IFC
8.790
6.743
5.448
4.505
3.665
3.006
2.338
1.681
0.923
SSIM
0.977
0.949
0.915
0.877
0.828
0.772
0.703
0.612
0.476
⎡
2 ⎢2 ⎢ ⎢3 ⎢ W =⎢ ⎢4 ⎢3 ⎢ ⎣2 2
123
2 3 4 7 4 3 2
3 4 7 55 7 4 3
4 7 55 0 55 7 4
3 4 7 55 7 4 3
2 3 4 7 4 3 2
⎤ 2 2⎥ ⎥ 3⎥ ⎥ 4⎥ ⎥ 3⎥ ⎥ 2⎦ 2
Multidim Syst Sign Process
The noise removal algorithm is summarized as follows: Step 1: If F(x, y) = 1, proceed to Step 7. Step 2: Set L = 3 and calculate the denominator of Eq. (20).If F W ≥ 55, then proceed to Step 5. Step 3: Set L = 5 and calculate the denominator of Eq. (20). If F W ≥ 15, then proceed to Step 5. Step 4: Set L = 7 and calculate the denominator of Eq. (20). If F W = 0, then proceed to Step 6. Step 5: Calculate f (i, j) using Eq. (20). Set g (i, j) = f (i, j). Proceed to Step 7. Step 6: Calculate f (i, j) using: f (i, j) = [ f (i − 1, j − 1) + f (i − 1, j) + f (i, j − 1)] 3. Set g (i, j) = f (i, j) . Step 7: Repeat Step 1 until all pixels have been processed.
3.3 Enhanced AMWMF-CI algorithm There are many parameters including the noise level (η), the standard deviation (σ 2 ), and ρ should be set in the AMWMF-CI algorithm. In most cases, the AMWMF-CI algorithm performs well under a set of fixed parameters (η = 50 %, σ 2 = 50, and ρ = 0.8). However, if the parameters are set inappropriately, the restoration results will be unsatisfactory. In addition, after the AMWMF-CI algorithm has been performed, some noisy pixels may remain. Therefore, a refinement process is proposed to remove the noisy pixels that the AMWMF-CI not removed. One round of the AMWMF-CI algorithm is firstly performed on the original noisy image with a set of fixed parameters (η = 50 %, σ 2 = 50, and ρ = 0.8). The three parameters (η, σ 2 , and ρ) are re-estimated from the filtered image (obtained from the AMWMF-CI algorithm).At most five rounds of AMWMF-CI algorithm are performed iteratively on the consecutive filtered image with the set of estimated parameters. The enhanced AMWMF-CI algorithm is summarized as follows: Step 1: Setting the initial parameters as η = 50 %, σ 2 = 50, and ρ = 0.8. Step 2: Perform one round of the AMWMF-CI algorithm. Step 3: Estimate the noise rate η,standard deviation σ 2 , and ρ. Step 3–1: Calculate the standard deviation of those noisy pixels with intensity small than 127 by sig_ p =
n 1 2 pk n k=1
where n denotes the number of detected noisy pixel, pk denotes the intensity of the kth noisy pixel with intensity small than 127. Step 3–2: Calculate the standard deviation of those noisy pixels with intensity larger than 127 by
123
Multidim Syst Sign Process
Fig. 5 Lena with 70 % noise and restoration results for various methods. a Lena with 70 % salt-pepper noise, b Lena with 70 % Gaussian noise with N(0, 10), restoration results obtained using c SMF, d DBA, e DBUTM, f RWRIN, g and proposed method, and h original Lena
123
Multidim Syst Sign Process
Fig. 6 Baboon with 70 % noise and restoration results for various methods. a Baboon with 70 % salt-pepper noise, b Baboon with 70 % Gaussian noise with N(0, 10), restoration results obtained using c SMF, d DBA, e DBUTM, f RWRIN, g proposed method, and h original Baboon
123
Multidim Syst Sign Process Table 4 Quality assessment values for restoration results for Lena with various positive impulse noise levels Noise level (%)
10
20
SFM PSNR
30.85
30.24
VSNR
23.18
22.36
30
40
50
60
70
80
29.46
28.11
21.3
19.55
90
24.92
19.72
14.82
11.00
8.20
16.36
10.92
5.54
1.52
−1.39
VIF
0.397
0.352
0.308
0.260
0.186
0.097
0.050
0.029
0.022
UQI
0.653
0.643
0.628
0.601
0.530
0.356
0.159
0.056
0.019
IFC
2.799
2.374
1.998
1.630
1.072
0.519
0.263
0.156
0.114
SSIM
0.858
0.851
0.840
0.817
0.739
0.526
0.242
0.077
0.026
DBA PSNR
16.23
13.17
11.41
10.14
9.14
8.31
7.57
6.93
6.32
VSNR
12.39
9.10
7.53
6.17
5.08
4.12
3.39
2.65
2.04
VIF
0.148
0.097
0.073
0.056
0.044
0.035
0.029
0.022
0.019
UQI
0.176
0.100
0.066
0.047
0.033
0.024
0.015
0.009
0.005
IFC
0.789
0.514
0.384
0.297
0.234
0.185
0.151
0.116
0.098
SSIM
0.204
0.100
0.063
0.044
0.031
0.023
0.016
0.011
0.007
DBUTM PSNR
16.22
13.15
11.42
10.12
9.12
8.31
7.58
6.93
6.34
VSNR
12.32
9.12
7.47
6.17
4.94
4.14
3.42
2.65
2.03 0.019
VIF
0.148
0.098
0.074
0.056
0.043
0.037
0.029
0.023
UQI
0.175
0.099
0.067
0.047
0.033
0.024
0.016
0.010
0.005
IFC
0.790
0.519
0.392
0.295
0.228
0.196
0.151
0.122
0.102
SSIM
0.202
0.099
0.064
0.044
0.031
0.023
0.017
0.011
0.008
IDFRWRIN PSNR
16.19
13.17
11.40
10.13
9.13
8.30
7.56
6.90
6.33
VSNR
12.18
9.08
7.43
6.13
4.94
4.12
3.38
2.55
2.00 0.019
VIF
0.147
0.097
0.072
0.056
0.045
0.035
0.029
0.022
UQI
0.173
0.099
0.066
0.046
0.033
0.024
0.016
0.008
0.005
IFC
0.783
0.514
0.381
0.296
0.237
0.186
0.152
0.115
0.103
SSIM
0.201
0.100
0.063
0.043
0.031
0.023
0.016
0.010
0.007
Proposed PSNR
43.49
40.00
37.50
35.63
33.95
32.35
30.75
29.00
26.54
VSNR
42.80
38.96
35.61
32.00
29.21
26.52
23.75
20.80
16.59
VIF
0.916
0.836
0.765
0.678
0.609
0.524
0.436
0.335
0.206
UQI
0.979
0.956
0.928
0.893
0.856
0.811
0.757
0.689
0.566
IFC
9.648
7.487
6.215
5.114
4.348
3.571
2.862
2.134
1.257
SSIM
0.991
0.981
0.970
0.954
0.937
0.915
0.889
0.854
0.781
sig_n =
m 1 (255 − qk )2 m k=1
where m denotes the number of detected noisy pixel, qk denotes the intensity of the kth noisy pixel with intensity larger than 128. Step 3–3: The standard deviation is estimated by σ 2 = max (sig_ p, sig_n)
123
Multidim Syst Sign Process
Fig. 7 Restoration results for Lena with positive impulse noise. a Lena with 50 % impulse noise with [0, 10] and [245, 255], and restoration results obtained using b SMF, c DBA, d DBUTM, e RWRIN, and f proposed method
123
Multidim Syst Sign Process Table 5 Quality assessment values for restoration results for Lena with bipolar impulse noise Noise level (%)
10
20
SFM PSNR
30.85
30.28
VSNR
23.18
22.36
30
40
50
60
70
80
29.46
28.06
21.3
19.55
90
24.67
19.30
14.34
10.51
7.70
16.25
10.63
5.24
1.25
−1.70
VIF
0.397
0.353
0.308
0.260
0.183
0.093
0.048
0.029
0.021
UQI
0.653
0.643
0.628
0.601
0.528
0.349
0.150
0.051
0.017
IFC
2.799
2.375
1.997
1.626
1.055
0.500
0.252
0.152
0.113
SSIM
0.858
0.851
0.840
0.816
0.736
0.514
0.228
0.069
0.022
DBA PSNR
29.96
26.48
24.43
22.99
21.16
19.55
17.76
15.77
VSNR
27.96
23.74
21.28
18.99
16.52
13.90
11.02
8.18
13.44 4.76
VIF
0.709
0.566
0.464
0.398
0.318
0.259
0.198
0.143
0.078 0.318
UQI
0.925
0.853
0.787
0.732
0.660
0.593
0.520
0.437
IFC
6.713
4.574
3.456
2.779
2.137
1.686
1.258
0.891
0.474
SSIM
0.943
0.890
0.843
0.808
0.759
0.714
0.666
0.608
0.527
DBUTM PSNR
30.02
26.58
24.45
23.03
21.38
19.61
17.72
15.49
VSNR
28.32
23.74
21.45
19.00
16.15
13.68
10.86
7.57
12.66 3.72 0.075
VIF
0.719
0.580
0.484
0.412
0.342
0.274
0.206
0.140
UQI
0.928
0.857
0.794
0.739
0.676
0.604
0.531
0.436
0.313
IFC
6.938
4.804
3.722
2.986
2.364
1.829
1.338
0.884
0.458
SSIM
0.946
0.893
0.847
0.812
0.770
0.722
0.673
0.608
0.523
IDFRWRIN PSNR
30.15
26.69
24.47
22.83
21.10
19.50
17.66
15.60
VSNR
28.60
24.09
21.10
19.05
16.18
13.75
11.28
8.11
13.01 4.57 0.093
VIF
0.716
0.575
0.477
0.407
0.336
0.278
0.221
0.161
UQI
0.929
0.856
0.794
0.732
0.671
0.605
0.538
0.454
0.342
IFC
6.857
4.684
3.566
2.859
2.291
1.833
1.434
1.021
0.568
SSIM
0.946
0.893
0.849
0.809
0.766
0.723
0.679
0.621
0.544
Proposed PSNR
43.24
40.00
37.50
35.63
33.94
32.32
30.74
28.95
26.58
VSNR
42.69
38.90
35.14
32.08
29.39
26.15
23.65
20.71
16.43
VIF
0.912
0.838
0.762
0.686
0.608
0.518
0.433
0.336
0.201
UQI
0.979
0.955
0.927
0.895
0.856
0.810
0.757
0.688
0.562
IFC
9.594
7.495
6.181
5.184
4.343
3.524
2.846
2.145
1.225
SSIM
0.991
0.981
0.969
0.955
0.937
0.915
0.888
0.854
0.779
Step 3–4 Estimate ρ by Eq. (6). Step 3–5 Calculate the noise rate by η=
noise_num × 100 % total_num
where noise_num and total_num denotes the number of detected noisy pixels and the total pixels in an image, respectively.
123
Multidim Syst Sign Process
Step 4: Set the number of iterations (rep) to 5. Step 5: Set the label CNT to 1. Step 6: Perform one round of the AMWMF-CI algorithm.If there are noisy pixels, set CNT to 0. Step 7: Set rep=rep-1. Step 8: If r ep ≥ 1 and C N T = 0, go to Step 5; otherwise, stop. In general, 2 to 3 passes of the AMWMF-CI algorithm were required. Without loss of generality, the number of iteration is set to 5 in this paper. 4 Experimental results To demonstrate the proposed method’s ability to restore noisy images, five experiments were performed. In the first four experiments, the peak signal to noise ratio (PSNR), visual signal-to-noise ratio (VSNR) (Chandler and Hemami 2007), visual information fidelity (VIF) (Sheikh and Bovik 2006), universal quality index (UQI) (Wang and Bovik 2002), information fidelity criterion (IFC) (Sheikh et al. 2005), and structural similarity index (SSIM) (Wang et al. 2004) were employed to assess restored images. More information for the algorithms and original code can be found at the website (MeTriXMuX). In the last experiment, a pavilion image provided by an anonymous reviewer was used to test the robustness of the proposed method. 4.1 Restoration results for Lena with 20 % noise The grayscale Lena (512 × 512 × 8 bits) was adopted in this experiment. The noise was set to 20 %. The PSNR values for the restored Lena for various σ 2 values are shown in Table 1. With increasing σ 2 , the distribution range of noise increases. Although the PSNR decreased slightly, the restored Lena retains good perceptual quality. Figure 4 shows the noisy and restored Lena. 4.2 Restoration results for Lena and Baboon with various levels of noise In order to demonstrate that the proposed method can robustly restore noisy images, various noise levels (10–90 %) were applied to Lena and Baboon. Since switching median filters are not suitable for handling Gaussian noise, only impulse noise with a maximum value of 255 and a minimum value of 0 was imposed for DBA, DBUTM, and RWRIN methods. Tables 2 and 3 show the quality assessment values for the restored Lena and Baboon for various noise levels, respectively. Figures 5 and 6 show the noisy images and restoration results obtained using various methods for Lena and Baboon, respectively. Tables 2 and 3, Figs. 4, and 5 indicate that the proposed method has the highest quality assessment values, and the best visual quality. 4.3 Restoration results for Lena with positive impulse noise In this experiment, positive impulse noise with ranges of [0, 10] and [245, 255] was applied to a Lena image (512 × 512 × 8 bits). Table 4 shows the quality assessment values for the restored Lena for various noise levels. The restoration results for the proposed method are very similar to those obtained for the image with Gaussian noise with N (0, 10). However, the restoration results of the other algorithms are significantly worse. The restoration results
123
Multidim Syst Sign Process
Fig. 8 Restoration results for Lena with bipolar impulse noise. a Lena with 50 % bipolar impulse noise with [200, 255] and [−200, −255] and restoration results obtained using b SMF, c DBA, d DBUTM, e RWRIN, and f proposed method
123
Multidim Syst Sign Process
Fig. 9 Restoration results for Pavilion with unknown noise. a noisy Pavilion image, restoration results by enhanced AMWMF-CI algorithm after b 1 pass, c 2 passes, d 3 passes, e 4 passes, f 5 passes, g 6 passes, h 10 passes, and i 11 passes
123
Multidim Syst Sign Process
for Lena with 50 % positive impulse noise are shown in Fig. 7. The perceived quality of the restored Lena is reasonable. 4.4 Restoration results for Lena with bipolar impulse noise In this experiment, bipolar impulse noise with ranges of [200, 255] and [−200, −255] was applied to a Lena image (512 × 512 × 8 bits). According to the discussion in Sect. 2, this noise was estimated from the superposition of two normal density functions with different σ 2 values. Therefore, the modified algorithm cannot be directly used to filter out the noise. Step 2 of the modified algorithm should be omitted (i.e., to maintain the value of σ 2 = 50). Table 5 shows the quality assessment values for the restored Lena with various noise levels, respectively. The restoration results for the proposed method are very similar to those obtained for the image with Gaussian noise with N (0, 10) (Table 2). However, the restoration results of the other algorithms are significantly worse. The restoration results for Lena with 50 % bipolarimpulse noise are shown in Fig. 8. The perceived quality is good. 4.5 Restoration results for pavilion with unknown noise In this experiment, a pavilion image provided by an anonymous reviewer was used to test the robustness of the proposed method. Figure 9a shows a noisy Pavilion image that suffered from unknown noise. Figure 9b–i shows the restoration results by enhanced AMWMF-CI algorithm after 1–6 and 10–11 passes, respectively. The estimated noise parameters are σ 2 = 794.54, η = 52 %,and ρ = 0.68. Observing Fig. 9g–i, we almost cannot find the differences between these restoration results by human eyes. The perceived quality is good. That is why the number of iteration set to 5 in the enhanced AMWMF-CI.
5 Conclusion This paper proposed a more realistic impulse noise model. The corresponding adaptive noise detection and filtering algorithm called Adaptive Masking Weighted Mean Filter with Consideration of Contextual Information (AMWMF-CI) and enhanced AMWMF-CI were proposed. Experimental results indicate that the proposed algorithms have excellent performance for images with positive impulse noise, bipolar impulse noise, and non-saturated additive impulse noise. The proposed method obtained higher quality assessment values than those of other methods. The restoration results also showed that the proposed method achieved higher visual perception. References Aizenberg, I., & Butakoff, C. (2004). Effective impulse detectors based on rank-order criteria. IEEE Signal Processing Letters, 11(3), 363–366. Akkoul, S., Harba, R., & Ledee, R. (2014). An image dependent stopping method for iterative denoising procedures. Multidimensional Systems and Signal Processing, 25(3), 611–620. Awad, A. S. (2010). Cascade window-based procedure for impulse noise removal in heavily corrupted images. Journal of Electronic Imaging, 19(1), 1–10. Brownrigg, D. (1984). The weighted median filter. Communications of the ACM, 27(8), 807–818. Chan, R., Hu, C., & Nikolova, M. (2004). An iterative procedure for removing random-valued impulse noise. IEEE Signal Processing Letters, 11(12), 921–924.
123
Multidim Syst Sign Process Chandler, D. M., & Hemami, S. S. (2007). VSNR: A wavelet-based visual signal-to-noise ratio for natural images. IEEE Transactions on Image Processing, 16(9), 2284–2298. Dong, Y., Chan, R., & Xu, S. (2007). A detection statistic for random-valued impulse noise. IEEE Transactions on Image Processing, 16(4), 1112–1120. Eng, H. L., & Ma, K. K. (2001). Noise adaptive soft-switching median filter. IEEE Transactions on Image Processing, 10(2), 242–251. Garnett, R., Huegerich, T., Chui, C., & He, W. J. (2005). A universal noise removal algorithm with an impulse detector. IEEE Transactions on Image Processing, 14(11), 1747–1754. Hwang, H., & Haddad, R. A. (1995). Adaptive median filters: New algorithms and results. IEEE Transactions on Image Processing, 4(4), 499–502. Jin, L., Xiong, C., & Li, D. (2008). Adaptive center-weighted median filter. Journal of Huaz Hong University of Science & Technology, 36(8), 9–12. Ko, S. J., & Lee, S. J. (1991). Center weighted median filters and their applications to image enhancement. IEEE Transactions on Circuits and Systems, 15, 984–993. Li, S. Q., Zhang, Y., Sun, G. M., & Lv, N. (2008). Improved filtering algorithm for removing salt and pepper noise. Computer Engineering, 34(10), 171–175. MeTriXMuX Visual Quality Assessment Package README (v. 1.1). (2014). http://foulard.ece.cornell.edu/ gaubatz/metrix_mux/. Sheikh, H. R., & Bovik, A. C. (2006). Image information and visual quality. IEEE Transactions on Image Processing, 15(2), 430–444. Sheikh, H. R., Bovik, A. C., & Vesiana, G. (2005). An information fidelity criterion for image quality assessment using natural scene statistics. IEEE Transactions on Image Processing, 14(12), 2117–2128. Shekar, D., & Srikanth, R. (2011). Removal of high density salt and pepper noise in noisy images using decision based unsymmetric trimmed median filter. International Journal of Computer Trends and Technology, 2(1), 109–114. Srinivasan, K. S., & Ebenezer, D. (2007). A new fast and efficient decision-based algorithm for removal of high-density impulse noises. IEEE Signal Process Letter, 14(3), 189–192. Sun, T., Gabbouj, M., & Neuvo, Y. (1994). Center weighted median filters: Some properties and their applications in image processing. Signal Processing, 35(3), 213–229. Sun, T., & Neuvo, Y. (1994). Detail-preserving median based filters in image processing. Pattern Recognition Letters, 15, 341–347. Tukey, J. W. (1974). Nonlinear (nonsuperposable) methods for smoothing data. In Proceedings of electronic and aerospace systems conference (pp. 673–681). Wang, S. S., & Wu, C. H. (2009). A new impulse detection and filtering method for removal of wide range impulse noises. Pattern Recognition, 42, 2194–2202. Wang, Z., & Bovik, A. C. (2002). A universal image quality index. IEEE Signal Processing Letters, 9(3), 81–84. Wang, Z., Bovik, A. C., Sheikh, H. R., & Simoncelli, E. P. (2004). Image quality assessment: From error visibility to structural similarity. IEEE Transactions on Image Processing, 13(4), 600–612. Xing, C. J., Wang, S. J., Deng, H. J., & Luo, Y. J. (2001). A new filtering algorithm based on extremum and median value. Journal of Image and Graphics, 6(6), 533–536. Xu, J. L., Feng, X. C., & Hao, Y. (2014). A coupled variational model for image denoising using a duality strategy and split Bregman. Multidimensional Systems and Signal Processing, 25(1), 83–94. Qing-Qiang Chen Since 1985, he has been with the School of Information Science and Engineering, Fujian University of Technology, China. He is currently an Associated Professor. His current research interests include embedded system and image processing.
123
Multidim Syst Sign Process Chuan-Yu Chang received the M.S. degree in electrical engineering from National Taiwan Ocean University, Keelung, Taiwan, in 1995, and the Ph.D. degree in electrical engineering from National Cheng Kung University, Tainan, Taiwan, in 2000. From 2001 to 2002, he was with the Department of Computer Science and Information Engineering, Shu-Te University, Kaohsiung, Taiwan. From 2002 to 2006, he was with the Department of Electronic Engineering, National Yunlin University of Science and Technology, Yunlin, Taiwan, where since 2007, he has been with the Department of Computer and Communication Engineering (later Department of Computer Science and Information Engineering), where he is currently a Distinguished Professor and Dean of Research and Development. He is the chair of IEEE Signal Processing Society Tainan Chapter. His current research interests include machine learning and their application to medical image processing, wafer defect inspection, digital watermarking, and pattern recognition. In the above areas, he has more than 150 publications in journals and conference proceedings. Dr. Chang received the excellent paper award of the Image Processing and Pattern Recognition society of Taiwan in 1999, 2001, and 2009. He was also the recipient of the Best Paper Award in the International Computer Symposium in 1998 and 2010, the Best Paper Award in the Conference on Artificial Intelligence and Applications in 2001, 2006, 2007, and 2008, and the Best Paper Award in National Computer Symposium in 2005. He received the Best Paper Award from the Symposium on Digital Life Technologies in 2010, 2011, 2013, and 2014. He served as the Program co-Chair of 2007 Conference on Artificial Intelligence and Applications, 2009 Chinese Image Processing and Pattern Recognition Society (IPPR) Conference on Computer Vision, Graphics, and Image Processing, and 2010–2013 International Workshop on Intelligent Sensors and Smart Environments. He served as General co-chair of 2012 International Conference on Information Security and Intelligent Control, 2011–2013 Workshop on Digital Life Technologies, and Finance co-chair of 2013 International Conference on Information, Communications and Signal Processing. He was a member of the organization and program committees for more than 50 times, organized and chaired for more than 30 technical sessions for many international conferences. He is a Life Member of IPPR and the Taiwanese Association for Artificial Intelligence (TAAI), senior Member of IEEE, and is listed in Who’s Who in the World, Who’s Who in Science and Engineering, Who’s Who in Asia, and Who’s Who of Emerging Leaders.
123