American Journal of Signal Processing
p-ISSN: 2165-9354 e-ISSN: 2165-9362
2014; 4(1): 16-23
doi:10.5923/j.ajsp.20140401.03
Zayed M. Ramadan
Electrical and Computer Engineering Department, King Abdulaziz University –North Jeddah Campus, Jeddah, 21589, KSA
Correspondence to: Zayed M. Ramadan, Electrical and Computer Engineering Department, King Abdulaziz University –North Jeddah Campus, Jeddah, 21589, KSA.
| Email: | ![]() |
Copyright © 2012 Scientific & Academic Publishing. All Rights Reserved.
This paper introduces a method for removal of salt-and-pepper impulsive noise from images while preserving edges and fine details. The method consists of two stages: detection and filtering. In the detection stage, two conditions must be satisfied for a pixel to be considered noisy. The first condition is based on convolution of the corrupted image with four convolution kernels and the second depends on the pixel under consideration in the sliding window and its neighborhood. In the filtering stage, the conventional median filtering is used except that only pixels that are considered noise-free in the sliding window of the detection stage are included in the calculations of the median value that replaces the corrupted pixel value. Small size of sliding windows and wide range of noise densities are used in this paper. Simulation results using many images of different features show superior results of the proposed method over other well-known methods in the literature of image restoration.
Keywords: Impulse noise, Salt-and-pepper noise, Convolution kernels, Noise detection, Noise suppression
Cite this paper: Zayed M. Ramadan, Salt-and-Pepper Noise Removal and Detail Preservation Using Convolution Kernels and Pixel Neighborhood, American Journal of Signal Processing, Vol. 4 No. 1, 2014, pp. 16-23. doi: 10.5923/j.ajsp.20140401.03.
![]() | (1) |
stands for the corrupted input image,
stands for convolution operation and
stands for the pth convolutional kernel. The minimum absolute value of these convolutions is then compared with a threshold value, T, such that if
is greater than T, then the considered pixel is a possible noise candidate. Otherwise, the pixel is noise-free and must be left unchanged. Mathematically, this can be expressed as![]() | (2) |
is small if either the current pixel lies in a noise-free flat region (the four convolutions are small), or if it is an edge (at least one of the convolutions is small, and others are large). Moreover,
is large if the current pixel is isolated impulse(the four convolutions are large). Only pixels that are considered as possible noisy candidates in the first step (denoted by
) are further processed through the second step to finally determine if these pixels are noisy or not. These pixels can be considered noisy if they are corrupted by either pepper or salt noise. A pixel is considered pepper noisy pixel if its value is 0 and the number of 0’s in the corresponding sliding window is less than some threshold value, say
. Similarly, a pixel is considered salt noisy pixel if its value is 255 and the number of 255’s in the corresponding sliding window is less than the same threshold value,
.Consequently, the second step can be expressed mathematically as![]() | (3) |
and
are the number of
and
in the sliding window, respectively.The threshold
is directly proportional to the noise density, D, and its value is less than or equal to the total number of elements in the sliding window, i.e.,
, where W is the length of the square filtering window. In the second stage of the proposed method, i.e., the filtering stage, the conventional median filtering is used. However, only uncorrupted pixels in the sliding window are counted in the calculations of the median value for the case in which the center pixel in the window is considered noisy in the detection stage. The following roughly estimate values of W are used in the simulations of the proposed method in which up to D = 60% total noise density is considered.![]() | (4) |
, the following formula can be used as a starting estimate value after which the most optimum value can be found through computer simulations.![]() | Figure 1. Four 7×7 convolutionkernels |
![]() | (5) |
![]() | (6) |
is the floor operation.The quantitative indices for measuring the performance of the restoration methods in this paper are the mean absolute error (MAE), mean square error (MSE) and the peak signal to noise ratio (PSNR). These measuring indices are defined as follows:![]() | (7) |
![]() | (8) |
![]() | (9) |
for 8-bit gray scale images, M and N are the total number of pixels in the horizontal and vertical dimensions of the image, and
and
are the pixel values in the
locations of the restored (filtered) image and the uncorrupted image, respectively![]() | Figure 2. Noise-free tested images used in this paper. First row (from left to right): Lena, Girl,Lake. Second row (from left to right): Plane, Peppers, Baboon |
|
![]() | Figure 3. First column: Lena, Girl, and lake images corrupted by 20% noise. Second column: corresponding images after being restored by the proposed method |
![]() | Figure 4. First column: Plane, Peppers, and Baboon images corrupted by 40% noise. Second column: corresponding images after being restored by the proposed method |
|
|
![]() | Figure 5. MSE vs. D for several methods (Lena image) |
![]() | Figure 6. MSE vs. D for several methods (Girl image) |