1 Introduction

Noise reduction in digital images, despite many years of active research, still remains a challenging problem. The rapid proliferation of portable image capturing devices, combined with the miniaturization of the imaging sensors and increasing data throughput capacity of communication channels, results in the need to create novel fast and efficient denoising algorithms.

Color images are very often corrupted by impulsive noise, which is introduced into the image by faulty pixels in the camera sensors, transmission errors in noisy channels, poor lighting conditions and aging of the storage material [16]. The suppression of the disturbances introduced by the impulsive noise is indispensable for the success of further stages of the image processing pipeline [712] and, therefore, we present a novel, very fast denoising algorithm.

In this paper, the color image will be considered as a two-dimensional array, consisting of \(N\) pixels \(\varvec{x}_j=(x_{j1}, x_{j2}, x_{j3})\), with index \(j=1,\ldots ,N\) indicating the position of a pixel on the image domain. The vector components \(x_{jq}\in [0,1]\), for \(q=1,2,3\) represent the color channel values in a given color space, quantified into the integer domain. To simplify the notation, we will also assign indexes to pixels belonging to the local filtering window \(W\), so that the central pixel will be denoted as \(\varvec{x}_1\) and the neighboring pixels will be \(\varvec{x}_2, \ldots , \varvec{x}_n\), where \(n\) is the window size.

The most popular filters applied for reduction of impulsive noise in color images are based on order statistics [1324]. Mostly, these techniques rely on the reduced vector ordering of a set of pixels belonging to \(W\). For each pixel from the sliding window the cumulative sum of distances is assigned and then sorted to produce a corresponding, ordered sequence of color pixels.

The vector corresponding to the minimum cumulative distance is the output of the very popular Vector Median Filter (VMF) [13, 2527]. The VMF output is always a pixel from the filtering window, and when all pixels are corrupted by a noise process, the vector median output is also noisy. To circumvent this unwanted behavior, the pixels with the lowest ranks can be averaged, which leads to a better filtering performance [25, 2834]. The dissimilarity of color pixels is usually defined in terms of the Euclidean distance in the RGB color space, however, other measures of vector dissimilarity, like the angular distance can be also applied [31, 3541].

For the calculation of the most centrally located pixel in the group of color samples, instead of the sum of all distances, only a few smallest distances to nearest pixels can be taken as a dissimilarity measure. Such a trimming procedure leads to a better robustness to outliers introduced by the noise process and produces images with enhanced, sharp edges [23, 4245].

The filters based on the reduced ordering concept were also modified using the methods derived from the fuzzy sets theory [4652]. The simulation results prove that application of the fuzzy concepts offers substantial flexibility and yields excellent performance both in the case of color images and video sequences [5358].

The drawback of the filters based on vector ordering lies in introducing too much smoothing, which results in an extensive blurring of the output image. This effect is caused by uniform processing of every image pixel, replacing their color channels not taking into account whether they are noisy or not disturbed. Therefore, alternative approaches to noise cancelation by means of the so-called switching filters have been developed. Their aim is to detect the pixels corrupted by the impulsive noise and replace their values with an estimate calculated using the information from the local neighborhood [30, 5968].

The Sigma Vector Median Filter (SVMF) calculates the sum of distances from the central pixel of \(W\) to all other pixels and if it exceeds a threshold value, which is fixed or made adaptive, then the pixel is replaced with the VMF output, otherwise it is retained [30, 6975]. The Fast Modified Vector Median Filter (FMVMF) is based on the design of the VMF and is utilizing fuzzy similarity measures [7678]. This approach has been further extended to improve its denoising properties using fuzzy metrics in [7983].

An interesting type of filters based on the concept of a peer group was proposed in [84, 85] and widely used in numerous designs [8690]. The peer group associated with central pixel of an operating window denotes a set of close pixels whose distance to central pixel is not exceeding a predefined threshold. The Fast Peer Group Filter (FPGF) replaces the center of the filtering window with the VMF output when a specified number of smallest distances between the central pixel and its neighbors differ not more than a predefined threshold [38, 70, 84, 85, 88].

The Fast Averaging Peer Group Filter (FAPGF) proposed in this paper is based on the idea of expressing the degree of membership of the central pixel to the local neighborhood by its peer group size. The structure of this filter can be divided into two main parts: pixel inspection and replacement. The first one evaluates the degree of membership of the central pixel of the local window to its neighborhood and the second part uses Weighed Average Filter (WAF) to replace pixels which were classified as outliers. The weights of the WAF are determined by analyzing the size of the peer groups of the samples which are in neighborhood relation with the processed pixel.

