1 Introduction

In the recent years the topic of image denoising has been extensively studied in computer vision and digital image processing fields. The enhancement of image quality is a crucial step for almost every computer vision system. Color digital images are often affected by various types of noise which can be caused by analog to digital converter errors during the acquisition process, transmission disturbances in noisy channels, malfunctioning pixels in the camera sensors, natural and man-made electromagnetic noise sources, aging of the storage material and flawed memory locations, among many others [3, 19, 41, 64]. As the denoising is the first step in the image processing pipeline, the effective restoration allows to successfully accomplish its further stages. Thus, denoising is one of the most significant low level processing operations.

Generally, the noise filtering methods used for color image enhancement can be divided into component-wise and vector-based techniques. The component-wise filters process the color image channels independently, neglecting the usually strong inter-channel correlation. The advantage of this approach is that many methods used for the greyscale image denoising can be directly applied to the color image channels and the processing results are merged to obtain the final restored output. However, the separate treatment leads to color artifacts, which are especially apparent at image edges. Therefore, generally the vectorial processing is preferred.

The noise distortions are usually modelled using a Gaussian or a heavy-tailed distribution or a mixture of both [12, 43]. The enhancement of images degraded by the combination of Gaussian and impulsive noise is a challenging task, since the methods which are designed to reduce the Gaussian noise are not able to remove the outlying samples and those capable of suppressing the impulses, usually fail to smooth out the Gaussian noise [15, 24, 33, 39].

Effective methods for the reduction of Gaussian noise like Non-local Means (NLM) [7] or Block-Matching and 3D Filtering (BM3D) [14] are not able to suppress the impulsive noise. The concept of the NLM filter is to estimate the new values of a pixel by looking for similar samples in the processing block. To determine the similarity between the central pixel and other samples of the block, the pixels in the local neighbourhoods are analyzed (in so-called patches). The accumulated distances between the corresponding pixels serve as a dissimilarity measure. Unfortunately, the impulsive noise is often handled as tiny details and is preserved.

The BM3D method performs the denoising using the sparse representation of an image in the transform domain. First, similar fragments of an image are stacked together into 3D data arrays and then a collaborative filtering using a 3D transform on those arrays is applied to estimate the denoising output. Like in the NLM method, when the processed pixel is corrupted, patches with similarly damaged central pixels are privileged, which leads to the preservation of impulses.

The idea of these filters relies on the assumption that in a non-noisy image, similar patches can be found in different image regions. In this manner, the image can be denoised by finding all of its corresponding patches, and then by estimating the most similar patch. In [16] the process is built upon the Maximum Likelihood Estimator (MLE) with weighted distance between patches and achieves good restoration results on textured regions.

Similar problems with impulsive noise preservation limit also the capability of popular methods like Mean Shift (MS) [13] and Bilateral Filtering (BF) [55], in which pixels from the local neighborhood which are similar to the corrupted, processed pixel are assigned high weighting values and as a result the impulses are again preserved.

The inefficiency in impulsive noise removal of the mentioned above filters can be alleviated by dividing the denoising process into two steps. First, by removing the impulses with a filter designed to cope with them and then by applying on the resulting image a filter designed to suppress the Gaussian noise. For the first step, various techniques can be used, like the standard channel-wise median filter [5], the widely used Vector Median Filter (VMF) [2] and its modifications [38], fuzzy filters [48] and highly effective switching methods [36, 40].

The median based filters process uniformly the noisy and uncorrupted pixels, which leads to the removal of tiny details and texture. To avoid this effect, only pixels which are detected as impulses are being replaced by a suitable filtering method. Another family of efficient denoising techniques is based on the concept of the Peer Group Filter (PGF) [9, 40]. In this approach each image pixel is analysed and depending on the distance to its closest neighbors in the processing window, it is classified as noisy or not corrupted.

The switching techniques can be also applied for the removal of mixed noise [32, 39]. First, impulses are detected and replaced with an output of a robust technique and the remaining pixels are restored using a smoothing method. Such a design was applied in [61], where impulses were removed by a median based filtering technique and then the image was smoothed with a BM3D filter.

Blur is also a problem of image distortion and has been taken into consideration together with impulsive noise in [10, 11]. The approach was similar as described before - first impulses were identified and suppressed, and further, remaining pixels were smoothed out by variational methods. Combining NLM [6] with different filters and techniques is also an effective solution, which has been proposed in [31] using the Trilateral Filter[21]. Also in [16, 22] a similar patch-based approach for the reduction of mixed noise was introduced. The idea of image inpainting has been also applied for noise removal, like in the approach called robust ALOHA (Annihilating filter-based LOw-rank HAnkel matrix) [25], which uses the sparse and low-rank decomposition of a Hankel structured matrix. Due to the high computational complexity, the usage of parallel CUDA computing is required.

