---
author:
- |
    A Lanza$^{\rm a}$, S. Morigi$^{\rm a}$, M. Pragliola$^{\rm a}$ and F. Sgallari$^{\rm a}$\
    $^{a}$[*[Department of Mathematics, University of Bologna, Piazza di Porta San Donato 5, Bologna, IT]{}*]{}
title:
- Overcomplete
- 'Space-variant TV regularization for image restoration'
---

Introduction {#sec:intro}
============

During the image acquisition and transmission processes, degradation effects such as those due to blur and noise always occur. The goal of *image restoration* is to eliminate these unwanted effects and to recover *clean* images from the acquired blurred and noisy ones. We consider grayscale images with rectangular $\,d_1 \!{\times}\, d_2$ domain, such that is the total number of pixels in the images. The general discrete model of the image degradation process under blur and noise corruptions can be written as $$g \:\;{=}\;\: \mathcal{N}\left( K u \right) \: ,
\label{eq:GDM}$$ where $u, g \in \mathbb{R}^{n}$ represent vectorized forms of the unknown clean image and of the observed corrupted image, respectively, $K \in {\mathbb{R}}^{n \times n}$ is a known linear blurring operator and $\mathcal{N}(\,\cdot\,)$ denotes the noise corruption operator, which in most cases is of random nature. Given $K$ and $g$, the goal of image restoration is to solve the ill-conditioned - or even singular, depending on $K$ - inverse problem of recovering an as accurate as possible estimate $u^*$ of the unknown clean image $u$.

In this paper, we are interested in two important types of noise, namely the additive (zero-mean) white Gaussian noise (AWGN) which typically appears, e.g., in Magnetic Resonance Tomography, and the impulsive salt and pepper noise (SPN) usually due to transmission errors or malfunctioning pixel elements in camera sensors. Denoting by $\Omega := \{1,\ldots,n\}$ the set of all pixel positions in the images, for these two kinds of noise the general degradation model in (\[eq:GDM\]) reads as $$\begin{array}{ccc}
\mathrm{AWGN:} & \quad\;\; & \mathrm{SPN:} \vspace{0.1cm} \\
g_i \:\;{=}\;\: (K u)_i \;{+}\; n_i \;\;\: \forall \, i \in \Omega \, , & &
g_{i} \:\;{=}\;\: \left\{
\begin{array}{ll}
(K u)_i \;\; & \mathrm{for} \;\;\: i \in \Omega_0 \subseteq \Omega\\
n_i \in \{0,1\}          & \mathrm{for} \;\;\: i \in {\Omega_1} :=\Omega \setminus \Omega_0
\end{array} \right. \, .
\end{array}
\label{eq:SDM}$$ For what concerns AWGN, the additive corruptions $n_i \in {\mathbb{R}}$, $i \in \Omega$, represent independent realizations from the same univariate Gaussian distribution with zero mean and standard deviation $\sigma$. In the case of SPN, only a subset $\Omega_1$ of the pixels is corrupted by noise, whereas the complementary subset $\Omega_0$ is noise-free. In particular, the corrupted pixels can take only the two possible extreme values $\{0,1\}$ (we assume that images have range $[0,1]$), with the same probability. The subset $\Omega_1$ is known in some applications [@Serena17] or it could be estimated [@mila]. Just like AWGN is fully characterized from a probabilistic point of view by the unique scalar parameter $\,\sigma$, SPN is characterized by the parameter $\gamma \in [0,1]$ which represents the probability for a pixel to be noise-corrupted. The class of *variational* methods for image restoration relies on determining restored images $u^*\in{\mathbb{R}}^n$ as the minimizers of suitable cost functionals $J: {\mathbb{R}}^n \to {\mathbb{R}}$ such that, typically, restoration is casted as an optimization problem of the form $$u^* \:\;{\leftarrow}\;\: \arg \min_{u \in {\mathbb{R}}^n}
\left\{ \,
J(u) \;{:=}\; R(u) \;{+}\; \mu \, F(u;g)
\, \right\}
\, ,
\label{eq:GVM}$$ where the functionals $R(u)$ and $F(u;g)$, commonly referred to as the *regularization* and the *fidelity* term, encode prior information on the clean image $u$ and on the observation model (\[eq:GDM\]), respectively, with the so-called regularization parameter $\mu > 0$ controlling the trade-off between the two terms. In particular, the functional form of the fidelity term is strictly connected to the characteristics of the noise corruption.

It is well known that AWGN and SPN are suitably dealt with the so-called L$_2$ and L$_1$ fidelity terms, which are related to the $\ell_2$ and $\ell_1$ norm of the residue image $Ku-g$, respectively; in formulas: $$F(u;g) \,\;{=}\;\, \mathrm{L}_q(u;g) \,\;{:=}\;\, \frac{1}{q} \, \| K u - g \|_q^q ,
\quad q \in \{1,2\} \, .
\label{eq:Lq}$$ For what regards the regularization term in (\[eq:GVM\]), a very popular choice is represented by the Total Variation semi-norm, that is $$R(u) \:\;{=}\;\: \mathrm{TV}(u) \,\;{:=}\; \sum_{i=1}^{n}  \| (\nabla u)_{i} \|_2 \, ,
\label{eq:TV}$$ where $(\nabla u)_i = \big( (D_h u)_i , (D_v u)_i \big)^T \in {\mathbb{R}}^2$ denotes the discrete gradient of image $u$ at pixel $i$, with $D_h,D_v \in {\mathbb{R}}^{n \times n}$ linear operators representing finite difference discretizations of the first-order horizontal and vertical partial derivatives, respectively. Popularity of TV regularizer for image restoration is mainly due to two facts, namely (a) it is convex and (b) it allows for restored images with sharp, neat edges. By substituting the TV regularizer (\[eq:TV\]) and the L$_2$ or L$_1$ fidelity terms (\[eq:Lq\]) for $R$ and $F$ in (\[eq:GVM\]), respectively, one obtains the so-called TV-L$_2$ [@ROF] - or ROF - and TV-L$_1$ [@tvl1] restoration models; in formulas: $$u^* \:\;{\leftarrow}\;\: \arg \min_{u \in {\mathbb{R}}^n}
\left\{ \,
\mathrm{TV}(u) \,\;{+}\;\, \mu \, \mathrm{L}_q(u;g)
\, \right\} ,
\quad q \in \{1,2\} \, .
\label{eq:TVLq}$$ The TV-L$_2$ and TV-L$_1$ models in (\[eq:TVLq\]) are non-smooth convex and allows to obtain good quality restorations of images corrupted by AWGN and SPN, respectively, such that they are regarded as sort of baseline models. The goal of this paper is to devise two new variational models which are able to outperform the TV-L$_2$ and models, in particular by designing a new, better performing regularizer, and also to propose an efficient minimization algorithm for the solution of these models based on the Alternating Direction Method of Multipliers (ADMM) strategy [@BOYD_ADMM].

The two proposed models are as follows: $$u^* \:\;{\leftarrow}\;\: \arg \min_{u \in {\mathbb{R}}^n}
\left\{ \,
\mathrm{TV}_p^{\mathrm{sv}}(u) \,\;{+}\;\, \mu \, \mathrm{L}_q(u;g)
\, \right\} ,
\quad q \in \{1,2\} \, ,
\label{eq:PMa}$$ where the new TV$_p^{\mathrm{sv}}$ regularizer is defined with a space-variant $p$-value by $$\mathrm{TV}_p^{\mathrm{sv}}(u) \,\;{:=}\; \sum_{i=1}^{n}  \| (\nabla u)_{i} \|_2^{p_i} ,
\quad p_i \:{\in}\; ]0,2] \;\; \forall \, i \in \Omega \, .
\label{eq:PMb}$$ A different value $p_i$ for each pixel $i\,$ is thus allowed by the proposed regularizer (\[eq:PMb\]), such that local, space-variant properties of the clean image $u$ can be potentially addressed. The usefulness of this great flexibility is however conditioned to the existence of effective procedures for the automatic estimation of the $p_i$ values. As it will be discussed in the paper, the algorithm used in [@tvpl2] for estimating a unique, global $p$ value is not sufficiently robust to be used for inferring our local $p_i$ values. Hence, in the paper we also propose a new suitable estimation procedure of the $p_i$ values based on the statistical inference technique described in [@shape2]. The regularization term in (\[eq:PMb\]) is a space-variant version of the TV$_p$ regularizer proposed in  [@tvpl2] where the estimation of a global fixed $p$-value relied on the gradient magnitudes of the image and such a distribution is in general too *rigid* for effectively modeling the actual gradient magnitudes distribution of real images. In the proposed model (\[eq:PMa\])–(\[eq:PMb\]) with $q = 2$, we also set automatically the regularization parameter $\mu$ based on the well-known discrepancy principle [@WC12].