In the remainder of this paper in Sect. 2 the proposed algorithm is presented and followed by an analysis of its properties and recommendations for the setting of its parameters in Sect. 3. In the next section, the efficiency of the proposed filtering technique is evaluated using three impulsive noise models. Section 5 is focused on the comparison with the standard, reference denoising techniques. In the next Section the computational complexity of the proposed filtering technique is addressed and finally in the last Section some conclusions are drawn.

2 Proposed filter design

The proposed FAPGF filter shows some similarity to the Fast Peer Group Filter [88] and the Sigma Vector Median Filter [30, 6972] briefly outlined in the previous Section. In the first step, the size of the peer group, or in other words, the number of close neighbors (CN) of the central pixel of the filtering window \(\varvec{x}_1\) is determined. A pixel \(\varvec{x}_{i} \ne \varvec{x}_{1}\) belonging to \(W\) is a close neighbor of \(\varvec{x}_{1}\), if the normalized Euclidean distance \(\rho (\varvec{x}_{i},\varvec{x}_{1})\) in a given color space is less than a predefined threshold value \(d\). This threshold \(0\le d\le 1\) is the primary parameter of this step, and \(d=0\) refers to two identical pixels, while \(d=1\) refers to maximum Euclidean distance in the color space.

In the RGB color space, the peer group size denoted as \(m_k\) is the number of pixels from \(W\) contained in a sphere with radius \(d\) centered at pixel \(\varvec{x}_{k}\)

$$\begin{aligned} m_k= \#\{ \varvec{x}_j\in W:\; \Vert \varvec{x}_{k}-\varvec{x}_j\Vert < d\}, \end{aligned}$$
(1)