The filters intended to smooth out the noise contaminating in color images are mostly exploiting the Minkowski norms in the RGB color space [20]. Some approaches operate on the perceptual spaces like HSV [56] or Lab [26], which yield improved efficiency in terms of objective and subjective quality measures. Techniques utilizing the concepts of fuzzy sets theory also offer a satisfying denoising performance in the mixed noise suppression [23, 29, 37, 44, 45]. The filters based on the quaternion representation of color image pixels can also be used for the removal of outliers before subsequent image smoothing [28, 57]. In [65] the quaternion based approach was combined with the local reachability density introduced in [4], where the Local Outlier Factor (LOF) has been defined. The concept of reachability distance and LOF has been also successfully utilized in switching fiters intended for the removal of impulsive noise in color images [27, 51, 58].

In this paper we propose an efficient filtering design, which is an extension and refinement of the technique introduced in [52] in which we described the Pixel to Patch Similarity (PPS) measure. Instead of using the Euclidean distance, we employ the concept of reachability to determine the dissimilarity between pixels and also estimate their measure of impulsiveness.

For each sample in the processing block, a weighted average is calculated using the PPS concept and additionally we determine the impulsiveness of each pixel in the processing block. In this way, we are able to eliminate not only impulsive pixels, but also their clusters. This procedure significantly improves the restoration results, especially in the case of strongly contaminated images.

The proposed filtering scheme, which will be denoted as Robust Reachability based Local Similarity Filter (RRLSF) enables to efficiently suppress the mixed Gaussian and impulsive noise in color images. The combination of the PPS concept with the reachability distance, enables to determine the membership of a pixel from the filtering block to the local neighborhood of the processed sample being restored and also allows to diminish the influence of outliers on the final restoration result. Additionally we propose a novel method of mixed noise intensity estimation and propose a self-adaptive procedure, which automatically tunes the parameters of the novel RRLSF. Thus, we propose an adaptive denoising design, which requires no tuning of its parameters. The proposed pixel to patch similarity concept and the introduced method of estimating the degree of image degradation can be used in various denoising designs and segmentation procedures like mean or medoid shift [49], anisotropic diffusion [42], fuzzy medians based methods [50] or various extensions of fuzzy clustering algorithms [59].

The main contributions of the paper can be summarized as follows:

  • Application of the pixel reachability concept within the framework of Pixel to Patch Similarity, which was introduced in [52], for the suppression of mixed Gaussian and impulsive noise in color images.

  • Analysis of the influence of the filter’s parameters on the objective efficiency of the restoration process.

  • Introduction of a simple and fast method of the mixed noise intensity estimation.

  • Construction of an adaptive design, able to tune the filtering parameters to the contamination level.

The paper is organized as follows. In Section 2 we introduce the proposed filtering design. In the next Section we analyze the influence of the filter’s parameters on its denoising efficiency. Additionally we propose a method of mixed noise intensity estimation and develop a fully adaptive filter. Then we compare the proposed techniques with state-of-the-art denoising methods. In Section 4 we discuss the properties of the proposed filter, analyze its computational complexity and provide an example of its application for the processing of one-dimensional signals. Finally, we draw some concluding remarks in Section 5.

2 Methods

The elaborated in this work noise filtering technique is based on the concept of Rank-Ordered Absolute Differences (ROAD) statistic [21], already applied for color image denoising [34, 35], and the extensively used Bilateral Filter (BF) [55]. The BF is utilizing the similarity measure between a given pixel and the samples from the processing block by combining the spatial distance and color dissimilarity. The pixels in the processing block B of size η = (2r + 1) × (2r + 1) will be denoted as x1,…,xη, where for convenience x1 is located in the center of B. The output y1 of the BF, which replaces the central pixel x1 of B, is

$$ \boldsymbol{y}_{1}= \frac{ {\sum}_{k=1}^{\eta} w_{r}(\boldsymbol{x}_{1},\boldsymbol{x}_{k})\cdot w_{s}(\boldsymbol{x}_{1},\boldsymbol{x}_{k}) \cdot \boldsymbol{x}_{k} } {{\sum}_{k=1}^{\eta} w_{r}(\boldsymbol{x}_{1},\boldsymbol{x}_{k})\cdot w_{s}(\boldsymbol{x}_{1},\boldsymbol{x}_{k}) }, $$
(1)

