Keywords

1 Introduction

Image restoration problem, such as image denoising, is important interest in image processing. This problem aims to seek the restored image u(i) such that

$$\displaystyle f(i)=u(i)+\xi (i),$$

where f(i) is a degraded image corrupted by the noise perturbation \(\xi (i)\) at a pixel i which often considered the stationary Gaussian with zero mean and variance \(\sigma ^2\). The main goal is to recover an image corrupted by the noise with preserving edges, fine details and small scale structures such as textures. To handle this problem, recently various of a nonlocal methods have been proposed for image denoising based on small sub-images, named patches that take into account the redundancy in natural images, particularly in textured parts. The nonlocal means proposed by Buades et al. [6] is the first to introduce this approach as a generalization of the Yaroslavsky filter [23] and patch based methods. Besides, the transform-based BM3D filter by Dabov et al. [9] is efficient at dealing with smooth regions and textures. It also relies both on nonlocal (patches) and local characteristics which is a combination of classical filtering techniques of natural images. Motivated by the definition of nonlocal operators by Zhou and Schölkopf on discrete graphs [24], Gilboa and Osher later formalized a systematical study, especially by introducing nonlocal operators [13, 14]. Meanwhile nonlocal PDEs on graphs [4, 5, 10,11,12] has stared to attract attention from mathematical, machine learning, image processing by proposing a regularization framework on weighted graphs with similar operators in the discrete setting. In the general setup of nonlocal variational problems, it is more appropriate to consider the minimization problem to seek the restored image :

(1)

where J is the weight function, \(1< p < \infty \), \(\mu \) is a probability measure and \(\lambda \) is a fidelity parameter. Notice that the second integral in the functional is the fidelity term, it encourages the solution u(x) that is being close enough to approximate the noisy image f(x). While the first integral in the energy E(u) is the nonlinear nonlocal regularization term. functional associated to \(\frac{1}{p}\int _{\varOmega }|\nabla u(x)|^p d\mu (x) \). In case \(H(t)=\frac{t^2}{2}\), Kindermann et al. [3, 18] have proposed and studied the nonlocal p-Laplacian problems for deblurring and denoising images, which can be written as:

(2)

Recently, in [17], the authors proposed to combine the nonlocal p-Laplacian equation with the variable exponent [1, 8] that yields to use different diffusion types depending on each pixel in the image in oder to give a faster denoising process, which is written as follows:

(3)

In other hand, following up on Meyer’s ideas [19], many research [2, 15, 16, 21, 22] have showed the important role of the fidelity term. Furthermore, they came up with variants choices in the fidelity term by choosing weaker norms that helped for much better separation of the high frequency component of images, such as smaller details and texture.

The rest of this paper is structured as follows. In Sect. 2, we present the proposed model inspired and motived by the previous works. At last, Sect. 3 is devoted to numerical results and comparative experiments to improve our model.

2 Proposed Model

In the current work, our contribution is to use variants choices of function H in the fidelity term of the nonlocal p(x)-Laplacian model (3). Therefore, we set \(H(t)=\frac{t^q}{q}\) with \(1<q\le 2\) in order to choose a suitable fidelity term can have far reaching consequences as preserving textures and small details. The proposed model inherits the power of the variable exponent in reducing the execution time, besides, the benefit of the nonlocal approach and the weaker norm in preserving textures and small details which the minimization can be expressed as:

(4)

where \(K(x,y)=\frac{J(x,y)}{2p(x,y)}.\) Moreover, if u is the minimizer of the functional (4), then we have

(5)

Thus, we deduce that the minimization problem (4) is formally associated to Euler-Lagrange equation:

(6)

We deal with the following evolution problem (\(P_q\)) associated to the minimization (4):

with \(1<q\le 2\) and \(\displaystyle Q_T:= (0,T) \times \varOmega \).

3 Numerical Simulations

For the numerical experiments, we are interested to solve the evolution discrete problem which is associate with the continuous nonlocal problem (\(P_q\)). The following problem (\(P_q\)) is presented by taking the measure as the form \(\mu =\sum _{i \in Z^m} \delta _i\) where \(\delta _i\) is the dirac:

