$\DeclareMathOperator{\arccosh}{arccosh} \DeclareMathOperator*{\argmin}{arg\,min} \DeclareMathOperator{\Exp}{Exp} \newcommand{\geo}[2]{\gamma_{\overset{\frown}{#1,#2}}} \newcommand{\geoS}{\gamma} \newcommand{\geoD}[2]{\gamma_} \newcommand{\geoL}[2]{\gamma(#2; #1)} \newcommand{\gradM}{\nabla_{\M}} \newcommand{\gradMComp}[1]{\nabla_{\M,#1}} \newcommand{\Grid}{\mathcal G} \DeclareMathOperator{\Log}{Log} \newcommand{\M}{\mathcal M} \newcommand{\N}{\mathcal N} \newcommand{\mat}[1]{\mathbf{#1}} \DeclareMathOperator{\prox}{prox} \newcommand{\PT}[3]{\mathrm{PT}_{#1\to#2}#3} \newcommand{\R}{\mathbb R} \newcommand{\SPD}[1]{\mathcal{P}(#1)} \DeclareMathOperator{\Tr}{Tr} \newcommand{\tT}{\mathrm{T}} \newcommand{\vect}[1]{\mathbf{#1}}$

# The second order total variation prior from the mid point prior

Computes the total variation of second order from the mid point model. An absolute difference of second order for three points $x,y,z\in\M$ is modeled as the distance of $y$ to the nearest mid point $\geo{x}{z}(\tfrac{1}{2})$ of the geodesics connecting $x$ and $z$.

Let $\Grid = \{1,\ldots,n_1\}\times\{1,\ldots,n_2\}\times\cdots\times\{1,\ldots,n_m\}$ denote the pixel grid the data $x$ is defined on and

the tupled of forward and backward neighbord and similarily

the set of backward neighbors. Then the second oder $\mathrm{TV}_2$ prior is given by

where $d_2(x,y,z) = \min_{c\in\mathcal C_{x,z} } d_{\M}(c,y)$ with $\mathcal C_{x,z}$ the set of mid points between $x,z$, is the second order difference mid point model and similarily the mixed difference is given by $d_{1,1}(w,x,y,z) = \min_{c\in\mathcal C_{x,z},\tilde c\in\mathcal C_{w,y}} d_{\M}(c,\tilde c)$.

Similar to the total variation prior this function can compute the isotropic second order TV, i.e. $p=2$-norm coupling on all summands where $x_{\vect{k}}$ is the base point, this can be relaxed by $\varepsilon$ and instead of the whole sum, also the single terms per pixel can be returned. Finally, weights can be used to recude the effect of certain pixel or even exclude them from the model completely.

### Optional Parameters

epsilon $(0)$
relax the TV (especially for $p=1$ by replacing any distance by $\sqrt{ d^2(\cdot,\cdot)+\varepsilon^2 }$ and for $p>1$ each inner sum (over $N_{\vect{k}}$) is relaxed to avoid subgradients in constant areas.
p $(0)$
denotes the outer coupling of the differences
weights $(1)$ for each item of $x$
introduces a weight that is muliplied to any term, i.e. if weights is zero this the corresponding data item is ignored, i.e. an above term $d_2(x,y,z)$ is extended to $w_xw_yw_zd_2(x,y,z)$.
Sum (true)
setting this value to false ommits the outer sum and returns the TV value per pixel. This is used in the computation of the gradTV.

### Matlab Documentation

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
% proxTV(M,x,lambda) compute the second order TV mid point model value
%
% INPUT
%     M       : a manifold
%     x       : data (manifold-valued)
%
% OPTIONAL
%   'p'      : (p=1) compute TV2 with p-norm coupling in the dimensions of
%              the data, i.e. anisotropic TV2 for p=1 and isotropic for p=2
%  'epsilon' : compute the gradient of the epsilon-relaxed TV2
%  'weights' : (ones(dataDims) exclude certain data points from all
%  'Sum'     : (true) return a value (true) or a matrix of TV2 terms (false)
%
% OUTPUT
%   d          : TV_2(x)
% ---
% MVIRT | R. Bergmann | 2017-12-11