where the weights wr and ws are usually defined as

$$ w_{r}(\boldsymbol{x}_{1},\boldsymbol{x}_{k})=\exp\left\{- \frac{\|\boldsymbol{x}_{1}-\boldsymbol{x}_{k}\|^{2}}{2{\sigma_{r}^{2}}} \right \}, w_{s}(\boldsymbol{x}_{1},\boldsymbol{x}_{k})=\exp\left\{- \frac{ \tau^{2}(\boldsymbol{x}_{1},\boldsymbol{x}_{k}) }{2{\sigma_{s}^{2}}} \right \}, $$
(2)

∥ ⋅ ∥ denotes the Euclidean distance in the RGB color space and τ stands for the distance between the pixels on the image domain. In this way, the BF combines the radiometric closeness of the pixels in the color space and their topographic nearness. The influence of the two weights on the final filter output is controlled by the parameters σr and σs, which have to be tuned to the image characteristic and noise contamination intensity.

Despite the fact that many filters based on the BF have been developed, their common drawback is the inability to efficiently suppress impulsive pixels. Because of their design, the outliers are treated as image details and are retained. Therefore, the BF is a very effective solution in the case of Gaussian noise, but for the mixed noise, an additional mechanism, reducing the influence of impulses on the denoising result has to be incorporated into its structure.

The Trilateral Filter (TF) [21] exploits one of such instruments. In this design, the concept of ROAD statistic has been applied, and it serves as an indicator of pixel corruption level [18, 62]. It can be defined for color images as [8, 34]

$$ \text{ROAD}_{\alpha}(\boldsymbol{x}_{i})=\frac{1}{\alpha}\sum\limits_{k=1}^{\alpha} d_{i(k)}, $$
(3)

where di(k) is the k-th smallest Euclidean distance between the central pixel xi of a small filtering window Wi (patch consisting of n pixels) and its neighbors, and α denotes the number of closest samples.

If a pixel is corrupted by impulsive noise, then the corresponding value of ROAD reaches high value, even when in its neighborhood a similarly damaged pixel can be found, as shown in Fig. 1.

Fig. 1
figure 1

Calculation of the ROAD indicator of impulsiveness. The pixels are compared with the central element of the patch (left) and the α smallest absolute differences are taken for the calculation of the ROAD measure (right)

In [30, 52] an efficient approach to the mixed noise reduction in color images called Robust Local Similarity Filter (RLSF) was proposed. It is based on the ROAD and BF concepts and utilizes the impulsivity measure used in TF. However, to diminish its computational complexity and to decrease the number of required parameters, the influence of topographic distance between pixels on the image domain has been neglected.

In the RLSF, for the pixels xj, (j = 1,…,η), from a processing block B centered at pixel x1, we assigned the ROAD defined as the sum of α smallest distances between a pixel xj belonging to B and the pixels from the filtering window W1 in the center of B. The output of the filter presented in [30, 52] replacing pixel x1, is defined as a weighted average

$$ \boldsymbol{y}_{1}=\frac{{\sum}_{j=1}^{\eta} w_{j} \cdot \boldsymbol{x}_{j}} {{\sum}_{j=1}^{\eta} w_{j}}, \boldsymbol{x}_{j}\in \boldsymbol{B}, $$
(4)

with

$$ w_{j}=\exp \left( - \frac{\text{ROAD}_{\alpha}(\boldsymbol{x}_{j})}{2\sigma^{2}}\right)= \exp \left( - \frac{1}{2\alpha \sigma^{2}} \sum\limits_{k=1}^{\alpha} d_{j1(k)} \right), $$
(5)

where dj1(k) is the k-th smallest dissimilarity measure between xj and the pixels of the window W1 of size 3 × 3 (patch containing n = 9 elements), which is centered at x1 and σ is a smoothing parameter.

The RLSF efficiently reduces the mixed noise, but highly corrupted images may contain too many impulsive pixels, which are not recognized as outliers. Thus, in our new Robust Reachability based Local Similarity Filter we analyze the neighborhood of the central pixel of the processing block and its remaining samples, and try to further reduce the influence of impulsive pixels on the final restoration result.

First, we introduce the concept of reachability distance, which will be used in the definition of a novel, robust dissimilarity measure discriminating the image pixels. Let dij denotes the Euclidean distance in a chosen color space between pixels xi and xj and let di(k) stands for the distance of a pixel xi to the k-th neighbor as depicted in Fig. 2. The reachability distance, of xi from xj is defined as [4]

