Next Article in Journal
A Novel Highly Linear Voltage-To-Time Converter (VTC) Circuit for Time-Based Analog-To-Digital Converters (ADC) Using Body Biasing
Next Article in Special Issue
CNN-Based Acoustic Scene Classification System
Previous Article in Journal
Control of Two Satellites Relative Motion over the Packet Erasure Communication Channel with Limited Transmission Rate Based on Adaptive Coder
Previous Article in Special Issue
Simplification on Cross-Component Linear Model in Versatile Video Coding
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Median Filtering Using First-Order and Second-Order Neighborhood Pixels to Reduce Fixed Value Impulse Noise from Grayscale Digital Images

by
Ali Salim Nasar Mursal
and
Haidi Ibrahim
*
School of Electrical & Electronic Engineering, Engineering Campus, Universiti Sains Malaysia, Nibong Tebal, Pulau Pinang 14300, Malaysia
*
Author to whom correspondence should be addressed.
Electronics 2020, 9(12), 2034; https://doi.org/10.3390/electronics9122034
Submission received: 16 October 2020 / Revised: 27 November 2020 / Accepted: 29 November 2020 / Published: 1 December 2020
(This article belongs to the Special Issue Multimedia Systems and Signal Processing)

Abstract

:
It is essential to restore digital images corrupted by noise to make them more useful. Many approaches have been proposed to restore images affected by fixed value impulse noise, but they still do not perform well at high noise density. This paper presents a new method to improve the detection and removal of fixed value impulse noise from digital images. The proposed method consists of two stages. The first stage is the noise detection stage, where the difference values between the pixels and their surrounding pixels are computed to decide whether they are noisy pixels or not. The second stage is the image denoising stage. In this stage, the original intensity value of the noisy pixels is estimated using only their first-order and second-order neighborhood pixels. These neighboring orders are based on the Euclidean distance between the noisy pixel and its neighboring pixels. The proposed method was evaluated by comparing it with some of the recent methods using 50 images at 18 noise densities. The experimental results confirm that the proposed method outperforms the existing filters, excelling in noise removal capability with structure and edge information preservation.

1. Introduction

Digital images have an important role in our life [1]. Digital imaging has a wide range of applications in many research areas, such as medical sciences, biology, particle physics, geology, the science of materials, photography and remote sensing [1,2,3]. For some medical practices, digital imaging plays an important role, especially for studying physiology abnormalities and anatomy of the internal organs [4]. Countless images are made, translated and edited daily [5].
However, many images that are created have some imperfections called noise [6]. Such imperfections may be caused by the incapacity and instability of imaging systems or sensors to obtain ideal images [1], or natural disruptions in the surroundings during image processing [1,7], inadequate illumination, or sensor temperature resulting in noise, or during compression and transmission [1,7,8]. Data obtained with these noises can make the data unusable or lose confidence in them [1,9].
Noise is simply an unnecessary detail, impacting the consistency of the signals and data [10,11]. This is because noise results in alterations in images where the original values of some pixels are changed to different values [5]. One of the common types of noise is impulse noise [12]. Impulse noise frequently distorts the image during the phase of image processing and transmission [11,13]. Impulse noise can be divided into two categories, which are random value impulse noise and fixed value impulse noise [13,14,15]. Random value impulse noise is usually caused by errors in timing or synchronization of analog to digital converter [15,16], malfunctioning pixel elements in the camera sensors or faulty transmission [3,15,16,17]. The intensity values of the damaged pixels in the image by random value impulse noise ranged from the minimum value to the maximum value in the dynamic range [13,15,18,19]. On the other hand, fixed value impulse noise is usually caused by malfunctioning pixel elements in the camera sensors, faulty memory locations or errors in the digitization process [15]. The damaged pixels in the image by fixed value impulse noise take only the maximum or the minimum values in the dynamic range [12,13,15,19]. Therefore, the damaged pixels appear as black and white pixels [20,21].
Impulse noise significantly impacts the processing and analysis of digital images, such as image segmentation, object recognition, object tracking and edge detection [22,23]. Thus, it is important to eliminate the impulse noise from the image before proceeding with any subsequent processing [11,23,24]. Effective impulse noise removal is therefore highly needed.
Median filter and mean filter have initially been proposed to eliminate the impulse noise [22]. Both filters have a simple process, but the mean filter was found not able to maintain image structure and edge details, while the median filter gave better results. Other classic filters are Kuwahara and Nagao filters; unlike mean and median filters, these filters are more complicated because they divide the window into groups, and the mean value of the most homogeneous group, based on the lowest standard deviation, is the new value of the pixel to be restored [25,26,27,28]. Besides the complexity, they have two main drawbacks. One is the block structure of the output, particularly evident in textured areas. The second one is that every time the minimum value of the standard deviation is reached by more than one subregion, the output of the filter operators cannot be uniquely determined [29].
However, the median filter still has several limitations, especially for removing high noise density. This is because it filters all pixels in the image, even those pixels that are not corrupted by noise [22,24]. Researchers have proposed several changes or enhancements to the Standard Median Filter (SMF) due to the limitations of the SMF filter [24,30,31]. Various advanced filters have been proposed by integrating various techniques [8]. However, the SMF drawback is that the filter is applied to all pixels in the image evenly, to the noisy pixels and noise-free pixels, which leads to original details lost. The switching median filter (SwMF) came to solve this drawback [32].
SwMF and its enhancement filters consist of two stages. The first stage is noise detection. In this stage, each pixel in the image is denoted as a noisy pixel or noise-free pixel [33]. This stage is very important, as the second stage depends on it to maintain the original details of the image and not to miss any noisy pixel for restoration. The existing impulse noise detectors may miss many noisy pixels from being detected, especially for high noise density or on white and black regions. Also, they still detect many of the noise-free pixels with extreme intensity as noisy pixels, which leads to a loss in the original details of the image [1]. From that, an enhancement of impulse noise detectors is required.
The second stage of the SwMF and its enhancement filters is the restoration of the corrupted pixels in the image. The restoration of corrupted pixels is done by estimating the original intensity value using the pixels around it. The existing restoration filters still cannot achieve high-quality restored images from corrupted images at high noise density as observed in the recent works by Chen et al. [22], Samantaray et al. [34], Chen et al. [35] and Sangave and Jain [12]. From that, an enhancement of impulse noise restoration is required.
In this paper, an enhanced SwMF method is proposed. The proposed method has two stages. The first stage is the fixed value impulse noise detection, wherein the pixels having extreme intensities in the corrupted image will be denoted as noisy pixels or noise-free pixels depending on the difference values between their intensities and the intensities of the surrounding pixels. In the second stage, the original intensity value of the noisy pixels will be estimated using the median value of the non-extreme intensity pixels of the first-order neighborhood pixels. In case all the pixels in the first-order neighborhood are having extreme intensity pixels, the median value of the non-extreme intensity pixels in the second-order neighborhood pixels will be used to estimate the original intensity of the noisy pixel.