where \(\#\) denotes the cardinality and \(\Vert \! \cdot \!\Vert\) stands for the Euclidean norm. In this way \(d\) is a parameter which determines how many pixels can be considered as close to the given pixel. For \(d=1\) all neighbors belong to a peer group and for \(d=0\) the set of close pixels contains no elements.

The concept of the peer group is explained in Fig. 1. The pixels \(\varvec{x}_{2}\), \(\varvec{x}_{4}\), \(\varvec{x}_{5}\) are CNs of \(\varvec{x}_{1}\), whereas \(\varvec{x}_{3}\), \(\varvec{x}_{6}\) are outside of the sphere and do not belong to the peer group.

Fig. 1
figure 1

The color pixels \(\varvec{x}_2\), \(\varvec{x}_4\) and \(\varvec{x}_5\) are close neighbors, whereas \(\varvec{x}_3\) and \(\varvec{x}_6\) are outliers. The size of the peer group is 3

The peer group size will be treated as a measure of pixel distortion caused by the noise process. If the \(m\) value is too low, then a pixel will be treated as corrupted, otherwise it will be declared as not disturbed. The parameter \(d\) plays a crucial role in the proposed algorithm. A simple example presented in Fig. 2 shows the impact of \(d\) on the corresponding peer group sizes \(m\) of a color image. As can be observed, if the \(d\) parameter is too high, the evidently noisy pixels, highlighted by green circles, may be declared as uncorrupted (red circles), and will be not rectified by the proposed noise removal algorithm. Therefore, the threshold parameter \(d\) has to be carefully selected.

Fig. 2
figure 2

Illustration of the influence of the parameter \(d\) on the number of close neighbors, (peer group size). Pixels in green circles are outliers for \(d=0.1\) but are considered as uncorrupted (red circles) for \(d=0.2\). As can be seen the classification of pixels is dependent on the value of \(d\)

The second part of the FAPGF is the pixel replacement step. When all \(m\) values of the image pixels are calculated, the filtering is performed as follows:

  • if the peer group size of the central pixel \(\varvec{x}_{1}\) of \(W\) is \(m_1\le 1\), then this pixel is treated as an outlier and replaced with the output of Weighted Average Filter (WAF) applied to the pixels belonging to the same operating window. The weights \(w_{i}\), \(i=2,\ldots ,n\) of the corresponding pixels \(\varvec{x}_i\) are computed in the following way [91]

    $$\begin{aligned} w_{i} = \frac{\mu _{i}}{\sum _{i=2}^{n} \mu _{i}}, \quad \mu _{i} = m_{i}^\gamma , \end{aligned}$$
    (2)

    where \(n\) is the size of \(W\), and \(\gamma >0\) is the secondary parameter influencing the quality of results. The output \(\varvec{y}_1\) of WAF, replacing \(\varvec{x}_1\) is then

    $$\begin{aligned} \varvec{y}_1 = \frac{1}{\sum _{i=2}^{n} w_i}\sum _{i=2}^{n} w_i \cdot \varvec{x}_i. \end{aligned}$$
    (3)

    The neighbors with more CNs are treated as more credible and have greater relative impact (greater weight) on the filter output. The pixels, which do not have any CNs (\(m=0\)), are not taken into the average. The \(\gamma\) parameter provides the possibility to further regulate the degree of membership of the neighboring pixels. If \(0 < \gamma < 1\) the differences in peer group sizes of the neighboring pixels are decreased and for \(\gamma > 1\) they are increased.

  • If the peer group size \(m\) of a pixel is greater than 1, then it is preserved. We assume that if \(\varvec{x}_{1}\) has 2 or more close neighbors, then its degree of membership is sufficient to treat it as uncorrupted and leave it without any changes.

  • In rare situations occurring in highly contaminated images, all of the pixels within \(W\) may have no CNs. In that case the size of the filtering window has to be increased until at least 2 uncorrupted pixels are found. This procedure is widely used when denoising gray-scale images contaminated by strong salt & pepper noise [9294].

3 Filter parameters

To ensure a proper selection of \(d\) and \(\gamma\) parameters, the simulation-based approach has been undertaken. The commonly used color benchmark images: Girl (GIR), Lena (LEN), Monarch (MON), Motocross (MOT), Parrots (PAR) and Peppers (PEP), exhibited in Fig. 3 have been corrupted by random-valued impulsive noise of various intensities.

Fig. 3
figure 3

Benchmark images used for the selection of the proposed filter parameters

Each image pixel \(\varvec{x}_j\), \(j=1,\ldots , N\) was corrupted with probability \(p\) (noise intensity level), so that every channel of a corrupted pixel was replaced by a random value \(v_{q} \in [0,1]\) (\(q=1, 2, 3\)) drawn from a uniform distribution

$$\begin{array}{ll} \varvec{y}_{j}= \left\{ \begin{array}{cl} (v_{1}, v_{2}, v_{3}) &{}:\; {\mathrm{with \,\,probability}}\; p, \\ \varvec{x}_{i} &{} :\; {\mathrm{with\,\,probability}}\; 1-p. \end{array} \right. \end{array}$$
(4)

This kind of noise will be denoted as CT, (channels corrupted together) [95].

Each benchmark image has been corrupted with 3 different noise intensities (\(p \in \{0.1, 0.2, 0.3\}\)) and every contamination was performed 10 times with different seed of random number generator, to ensure that results are statistically relevant. For each corrupted image the FAPGF was applied using every \(d\) within the set \(\{0.05, 0.06,\ldots , 0.15\}\) and \(\gamma\) within the set of values \(\{0.2, 0.4,\ldots , 2.0\}\).

After image denoising, the PSNR, MAE, NCD [38, 96, 97] restoration quality measures were calculated:

$$\begin{aligned} {\mathrm{MSE}} = \frac{1}{3N} \sum _{j=1}^{N}\sum _{q=1}^{3} (x_{j,q}-\hat{x}_{j,q})^2, \end{aligned}$$
(5)
$$\begin{aligned} {\mathrm{PSNR}} = 10\log _{10} \left( \frac{1}{{\mathrm{MSE}}}\right) = -10\log _{10}{{\mathrm{MSE}}}, \end{aligned}$$
(6)
$$\begin{aligned} {\mathrm{MAE}} = \frac{1}{3N} \sum _{j=1}^{N}\sum _{q=1}^{3} |x_{j,q}-\hat{x}_{j,q}|, \end{aligned}$$
(7)

where \(x_{j,q}\), \(q=1,2,3\) are the channels of the original image pixels and \(\hat{x}_{j,q}\) are the restored components.

The NCD image restoration quality measure requires the conversion to the CIE Lab color space and it is defined as [1, 96]:

$$\begin{aligned} {\mathrm{NCD}}=\frac{\!\!\! \sum _{j=1}^{N}\!\! \left[ \left( L_{j}\!-\!\hat{L}_{j}\right) ^2\!+\!\left( a_{j}\!-\!\hat{a}_{j}\right) ^2\!+\! \left( b_{j}\!-\!\hat{b}_{j}\right) ^2\right] ^{\frac{1}{2}} }{\sum _{u=1}^{N}\sqrt{L_{j}^2+a_{j}^2+b_{j}^2}}, \end{aligned}$$
(8)

where \(L_{j}, a_{j}, b_{j}\) are the Lab coordinates of the original and \(\hat{L}_{j}, \hat{a}_{j}, \hat{b}_{j}\) of the restored image pixels.

Additionally, we used the FSIMc [98] and SR-SIM [99] quality metrics which are based on the structural similarity index SSIM [100]. These metrics were extended so that they can be used for the inspection of color images.

The obtained restoration results show a slight dependence of the best possible values of the utilized quality measures on the filter parameters \(d\) and \(\gamma\) and also on the contamination intensity and the structure of the analyzed benchmark images. The ranges of the optimal values of \(d\) and \(\gamma\) parameters obtained for various test images and contamination levels are presented in Table 1 and also visualized in Fig. 4.

Table 1 Recommended ranges of \(d\) and \(\gamma\) optimizing the respective quality measures for CT noise model
Fig. 4
figure 4

Influence of the parameters \(d\) and \(\gamma\) on the quality metrics for the test image PEP contaminated with CT impulse noise of intensity \(p = 0.3\)

Analyzing the optimal \(d\) values in Table 1 following conclusions can be drawn:

  1. 1.

    Parameter \(d\) seems to be slightly image dependent.

  2. 2.

    The most common threshold (median of best possible results) is \(d=0.10\) for low noise intensity (\(p=0.1\)) and this value decreases to \(d=0.08\) for stronger noise pollution (\(p=0.3\)).

  3. 3.

    Different quality measures seem to favor slightly different values of \(d\). The MAE seems to be optimized for higher \(d\) values while PSNR and NCD seem to be optimized by medium \(d\) values.

Finally, the setting \(0.07 \le d \le 0.11\) can be recommended as a range for the threshold \(d\). Moreover, lower values from this range should be chosen if stronger noise is to be suppressed.

The results for the secondary parameter \(\gamma\) can be summarized as follows:

  1. 1.

    The optimal \(\gamma\) parameter, ensuring the best possible restoration quality metrics, is also slightly image dependent.

  2. 2.

    The recommended value of \(\gamma\), (median of best results obtained for used test images and performing 10 realizations of noise contamination) is \(\gamma = 0.5\) for weaker noise (\(p=0.1\)) and it rises to \(\gamma = 1.1\) for more intensive image corruption (\(p=0.3\)). This effect can be easily explained. When the noise intensity is low, there is a lot of pixels with high peer group size \(m\) and those which have low \(m\) value are not necessarily affected by noise, but may represent the tiny image details. Therefore, the use of high \(\gamma\) value might introduce too strong changes of the uncorrupted pixels. On the other hand, when the image is corrupted by high-intensity noise, only a few pixels with high \(m\) values belong to the peer group, and their influence on the filter output should be reinforced by the high \(\gamma\) value setting.

  3. 3.

    Different quality measures are optimized by different \(\gamma\) values. The PSNR measure seems to promote lower values, while other measures show no explicit preferences.

The influence of the \(\gamma\) parameter on the quality metrics is shown in Table 2 for the color test image PEP and for various contamination levels. The recommended value of the \(\gamma\) for contamination ratios not exceeding \(p=0.3\) should be drawn from the range \(0.45 \le \gamma \le 1.3\) and lower value from this range should be chosen for weak noise pollution. As can be observed the effectiveness of the proposed filter is increased by the proper setting of \(\gamma\), especially for high contamination levels.

Table 2 Influence of \(\gamma\) parameter on image restoration quality measures for color test image PEP (\(d = 0.1\), CT noise model)

4 Impact of noise model on the filtering efficiency

A comparison of the efficiency of FAPGF to restore images corrupted by different types of random-valued impulsive noise has been also performed. We evaluated the proposed filter performance using following noise models [95]:

  • All channels of the color image are contaminated simultaneously by a random impulsive noise, (all channels together—CT).

  • Every channel of noisy pixels is corrupted independently—CI.

  • The corruption of one channel results in contamination of others with probability represented by correlation factor which was set at \(0.5\), (channels correlated—CC).

For each noise model and noise intensity \(p\), the test image PAR was contaminated. The FAPGF was used to enhance noisy images using recommended \(d=0.1\) value of the threshold parameter and setting \(\gamma =0.8\). Also filtering results were obtained for \(d\in <\!0.05,0.20\!>\) and the optimal settings of \(d\), in terms of PSNR quality measure, were found. The values of PSNR metric achieved for recommended and optimal \(d\) values are presented in Table 3. A visual comparison of the results achieved using different noise models is shown in Fig. 5. As can be observed, the new filter is able to cope with impulsive noise irrespectively on the applied noise model. The differences in the restoration efficiency are visually and also objectively not significant.

Table 3 Efficiency of the proposed filter in terms of PSNR using test image PAR for different noise models applying the recommended parameters (rec) and those yielding the optimal (opt) results
Fig. 5
figure 5

Comparison of the efficiency of FAPGF to restore the test image PAR corrupted by CT, CI and CC impulsive noise with intensity \(p = 0.2\)

5 Comparison with state-of-the-art filters

To evaluate the efficiency of the Fast Averaging Peer Group Filter (FAPGF), it is mandatory to compare it with other commonly used filters, dedicated for impulsive noise removal. The following filtering techniques have been chosen for comparison [38]:

  • Sigma Vector Median Filter (SVMFr) [69],

  • Fast Fuzzy Noise Reduction Filter (FFNRF) [48],

  • Peer Group Filter (PGF) [85],

  • Fast Modified Vector Median Filter (FMVMF) [101],

  • Adaptive Vector Median Filter (AVMF) [30],

  • Adaptive Center-Weighed VMF (ACWVMF) [102],

  • Fuzzy Ordered Vector Median Filter (FOVMF) [91],

  • Fast Peer Group Filter (FPGF) [88].

For the comparison we have chosen a set of test images: Caps (CAP), Flower (FLO), Rafting (RAF) and Six-Shooter (SIX), depicted in Fig. 6. They were corrupted by impulsive noise of intensity \(p=0.1, 0.2, \ldots , 0.5\). The FAPGF and other reference filters were applied to remove the impulses in those images using the default settings recommended by their authors. For all of the performed tests, the threshold parameter was set at \(d=0.1\) and the parameter \(\gamma\) at 0.8, as those values are in the middle of the recommended ranges of parameters provided by the analysis in Sect. 3. The filtering results are presented in Fig. 7 in terms of quality metrics PSNR, NCD, MAE, FSIMc, SR-SIM and also summarized in Tables 4, 5, 6 and 7. The best values of quality measures are depicted with bold font.

Fig. 6
figure 6

Benchmark color images used for the evaluation of denoising efficiency of the proposed filter

Fig. 7
figure 7

Comparison of PSNR achieved by different filters when restoring the color test images contaminated by CT noise model

Table 4 Quality measures obtained using all tested filters for image CAP contaminated by CT noise model

The analysis of the achieved filtering results leads to the following conclusions:

  1. 1.

    The denoising efficiency of the proposed FAPGF filter is comparable with the PGF for low contamination levels.

  2. 2.

    FAPGF is very efficient for strong contamination, (\(p \ge 0.3\)), and outperforms the reference filters.

  3. 3.

    FAPGF is always the best one from the FSIMc and SR-SIM point of view.

The quality of the results obtained with the new and reference filters is presented using the test images CAP and RAF contaminated with impulsive noise of intensity \(p=0.3\) in Figs. 8 and 9. The filter effectiveness for strong impulsive noise is also confirmed by Fig. 10, which shows the filter output for the PEP image distorted by very high-intensity noise. The example is unrealistic, however, it clearly shows the ability of the proposed filter to cope with very strong noise degradation.

Fig. 8
figure 8

Comparison of the proposed FAPGF with the state-of-the-art filters using the test image CAP contaminated with CT noise of intensity \(p=0.3\)

Fig. 9
figure 9

Comparison of the proposed FAPGF with the state-of-the-art filters using the test image RAF contaminated with CT noise of intensity \(p=0.3\)

Fig. 10
figure 10

Example of the restoration of test image PEP corrupted by CT noise of intensity \(p=0.9\), (window size \(n=11\), \(d=0.1\), \(\gamma =2\))

Table 5 Quality measures obtained using all tested filters for image FLO contaminated by CT noise model
Table 6 Quality measures obtained using all tested filters for image RAF contaminated by CT noise model
Table 7 Quality measures obtained using all tested filters for image SIX contaminated by CT noise model

6 Computational complexity

Beside the denoising efficiency, the important feature of any filtering design is its computational efficiency, which very often plays a crucial role in image enhancement tasks, determining its practical usability. As the comparison with all state-of-the-art filters falls out of the scope of this paper, we compare the computational burden of the new filtering design with the FPGF, described already in Sect. 1. The FPGF belongs to the fastest filters known from the literature and its efficiency is comparable for low noise contamination levels with the novel noise reduction method [22, 27, 34, 38, 60, 76, 87, 88].

As the analyzed techniques belong to the class of switching filters [2, 21, 22, 38], to exclude the effect of the image corruption intensity on the computational load, our analysis will focus on the number of elementary operations performed by impulse detection process and the number of elementary operations needed to perform the pixel replacement separately. The computational burden of switching filters is increasing with rising noise intensity as the replacement of corrupted pixels requires additional, time-consuming operations [14, 16, 27, 38, 76, 87, 88].

We assume a color image with \(L\) channels and the filter operating window of size \(n\). The elementary operations will be labeled as follows: Additions—ADDS, Multiplications—MULTS, Divisions—DIVS, Exponentiations—EXPS, Extractions of roots—SQRTS, Comparisons—COMPS.

The impulse detection process of FAPGF and FPGF algorithms is almost the same and requires:

  • Computation of \((n^{2}-1)\) Euclidean distances. Each distance requires: \(L\times {\mathrm{MULTS}} + 2L \times {\mathrm{ADDS}} + 1 \times {\mathrm{SQRTS}}\).

  • Computation of \((n^{2}-1) \times {\mathrm{COMPS}}\).

  • Additionally FAPGF requires \((n^{2}-1) \times {\mathrm{ADDS}}\) for counting the number of its CNs in operating window and \(1\times {\mathrm{DIVS}}\) for distance normalization, which could be omitted, but was introduced to simplify the filter analysis.

The FPGF replaces the pixels found to be corrupted with the output of the VMF. The VMF requires: \([(2L + 3)n^{3} - (L + 2)n^{2} - (L + 1)n] \times {\mathrm{ADDS}} + L(n^{3} - n(n + 1)/2 ) \times {\mathrm{MULTS}} + (n^{3} - n(n + 1)/2) \times {\mathrm{SQRTS}} +(n^{2} - 1) \times {\mathrm{COMPS}}\).

The FAPGF uses the weighted average Filter (WAF) for the replacement of noisy pixel. The computation of weights requires \((n^{2}-1) \times {\mathrm{EXPS}}\), then \((n^{2}-1) \times {\mathrm{ADDS}}\) and \(1 \times COMPS\) is needed to check if the pixels have at least two CNs needed to compute the mean. Finally, the computation of the filter output requires: \((n^{2}-1) \times {\mathrm{MULTS}}\), \((n^{2}-1) \times {\mathrm{ADDS}}\) and \(1 \times DIVS\).

The number of elementary mathematical operations for both filters is presented in Table 8 for the window size \(n=3\) and \(n=5\), using the notation: impulse detection (ID) and pixel replacement (PR) for the two filtering stages. As can be observed, both filters require comparable amount of elementary operations for the impulse detection. The pixel replacement step of the FPGF is, however, much more computationally expensive and the difference between the two analyzed filters is significant for high contamination ratios. Therefore, we can conclude that the proposed filter is computationally very efficient.

Table 8 Comparison of computational complexity of the proposed FAPGF with the FPGF

Table 9 shows the average execution times when restoring the test images GIR, LEN and MON corrupted by the CT noise using unoptimized code. The images were filtered using Matlab and Intel i5 processor (2.5 GHz, 8 GB RAM, Windows 7). Each image was filtered 100 times and the average execution time is provided with the corresponding standard deviations. As expected, the computational complexity slightly increases for higher contamination levels, due to increasing number of corrupted pixels replacements.

Table 9 Average execution times in seconds calculated for 100 filter runs when restoring the GIR, LEN, MON images corrupted by the CT noise

7 Summary and conclusions

In this paper, a new efficient technique of impulsive noise removal was proposed. The described technique has the ability to restore images while preserving edges and tiny image details. The performed extensive simulations show that the new method outperforms the state-of-the-art techniques especially for high noise contamination levels.

The very fast impulse detection technique coupled with computationally efficient pixel replacement scheme makes that the proposed denoising design belongs to the fastest available switching filters. Future work will be focused on the application of the proposed denoising scheme for video enhancement.