$$ \text{R}_{\alpha}(\boldsymbol{x}_{i},\boldsymbol{x}_{j})=\max \{d_{i(\alpha)}, d_{ij} \}. $$
(6)
Fig. 2
figure 2

Illustration of the concept of reachability of xi from xj and xk for α = 4 (a). Even when the distance between points xi and xj is small, the reachability distance R4 of xi from xj is high when the two points are outliers (b)

Thus, the reachability distance Rα of xi from xj is at least di(α) and takes the value dij when it is greater than di(α), (see Fig. 2a). Figure 2 b shows an example, in which the distance between xj and xi is relatively small, however as the distance di(4) is greater than dij, the reachability R4(xi,xj) is equal to di(4). Therefore, even if a point is very close to the reference one, the reachability distance can be high, as for its computation the local structure of data points is considered.

In this paper we will employ a modified definition of reachability, denoted as \(\mathcal {R}\) [1, 47], which enables more stable description of the outlying data points structure

$$ \mathcal{R}_{\alpha}(\boldsymbol{x}_{i},\boldsymbol{x}_{j})=\max \{\upsilon_{\alpha}(\boldsymbol{x}_{i}), \rho_{ij} \}, $$
(7)

with

$$ \upsilon_{\alpha}(\boldsymbol{x}_{i})=\frac{1}{\alpha} \sum\limits_{k=1}^{\alpha} \rho_{i(k)} , $$
(8)

where ρij is a chosen dissimilarity measure between xi and xj, which allows to adopt other types of pixels discrepancy measures and υα is the mean of the α-smallest difference measures calculated for the closest samples of xi. Thus, instead of the Euclidean distance, more robust distance types or dissimilarity measures can be used and the averaging operation guarantees more stable behavior in the case of low number of points which are being analyzed. In this way, instead of taking in (6) the Euclidean distance with rank α, the average of the smallest α difference measures is computed.

The calculation of the reachability distance \(\mathcal {R}\) is illustrated in Fig. 3. First the average of the nearest α dissimilarities of the pixel xjB to the pixels in the window centered at x1 is calculated and then compared with the absolute difference of intensities of pixels x1 and xj. Finally, the maximum is taken as a reachability distance.

Fig. 3
figure 3

Illustration of the computation of reachability of the noisy pixel x1 = 244 in the center of a 3 × 3 window from a pixel xj = 198 of the processing block. For the sake of simplicity, a greyscale image is used and absolute differences of intensities between pixels are taken as dissimilarity measures. Note that the distance between xj and x1 is 46 and is significantly smaller than the reachability distance, whose value is 116

Now, we are able to introduce a new measure of discrepancy between a pixel xj and a patch Wi centered at xi, which can be viewed as a generalization of the previously defined ROAD and will be denoted as Ψα

$$ \varPsi_{\alpha}(\boldsymbol{W}_{i},\boldsymbol{x}_{j})= \frac{1}{\alpha} \sum\limits_{k=1}^{\alpha} \mathcal{R}_{\alpha} (\boldsymbol{x}_{i(k)}, \boldsymbol{x}_{j}),\quad \boldsymbol{x}_{i(k)}\in \boldsymbol{W}_{i}, \boldsymbol{x}_{j}\in \boldsymbol{B}, $$
(9)

and is equal to the average of reachabilities from the pixel xj of a processing block to the α most similar pixels, denoted as xi(k), belonging to the patch Wi.

The proposed measure of dissimilaritiy between a pixel and a patch is insensitive to outliers, as instead of direct measures of closeness, the modified reachability concept is employed. Using the measure Ψα(Wi,xj) of the difference between pixels xj and those contained in Wi, we can define a weight describing their closeness

$$ w_{1}(\boldsymbol{W}_{i},\boldsymbol{x}_{j})=\exp \left( - \varPsi_{\alpha}(\boldsymbol{W}_{i},\boldsymbol{x}_{j}) / 2{\sigma_{1}^{2}} \right), $$
(10)

where σ1 is a smoothing parameter.

However, we are only interested in the patch W1 in the center of the processing block. Therefore, in order to replace the pixel x1 in its center, we assign to every pixel of B the weight w1(W1,xj) according to (10). The pixels in W1, which is located in the center of B, are likely to be noisy, however the reachability values are calculated only for the α pixels which show similarity to the individual pixels from the processing block. Additionally, the application of reachability distance prevents the situation that corrupted pixels in B get high weighting values, when similar pixels are contained in the central patch W1.