2. Related Works

Many methods were proposed to enhance SwMF. For example, in work by Samantaray et al. [34], a variable threshold detector (VTD) was used, where the threshold value was dependent on the estimated noise density. The noise density was estimated by sliding an 11 × 11 mask over all the image regions. For each mask having a non-extreme intensity pixel at its center, the method counts the number of pixels with extreme intensity within this area. Then, the noise density was estimated by dividing this number of extreme intensity pixels by the number of the mask’s positioning over the entire image. To restore the noisy pixels, Samantaray et al. [34] proposed a neighborhood-based decision filter (NBDF), where only the first-order neighborhood (FON) pixels were used to estimate the original intensity value of the noisy pixel.
In work by Chen et al. [22], the 3σ and local statistics principal (D3PLS) distinguish the noisy pixels and the noise-free pixels in the corrupted image. For the restoration of the noisy pixels, Chen et al. [22] proposed an adaptive sequentially weighted median filter (ASWMF). The median value of the weighted noise-free pixels in a small window is used as the new value of the noisy pixels. If all the pixels in the window are noisy pixels, the window is enlarged until there is at least one noise-free pixel, or it reaches its maximum size.
In work by Chen et al. [35], a fixed threshold detector (FTD) was used, where the number of pixels having the same intensity value as the pixel to be checked in a window of size 5 × 5 determines whether the pixel is noisy or not. In the work by Chen et al. [35], iterative grouping median filter (IGMF) was proposed to restore the noisy pixels. The uncorrupted pixels within a window of size 5 × 5 pixels were arranged in ascending or descending order. They are then divided into groups as the number of edges is found by applying a threshold value between each pixel and its adjacent pixel.
In work by Sangave and Jain [12], a boundary discriminative noise detector (BDND) is used to discriminate the noisy pixels in the corrupted image. The pixels in a window of size 21 × 21 pixels were divided into two groups of equal number, after ascending sort. The two boundaries determined by the pixel intensity value had the largest difference in value with the intensity value of the next pixel to it in each group. After that, to restore the noisy pixels, Euclidean distance filter (EDF) was used, where the original intensity value of a noisy pixel was estimated by the mean value of the noise-free pixels in a window of size w × w pixels after being weighted by the Euclidean distance.

3. The Proposed Method

In this work, we aim to generate a restored image R from the image C corrupted by fixed value impulse noise. The proposed method is based on SwMF. Therefore, the proposed method consists of two stages, with the first stage being the noise detection stage, and the second stage being the image denoising stage. This is shown in Figure 1. In the noise detection stage, each pixel in the corrupted image C will be denoted as either a noisy pixel or noise-free pixel. This information will be stored in a noise mask N. Then, in the image denoising stage, those pixels denoted as noisy pixels in noise mask N will undergo the process to estimate their original intensity value. The result is the restored image R.

3.1. Noise Detection Stage

