Computes the total variation of second order from the mid point model. An absolute difference of second order for three points is modeled as the distance of to the nearest mid point of the geodesics connecting and .

Let denote the pixel grid the data is defined on and

the tupled of forward and backward neighbord and similarily

the set of backward neighbors. Then the second oder prior is given by

where with the set of mid points between , is the second order difference mid point model and similarily the mixed difference is given by .

Similar to the total variation prior this function can compute the isotropic second order TV, i.e. -norm coupling on all summands where is the base point, this can be relaxed by 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`

- relax the TV (especially for by replacing any distance by and for each inner sum (over ) is relaxed to avoid subgradients in constant areas.
`p`

- denotes the outer coupling of the differences
`weights`

for each item of- 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 is extended to .
`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
% gradient terms
% 'Sum' : (true) return a value (true) or a matrix of TV2 terms (false)
%
% OUTPUT
% d : TV_2(x)
% ---
% MVIRT | R. Bergmann | 2017-12-11