In order to further diminish the influence of an outlying pixel xjB on the restoration result, we can evaluate its impusiveness by analyzing the closeness to local neighborhood or in in other words to the patch Wj. To this end, we can assign the pixels a second weight

$$ w_{2}(\boldsymbol{W}_{j},\boldsymbol{x}_{j})=\exp \left( - \varPsi_{\alpha}(\boldsymbol{W}_{j},\boldsymbol{x}_{j}) / 2{\sigma_{2}^{2}} \right), $$
(11)

where σ2 is the second parameter.

It is worth noticing, that when calculating the second weight, we are using the reachability distances to the pixels in Wj which are most similar to xj. This requires finding the closest neighbors and in fact the information from a 5 × 5 window is exploited. Additionally, the reachability distance makes the procedure robust to the influence of small clusters of impulsive pixels.

For the estimation of new filter output y1, replacing the central pixel x1 of B, we compute a weighted average of all pixels xj in this block. As a result, the output pixel y1 of the proposed filter, will be

$$ \boldsymbol{y}_{1}= \frac {{\sum}_{j=1}^{\eta} w_{1}(\boldsymbol{W}_{1},\boldsymbol{x}_{j})\cdot w_{2}(\boldsymbol{W}_{j},\boldsymbol{x}_{j}) \cdot \boldsymbol{x}_{j}} {{\sum}_{j=1}^{\eta} w_{1}(\boldsymbol{W}_{1},\boldsymbol{x}_{j})\cdot w_{2}(\boldsymbol{W}_{j},\boldsymbol{x}_{j})}. $$
(12)

The described approach is illustrated in Fig. 4, using for simplicity a greyscale image. For a pixel x1 with intensity 244, a processing block B and a small 3 × 3 window W1 is taken - both marked red. Then for an exemplary pixel xj with intensity 198 in the center of Wj, we proceed as follows

  • to compute w1, we first calculate the distances between pixel of intensity 198 to each pixel in the patch W1. Then, we compute the weight by averaging the computed reachabilities for the α closest pixels in W1,

  • to compute w2, we proceed similarly, but instead of taking the patch W1 we analyze the patch Wj centered at xj.

Fig. 4
figure 4

Illustration of the proposed algorithm. To simplify a greyscale image is used and absolute differences of intensities between pixels were computed

Utilizing the reachability approach, we minimize the impact of cluster of impulsive pixels in the averaging process. Furthermore, the second weight w2 eliminates single impulses, which can be wrongly taken with high weight into the averaging process.

3 Results

The aim of our work is to design a filter which is capable of suppressing both the Gaussian and impulsive noise in one denoising framework. The need of developing such an approach is illustrated in Fig. 5, which depicts the performance of NLM, BM3D and MS techniques, when denoising a test image (a) contaminated by Gaussian noise of standard deviation σ = 30 (b) and with subsequently introduced impulsive noise (c), in which the fraction of 30% of pixels was corrupted. In a pixel affected by impulsive noise, each RGB channel was randomly replaced by a value drawn from uniform distribution in the range [0,255]. As can be observed, using the classical methods, the Gaussian noise is efficiently removed, but the impulses are retained. This example demonstrates the need for developing robust techniques which are able to cope with the noise mixtures.

Fig. 5
figure 5

Illustration of the inability of NLM (d), BM3D (e), BF (f) and MS (g) filtering methods to suppress the impulses in the mixture of Gaussian σ = 30 and impulsive noise (30 % of corrupted pixels) (b, c) which distorted the original color test image (a). For each filter, the denoising of Gaussian noise (left) and the mixed noise (right) is presented

3.1 Analysis of the influence of parameters on denoising efficiency

The efficiency of the RRLSF was evaluated on a set of color test images depicted in Figs. 6 and 7. The images were first distorted by Gaussian noise with standard deviation in the range 10–50, (with step 10) and then 10–50 % of the pixels was replaced by random-valued impulsive noise, so that every RGB channel of a corrupted pixel was assigned a value drawn from uniform distribution in the range [0,255]. To simplify the notation, p denotes the intensity of the Gaussian noise with standard deviation p, combined with impulsive noise contaminating p% of image pixels.

Fig. 6
figure 6

Color images used in the comparison with competitive methods

Fig. 7
figure 7

Color image database consisting of 100 images of resolution 640× 480, available for download at http://denoising.net/

The restoration efficiency has been assessed using the commonly used Peak Signal-to-Noise Ratio (PSNR) and Mean Absolute Error (MAE) quality measures [53, 54, 60] defined as