This method aims to remove fixed value impulse noise only. For this type of impulse noise, all corrupted pixels in image C have extreme intensity values (i.e., 0 or L-1), where L is the number of intensity levels of the image (e.g., for an eight-bit-per-pixel grayscale image, L is equal to 256 levels). Therefore, all pixels in image C that have non-extreme intensity values will be denoted as noise-free pixels. On the other hand, initially, all pixels in image C having extreme intensity value will be denoted as noise candidate pixels. However, some of the pixels with the extreme intensity value are not noisy pixels. As a consequence, in this work, noise candidate pixels will be further undergoing the detection stage to distinguish which of them are noisy pixels, and which ones are noise-free pixels.
As mentioned in work by Chen et al. [22], it is assumed that the intensity distribution of the uncorrupted pixels within a local window usually follows a normal distribution. This means that the intensities in the local window have a small difference in value between each other. Hence, the noise-free pixels with extreme values are normally surrounded by pixels that have the same or similar intensity values (i.e., with a small difference in value) to them. From these assumptions, the proposed detector considers that the noise candidate pixel’s intensity is significantly different from the neighboring pixels as a noisy pixel. On the other hand, if the intensity value of the noise candidate pixel is similar to its neighboring pixels, this pixel is considered as a noise-free pixel.
Based on that, two threshold values will be used to evaluate the intensity differences between the noise candidate pixel with its neighboring pixels. The first threshold value is the highest difference value (HDV), and the second threshold value is the highest mean value (HMV) of the difference values. Both HDV and HMV will be determined from a set of training images. The training image Tr is considered a clean image without noise.
HDV will be calculated by taking the intensity differences between normal extreme intensity (NEI) pixels, which are the pixels having extreme intensity value in image Tr, with all of their surrounding pixels, within a window of size 3 × 3 pixels. These difference values will be obtained from all training images that will be used in this work. As the dynamic range is from 0 to 255, the difference values will be grouped and each group will be of 10 difference values. The groups having less than 6% repetitive rate will be denoted as infrequent difference values and will be excluded. Then, the largest intensity difference that is obtained after excluding the infrequent values will be the HDV.
On the other hand, HMV will be calculated by taking the mean values of the difference values between each NEI in image Tr and its surrounding pixels within a window of size 3 × 3 for all original images. The infrequent mean values will be excluded. The mean values having less than 2% will be denoted as infrequent mean values and will be excluded. The highest mean value after excluding the infrequent values will be the HMV.
Based on that, the proposed detector denotes noise candidate pixels on an image as noisy pixels or noise-free pixels depending on either of those two threshold values. First, the difference value between the intensity value of the pixel will be checked with the intensity values of the pixels surrounding that pixel, as these difference values will be compared with HDV. Second, the mean value of all the difference values between the noise candidate pixel and its surrounding pixels, as this value, will be compared with HMV.
After that, each noise candidate pixel will be compared with all non-extreme intensity pixels surrounding it in a window of size 3 × 3 pixels. If any difference value is bigger than HDV, the noise candidate pixel will be denoted as a noisy pixel. Otherwise, the mean value of all the difference values will be computed. The difference value between noise candidate pixels and extreme intensity pixels will be constant. For the opposite extreme intensity pixels than the noise candidate pixel, the difference will be equal to the HDV value. For the pixels having the same extreme intensity value as the noise candidate pixel, the difference will equal to 0. If the mean value of the difference values is bigger than HMV, the noise candidate pixel will be denoted as a noisy pixel, otherwise as a noise-free pixel.
If all the pixels surrounding the noise candidate pixel have extreme-intensity values, the fixed threshold detector will be used. For the fixed threshold detector, a window of size 5 × 5 pixels and a threshold of 21 will be used, as recommended in the work by Chen et al. [22]. The number of pixels having the same intensity as the noise candidate pixel will be counted in a window of size 5 × 5 pixels. If the number counted is bigger than the threshold, the noise candidate pixel will be denoted as a noise-free pixel, otherwise as a noisy pixel.
The following eight steps are presented to summarize the procedure:
Step 1:
Initialize all pixels as noise-free pixels by making all elements in matrix N equal to 0.
Step 2:
Denote all pixels having extreme intensity value as noise candidate pixel PNC.
P N C ( x , y ) = { 1 C ( x , y ) = 0   or   C ( x , y ) = 255 0 otherwise
where (x,y) are the spatial coordinates, and C(x,y) is the intensity value of the corrupted image at coordinates (x,y). PNC(x,y) equal to 1 is used to indicate that the pixel is a noise candidate pixel, whereas PNC(x,y) equal to 0 is used to indicate that the pixel is noise-free.
Step 3:
For each PNC(x,y) equal to 1, compute the intensity difference values between this pixel with each of its neighboring pixels within a 3 × 3 window, with coordinates (x,y) at the center of that window. These difference values are stored in vector D.
D ( i ) = | C ( x , y ) C ( x + a i , y + b i ) | 0 i 7
with vector a = {−1,0,1,1,1,0,−1,−1} and vector b = {−1,−1,−1,0,1,1,1,0}.
Step 4:
If all the neighboring pixels have the same intensity with the center pixel, which is i D ( i ) = 0 , go to Step 6. Otherwise, compare all values in D with HDV value. If any value in D is bigger than HDV, the pixel at these coordinates is denoted as a noisy pixel. Thus, N(x,y) is given the value 1 and go to Step 8. Otherwise, go to Step 5.
Step 5:
Replace any element in D which is equal to 255 with HDV value. Then, compute the mean value of the elements in the updated D. If the mean value is greater than HMV, PNC is denoted as a noisy pixel (i.e., N(x,y) = 1), otherwise as a noise-free pixel (i.e, N(x,y) = 0), then go to Step 8.
Step 6:
Count the number of pixels that have the same intensity as PNC(x,y) within a window of size 5 × 5 pixels, with coordinates (x,y) at the center of the window. Save this count as Cs.
Step 7:
If Cs > 21, PNC is denoted as a noise-free pixel (i.e., N(x,y) = 0), otherwise as a noisy pixel (i.e., N(x,y) = 1), then go to Step 8.
Step 8:
Repeat the steps from Step 3 to Step 8 for all PNC.

3.2. Image Denoising Stage

The proposed image denoising stage is based on the work by Samantaray et al. [34], where only FON pixels are used to estimate the original intensity value of the noisy pixel, as they are more correlated to the noisy pixel than the others. In the work by Samantaray et al. [34], as some pixels left with an extreme intensity value in case of all FON pixels have extreme intensity values, the process of restoration needed to be repeated to ensure that all noisy pixels have been restored. Some pixels have extreme intensity values that remain in the second round to be restored. In the second round, the FON pixels may already be restored depending on the second-order neighborhood (SON) and third-order neighborhood (TON) pixels. This means, in the second round, the process depends on SON and TON to estimate the original intensity value of the noisy pixel. Figure 2 shows the positions of FON, SON and TON pixels in relation to the noisy pixel PN (i.e., the pixel with N(x,y) = 1). These neighboring orders are based on the Euclidean distance between the noisy pixel and its neighboring pixels.
However, the SON pixels are more correlated to the central pixel than the TON pixels [22]. Based on that, an enhancement is proposed to the work by Samantaray et al. [34], where the SON pixels are used to estimate the original intensity value of the noisy pixels in the case of all the FON pixels having extreme intensity values. Thereafter, if all FON and SON pixels have extreme intensities, the pixel to be restored will either have an extreme intensity as the new intensity value or it should be left unchanged.
The proposed method replaces the intensity value of the noisy pixel by the median value of the non-extreme intensity FON pixel intensities. The intensity value of the noisy pixel is replaced by the median value of the non-extreme intensity SON pixel intensities if all the FON pixels have extreme intensities. If all the FON and SON pixels have extreme intensities and the number of the opposite extreme intensity value pixels is bigger than 6, the new value of the corrupted pixel will be the opposite extreme intensity; otherwise, it will be left with no change.
To summarize, the steps are as follows:
Step 1:
Locate the noisy pixel PN (i.e., the pixel with N(x,y) = 1).
Step 2:
Check the pixels surrounding PN in a window of size 3 × 3 with PN at the center of the window. If all pixels in the window have extreme intensities go to Step 4. Otherwise, go to Step 3.
Step 3:
If all FON pixels have extreme intensities, the median value of SON pixels will be the new intensity value of PN. Otherwise, the median value of FON will be the new value of PN. Then go to Step 6.
Step 4:
Count the number of the pixels having the opposite extreme intensity of PN, which is Co. Then go to Step 5.
Step 5:
If Co greater than 6, the new value of PN will be the opposite extreme value of it. Otherwise, leave it with no change. Then move to Step 6.
Step 6:
Repeat all steps for all noisy pixels in the image (i.e., the pixels with N(x,y) = 1).

4. Results and Discussions

To evaluate the results of the proposed noise detector and the mentioned detectors above, the missing detection rate (MDR), and the false detection rate (FDR) were used. Equations (3) and (4) show the mathematical expression for the MDR and the FDR, respectively [22].
MDR = p f ( R r ( p ) = 0 R d ( p ) = 1 ) p f R r ( p ) × 100 %
FDR = p f ( R r ( p ) = 1 R d ( p ) = 0 ) p f R r ( p ) × 100 %
where f is the image matrix, Rr is the matrix for indicating noises added by Matlab 2018a, which indicates a noisy pixel with Rr(p) = 0, or noise-free with Rr(p) = 1; Rd is the matrix for indicating the detected noises, which indicates a noisy pixel with Rd(p) = 0, or noise-free with Rd(p) = 1; symbol ˄ refer to logical AND.
MDR calculates the ratio of noisy pixels that the detector did not detect to the total number of noisy pixels in the corrupted image. Therefore, the lower the MDR ratio the better detecting capability. FDR calculates the ratio of noise-free pixels that the detector detects as noisy pixels to the total number of noisy pixels in the corrupted image. Therefore, the lower the FDR ratio, the better at not detecting false pixels.
However, to evaluate the image denoising stage of the proposed method and the methods mentioned above, the peak signal to noise ratio (PSNR) and structural similarity index (SSIM) are used. Equations (5) and (6) show the PSNR and SSIM mathematical expressions [22].
PSNR = 10 log 10 m × n × 255 2 i = 1 m j = 1 n ( f ( i , j ) g ( i , j ) ) 2
SSIM = ( 2 μ f μ g + C 1 ) ( 2 σ f g + C 2 ) ( μ f 2 + μ g 2 + C 1 ) ( σ f 2 + σ g 2 + C 2 ) , C 1 = ( K 1 L ) 2 , C 2 = ( K 2 L ) 2
where, f is the original image and g is the restored image; m is the height of the image and n is the width of the image, σf is the standard deviation of f and µf is the mean value of f, σg is the standard deviation of g and µg is the mean value of g, σfg is the covariance of f and g, C1 and C2 are the stabilizing constants, L is the number of intensities levels in the image, K1 and K2 are selected by default as 0.01 and 0.03, respectively.
PSNR measures the resemblance between the original image and the restored image. Therefore, the higher the PSNR the better the restored image, which means the better the image denoiser restoring capability. SSIM measures the preservation capability of the structural information. Therefore, the higher the SSIM the better the preservation capability, which means better image denoiser structure information preservation capability.

4.1. Data Preparation

In this paper, 83 standard images will be used. These images are taken from the internet. All images are gray-scale images, with different size (i.e., 480 × 480 pixels, 512 × 512 pixels, 640 × 480 pixels, 720 × 576 pixels, and 720 × 580 pixels). These images have been selected because they are normally used in digital image processing research. Furthermore, most of them have large black or white regions on the image.
These images are divided into two groups. The first group consists of 33 images and is used as the training images Tr. These images are used to determine the values of HDV and HMV. The remaining 50 images are used as the testing images Ts. Because all images are considered noise-free images, to evaluate the performance of the methods in noise detection and image denoising, image Ts will be synthetically corrupted by fixed value impulse noise using Matlab 2018a, from noise density 5% to 90%, with increment step of 5%. Therefore, 18 noise density levels are evaluated in this work.

4.2. Calculations to Determine HDV and HMV

To calculate the value of HDV, a procedure was conducted on the 33 original uncorrupted Tr images. The procedure calculated the difference values between the NEI pixels and their surrounding pixels in a window of size 3 × 3 pixels. The results of this procedure are based on 59,122 NEI pixels found in the 33 Tr images, which means 472,976 surrounding pixels. The results of the procedure are shown in Table 1.
It can be analyzed from the results of Table 1 that NEI pixels are correlated to their surroundings. Of the surrounding pixels, 58.01% have the same intensity level as their NEI pixel and 14.7% have a difference in intensity level with their NEI between 1 to 10 intensity levels. However, it can be observed that the differences in intensity level ratio become less as the difference in intensity levels becomes higher.
The ratio of the difference value of less than 11 intensity levels between NEI pixels and their surrounding pixels in a window of size 3 × 3 pixels is equal to 72.7%. Therefore, the ratio of the difference value higher than 10 intensity levels between NEI pixels and their surrounding pixels in a window of size 3 × 3 pixels is equal to 27.3%. From this observation, the recommended HDV for the proposed method is 10 intensity levels.
To calculate the recommended value for HMV, another procedure has been conducted. The procedure was applied to these pixels surrounding NEI pixels in a window of size 3 × 3 pixels. As the recommended value for HDV is 10 intensity levels, the procedure was applied only on those pixels that had differences in intensity value from their NEI pixels that were less than 11 intensity levels.
The procedure to determine the value of HMV calculates the ratio of the mean values of the difference values between the intensity level of NEI pixels and their surrounding pixels within a window of size 3 × 3 pixels. The procedure was conducted on the same 33 images used to calculate the HDV value. Table 2 shows the results of the procedure.
As shown in Table 2, it can be observed that most of the pixels surrounding the NEI pixels have a small difference in intensity level. The other differences may exist as they are on the border of an edge. The ratio for mean values less than three is equal to 95.5%. The ratio for mean values greater than three is increased slightly. Based on that, the recommended HMV value is 3.

4.3. Noise Detection Stage Evaluation

The proposed fixed value impulse noise detector and some of the recent detectors were applied to the 50 images from testing set Ts, after adding noise to them. The detectors applied to images at each noise density from 5% to 90% with a gap difference of 5%. The MDR and FDR have been taken for each detector at each noise density. The average of MDR and FDR have been taken for all images at each noise density. Table 3 shows the results of the noise detection stage, where ND refers to noise density and AVG refers to the average.
From Table 3, it can be observed that FTD has the best results for MDR, which means its miss-detection of noisy pixels is the lowest. Yet, FTD has the highest FDR, which means it detects noise-free pixels as noisy pixels more than the other methods.
The proposed method has the best result for FDR. This means that the proposed method has the lowest false noise detection ratio. Besides, the proposed method also performs well in terms of MDR, where the average MDR is still less than 1%. Furthermore, the proposed method also gives the lowest value when we add the average MDR with the average FDR, showing that the proposed method is the best noise detector amongst the evaluated methods in this work.

4.4. Image Denoising Stage Evaluation

To evaluate the noise cancelation stage, the proposed method and the recent methods we applied to the 50 Ts images, after adding noise to them. The methods applied to images at each noise density from 5% to 90% with a gap difference of 5%. The PSNR and SSIM are used to evaluate each method at each noise density for all images. The average PSNR and the average SSIM have been taken for all images at each noise density for each method. The same fixed value impulse noise detector is used for methods. The detector used is FTD with threshold of 21. Table 4 shows the results of the experiment, where, ND refers to noise density and AVG refers to the average.
It can be observed from Table 4, that the EDF method has the worst results in this experiment for both PSNR and SSIM. On the other hand, the proposed method has the best PSNR and SSIM results in the average of all densities in this experiment. This means that the proposed method has the best restoring and structure information preservation capability.

4.5. State-of-Art Evaluation

To evaluate the state-of-art of the proposed method, an experiment was conducted. The proposed method is evaluated by comparing it with some of the recent state-of-art methods. PSNR and SSIM will be used to evaluate the output images for each state-of-art at each noise density from 5% to 90% with 5% as a gap difference between those noise densities, using 50 Ts images. Table 5 shows the average results for all images at each noise density, where, ND refers to noise density and AVG refers to the average.
From Table 5, it can be observed that the state-of-art consists of EDF as a denoiser, and BDND as a noise detector has the worst results in both PSNR and SSIM. On the other hand, the state-of-art consists of the proposed detector, and the proposed denoiser has the best results in both PSNR and SSIM. This means, the proposed method is better than the other methods mentioned in this work.
Figure 3, Figure 4 and Figure 5 show noisy images and their restored images. The noisy images are affected by fixed value impulse noise at 10%, 50% and 90% noise density, respectively. Each noisy image is restored by the proposed method and some of the recent methods.
Figure 3 shows a noisy “Girl face” image by fixed value impulse noise at 10% density and its restored images by the proposed method and some of the recent methods that have been mentioned in this work. This figure presents the performance of the methods for a low corruption level. It can be observed that EDF+BDND has the worst restored image. On the other hand, the proposed method and the others have better results and they look similar. However, the PSNR of the proposed method is the highest.
Noisy “Girl” image at 50% noise density and its restored images are shown in Figure 4. This figure presents the performance of the methods for a medium corruption level. From the appearance of the restored images, it can be observed that EDF+BDND has the worst restored image. On the other hand, the other methods have a better appearance on their restored images, but the PSNR of the restored image by the proposed method is the highest.
Figure 5. presents noisy “Tulips” image along with its restored images. In this figure, the noise density added is at 90%, to present a high corruption level. It can be observed from the appearance of the restored images that EDF+BDND has a less similar output image to the original image. On the other hand, the other methods have more similarity to the original image, but the restored image by the proposed method has the highest PSNR, which means that it has the most similarity to the original image.

5. Conclusions

In this paper, a method has been proposed to restore corrupted images by fixed value impulse noise. The proposed method has two stages, the noise detection stage and the image denoising stage. In the noise detection stage, the pixels with extreme intensities are denoted as noisy or noise-free pixels depending on the difference between their intensities and the intensities of the pixels surrounding them. An experiment was conducted to evaluate the proposed detector by comparing it with some of the recent detectors used to detect the fixed value impulse noise. The results of the experiment showed that the proposed detector has the best result in the average of all outputs.
In the image denoising stage, the noisy pixels are restored by estimating their original intensities based on the first-order and second-order neighborhood pixel intensities. An experiment has been conducted to evaluate the proposed image denoiser by comparing its output images with the output of some of the recent methods used to restore the images corrupted by fixed value impulse noise. The results of the experiments show that the proposed method has better restoring and structure information preservation capability. In future works, to further improve the method’s performance, the authors will explore the possibilities of using inpainting approaches in the image-denoising stage. The inpainting methods have been used in noise reduction works, such as Zhou et al. [36] and Zhou et al. [37].

Author Contributions

A.S.N.M. conceived the study, conducted the experiment and wrote the manuscript; H.I. supervised the project, manage the funding, gave some valuable suggestions and revised the manuscript. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by the Ministry of Higher Education Malaysia, under the Fundamental Research Grant Scheme (TRGS) with research grant number 203/PELECT/6071421.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Dubey, A.K.; Arora, R.; Yadav, S. A review and comprehensive comparison of image de-noising techniques. In Proceedings of the 2017 6th International Conference on Reliability, Infocom Technologies and Optimization (Trends and Future Directions) (ICRITO), Noida, India, 20–22 September 2017; pp. 624–629. [Google Scholar]
  2. Khan, S.; Lee, D. An adaptive dynamically weighted median filter for impulse noise removal. EURASIP J. Adv. Signal Process. 2017, 2017, 67. [Google Scholar] [CrossRef] [Green Version]
  3. Jian-Hong, X.; Ye, P.; Wang, L.; He, M. A novel image-restoration method based on high-order total variation regularization term. Electronics 2019, 8, 867. [Google Scholar]
  4. Omer, A.A.; Hassan, O.I.; Ahmed, A.I.; Abdelrahman, A. Denoising CT Images using Median based Filters: A Review. In Proceedings of the 2018 International Conference on Computer, Control, Electrical, and Electronics Engineering (ICCCEEE), Khartoum, Sudan, 12–14 August 2018; pp. 1–6. [Google Scholar]
  5. George, G.; Oommen, R.M.; Shelly, S.; Philipose, S.S.; Varghese, A.M. A Survey on Various Median Filtering Techniques for Removal of Impulse Noise from Digital Image. In Proceedings of the 2018 Conference on Emerging Devices and Smart Systems (ICEDSS), Tiruchengode, India, 2–3 March 2018; pp. 235–238. [Google Scholar]
  6. Boo, S.T.; Ibrahim, H.; Toh, K.K.V. An Improved Progressive Switching Median Filter. In Proceedings of the 2009 International Conference on Future Computer and Communication, Kuala Lumpar, Malaysia, 3–5 April 2009; pp. 136–139. [Google Scholar]
  7. Sheikh, S.; Suthar, B.; Uddin, M. Comparative study of noise and digital filters for image processing. In Proceedings of the 2017 International Conference on Innovations in Control, Communication and Information Systems (ICICCI), Greater Noida, India, 12–13 August 2017; pp. 1–6. [Google Scholar]
  8. Konieczka, A.; Balcerek, J.; Dąbrowski, A. Method of adaptive pixel averaging for impulse noise reduction in digital images. In Proceedings of the 2018 Baltic URSI Symposium (URSI), Poznan, Poland, 14–17 May 2018; pp. 221–224. [Google Scholar]
  9. Kumain, S.C.; Singh, M.; Singh, N.; Kumar, K. An efficient Gaussian Noise Reduction Technique for Noisy Images using optimized filter approach. In Proceedings of the 2018 First International Conference on Secure Cyber Computing and Communication (ICSCCC), Jalandhar, India, 15–17 December 2018; pp. 243–248. [Google Scholar]
  10. Das, J.; Das, B.; Saikia, J.; Nirmala, S. Removal of salt and pepper noise using selective adaptive median filter. In Proceedings of the 2016 International Conference on Accessibility to Digital World (ICADW), Guwahati, India, 16–18 December 2016; pp. 203–206. [Google Scholar]
  11. Sravani, B.; Rao, M.V.N. Removing of high density salt and pepper noise using fuzzy median filter. In Proceedings of the 2014 International Conference on High Performance Computing and Applications (ICHPCA), Bhubaneswar, India, 22–24 December 2014; pp. 1–6. [Google Scholar]
  12. Sangave, P.H.; Jain, G. Impulse noise detection and removal by modified boundary discriminative noise detection technique. In Proceedings of the 2017 International Conference on Intelligent Sustainable Systems (ICISS), Palladam, India, 7–8 December 2017; pp. 715–719. [Google Scholar]
  13. Kiani, V.; Zohrevand, A. A Fuzzy Directional Median Filter for Fixed-value Impulse Noise Removal. In Proceedings of the 2019 7th Iranian Joint Congress on Fuzzy and Intelligent Systems (CFIS), Bojnord, Iran, 29–31 January 2019; pp. 1–4. [Google Scholar]
  14. Jin, K.H.; Ye, J.C. Sparse and Low-Rank Decomposition of a Hankel Structured Matrix for Impulse Noise Removal. IEEE Trans. Image Process. 2018, 27, 1448–1461. [Google Scholar] [CrossRef] [PubMed]
  15. Yun, J.H.; Lim, H.J. Image Restoration Using Fixed-Point-Like Methods for New TVL1 Variational Problems. Electronics 2020, 9, 735. [Google Scholar] [CrossRef]
  16. Patanavijit, V.; Thakulsukanant, K. The Novel Denoising Technique Based on 8D Optimal Directions Using Statistical SD for Random-Valued Impulse Noise. In Proceedings of the 2018 IEEE 7th Global Conference on Consumer Electronics (GCCE), Nara, Japan, 9–12 October 2018; pp. 34–37. [Google Scholar]
  17. Ibrahim, H.; Abdalameer, A.K. Improvement of quantized adaptive switching median filter for impulse noise reduction in gray-scale digital images. Turk. J. Electr. Eng. Comput. Sci. 2019, 27, 580–594. [Google Scholar] [CrossRef]
  18. Roy, A.; Manam, L.; Laskar, R.H. Region Adaptive Fuzzy Filter: An Approach for Removal of Random-Valued Impulse Noise. IEEE Trans. Ind. Electron. 2018, 65, 7268–7278. [Google Scholar] [CrossRef]
  19. Zhu, H.; Ng, M.K. Structured Dictionary Learning for Image Denoising Under Mixed Gaussian and Impulse Noise. IEEE Trans. Image Process. 2020, 29, 6680–6693. [Google Scholar] [CrossRef]
  20. Mafi, M.; Izquierdo, W.; Adjouadi, M. High Impulse Noise Intensity Removal in Natural Images Using Convolutional Neural Network. In Proceedings of the 2020 10th Annual Computing and Communication Workshop and Conference (CCWC), Las Vegas, NV, USA, 6–8 January 2020; pp. 673–677. [Google Scholar]
  21. Taha, A.Q.M.; Ibrahim, H. Reduction of Salt-and-Pepper Noise from Digital Grayscale Image by Using Recursive Switching Adaptive Median Filter. In Intelligent Manufacturing and Mechatronics. SympoSIMM 2019. Lecture Notes in Mechanical Engineering; Jamaludin, Z., Ali Mokhtar, M., Eds.; Springer: Singapore, 2020; pp. 32–47. [Google Scholar]
  22. Chen, J.; Zhan, Y.; Cao, H. Adaptive Sequentially Weighted Median Filter for Image Highly Corrupted by Impulse Noise. IEEE Access 2019, 7, 158545–158556. [Google Scholar] [CrossRef]
  23. Suganthi, A.; Senthilmurugan, M. Comparative Study of Various Impulse Noise Reduction Techniques. Int. J. Eng. Res. Appl. 2013, 3, 1302–1306. [Google Scholar]
  24. Caliskan, A.; Çil, Z.A.; Badem, H.; Karaboga, D. Regression-Based Neuro-Fuzzy Network Trained by ABC Algorithm for High-Density Impulse Noise Elimination. IEEE Trans. Fuzzy Syst. 2020, 28, 1084–1095. [Google Scholar] [CrossRef]
  25. Kuwahara, M.; Hachimura, K.; Eiho, S.; Kinoshita, M. Processing of RI-Angiocardiographic Images. In Digital Processing of Biomedical Images; Preston, K., Jr., Onoe, M., Eds.; Plenum: New York, NY, USA, 1976; pp. 187–202. [Google Scholar]
  26. Bartyzel, K. Adaptive Kuwahara filter. Signal Image Video Process. 2016, 10, 663–670. [Google Scholar] [CrossRef] [Green Version]
  27. Van den Boomgaard, R. Decomposition of the Kuwahara-Nagao Operator in terms of Linear Smoothing and Morphological Sharpening. IEEE Trans. Knowl. Data Eng. 2002, 2, 283–291. [Google Scholar]
  28. Nagao, M.; Matsuyama, T. Edge preserving smoothing. Comput. Graph. Image Process. 1979, 9, 394–407. [Google Scholar] [CrossRef]
  29. Papari, G.; Petkov, N.; Campisi, P. Artistic edge and corner enhancing smoothing. IEEE Trans. Image Process. 2007, 16, 2449–2462. [Google Scholar] [CrossRef] [Green Version]
  30. Sadhukhan, T.; Chatterjee, S.; Das, R.K.; Ghosh, S.; Das, D.; Sanyal, J. Efficient Removal of Noise from an Image using HSV Filtering. In Proceedings of the 2019 Global Conference for Advancement in Technology (GCAT), Bangaluru, India, 18–20 October 2019; pp. 1–4. [Google Scholar]
  31. Teoh, S.H.; Ibrahim, H. Robust algorithm for broad impulse noise removal utilizing intensity distance and intensity height methodologies. Signal Image Video Process. 2014, 8, 223–242. [Google Scholar] [CrossRef]
  32. Wang, G.; Li, D.; Pan, W.; Zang, Z. Modified switching median filter for impulse noise removal. Signal Process. 2010, 90, 3213–3218. [Google Scholar] [CrossRef]
  33. Tripathi, A.; Ghanekar, U.; Mukhopadhyay, S. Switching median filter: Advanced boundary discriminative noise detection algorithm. IET Image Process. 2011, 5, 598–600. [Google Scholar] [CrossRef]
  34. Samantaray, A.K.; Kanungo, P.; Mohanty, B. Neighbourhood decision based impulse noise filter. IET Image Process. 2018, 12, 1222–1227. [Google Scholar] [CrossRef]
  35. Chen, J.; Zhan, Y.; Cao, H.; Xiong, G. Iterative grouping median filter for removal of fixed value impulse noise. IET Image Process. 2019, 13, 946–953. [Google Scholar] [CrossRef]
  36. Zhou, M.; Chen, H.; Paisley, J.; Ren, L.; Li, L.; Xing, Z.; Dunson, D.; Sapiro, G.; Carin, L. Nonparametric Bayesian Dictionary Learning for Analysis of Noisy and Incomplete Images. IEEE Trans. Image Process. 2012, 21, 130–144. [Google Scholar] [CrossRef] [PubMed]
  37. Kwan, C.; Zhou, J.; Ayhan, B.; Tran, T. ATR performance improvement using images with corrupted or missing pixels. In Proceedings of the Pattern Recognition and Tracking XXIX, Orlando, FL, USA, 18–19 April 2018; Volume 10649, p. 106490E. [Google Scholar]
Figure 1. General flow of the proposed method.
Figure 1. General flow of the proposed method.
Electronics 09 02034 g001
Figure 2. FON, SON and TON pixels positions.
Figure 2. FON, SON and TON pixels positions.
Electronics 09 02034 g002
Figure 3. Noised “Girl face” image by 10% fixed value impulse noise and its restored images by different state-of-art and their PSNR. (a) Noisy “Girl face” image (b) EDF + BDND (c) IGMF + FTD (d) ASWMF + D3PLS (e) NBMF + VTD (f) The proposed state-of-art.
Figure 3. Noised “Girl face” image by 10% fixed value impulse noise and its restored images by different state-of-art and their PSNR. (a) Noisy “Girl face” image (b) EDF + BDND (c) IGMF + FTD (d) ASWMF + D3PLS (e) NBMF + VTD (f) The proposed state-of-art.
Electronics 09 02034 g003
Figure 4. Noised “Girl” image by 50% fixed value impulse noise and its restored images by different state-of-art and their PSNR. (a) Noisy “Girl” image (b) EDF + BDND (c) IGMF + FTD (d) ASWMF + D3PLS (e) NBMF + VTD (f) The proposed state-of-art.
Figure 4. Noised “Girl” image by 50% fixed value impulse noise and its restored images by different state-of-art and their PSNR. (a) Noisy “Girl” image (b) EDF + BDND (c) IGMF + FTD (d) ASWMF + D3PLS (e) NBMF + VTD (f) The proposed state-of-art.
Electronics 09 02034 g004
Figure 5. Noised “Tulips” image by 90% fixed value impulse noise and its restored images by different state-of-art and their PSNR. (a) Noisy “Tulips” image (b) EDF + BDND (c) IGMF + FTD (d) ASWMF + D3PLS (e) NBMF + VTD (f) The proposed state-of-art.
Figure 5. Noised “Tulips” image by 90% fixed value impulse noise and its restored images by different state-of-art and their PSNR. (a) Noisy “Tulips” image (b) EDF + BDND (c) IGMF + FTD (d) ASWMF + D3PLS (e) NBMF + VTD (f) The proposed state-of-art.
Electronics 09 02034 g005
Table 1. The ratio of the difference values NEI pixels and their surrounded pixels in window of size 3 × 3.
Table 1. The ratio of the difference values NEI pixels and their surrounded pixels in window of size 3 × 3.
The Difference Values01–1011–2021–3031–4041–5051–100101–150151–200201–255
Repetition rate58.0%14.7%5.7%5.9%3.7%2.5%6.2%2.2%0.9%0.3%
Table 2. The ratio of the mean values of the difference values between the intensity level of NEI pixels and their surrounding pixels.
Table 2. The ratio of the mean values of the difference values between the intensity level of NEI pixels and their surrounding pixels.
Mean Value of the Differences<1<2<3<4<5<6<7<8
The ratio83.4%91.9%95.5%96.9%98.1%99.3%99.9%100%
Table 3. The results of the noise detection stage.
Table 3. The results of the noise detection stage.
NDVTD [33]FTD [34]BDND [12]D3PLS [22]Proposed
MDRFDRMDRFDRMDRFDRMDRFDRMDRFDR
50.003.690.003.670.003.800.393.230.132.65
100.001.840.001.810.001.890.411.570.131.30
150.001.230.001.190.001.210.401.010.130.85
200.000.810.000.880.000.880.390.750.130.63
250.000.630.000.690.000.690.400.580.140.50
300.000.530.000.570.000.560.390.470.140.42
350.010.440.000.480.000.460.390.390.140.36
400.140.310.000.410.000.390.390.330.150.31
450.270.280.000.360.000.340.390.280.160.27
500.470.250.000.320.000.290.390.250.160.24
552.410.160.000.280.000.260.390.220.170.22
605.910.140.000.250.000.230.390.190.170.19
658.150.130.000.230.000.200.380.170.180.17
7010.740.110.000.200.000.180.370.150.180.16
7535.030.060.000.180.000.160.370.140.190.15
8040.760.060.000.160.010.140.450.120.190.14
8546.550.050.000.150.150.131.240.100.180.13
9052.450.050.020.132.360.116.500.080.160.12
AVG11.300.600.000.670.140.660.780.560.160.49
AVG MDR + FDR11.870.670.811.340.65
Table 4. The results of the noise cancelation stage.
Table 4. The results of the noise cancelation stage.
NDIGMF [34]EDF [12]ASWMF [22]NBMF [33]Proposed
PSNRSSIMPSNRSSIMPSNRSSIMPSNRSSIMPSNRSSIM
539.670.99034.860.95442.900.99343.410.99443.760.994
1037.020.98030.210.85439.960.98740.430.98840.660.988
1535.300.97126.710.73238.070.98038.530.98238.660.982
2034.060.96123.950.61736.590.97337.040.97537.120.975
2532.990.95021.670.52035.360.96535.770.96735.870.968
3032.110.94019.720.43834.280.95634.700.95934.750.959
3531.350.92718.060.37133.330.94733.780.95033.760.950
4030.630.91516.590.31632.500.93632.900.94032.890.939
4529.980.90215.310.27131.710.92432.090.92832.030.928
5029.330.88814.130.23230.960.91131.310.91631.270.915
5528.710.87213.080.20030.240.89730.570.90230.510.901
6028.110.85512.150.17229.560.88229.850.88729.800.886
6527.520.83611.290.14828.860.86429.100.86929.070.868
7026.900.81510.520.12628.160.84528.330.84928.320.848
7526.210.7919.740.10527.380.82127.510.82427.570.825
8025.500.7629.020.08526.550.79326.630.79526.720.797
8524.710.7268.350.06725.570.75625.600.75725.750.760
9023.770.6827.760.05124.360.70524.370.70524.500.709
AVG30.220.87616.840.34832.020.89632.330.89932.390.700
Table 5. The results of the state-of-art experiment.
Table 5. The results of the state-of-art experiment.
NDIGMF + FTDEDF + BDNDASWMF + D3PLSNBMF + VTDProposed
PSNRSSIMPSNRSSIMPSNRSSIMPSNRSSIMPSNRSSIM
539.670.99034.910.95442.830.99343.640.99443.850.994
1037.020.98030.210.85539.950.98740.610.98940.860.989
1535.300.97126.700.73138.050.98038.730.98338.860.983
2034.060.96123.930.61736.560.97337.220.97637.290.976
2532.990.95021.670.51935.340.96536.000.96936.050.969
3032.110.94019.730.43834.300.95634.910.96034.980.960
3531.350.92818.060.37133.330.94633.970.95133.960.951
4030.630.91516.600.31632.470.93633.100.94133.090.941
4529.980.90215.310.27131.680.92432.280.93032.230.930
5029.330.88814.140.23330.950.91131.530.91831.470.918
5528.710.87213.100.20030.220.89830.760.90530.720.904
6028.110.85612.160.17229.530.88230.030.89029.990.889
6527.520.83711.280.14728.870.86429.270.87229.250.872
7026.900.81510.500.12628.130.84428.480.85128.480.852
7526.210.7919.740.10527.370.82127.620.82627.730.829
8025.500.7629.030.08626.560.79326.760.79726.890.801
8524.710.7268.360.06725.570.75625.730.75825.910.765
9023.770.6827.770.05124.340.70424.420.70524.630.714
AVG30.220.87616.840.34832.000.89632.500.90132.570.902
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Mursal, A.S.N.; Ibrahim, H. Median Filtering Using First-Order and Second-Order Neighborhood Pixels to Reduce Fixed Value Impulse Noise from Grayscale Digital Images. Electronics 2020, 9, 2034. https://doi.org/10.3390/electronics9122034

AMA Style

Mursal ASN, Ibrahim H. Median Filtering Using First-Order and Second-Order Neighborhood Pixels to Reduce Fixed Value Impulse Noise from Grayscale Digital Images. Electronics. 2020; 9(12):2034. https://doi.org/10.3390/electronics9122034

Chicago/Turabian Style

Mursal, Ali Salim Nasar, and Haidi Ibrahim. 2020. "Median Filtering Using First-Order and Second-Order Neighborhood Pixels to Reduce Fixed Value Impulse Noise from Grayscale Digital Images" Electronics 9, no. 12: 2034. https://doi.org/10.3390/electronics9122034

APA Style

Mursal, A. S. N., & Ibrahim, H. (2020). Median Filtering Using First-Order and Second-Order Neighborhood Pixels to Reduce Fixed Value Impulse Noise from Grayscale Digital Images. Electronics, 9(12), 2034. https://doi.org/10.3390/electronics9122034

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop