An adaptive switching filter based on approximated variance for detection of impulse noise from color images

A new adaptive switching algorithm is presented where two adaptive filters are switched correspondingly for lower and higher noise ratio of the image. An adaptive center weighted vector median filter is used for the lower noise ratio whereas for higher noise ratio the noisy pixels are detected based on the comparison of the difference between the mean of the vector pixels in the window and the approximated variance of the vector pixels in the window. Then the window comprising the detected noisy pixel is further considered where the pixels are given exponential weights according to their similarity to the other neighboring pixels, spatially and radio metrically. The noisy pixels are then replaced by the weighted average of the pixels within the window. The filter is able to preserve higher signal content in the higher noise ratio as compared to other robust filters in comparison. With a little high in computational complexity, this technique performs well both in lower and higher noise ratios. Simulation results on various RGB images show that the proposed algorithm outperforms many other existing nonlinear filters in terms of preservation of edges and fine details.

with impulse noise. Non-linear filters which actually work in spatial domain suit well for impulse noise removal from color images (Celebi et al. 2007).
Initial approach like the marginal median filter (MMF) treats the color image channel wise in a scalar form which often leads to color artifacts (Pitas 1990). The nonlinear filters like the vector median filter (VMF) (Astola et al. 1990) and the basic vector directional filter (BVDF) (Trahanias and Venetsanopoulos 1992) which consider the color pixels as vectors and work on the concept of order-static filters, are very efficient for the impulse noise removal of color images. The VMF forms a sorted array of the cumulative distance of intensity value of the vector pixels from the surrounding pixels in the window, and then the corresponding vector pixel which gives the least value of cumulative distance in the sorted array is substituted as the vector median instead of the center pixel. And in case of VDF, the sorted array is of the cumulative angular distance of the vector pixels from the surrounding vectors in the window. Thus the output of the VDF is the vector pixel that corresponds to the least value of cumulative angular distance. The directional-distance filter (DDF) (Karakos and Trahanias 1995) combines the μ magnitude part from the VMF and the (1 − μ) angular part from the VDF in calculating the cumulative distances from a vector pixel to the other in the filtering window. The center weighted VMF (CWVMF) (Smolka et al. 2012a), center weighted VDF (CWVDF) and the center weighted DDF (CWDDF) highlight the center pixel by assigning more weight. These filters have a tendency to preserve the center pixel in the filtering window which reduces the efficiency in higher noise ratio. These are the popular filters where the filtering is done uniformly across the pixels without using an actual noise detection algorithm. These filters tend to modify the uncorrupted pixels which result in blurring of the edges and loss of fine details of the image.
To overcome this particular issue noise detection schemes are introduced in the rank order static filters, that check whether the center pixel is noisy or not. Then the noisy pixel is replaced by the output of a vector filter otherwise it is left unaltered. The adaptive CWVMF (ACWVMF) , adaptive CWVDF (ACWVDF) (Lukac 2004) and adaptive CWDDF (ACWDDF) replace the center pixel by the output of VMF, VDF and DDF respectively, if the difference between the center pixel and the corresponding center-weighted vector median is greater than a user specified threshold. A weight in the range of 0-1 is given to cumulative distance of the center pixel, for getting the vector median of the modified CWVMF (MCWVMF).
In the peer group filter (PGF) the pixels in the window is sorted according to their differences from the center pixel, then a peer group of m = √ n + 1 2 is selected from the sorted array, where n is the number of vector pixels in the window. If the difference between any two pixels from the peer group is greater than user-specified threshold, then the center pixel is replaced with the output of VMF. And if the difference of the individual pixel, in the peer group m, from the center pixel is less than a user specified threshold, then the center pixel is replaced with the VMF, which results in the fast PGF (FPGF) (Kenny et al. 2001;Smolka and Chydzinski 2005;Malinski and Smolka 2015). The adaptive VMF (AVMF) and adaptive VDF (AVDF) replace the center pixel with the output of VMF and VDF respectively if their respective cumulative distance is greater than a user specified threshold ∂ and T (Lukac 2002(Lukac , 2003. The entropy VMF (EVMF), entropy VDF (EVDF) and entropy DDF (EDDF) are the group of entropy vector filters which replace the center pixel with the output of VMF, VDF and DDF respectively, if the local contrast entropy of the center pixel is greater than its local contrast entropic threshold multiplied by a weighting factor υ .
The Neuvo VMF (NVMF) (Sun and Neuvo 1994) is that kind of vector filter where the center pixel is considered to be noisy if its difference from the vector median is bigger than a predefined threshold. For the rank-conditioned VMF (RCVMF), rank-conditioned VDF (RCVDF) and rank-conditioned DDF (RCDDF), with respect to ascending order of the respective cumulative distances, a subset of the vector pixels excluding the minimum and maximum values is formed (Singh and Bora 2004). If the center pixel is not in the ordered subset, then it is replaced by the output of VMF, VDF and DDF respectively. If l is the number of pixels in the ordered set, then position of the noisy center pixel will be outside the range of l. In the rank-conditioned and threshold VMF (RCTVMF), rank-conditioned and threshold VDF (RCTVDF) and rank-conditioned and threshold DDF (RCTDDF) (Singh and Bora 2004;Smolka et al. 2012b), the center pixel is considered as noisy if it does not belong in the trimmed set and its difference from the respective vector median is greater than a pre-defined threshold.
The group of fuzzy weighted filters namely the fuzzy vector median filter (FVMF), fuzzy vector directional filter (FVDF) and fuzzy directional distance filter (FDDF) weight the pixels in the filtering window according to their respective cumulative distance before replacing the center pixel with the average of the weighted pixels. These filters use certain parameters α and β to adjust amount of fuzziness in weighting the pixels (Plataniostis et al. 1996(Plataniostis et al. , 1999. The fuzzy ordered vector filter (FOVMF) picks up the first l elements of the ordered set of cumulative distances, and then assigns the weight only to the corresponding pixels.
In the signal dependent rank-ordered mean (SDM), if the difference between the center pixel and the first four pixels of the rank-ordered set of pixels is greater than four separate thresholds T a , T b , T c and T d respectively, Moore et al. (1999) then the center pixel is replaced with the output of VMF. The robust switching vector median filter (RSVMF) proposed by Celebi and Aslandogan considers the noisy pixel to be a noisy pixel if the cumulative distance with respect to the center pixel is greater than a predefined percentage β of the cumulative distance associated with the median (Celebi and Aslandogan 2008).
The non-causal linear predictor based filters use the concept of linear prediction (Singh 2012; Singh and Bora 2003) for estimating the center pixel as a weighted combination of past and future vector pixels with respect to the center pixel. It is based on the fact that there exists a strong correlation among the neighborhood pixels of a window centered at a vector pixel.
The non-causal vector median filter (NCVMF) (Singh and Bora 2014) first filters the image using VMF, then estimates the center pixel using constrained intra-channel linear predictor (Hu et al. 1997) by considering the eight second order pixels (see Fig. 1) (David and Ramamurthi 1991;Asif and Moura 1996;Asif 2004). Then if the difference between the predicted pixel and the center pixel is greater than or equal to a user-specified threshold, the center pixel is replaced by the output of VMF, VDF or DDF. In the rank conditioned non-causal vector median filter (NCRVMF), the value of index p, which corresponds to the least valued element from the sorted array of cumulative distance of the vector pixels in the window, is compared with a threshold, which is calculated based on the standard deviations of the separate three channels of the image. If the value of k is greater than that of the threshold T, then the center pixel is predicted considering the 2nd order non-causal regions. The non causal vector median filter 2nd order non causal (NCVMF_2nc) considers only the upper four non causal pixels out of the eight, from the 2nd order region excluding the center pixel. The non causal vector median filter 1st order non causal (NCVMF_1nc) considers the four 1st order pixels from the non causal region. The non causal vector median filter 1st order causal (NCVMF_1c) predicts the center pixel using the two pixels of the 1st order causal region.
The adaptive vector marginal median filter (AVMMF) compares the cumulative distance of the center pixel with that of the sorted array of the cumulative distance of all the pixels in the window, so that center pixel lies in the l index in the sorted array (Morillas et al. 2011). And if l is greater than the index defining the center of the window, then the center pixel is replaced by the median of the vector medians for n = 1, 2, …, k, where n is the index of the sorted array of cumulative distances of the pixels in the window.
The vector sigma filters (Lukac et al. 2006) which are based on approximated variance of the vector pixels in the window are grouped into adaptive and non-adaptive. The multivariate variance is calculated either based on the vector mean or the lowest ranked vector, vector median. In the non-adaptive group of vector sigma filters the center pixel is replaced with the output of VMF, VDF and DDF, if the cumulative distance of the center pixel is greater than a threshold, calculated based on the cumulative distance of the mean vector or the vector median and a parameter μ. This results to the corresponding non-adaptive sigma vector filters as SVMF_MEAN, SVMF_RANK, SVDF_MEAN, SVDF_RANK, SDDF_MEAN and SDDF_RANK respectively. Then the groups of adaptive sigma vector filters are ASVMF_MEAN, ASVMF_RANK, ASVDF_ MEAN, ASVDF_RANK, SDDF_MEAN and ASDDF_RANK correspondingly. Here the center pixel is replaced with output of VMF, VDF and DDF respectively if the difference between the center pixel and the mean vector or the vector median is greater than the product of the corresponding approximated variance and a weighting parameter μ, where the approximated variance is calculated based on the cumulative distance of the vector pixels in the window from that of the mean vector.
Many robust filters for impulse noise removal have been proposed in the literature but most of them which work efficiently in the lower noise ratio, lack considerably in the higher noise ratio. Filters like CWVMF, CWVDF, CWDDF, RCTVDF, RCTVDF, RCT-DDF etc. which perform very well in the lowest noise ratio group, are not efficient in the higher noise ratio group. On the other hand filters like ASVMF_MEAN, ASDDF_MEAN and EVMF work quite well both in lowest and highest noise ratio group.
In this work, a simple algorithm checks the impulse noise ratio in the image prior to the implementation of the noise detection algorithms, depending on which two filters are switched accordingly from lower noise ratio to higher and vice versa. In the higher nose ratio, the noisy pixels are identified with the help of noise detection algorithm, based on how much the center pixel is different from the mean vector of the neighboring vectors in the widow (Lukac et al. 2006). Then the detected noisy pixels are replaced with the output of modified exponentially weighted mean filter (Celebi et al. 2007) based on the concept of bilateral filter (Tomashi and Manduchi 1998;Daniel John 2013;Kaur et al. 2015), whereas the uncorrupted pixels are kept untouched.
"Proposed method" section describes the proposed method. Noise model performance measuring parameters are described briefly in the next "Filter evaluation" section and finally the details are summarized and concluded in "Conclusions" section.

Proposed method
Let a color image X of size P × Q be represented by a 2-D array of 3 component vectors represented as, where p = 1, 2, 3 . . . P and q = 1, 2, 3 . . . Q represents the row and column indices. R, G and B represent the Red, Green and Blue components of the vector pixel x(p,q). As usual in the basic filtering approach, a window W of odd size m × n centered at x(p,q) is considered (see Fig. 2). Considering the fact that impulse noise is distributed randomly which results in the variation of noise content in different parts of the image, before x7=x(p+1, q-1) x8=x(p+1, q) x9=x(p+1, q+1)

Fig. 2 A 3 × 3 window of color vectors with their coordinates
checking whether the center pixel is noisy or not, a localized impulse noise probability P r , in the window comprising the center pixel is calculated as, where N imp is the number of 0 s and 255 s in the window. If T L ≤ p r ≤ T H , then the center pixel is replaced with the output of the ACWVMF, otherwise it is replaced with the output of the modified ASVMF_MEAN, MASVMF_MEAN, to give the overall proposed noise percentage based switching filter, NPSF as shown below T L and T H are the lower and higher threshold value of p r . x NPSF is the output of NPSF and x ACWMF is the output of ACWVMF which is defined as where c = ((m × n) + 1) 2, T is the threshold, with which the difference of the center pixel from the output of CWVMF is compared with and x CWVMF is the output of CWVMF which is given as and represents the weight to be given to the center pixel. ACWVMF is chosen for the window with less number of impulse noises, like if at the most one number of 0 or 255 is present. It is a very robust filter which is very efficient and flexible in removing impulse noise, which actually allows one to design an optimal filter for a particular domain by adjusting the weights assigned to the center pixel. The weights are estimated using an optimization procedure in Eq. 5 by using a number of training images (Celebi et al. 2007). u is used as the smoothing parameter such that if u = 1 the ACWVMF becomes an identity filter and so no smoothing will be performed and if the value of u increases from 1 to 5, the smoothing potential of the filter increases. When u reaches the value of c, lastly the ACWVMF becomes the VMF where the maximum amount of smoothing is done. In this paper three values of u is chosen from v to v + 2, for which three respective CWVMF outputs are determined to be subtracted from their respective center pixel as seen in Eq. 4. And if the sum of the three differences is greater than the threshold T then the center pixel is replaced with the output of VMF. In the ACWVMF the center pixel is highlighted or given more importance without a prior knowledge of whether it is a noisy pixel or not, by assigning a variable weight by Eq. 5, that makes the ACWVMF more suitable to be considered for windows which contain at the most one 0 or 255. The ACWVMF has a tendency to preserve the center pixel that makes it more suitable for lower noised region of the image. And for the window with two or more number of 0 s and 255 s, a detection algorithm based on ASVMF_MEAN is used where the noisy pixel is detected based on the comparison of the center pixel with that of an approximated variance of the vector pixels in the filtering window (see Fig. 3). Depending on the fact that the impulse noise usually has very high or very low pixel value as compared to the surrounding pixels, the variance is calculated based on the mean vector of the pixels in the window, where mean is considered as one of the most probable values other than the vector median, for substituting the noisy pixel. Once the noisy pixels are detected, they will be replaced by the output of an exponentially weighted filter. The complete algorithm of noise detection using the approximated variance and replacement of the center pixel by the output of the exponentially weighted filter, defines the MASVMF_MEAN.
The variance σ 2 , which is to be compared with, is calculated as, where, x mean is the mean of the vector pixels in the window W. For checking the pixels to be noisy or not, the difference of the center pixel, x(p,q) from the mean, x mean is compared with the approximated variance, σ 2 multiplied by a weighting factor ∂, to give ∂ × σ 2 and if �x(p, q) − x mean � ≥ ∂ × σ 2 , then the centered pixel x(p,q) is considered to be a noisy pixel. This particular detection algorithm based on ASVMF_MEAN is suitable for higher noise region of the image because the approximated variance is calculated based on the cumulative difference of the vector pixels from the mean, which means that all the pixels whether impulse noise or not are considered and are given similar importance. And the vector pixel is treated as impulse noise if it is having a bigger difference from the mean, as compared to average of the difference of vector pixels from the mean as seen in Eqs. 6 and 7. Then the window where the center pixel is detected as noisy pixel is further considered for further classification of the vector pixels among themselves with respect to their individual importance in the window. This further classification is helpful for window with more number of impulse noises where more number of 0 s and 255 s are present as it helps in more efficient detection of noisy pixel. The classification and the corresponding assignment of weights to the respective vector pixel according to their importance in the window is given by the equation where And Then the noisy pixel is replaced with the output of the exponentially weighted mean filter given as Abiding by the normalization procedure, two constraints are necessary to make it sure that the output of Ewmf is an unbiased one, namely: (a) each weight for a respective vector pixel x i is a positive number, y i ≥ 0 and (b) m × n i y i = 1. The parameters α, η and β are used to tune the amount of weight to be given to the pixels. To obey the above constraints so that the output is unbiased, it is made that  0 < α < 1 since the values of d(i) and l(i) will be in the range of k where 0 ≤ k < ∞ excluding 0 < k < 1. And β is the value of α at which the weighting function w i takes the maximum derivative. The value of η = 1 − α also makes it sure that the two components in Eq. 8 are dependent and correlated to each other according to the noise probability of the sliding window. The first component described by Eqs. 9 and 10, depends on the cumulative distance of intensity difference of each pixel from its surrounding neighboring pixels. If the value of d(i) for a particular pixel x i is larger, than it means that the intensity difference of the particular pixel from its surrounding is very large and has more tendencies to be an impulse noisy pixel. Therefore less weight is given to the pixel and vice versa. Whereas the second component as described by Eqs. 11 and 12, depends on the cumulative distance of coordinate or position difference of the pixel from its surrounding pixels. It is based on the fact that a pixel which is far away from the center pixel spatially is of less importance. Therefore a pixel x i with a large value of l(i) is far away from the center pixel x(p,q) and is of less resemblance or importance, to be assigned with less weight. And it can be also seen that the parameters α and η are inversely proportional to the weight w i . Further for a particular value of d(i) and l(i), the amount of weight assigned is again controlled by the respective values of α and η. If any of α or η is having a value of 1 then the other will be 0 that avoids the condition for both the components to be considered simultaneously. The condition that η = 1 − α makes it achievable that, for the window with a comparatively lesser number of 0 s and 255 s in the region of p r > T H and with a lesser value of d(i), more weight is allowed to be assigned to the pixel by the first component of Eq. 8 with a lesser value of α, thus highlighting the first component, that subsequently makes the second component which is made of l(i) to be less important with a comparatively higher value of η = 1 − α. Whereas in the window with more number of 0 s and 255 s which usually has a higher value of d(i), less weight is made to be assigned by the first component with higher value of α and thus the second component is given more importance with a comparatively lesser value of η = 1 − α. This fact is supported by the results in Tables 1 and 2 where the values of NCD, PSNR, MAE and TIME are listed at different noise ratios and at different values of α and η for fixed valued and random valued noise correspondingly. And the values of α and η at which the value of PSNR and other measuring parameters attain their maximum values is highlighted. The selection of values for the parameters is further discussed in part C: Parameter selection, of section III.

Filter evaluation
The filters are evaluated in this section on a variety of RGB color images, which includes scientific images, biomedical images, photographic images, synthetic images and a group of images generally used in the color image processing literature, for a better comparison on the performance of the filters, by considering a 3 × 3 window size with L 1 and L 2 norms. Figure 4 shows the 12 representative images of Lena image, Mandrill, Airplane, Aptus, Barbara, Brain, Couple, Girl, Gold hill, House, Lake and Miramar.

Noise model
An impulse noise model which is commonly used in the literature of filtering of color images is used in this work (Viero et al. 1994). Let b be the probability of corruption of the color image with the impulse noise. A color image has three vector components, where each component has a chance of being corrupted by the impulse noise with a respective corruption probability. Let b R , b G and b B be the probabilities of impulse noise corruption of the three components R, G and B respectively.
x = {x R , x G , x B } and y = y R , y G , y B represent the original and the corrupted vector pixels respectively. And the impulse noise is represented by the random vector n = {n R , n G , n B } which can be a vector of 0 or 255 or both. The images are induced with both fixed valued noise and random valued noise with noise ratio ranging from 10 to 90%. For the fixed valued noise, η k can be either 0 or 225, whereas it can be any random value ranging from 0 to 255 for the random valued noise.

Filter performance measurements
Execution time, mean absolute error (MAE) (Singh and Bora 2014), normalized color difference (NCD) (Singh and Bora 2014) and peak signal to noise ratio (PSNR) (Plataniotis and Venetsanopoulos 2000) are the performance measuring parameters which will be Fig. 4 Test images: a Lena, b Mandrill, c Airplane, d Aptus, e Barbara, f Brain, g Couple, h Girl, i Gold hill, j House, k Lake and l Tiffany used to evaluate the filters in comparison. Color chromaticity preservation capability of a filter is measured with NCD. A filtered image is said to preserve its chromaticity if it is free from the shadowy effects whereas MAE represents the noise suppression and the signal-detail preservation capability. MAE is mathematically expressed as x(i, j) and x F (i, j) are the original and the filtered image respectively.
x(i, j) R , x(i, j) G , x(i, j) B and x F (i, j) R , x F (i, j) R , x F (i, j) R are the red, green and blue components of the original image x(i, j) and filtered image x F (i, j) respectively. It can be seen that with the help of the above equation a slight difference between the original and filtered image can be highlighted properly for better comparison between the filters. The NCD is defined in the L u * v * color space by where L(i, j), u (i, j), v (i, j) and L F (i, j), u F (i, j), v F (i, j) are the respective values of the lightness and two chrominance components of the original image x(i, j) and filtered image x F (i, j). And the signal content of the image is described by PSNR which is expressed as where x max = 2 b − 1 is the maximum intensity for an image in a particular channel. 24 bits images of size 512 × 512 are considered in this work, where b = 8, is the number of bits in a pixel for the particular channel and x max is equal to 255.

Parameter selection
The exponential weight is found using Eq. 6 where the weight is controlled by the three parameters α, η and β. As seen from the weight equation, α and η are inversely proportional to the weight as seen in Eq. 8. Analyzing the simulation results on the various images, it is found that at the lower noise ratio, 10% and 20% as representative in this work, the PSNR attains its maximum value at lower value of ∝ = 0.4 and comparatively higher value of η = 0.6, supported by the fact that more weight is given by the first component d(i) α in Eq. 8 to the pixels at lower noise ratio, during which most of the pixels in the window tends to be less impulse. Whereas the PSNR attains its maximum value at a relatively higher value of around α = 0.6 or 0.7 and comparatively lower value of η = 0.4 or 0.3 for higher noise ratio, during which less weight is necessary by the pixels in the window from the first component d(i) α and instead more from the second component l(i) η is considered, since their probability to be impulse is more. Therefore α = 0.7 , η = 0.3 and α = 0.6, η = 0.4 are considered for the highest noise ratio (80 and 90%) with relatively smaller value of α = 0.4 and higher value of η = 0.6 for lower noise ratio (10 and 20%) for fixed valued noise and random valued noise respectively (see Tables 1, 2). The above discussion concludes that the first component controlled the parameter α plays a bigger role as compared to the second component controlled by parameter η in Eq. 8. The values of β and ∂ are set as 1 and 0.5 respectively. Considering the Eqs. 4 and 5 which represents the expression for ACWVMF, the value of ν is considered as 3 so that u goes from 3 to 5, for which three different x CWVMF is calculated with three different w j (u) respectively. The values of T L and T H in Eq. 3 are set as 0.000 and 0.111 respectively. The parameters and their respective values selection, for both fixed valued and random valued noise, for other filters in comparison are shown in Table 3.

Comparison with other existing filters
The performance comparison of the various filters is shown in Tables 4 and 5. Figure 5 shows the graphical comparison of the MASVMF_MEAN, VMF, ACWVMF, EVMF, group of filters namely the ASDDF_RANK, ASVMF_MEAN, ASDDF_MEAN work efficiently in higher noise ratio although not very well in the lower noise ratio as compared to the case of ACWVMF and its allies mentioned above. But generally it can be clearly seen that the Adaptive switching filters like the Adaptive center weighted vector filters, Vector sigma filters, Adaptive vector filters and entropy based vector filters, first detect the noisy pixels using certain noise detection algorithm, before replacing the center pixel with the output of some vector filter and thus is able to give higher PSNR values than those of the non adaptive switching filters like the basic vector filters, fuzzy weighted filters etc. Therefore the adaptive switching filters are able to restore the original find details of the image better than the non-adaptive filters. After working on various numbers of images it can be seen that the proposed filter, Noise percentage based switching filter maintains a good PSNR value at lower noise ratio by outperforming robust filters like ACWVMF, ACWVDF, etc. and also definitely overtakes even the most robust filters, which are very efficient in the higher noise ratios, like ACWVMF, EVMF and some vector sigma filters. This is supported by the experimental results shown in the Tables 4 and 5, where the results of some efficient filters in consideration are christened. Figures 6 and 7 show the original images, corrupted images with 90% of fixed valued and random valued impulse noise and filtered images Fig. 6 Filtering results for the TIFFANY image corrupted with 90% noise: a original, b 90% noisy, c ASVMF_ MEAN, d ASVMF_RANK, e ASDDF_MEAN, f ASDDF_RANK, g VMF, h MCWVMF, i NVMF, j RSVMF, k RCTVMF and l MASVMF Fig. 7 Filtering results for the TREE image corrupted with 90% noise: a original, b 90% noisy, c ACWDDF, d ACWVDF, e ACWVMF, f AVDF, g AVMF, h EDDF, i EVDF, j EVMF, k FVMF and l MASVMF of Tiffany and Tree respectively. The filtered images of the proposed filter are shown in image l of the Figs. 6 and 7, depicting high signal content and detail preservation. But seen precisely the filtered images are little blurred since the noisy pixels are replaced by the output of the average of the exponentially weighted filter. And also the proposed filter can be further improved in terms of preservation of chromaticity by furthering lowering the value of NCD.

Conclusions
The proposed filter is able to outperform the other robust filters, in maintaining the signal content and preserving the fine details of the image corrupted with fixed valued and random valued impulse noise at the lower noise ratios as well as at the higher noise ratios. And the filter also maintains the chromaticity of the filtered image at a lower value of NCD and MAE as compared to some of the very efficient filters in literature. The weighted average output of the filter does not belong to the vectors in the window because of which the filter can be extended further for Gaussian noise and mixed Gaussian and impulse noise removal. Other than this, an unwanted commonly occurring issue called smoothing can be still further minimized. Future work will be in introducing a directional distance factor in the exponential weight function so that the chromaticity maintenance of the image is improved further.