$$ \text{PSNR} = 10\log_{10} \left( \frac{255^{2}}{\text{MSE}}\right), \quad \text{MSE} = \frac{1}{3N} \sum\limits_{j=1}^{N}\sum\limits_{q=1}^{3} (x_{j,q}-y_{j,q})^{2}, $$
(13)
$$ \text{MAE} = \frac{1}{3N} \sum\limits_{j=1}^{N}\sum\limits_{q=1}^{3} |x_{j,q}-y_{j,q}|, $$
(14)

where xj,q, q = 1,2,3, are the channels of the original image pixels, N denotes the number of pixels in an image and yj,q are the restored components. Additionally, the spectral residual based similarity (SRSIM) measure was used to better express the image restoration quality in consistency with subjective ratings [63].

First, we have investigated the influence of the radius r of the processing block B and the parameter α on the denoising efficiency of the proposed filter. Figure 8 shows the dependence of PSNR on the radius r and α using the test color image PEPPERS.

Fig. 8
figure 8

Dependence of the highest PSNR measure achieved using the RRLSF design on the r and α parameters for a test image PEPPERS

As can be seen, the higher the contamination level, the bigger processing blocks are needed. The parameter α however, does not depend significantly on the noise level, and taking α equal to 3 or 4 guarantees good denoising performance.

To draw more general conclusions, in Fig. 9 the distribution of r and α values yielding the highest PSNR values, using 100 images from the database depicted in Fig. 7 has been presented. For low contamination level, the processing block of size 5 × 5, (r = 2) gives satisfactory results. For higher noise intensity (p = 30), a block radius r = 5 is recommended and finally for very high contamination r = 7 is required. The second important parameter α is again not much dependent on the noise level. For low noise level, taking α = 3 nearest pixels for the similarity measure is adequate. For higher noise intensity, 4 closest pixels are sufficient.

Fig. 9
figure 9

Distribution of radius r and α parameters providing best possible filtering efficiency in terms of PSNR measure. The box plots have been created using 100 images (Fig. 7) with filter setting yielding the highest PSNR values

As can be noticed, the box plots presented in Fig. 9 confirm the dependence of r and α on the noise intensity depicted in the heatmaps of Fig. 8. Using too low or too high α value leads to deterioration of the denoising results. For low contamination, too large value of α will smooth the image, resulting in loosing important details, while for higher contamination, taking too small α will result in insufficient suppression of outliers. Additionally, the two tuning parameters σ1 and σ2 are used for better adaptation of the smoothing process, as they reduce the impact of Gaussian noise in the outlier detection process.

As can be observed in the heat maps presented in Fig. 10 and also in the box plots exhibited in Fig. 11, the optimal σ1 parameter is proportional to the noise level p. This behavior is apprehensible, as with the first weight w1 defined in (10), we analyze the pixels in terms of their impulsiveness. In this way, using a larger smoothing parameter for high noise contamination levels, the outliers are better smoothed out. The σ2 parameter needed in the second weight w2 defined in (11) is inversely proportional to the contamination level. For strong noise, the outliers tend to group into clusters and lower σ2 helps decrease their influence of the final denoising result.

Fig. 10
figure 10

Dependence of the highest PSNR values obtained for various σ1 and σ2 for test image PEPPERS

Fig. 11
figure 11

Distribution of σ1 and σ2 parameters providing the best possible filtering efficiency in terms of PSNR measure, using the database depicted in Fig. 7

3.2 Noise intensity estimation

To achieve satisfying filtering results, an efficient noise level estimation method is required to adaptively tune the filtering parameters. Using the already introduced ROAD measure, a simple but effective noise intensity estimator can be constructed. Let \(\hat {R}\) denotes the average ROADα

$$ \hat{R}=\frac{1}{N}\sum\limits_{i=1}^{N} \text{ROAD}_{\alpha}(\boldsymbol{x}_{i}), $$
(15)

where ROADα is defined by (3) and N is the number of image pixels.

Figure 12 reveals a strong correlation between \(\hat {R}\) and the noise intensity p for α = 3,4 and 5 using the database presented in Fig. 7.

Fig. 12
figure 12

Box plots depicting the correlation between the average ROAD measure \(\hat {R}\) and the noise level p obtained using the database shown in Fig. 7