$$\begin{aligned} \left\{ \begin{array}{l l } \displaystyle u_t (t,i)=\sum _{ j} J(i,j) \,\left| { u (t,j)-u (t,i)} \right| ^{p(i,j)-2}(u (t,j)-u (t,i))\\ \qquad \qquad \qquad -\lambda \,\left| { u (t,j)-f(i)} \right| ^{q-2} \,(u(t,i)-f(i)), \\ \\ \displaystyle u(0,i)=f(i), \quad \text{ for } i \in Z^m. \end{array} \right. \end{aligned}$$
(7)

The function p is chosen as:

$$\displaystyle p(i,j)=\frac{p(i)+p(j)}{2} \quad \text{ with }\quad p(i)=1+\frac{1}{1+k|\nabla G_a*f|^2}, \displaystyle k>0, \displaystyle a>0,$$

the Gaussian kernel \(\displaystyle G_a\) and the weight function are respectively given by:

$$G_a(i)=\frac{1}{(4\pi a)^{\frac{N}{2}}}\exp \Big (- \frac{|i|^{2} }{4a}\Big ), \qquad \qquad \displaystyle J(i,j) =\exp \Big (-\frac{d(i,j)}{\rho ^2}\Big ),$$

where \(\displaystyle d(i,j)= \int _\varOmega G_a(z)|f(i+z)-f(j+z)|^2 dz\) is the distance between patches located at i and j, \(\rho \) is a positive constant which controls the similarity. The discrete iterative scheme of the problem (\(P_q\)) using the explicit Euler method is given by:

$$\begin{aligned} \left\{ \begin{array}{l l } \displaystyle \displaystyle \frac{u_i^{n+1}-u_i^{n}}{\tau }=\sum _{j\in \mathcal {N}_i}J_{ij} |u_j^n-u_i^n|^{p_{ij}-2}(u_j^n-u_i^n)-\lambda |u_j^n-f_i|^{q-2}(u_i^n-f_i), \\ \displaystyle u_i^0=f_i, \end{array} \right. \end{aligned}$$
(8)

where \( \mathcal {N}_i\) is the neighbors set and \(\tau \) is the time step sizer, \(u_i\) be the value of a pixel i in the image and \(J_{i,j}\) is the discrete version of the function J(ij).

Next we present the algorithm used to solve our proposed model.

figure a

For the numerical experiments, we set \(\lambda =0.05\), \(q=1.0001\) and the time step size \(\tau =0.5\). For computing the weight function, we choose a patches size of \(11\times 11\) (i.e. to the standard square window of size \(2P+1\) with \(P=5\)), a search window of \(21\times 21\) (i.e. to the standard square window of size \(2N_w+1\) with \(N_w = 10\)) and \(a=2\). To evaluate the quality of the restoration results of our model, we applied statistical measure:

  • The peak signal to noise ratio (PSNR) is used to measure the quality of the restoration results which is given as:

    $$ \displaystyle \text{ PSNR }=10 \log _{10}\Big [\frac{255^2 M N}{||u_0-u||^2_2}\Big ]dB,$$

    where \(u_0\), u and \(M\times N\) are the original image, the restored image and the size of the image, respectively.

  • The signal–to–noise ratio (SNR) is applied to qualify the restoration capacity of the method under consideration, and denoted by:

    $$ \displaystyle \text{ SNR }=\log _{10}\big [\frac{\sigma _u}{\sigma _n}\big ]dB,$$

    where \(\sigma _u\) and \(\sigma _n\) are the signal and noise standard deviations, respectively. In Fig. 1 our algorithm can denoise images contaminated by additive gaussian noise. Furthermore, the SNR and PSNR values of the noisy and restored images displayed in Table 1 confirm the performance of our model on denoising images.

Fig. 1.
figure 1

First row: images corrupted by Gaussian noise with zero mean and variance \(\sigma =25\). Second row: restored images with the model (\(P_q\)).

Table 1. PSNR and SNR values of noisy images and the restored ones displayed on Fig. 1.

To validate the ability of the model (\(P_q\)) to preserve the texture and small details, we compare the model (\(P_q\)) with the local Total variation with \(L^1\)-term fidelity (TVL1) studied by Chan and Esedoglu [7] and Nikolova [20] by choosing \(H(t)=t\). The Fig. 2 indicate that our method could raises the PSNR value compared with the local method. Then, we shall zoom the region containing the texture. Thus, the Fig. 3 confirm that our model is more robust than the local model in preserving texture and fine details.

Fig. 2.
figure 2

Left: noisy Barbara image with \(PSNR = 26.5609\), middle: restored image by TV model with \(L^1\)-fidelity term with \(PSNR = 28.3769\) and right: restored image by our model with \(PSNR = 32.1088\).

Fig. 3.
figure 3

Comparative experiment on zoomed region on Barbara image.

In the next experiment, we compare our model (\(P_q\)) with the nonlocal model with \(L^1\) in the fidelity term (NLL1) with \(H(t)=t\) in order to show the benefit of the exponent variable. We set an optimal value of PSNR as a stopping criteria (30.7654 for Barbara image) and we use the same parameters for both algorithms then we compare the results (cf. Fig. 4). After 110 iterations, our algorithm obtains the desired PSNR while the image resulting of the application of NLL1 is not yet denoised. The NLL1 model reaches the stopping criterion after 380 iterations (cf. Fig. 5). Besides, the execution time for NLL1 model is 164.5305 s while our algorithm takes only 48.7873 s. Table 2 shows that our algorithm takes less time to denoise different images compared to NLL1 model. Furthermore, we present the denoising error image which contains many less details (cf. Fig. 6). This proves the benefit of the variable exponent in regards to both computation time and quality.

Fig. 4.
figure 4

Left: noisy image (PSNR = 24.6126), middle: restored image by NLL1 (PSNR = 27.5385) and right: restored image by our model (PSNR = 30.7654).

Fig. 5.
figure 5

Left: noisy image (PSNR = 24.6126), middle: restored image by NLL1 (PSNR = 30.7654) and right: restored image by NLL1px (PSNR = 30.7654).

Table 2. CPU time and PSNR of our method and NLL1 method.
Fig. 6.
figure 6

From left to right: NLL1 denoising result and error and our model denoising result and error.

Table 3. Performance parameters PSNR and SNR for images with different q values.
Fig. 7.
figure 7

Restored Barbara image using our algorithm and different q values.

In the last test, we compare the model (P) with variants choices of q values that correspond to different models which replace the fidelity term with weaker norms when q is close enough to 1. We choose the same parameters for this comparison. Figures 7 proves that in case where q is close to 1 gives a better results in removing noise as well much better separation of the high frequency component of images, such as smaller details and texture compared with the p-Laplacian equation with \(L^2\)-term (\(q = 2\)).

4 Conclusion

This paper describes a variable exponent nonlocal p(x)-Laplacian model with weaker norm for image denoising. The proposed model, which is based on introducing a weaker norm as well on exploitation of the variable exponent, removes noise, preserves edges, handles better repetitive structures and textures in a reduced time.