The paper is organized as follows. In Sect. \[sec:pi\] we briefly outline the procedure proposed for the automatic estimation of the $p_i$ parameters. The ADDM-based minimization algorithm is illustrated in Sect. \[sec:admm\] and numerical results are reported in Sect. \[sec:nr\].

Estimation of the space-variant parameters {#sec:pi}
==========================================

The method proposed in [@tvpl2] for estimating a global, image-based $p$ value requires a very large number of samples in order to provide statistically reliable estimates, therefore it could not be generalized to our proposal since we use small size patches for the estimation of local $p$ values. In the following we briefly outline our proposal based on the statistical inference procedure illustrated in [@shape2].

Let $u \in {\mathbb{R}}^n$ be the vectorized form of an image for which we want to estimate the associated vector of space-variant parameters $p_i$, $i \in \Omega$. First, we compute the vector $m \in {\mathbb{R}}^n$ containing the magnitudes of the gradients of the image $u$; in formulas: $$m_i \;{:=}\; \left\| (\nabla u)_{i} \right\|_2, \quad\; i \in \Omega \, .
\label{eq:m}$$ Then, we estimate each parameter $p_i$ by applying the statistical inference technique in [@shape2] to the local data set consisting of the computed gradient magnitudes in a neighborhood of the pixel $i$. In particular, we use square neighborhoods $N_{\,i}^{\,s}$ of size $s \in \{3,5,\ldots\}$ centered at pixel $i \in \Omega$. Following [@shape2], the values $p_i$, $i \in \Omega$, parameters of the Generalized Gaussian Distributions, are estimated as follows: $$p_i \,\;{=}\;\, h^{-1}(\rho_i), \quad\;
\rho_i \,\;{=}\;\;
\mathrm{card}\big(N_{\,i}^{\,s}\big) \,
\bigg( \sum_{j \in N_{\,i}^{\,s}} \! m_j^2 \bigg)
\, / \,
\bigg( \sum_{j \in N_{\,i}^{\,s}} \! | m_j | \bigg)^{\!\!2} ,
\quad i \in \Omega \, ,
\label{eq:pi_est}$$ where $\mathrm{card}(A)$ denotes the cardinality of set $A$ and where the function $h: {\mathbb{R}}_+^* \to {\mathbb{R}}_+^*$, referred to as the *generalized Gaussian ratio function* in [@shape2], is defined by $$h(z) \,\;{=}\;\, \big( \Gamma(1/z) \,\, \Gamma(3/z) \big) \, / \, \big( \Gamma^2(2/z) \big) \, , \label{eq:h}$$ with $\Gamma(\,\cdot\,)$ indicating the Gamma function [@Gamma]. The function $h$ in (\[eq:h\]) is continuous, monotonically decreasing and surjective, hence invertible. Moreover, since $h$ is not data-dependent, its inverse $h^{-1}$, representing the values $p_{i}$, can be pre-computed off-line and stored as a lookup-table, restricted to $(0,2]$, such that at run-time the final step of the estimation in (\[eq:pi\_est\]) can be carried out very efficiently. In the maps of local $p$ values, obtained with neighborhoods of size $s=3$ (b) and $s=11$ (c) starting from the original test image `geometric` (a) are shown. Both maps are scaled in the same range for visual comparison. As the size $s$ increases, we acquire different kind of details, but in any case the method associates very low $p$ values with flat regions and higher values with edges. It is worth remarking that in Sect. \[sec:nr\] numerical experiments have been carried out by computing the $p$-map starting from the corrupted images.

  --------------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------------------------------------
   ![Original test image `geometric` (a), $p$-map for $s=3$ (b) and $s=11$ (c).[]{data-label="fig:map"}](output/geom_true.eps "fig:"){width="1.2in"}   ![Original test image `geometric` (a), $p$-map for $s=3$ (b) and $s=11$ (c).[]{data-label="fig:map"}](output/geotruenew_map1.eps "fig:"){width="1.2in"}   ![Original test image `geometric` (a), $p$-map for $s=3$ (b) and $s=11$ (c).[]{data-label="fig:map"}](output/geotrue_map5.eps "fig:"){width="1.2in"}
                                                                          (a)                                                                                                                                                    (b)                                                                                                                                                     (c)
  --------------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------------------------------------

Applying ADMM to the proposed model {#sec:admm}
===================================

In this section, we illustrate the ADMM-based iterative algorithm used to numerically solve the proposed model (\[eq:PMa\])–(\[eq:PMb\]) for both cases $q = 2$ and $q = 1$. To this purpose, first we resort to the variable splitting technique [@VAR_SPL1] and introduce two auxiliary variables $r \in V$ and $t \in Q$, with $V :={\mathbb{R}}^n$, $Q := {\mathbb{R}}^{2n}$, such that model (\[eq:PMa\])–(\[eq:PMb\]) is rewritten in the following equivalent constrained form: $$\begin{aligned}
\{ \, u^*,r^*,t^* \}
\:\;{\leftarrow}\;\:
\mathrm{arg}
\min_{u,r,t}
&\:&\bigg\{ \:
\sum_{i = 1}^{n} \| t_i \|_2^{p_i}
\;{+}\;
(\mu / q) \, \| r \|_q^q
\: \bigg\} ,
\quad  q \in \{1,2\} \, ,
\label{eq:PM_ADMM_a} \vspace {0.2cm} \\
\mathrm{subject}\:\mathrm{to:}
&& \; r \;{=}\; K u - g \, , \;\: t \;{=}\; D u \, ,
\label{eq:PM_ADMM_b}\end{aligned}$$ where $D := (D_h^T,D_v^T)^T \in {\mathbb{R}}^{2n \times n}$ and $t_i \:{:=}\: \big( (D_h u)_i \,,\, (D_v u)_i \big)^T \in {\mathbb{R}}^2$ represents the discrete gradient of image $u$ at pixel $i$. To solve problem (\[eq:PM\_ADMM\_a\])–(\[eq:PM\_ADMM\_b\]) by ADMM [@BOYD_ADMM], we define the augmented Lagrangian functional $$\begin{aligned}
\mathcal{L}(u,r,t;\lambda_r,\lambda_t)
&\;\;{=}\;\;&
\displaystyle{
    \sum_{i = 1}^{n} \| t_i \|_2^{p_i}
    \;{+}\;
    (\mu / q) \, \| r \|_q^q
    \,{-}\; \langle \, \lambda_t , t - D u \, \rangle
    \;{+}\;
    (\beta_t / 2) \: \| t - D u \|_2^2
} \nonumber \\
&&\displaystyle{
    {-}\; \langle \, \lambda_r , r - (Ku-g) \, \rangle
    \,\;\;{+}\;
        (\beta_r / 2) \, \| \, r - (Ku-g) \|_2^2 \, ,
}
\label{eq:PM_AL}\end{aligned}$$ where $\beta_r, \beta_t > 0$ are scalar penalty parameters and $\lambda_r \in V$, $\lambda_t \in Q$ are the vectors of Lagrange multipliers associated with the linear constraints $r = Ku-g$ and $t = Du$ in (\[eq:PM\_ADMM\_b\]), respectively. Given the previously computed (or initialized for $k = 0$) vectors $u^{(k)}$, $\lambda_r^{(k)}$ and $\lambda_t^{(k)}$, the $k$-th iteration of the proposed ADMM-based iterative scheme applied to the solution of the saddle-point problem associated with the augmented Lagrangian in (\[eq:PM\_AL\]) - minimization for the primal variables $u,r,t$, maximization for the dual variables $\lambda_r,\lambda_t$ - reads as follows: $$\begin{aligned}
&
r^{(k+1)} &
\;{\leftarrow}\;\;\,\,
\mathrm{arg} \: \min_{r \in V} \;
\mathcal{L}(u^{(k)},r,t^{(k)};\lambda_r^{(k)},\lambda_t^{(k)}) \, ,
\label{eq:PM_ADMM_r} \\
&
t^{(k+1)} &
\;{\leftarrow}\;\;\,\,
\mathrm{arg} \: \min_{t \in Q} \;
\mathcal{L}(u^{(k)},r^{(k+1)},t;\lambda_r^{(k)},\lambda_t^{(k)}) \, ,
\label{eq:PM_ADMM_t} \\
&
u^{(k+1)} &
\;{\leftarrow}\;\;\,\,
\mathrm{arg} \: \min_{u \in V} \;
\mathcal{L}(u,r^{(k+1)},t^{(k+1)};\lambda_r^{(k)},\lambda_t^{(k)}) \, ,
\label{eq:PM_ADMM_u} \\
&
\lambda_r^{(k+1)} &
\;{\leftarrow}\;\;\,\,
\lambda_r^{(k)} \;{-}\; \beta_r \, \big( \, r^{(k+1)} \;{-}\; (K u^{(k+1)}-g) \, \big) \, ,
\label{eq:PM_ADMM_lz} \\
&
\lambda_t^{(k+1)} &
\;{\leftarrow}\;\;\,\,
\lambda_t^{(k)} \;{-}\; \beta_t \, \big( \, t^{(k+1)} \;{-}\; D u^{(k+1)} \, \big) \, .
\label{eq:PM_ADMM_lt}\end{aligned}$$ In the following we describe how to solve the minimization sub-problem (\[eq:PM\_ADMM\_r\]) - in both cases $q \in \{1,2\}$ - for the primal variable $r$ only. In fact, thanks to the preliminary ADMM variable splitting procedure, sub-problems (\[eq:PM\_ADMM\_t\])–(\[eq:PM\_ADMM\_u\]) for the variables $t$ and $u$ are identical in the two cases $q \in \{1,2\}$ and, more importantly, their solution can be obtained based on formulas given in [@tvpl2] for the same sub-problems.

#### Solving the sub-problem for $\mathbf{r}$

Recalling definition (\[eq:PM\_AL\]) and carrying out some simple algebraic manipulations, the minimization sub-problem (\[eq:PM\_ADMM\_r\]) reads as $$\begin{aligned}
r^{(k+1)}
&\;{\leftarrow}\;&
\mathrm{arg} \min_{r \in V}\:
\left\{ \,
(\mu / q) \, \| r \|_q^q
\;{+}\;
(\beta_r/2) \,
\| r - v^{(k)} \|_2^2
\: \right\} \, , 
\quad  q \in \{1,2\} \, ,
\label{eq:sub_r_q12}\end{aligned}$$ with the constant (w.r.t. the optimization variable $r$) vector $v^{(k)} \in V$ given by $$v^{(k)} \;{=}\;\: Ku^{(k)} - g + \, \lambda_r^{(k)} / \beta_r \; .
\label{eq:v_def}$$ Since $\mu \geq 0$, $\beta_r>0$, in both cases $q \in \{1,2\}$ the cost function in (\[eq:sub\_r\_q12\]) is strictly convex and its (unique) global minimizer - that is, the solution $r^{(k+1)}$ of (\[eq:sub\_r\_q12\]) - can be computed, depending on $q$, by means of the following closed-form formulas: $$\begin{aligned}
\mathrm{case}\;\;q \;{=}\; 1 \, : \qquad\!
r^{(k+1)}
&\;{=}\;&
\mathrm{sign}\big( v^{(k)} \big) \, \odot \,\,
\max\big\{ \, |v^{(k)}| - \mu / \beta_r \, , \, 0 \, \big\} \: ,
\label{eq:sub_r_q1_sol} \\
\mathrm{case}\;\;q \;{=}\; 2 \, : \qquad\!
r^{(k+1)}
&\;{=}\;&
\big(\beta_r / (\beta_r+\mu)\big) \, v^{(k)} \: ,
\label{eq:sub_r_q2_sol}\end{aligned}$$ where $\mathrm{sign}(\,\cdot\,)$ and $| \, \cdot \, |$ in (\[eq:sub\_r\_q1\_sol\]) denote the component-wise signum and absolute value functions and $\,\odot$ indicates the component-wise vectors product. We remark that formula (\[eq:sub\_r\_q1\_sol\]) represents a well-known component-wise soft-thresholding operator - see e.g. [@tvl1] - whereas (\[eq:sub\_r\_q2\_sol\]) comes easily from first-order optimality conditions of (\[eq:sub\_r\_q12\]).

In case that the regularization parameter $\mu$ is regarded as a constant - that is, it is fixed a priori - then formulas (\[eq:sub\_r\_q1\_sol\])–(\[eq:sub\_r\_q2\_sol\]) allow to determine very efficiently the solution $r^{(k+1)}$ of this sub-problem. However, as previously stated, in the case $q = 2$ we aim also at automatically adjusting $\mu$ along iterations - that is, $\mu$ becomes $\mu^{(k)}$ - such that the final solution $u^*$ of our model (\[eq:PMa\])–(\[eq:PMb\]) satisfies the discrepancy principle [@WC12]. To this aim, in the following we propose a procedure which builds upon those presented in [@APE; @JMIV16] but, due to a different ADMM initial variable splitting, needs to be adapted and is worth to be outlined in detail. We consider the discrepancy associated with the solution $r^{(k+1)}$ in (\[eq:sub\_r\_q2\_sol\]) as a function $\delta^{(k+1)}: {\mathbb{R}}_+ \rightarrow {\mathbb{R}}_+$ of the regularization parameter $\mu$: $$\delta^{(k+1)}(\mu)
\,\;{:=}\;\,
\| r^{(k+1)} \|_2
\;{=}\;\:
\big(\beta_r / (\beta_r+\mu)\big) \, \| \, v^{(k)} \|_2 \; ,
\label{eq:d_und}$$ where the second equality comes from (\[eq:sub\_r\_q2\_sol\]). The discrepancy function in (\[eq:d\_und\]) is continuous, non-negative and monotonically decreasing over its entire domain and at the extremes we have $\delta^{(k+1)}(\mu=0) = \| \, v^{(k)} \|_2$, $\delta^{(k+1)}(\mu \to +\infty) = 0$. In order to set a value $\mu^{(k+1)}$ such that the discrepancy principle is satisfied here for the auxiliary variable $r$ (recall that $r=Ku-g$ represents the residue of the restoration), we consider two complementary cases based on the norm of the vector $v^{(k)}$ in (\[eq:v\_def\]).

In case that $\,\| \, v^{(k)} \|_2 \leq \bar{\delta}$, with $\bar{\delta}$ denoting the noise level, then from (\[eq:d\_und\]) and from the fact that $\,0 < \beta_r / (\beta_r + \mu) \leq 1$, it follows that $\,\delta^{(k+1)}(\mu) \;{\leq}\; \bar{\delta} \;\: \forall \, \mu \in {\mathbb{R}}_+$, that is the discrepancy principle is satisfied for any $\mu \geq 0$. We set $\mu^{(k+1)} = 0$, such that, according to (\[eq:sub\_r\_q2\_sol\]), the sub-problem solution is $r^{(k+1)} = v^{(k)}$. In case that $\,\| \, v^{(k)} \|_2 > \bar{\delta}$, the properties of the discrepancy function $\delta^{(k+1)}$ in (\[eq:d\_und\]) guarantee that there exists a unique value $\mu^{(k+1)}$ of $\,\mu$ such that $\delta^{(k+1)}(\mu^{(k+1)}) = \bar{\delta}$. Recalling (\[eq:d\_und\]), we have $\big(\beta_r / (\beta_r+\mu^{(k+1)})\big) \| \, v^{(k)} \|_2 \;{=}\; \bar{\delta}
\:\;\;\;{\Longleftrightarrow}\;\;\;
\mu^{(k+1)} = \beta_r \big(\, \| \, v^{(k)} \|_2 / \bar{\delta} \:\;{-}\; 1 \,\big)$. Replacing this expression for $\mu$ in (\[eq:sub\_r\_q2\_sol\]), the sub-problem solution is $\,r^{(k+1)} \;{=}\;\: \bar{\delta} \, v^{(k)} / \| \, v^{(k)} \|_2$. To summarize, the solution of this sub-problem at any iteration $k$ is computed by (\[eq:sub\_r\_q1\_sol\]) for the case $q = 1$ whereas for the case $q = 2$ it is determined as follows: $$\begin{array}{llll}
\| \, v^{(k)} \|_2 \;{\leq}\; \bar{\delta} &
\;\Longrightarrow\; &
\mu^{(k+1)} \;{=}\; 0 , & 
\;\; r^{(k+1)} \;{=}\; v^{(k)} \vspace{0.2cm} \\
\| \, v^{(k)} \|_2 \;{>}\; \bar{\delta} &
\;\Longrightarrow\; &
\mu^{(k+1)} \;{=}\; \beta_r \big( \| \, v^{(k)} \|_2 / \bar{\delta} - 1 \big) , &
\;\; r^{(k+1)} \;{=}\; \bar{\delta} \,\, v^{(k)} / \| \, v^{(k)} \|_2
\end{array}
\label{eq:sub_r_q2_q2_sol}$$

Numerical results {#sec:nr}
=================

In this section, we evaluate experimentally the performance of the two proposed models TV$_p^{\mathrm{sv}}$-L$_q$, $q = 1,2$, defined in (\[eq:PMa\])–(\[eq:PMb\]), when applied to the restoration of gray-scale images synthetically corrupted by blur and by AWGN - in the case of TV$_p^{\mathrm{sv}}$-L$_2$ model - or SPN - in the case of TV$_p^{\mathrm{sv}}$-L$_1$ model. In particular, the proposed models are compared with:

-   TV-L$_q$, $q = 1,2$, defined in (\[eq:TVLq\]) with $p=1$ fixed,

-   TV$_p$-L$_q$, $q = 1,2$, with $p \in (0,2]$ fixed.

We remark that the TV$_p$-L$_2$ model has been introduced in [@tvpl2], whereas the TV$_p$-L$_1$ model has not been proposed before and can be regarded as a further contribution of this paper, together with the automatic selection procedure for the space-variant $p$ parameters. For what concerns the TV$_p^{\mathrm{sv}}$-L$_1$ model in order to have a robust evaluation of the $p$-map, the image is preliminarily processed by an adaptive filter. We assume that the position of the pixels corrupted by the SPN is known a priori, otherwise it can be easily detected as suggested in [@mila]. We replace the corrupted pixels with the mean of non-corrupted pixels of its neighborhood. The size of the neighborhood is variable and depends on the percentage of non-corrupted pixels in it. The image obtained is then used to compute the $p$-map. The described strategy has been introduced instead of the simple median filter, whose smoothing effects is quite high. The quality of the observed corrupted images $g$ and of the restored images $u^*$ is measured - in dB - by means of the Blurred Signal-to-Noise Ratio $$\;\mathrm{BSNR}(g,u) = 10\log_{10}\|Ku - E\,[Ku]\|_2^2 / \|g-Ku\|_2^2$$ and the Improved Signal-to-Noise Ratio $$\mathrm{ISNR}(g,u,u^*) = 10\log_{10}\|g-u\|_2^2 / \|u^*-u\|_2^2,$$ respectively, with $u$ denoting the original uncorrupted image and $E\,[Ku]$ the average intensity of image $Ku$. In general, the larger the ISNR value, the higher the quality of restoration. For all the ADMM-based minimization algorithms and for all the tests, the parameters $\beta_t$ and $\beta_r$ are suitably set. Usually good choices are $(\beta_t, \beta_r)=(1,1),(10,5)$. The iterations of the algorithms are stopped as soon as two successive iterates satisfy $\;\| u^{(k)} - u^{(k-1)} \|_{2} / \| u^{(k-1)}\|_{2} \,\;{<}\;\,10^{-4}$. For the models with the L$_2$ fidelity term, the regularization parameter $\mu$ has been automatically set based on the discrepancy principle. For the models with the L$_1$ fidelity term, $\mu$ has been hand-tuned independently in each test so as to provide the highest possible ISNR value for that test. In the following, we report numerical results concerning the restoration of images corrupted by AWGN (Example 1) and SPN (Example 2).

#### Example 1: restoration of images corrupted by AWGN

In this subsection we are testing the performance of TV$_p^{\mathrm{sv}}$-L$_2$ on piecewise constant (`geometric` ($256 \times 256$) Fig. \[fig:geomand\](a)) and textured images (`mandrill` ($512 \times 512$) Fig. \[fig:geomand\](c)) with different noise levels. In Table 1 the results are compared in terms of ISNR with the ones obtained by TV-L$_2$ and TV$_{p}$-L$_2$. Both `geometric` and `mandrill` images have been corrupted by a Gaussian blur of `band=5` and standard deviation `sigma=1.0`, and by an AWGN, with BSNR=20,30,40. The $p$-maps have been computed by setting the size of the neighborhoods $s=3$. The good quality of the reconstructed images can be appreciated by a visual inspection of Fig. \[fig:geomand\](b),(d) and by comparing the ISNR values reported in Table 1.

  ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
   ![Example 1: Corrupted `geometric` (a) and `mandrill` (c) images and reconstructions ((b),(d)) by TV$_p^{\mathrm{sv}}$-L$_2$ for BSNR=20.[]{data-label="fig:geomand"}](output/bsnr20_blur.eps "fig:"){width="1.2in"}   ![Example 1: Corrupted `geometric` (a) and `mandrill` (c) images and reconstructions ((b),(d)) by TV$_p^{\mathrm{sv}}$-L$_2$ for BSNR=20.[]{data-label="fig:geomand"}](output/bsnr20_tvpl2loc.eps "fig:"){width="1.2in"}   ![Example 1: Corrupted `geometric` (a) and `mandrill` (c) images and reconstructions ((b),(d)) by TV$_p^{\mathrm{sv}}$-L$_2$ for BSNR=20.[]{data-label="fig:geomand"}](output/bsnr20_mand.eps "fig:"){width="1.2in"}   ![Example 1: Corrupted `geometric` (a) and `mandrill` (c) images and reconstructions ((b),(d)) by TV$_p^{\mathrm{sv}}$-L$_2$ for BSNR=20.[]{data-label="fig:geomand"}](output/bsnr20_tvpl2locmand "fig:"){width="1.2in"}
                                                                                                           (a)                                                                                                                                                                                                                      (b)                                                                                                                                                                                                                      (c)                                                                                                                                                                                                                      (d)
  ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

  -- -- ------------------------------------------------------------------------------------------------------------------------- -- -- -- --
        **[geometric]{} & & & **[mandrill]{}\                                                                                              
        BSNR & TV-L$_2$ & TV$_{p}$-L$_2$ & TV$_p^{\mathrm{sv}}$-L$_2$ & TV-L$_2$ & TV$_{p}$-L$_2$ & TV$_p^{\mathrm{sv}}$-L$_2$\            
        20 & 7.77 & 7.92 & 8.36 & 1.38 & 1.64 &1.78\                                                                                       
        30 & 9.01 & 9.87 & 10.30 & 2.90 & 3.04 &3.31\                                                                                      
        40 & 11.58 & 12.98 & 13.47 & 5.32 & 5.56 &6.09\                                                                                    
        ****                                                                                                                               
  -- -- ------------------------------------------------------------------------------------------------------------------------- -- -- -- --

  : Example 1: ISNR values for different models with different noise level (BSNR) on test images.[]{data-label="tab:1"}

#### Example 2: restoration of images corrupted by SPN

In this subsection we report the performance of TV$_p^{\mathrm{sv}}$-L$_1$ on a $200 \times 200$ medical image representing a particular of a CT scan of an abdomen - see Fig. \[fig:med2\](a). It has been corrupted by a SPN of level $\gamma = 0.35$ and by a Gaussian blur of `band=9` and `sigma=2.5` (Fig. \[fig:med2\] (b)). The $p$-map in Fig.\[fig:med2\](c), computed by setting the size of the neighborhood `s=25`, presents higher values in the textured regions. A comparison of the methods TV-L$_1$, TV$_p$-L$_1$, TV$_p^{\mathrm{sv}}$-L$_1$ leads to ISNR=$11.81,12.97,13.60$, respectively. The quality of the reconstructed images can be visually appreciated in Fig. \[fig:med2\](d),(e),(f).

  ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
   ![Example 2: Original image (a), corrupted image (b), $p$-map (c), reconstruction by TV-L$_1$ (d), TV$_p$-L$_1$ ($p=1.4$) (e), and TV$_p^{\mathrm{sv}}$-L$_1$ (f).[]{data-label="fig:med2"}](output/NLDIF_original.eps "fig:"){width="1.2in"}   ![Example 2: Original image (a), corrupted image (b), $p$-map (c), reconstruction by TV-L$_1$ (d), TV$_p$-L$_1$ ($p=1.4$) (e), and TV$_p^{\mathrm{sv}}$-L$_1$ (f).[]{data-label="fig:med2"}](output/nldif_corr.eps "fig:"){width="1.2in"}    ![Example 2: Original image (a), corrupted image (b), $p$-map (c), reconstruction by TV-L$_1$ (d), TV$_p$-L$_1$ ($p=1.4$) (e), and TV$_p^{\mathrm{sv}}$-L$_1$ (f).[]{data-label="fig:med2"}](output/med_mapnew.eps "fig:"){width="1.2in"}
                                                                                                                        (a)                                                                                                                                                                                                                                           (b)                                                                                                                                                                                                                                          (c)
      ![Example 2: Original image (a), corrupted image (b), $p$-map (c), reconstruction by TV-L$_1$ (d), TV$_p$-L$_1$ ($p=1.4$) (e), and TV$_p^{\mathrm{sv}}$-L$_1$ (f).[]{data-label="fig:med2"}](output/TVL1_rec.eps "fig:"){width="1.2in"}      ![Example 2: Original image (a), corrupted image (b), $p$-map (c), reconstruction by TV-L$_1$ (d), TV$_p$-L$_1$ ($p=1.4$) (e), and TV$_p^{\mathrm{sv}}$-L$_1$ (f).[]{data-label="fig:med2"}](output/TVpL1_rec1.eps "fig:"){width="1.2in"}   ![Example 2: Original image (a), corrupted image (b), $p$-map (c), reconstruction by TV-L$_1$ (d), TV$_p$-L$_1$ ($p=1.4$) (e), and TV$_p^{\mathrm{sv}}$-L$_1$ (f).[]{data-label="fig:med2"}](output/TVpL1loc_rec.eps "fig:"){width="1.2in"}
                                                                                                                        (d)                                                                                                                                                                                                                                           (e)                                                                                                                                                                                                                                          (f)
  ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Conclusions
===========

We have proposed two new variational models which are able to outperform the popular TV model for image restoration with L$_2$ and L$_1$ fidelity terms. In particular, we introduced the TV$_p^{SV}$ regularizer, a space-variant generalization of the popular TV prior, where the shape parameter $p$ is automatically and locally estimated by an effective procedure based on the statistical inference technique in [@shape2]. The restored image is efficiently computed by using an ADMM-based algorithm. Numerical examples show that the proposed approach is particularly effective and well suited for images corrupted by Gaussian blur and two important types of noise, the AWGN and SPN. As future work, we plan to extensively test our models on a new immunofluorescence portable diagnostic systems where low-cost complementary metal-oxide semiconductor (CMOS) sensors are used. In this system different noise sources affect a noise-free image acquired by the CMOS-based imaging system:the Photo-Response Non-Uniformity is usually modeled as an AWGN while the signal dependent Photon Shot Noise is more properly modeled as a Poisson noise and the Analog-to-Digital Converter noise as an SPN with known positions.