The dependence between \(\hat {R}\) and p is nearly linear, which enables to estimate the image contamination determining its \(\hat {R}\) value. Figure 13 depicts the dependence of the block radius r and smoothing parameters σ1, σ2 on \(\hat {R}\) using α = 3. As can be observed, the optimal setting of the parameters, yielding the optimal performance in terms of PSNR quality measure, is dependent on the image structure, as the scatter plots are rather widely spread, which is in accordance with the box plots depicted in Figs. 9 and 11.

Fig. 13
figure 13

Dependence of the block radius r (a), parameters σ1 (b) and σ2 (c) on the \(\hat {R}\) image contamination measure, evaluated using the database shown in Fig. 7

Nevertheless, the block size r and σ1 and σ2 parameters can be approximated exploiting a linear dependence of \(\hat {R}\) on the noise intensity level p (see Fig. 12), estimated for the image which is to be denoised. In this way, assuming a linear relation between \(\hat {R}\) and p, we can estimate the values of block size r and parameters σ1 and σ2

$$ r = \max\{1,\text{round}(0.065\cdot\hat{\text{R}}-0.5)\}, $$
(16)
$$ \sigma_{1} = 0.37\cdot\hat{\text{R}}+15, $$
(17)
$$ \sigma_{2}=-0.72\cdot\hat{\text{R}}+102. $$
(18)

Needless to say, the obtained in this way parameter settings do not guarantee optimal denoising performance, as the deviations from the estimated parameters can be significant, especially in the case of σ2, (Fig. 13c). However, the difference between the best possible filtering result and those achieved using the adaptive RRLSF, with automatic parameter settings, is not large and visually hardly noticeable. In this way, the introduced adaptive filter is able to enhance the noisy images in an self-adaptive manner, without experimentally adjusting the filter parameters dependent on the noise intensity.

3.3 Comparison with competitive methods

The described filtering design has been compared with a set of commonly used denoising methods:

  • Robust Local Similarity Filter, (RLSF) [52],

  • Trilateral Filter, (TF) [21],

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

  • Alpha-Trimmed Vector Median Filter, (ATVMF) [43],

  • Patch-based Approach to Remove Impulse-Gaussian Noise, (PARIGI), [17]

  • Restricted Marginal Median Filter, (RMMF) [46],

  • Combined Reduced Ordering Marginal Ordering, (CROMO), [38]

  • Annihilating fillter-based LOw-rank HAnkel matrix, (ALOHA), [25]

  • Bilateral Filter, (BF) [55],

  • Vector Median Filter, (VMF) [2],

and with two-step filtering techniques: VMF or Peer Group Filter followed by BF, MS, NLM or BM3D methods. Different distance measures between pixels were tested and finally the squared Euclidean distance has been chosen, because of the lower computation load and better denoising results. In this way, we do not need to compute the square root and the distance value between two pixels is more precise.

Table 1 presents the PSNR, MAE and SRSIM values obtained with the RRLSF and its adaptive version. For all contamination levels, the loss in PSNR when using the self-tuning procedure is mostly lower than 0.5 dB. Additionally, in the Table the quality measures obtained when employing a set of competitive filters are presented. Table 2 shows the comparison with two-stage denoising methods, in which first the impulses are removed and then a filter well suited for the denoising of Gaussian noise is applied. Again, the comparison shows that the new design is able to enhance efficiently color images highly degraded with mixed noise. What is important, the adaptive design yields results which mostly excels over the computationally expensive two-stage approaches.

Table 1 Comparison of the PSNR (top), MAE (middle) and SRSIM (bottom) quality measures of the restored color test images using the proposed RRLSF and state-of-the art filtering methods
Table 2 Comparison of the PSNR (top), MAE (middle) and SRSIM (bottom) quality measures of the restored color test images using the RRLSF and the combination of filters intended for impulsive noise removal (VMF, PGF) and techniques suited for the Gaussian noise suppression (NLM, BM3D, BF, MS)

The analysis of the results shows, that the proposed filter produces especially good results for high noise contamination levels. This behavior is caused by the applied concept of the pixel-patch similarity measure, which is effective for highly corrupted images. It is worth noticing that all the results obtained for the competitive filters are optimal in terms of the used quality measures, which means that their parameters yield best possible performance. The RRLSF excels over the filters taken for comparisons for highly contaminated images, however even the fully adaptive version, which requires no tuning of any parameters, offers very satisfying outcomes.

4 Discussion

The satisfactory denoising results offered by the proposed RRLSF can be evaluated using objective quality measures, but they can also be visually assessed when analyzing the filtering outcomes depicted in Fig. 14.

Fig. 14
figure 14

Comparison of the efficiency of the RRLSF using r = 5, and α = 4 with TF, PARIGI and PGF + BM3D, when restoring two color test images contaminated with mixed Gaussian and impulsive noise of intensity p = 30

