
# gradient of the second order TV mid point model

For data $x\colon\Grid\to\M$ on a $m$-dimensional grid $\Grid$ this function returns the gradient $\gradM F$ of the first and second order total variation additive mid point model. The model is explained here and was developed in [1]. Since the model consists of the three terms

The gradient is given by the gradient of the squared distance, the gradient of total variation, and the gradient of second order total variation, where this model uses the mid point formulation.

### 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 $(1)$
denotes the outer coupling of the differences

### Matlab Documentation

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
% d(x,f)^2 + alpha*TV(x) + beta*TV2(x), where TV(x) is d(x_i,x_i+1) and
% the second order terms are given by ||log_x_i x_i-1 + log_x_i x_i+1 ||
%
% INPUT
%    M : a manifold
%    f : given (original) data
%    x : value to take the gradient at
%    alpha : weight of TV
%    beta : weight of TV2
%
% OPTIONAL
%   'p       : (p=1) compute TV with p-norm coupling in the dimensions of the
%             data, i.e. anisotropic TV for p=1 and isotropic for p=2
%  epsilon   : compute the gradient of the epsilon-relaxed TV
% ---
% MVIRT - R. Bergmann, 2017-12-07