The impulsive and Gaussian noise is well attenuated, edges are sharp, smooth areas do not contain color blotches and the denoised images are visually pleasing and of overall much better quality than the restoration results obtained using the competitive filters. Figure 14 also shows that the new filter much better preserves image details and smooths out the Gaussian noise in homogeneous image areas.

Analyzing Table 1 it can be concluded, that the proposed algorithm outperforms other state-of-art filters for highly contaminated images. Additionally, it performs generally better that the solutions which first remove impulses and then smooth out the Gaussian noise component. On the other hand, for low contaminated images, the best results achieves the Trilateral Filter or a combination of two filters, e.g. PGF+NLM. In terms of the SRSIM measure, the two-pass filters are sometimes slightly better than the proposed RRLSF. The cause can be the fact, that the new filter was being optimized using the PSNR quality measure.

A drawback of two-pass filters is their high computational load. In our approach, we need to analyze for every image pixel all reachabilities of elements in a block B to the pixels in the window W centered at the central pixel of B and the window centered at the analyzed pixel. In this manner we get a complexity of O(Nηn), where N, η and n denote the number of image pixels, number of pixels in the block and the filtering patch, respectively.

Figure 15 shows the comparison of the execution time of the RRLSF when compared with the NLM [6] and BF [55]. The new filtering design is slower than BF, but significantly faster than NLM, which allows to apply the elaborated filter for real-time processing tasks even for images in full HD resolution. The experiments have been executed on a CUDA compatible NVIDA RTX2080Ti graphics card.

Fig. 15
figure 15

Comparison of computational efficiency of RRLSF with the NLM [6] and BF [55] for varying block radius r on test images with increasing size. The presented times are an average of 1000 processing cycles

Figure 16 illustrates the application of the proposed filtering design in the denoising of one-dimensional signal (part of a row of the grayscale test image PEPPERS). As can be seen the mixed noise is well attenuated, impulses are completely removed and details are well preserved. In this particular example, we used a processing window consisting of 5 samples and a processing block with the same length.

Fig. 16
figure 16

Application of the RRLSF on a one-dimensional signal, (part of a row of gray scale image PEPPERS), where i denotes the spatial or temporal position and x stands for the signal intensity. The absolute difference between the denoised and original signal is shown in (d)

This example shows that the proposed method can be used also in 1D case, however a thorough analysis of the filter’s behavior is beyond the scope of the present submission. Nevertheless, the proposed method can be useful for artifacts suppression in electroencephalography, electrocardiography or seismic signal processing, among many others.

The proposed filtering design compared to our previous work (RLSF) and other state-of-the-art filters reveals a high potential of its use for strongly contaminated images. For low-level noise, two-pass solutions like PGF+BM3D give better results in terms of PSNR and MAE measures, but the computational load is higher and the settings of the optimal parameters is much more complex than in our filtering method. Furthermore, our solution can be easily implemented in a parallel computing environment like CUDA or OpenMP.

The proposed novel noise estimator allows applying the proposed RRLSF filter directly on noisy images without a priori knowledge of the noise level. Thus, the filter can be used as self-tuning denoising tool. The proposed denoising structure can be of interest to the image processing community, as it is relatively fast and simple in implementation and can be applied in a straightforward way in many existing image enhancement frameworks.

5 Conclusions

In this paper a new method of mixed Gaussian and impulsive noise suppression in color digital images has been presented. The proposed filtering mechanism utilizes the novel reachability concept to determine the dissimilarity of pixels, which is used to estimate the impulsiveness of picture elements. In the proposed design, the pixel to patch similarity measure is used and combined with reachability concept to build a weighted average of pixels in a processing block. The experiments revealed that the new filter is robust to outliers, thus effectively removes the impulsive disturbances, while efficiently suppressing the Gaussian noise. Additionally, the proposed approach preserves details and enhances image edges. The reported results confirm the high efficiency of the elaborated filtering technique when enhancing color images degraded by high intensity mixed noise.

Additionally, we proposed a method of the estimation of mixed noise contamination intensity and designed a self-tuning filter, which is able to suppress the noise distortions without any adjustment of its parameters. Therefore, the described in this paper filtering approach can be of interest when the noise intensity is changing and no tuning of parameters is possible.

We also implemented our algorithm so that it can work on time series and performed many experiments, denoising one-dimensional signals. The obtained results are very promising and the investigation of the properties of the introduced framework might be addressed in future studies.