
# The CPP algorithm for first and second order TV

This algorithm computes the cyclic or randomized proximal point algorithm on a manifold $\M$ for the first and second order TV additive coupling functional. The functional consists of proxDistanceSquared, proxTV, and proxTV2. The functional to minimize reads for given (noisy or lossy) data $u\in\M^{\vect{n}}$$as where the data term is reduced to known data from $u\in\M^{\vect{n}}$ for the lossy case. The weighghts $\alpha,\beta>0$ can be also given as vectors for the dimensions with different weights, i.e.$\alpha_1\$ as a weight for the differences in $x_1$-direction and similarly for $\beta$. Real values are interpreted as constant vectors.

When given as matrices, the upper triangular part of $\alpha$ weights the diagonal differences in both positive directions (to $\vect{k}+\vect{e}_i+\vect{e}_j$ direction, while the lower triangular denotes weights for $\vect{k}+\vect{e}_i-\vect{e}_j$. The upper triangluar part of a matric for $\beta$ are weights for the second order mixed differences.

The parameters lambda, lambdaIterate, and stoppingCriterion are explained in the optional parameters section of the CyclicProximalPoint this function internally uses.

The FixedMask sets pixel in $u$ to the value initially provided by $x$ and leaves them unchanged. the UnknownMask specifies unknown pixel, which are intialized and regularized during the algorithm.

### Matlab Documentation

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
% Compute the CPP of the first and second order TV with additive coupling
% can also be called with a struct with the corresponding fields, i.e. as
%
% INPUT
%   M                 : a manifold.
%   f                 : an image from M^{m_1,m_2,...,m_n} of
%                           manifold-valued data
%   alpha             : weight(s) for first order absolute difference terms
%                       either a number or one for each dimension.
%   beta              : weight(s) for each weight for second order absolute
%                       difference terms either two nubers (straight &
%                       mixed differences) or one for each (n + n-1+...+1)
%   stoppingCriterion : a functional @(x,xold,lambda,iter) as a stopping
%                       criterion based on x, the last iterate xold, lambda
%
%   OUTPUT:
%      x   : result of the cyclic proximal point algorithm
%  recData : recorded data array of the by the record-function
%
%   OPTIONAL PARAMETERS
%
%  'UnknownMask'   : ([]) Specify a mask the same size as the data, i.e.,
%                        m_1xm_2x...xm_nw, which are labeled as unknown
%                        they are initialized in the cycles, when possible.
%                       values that are fixed. They are fixed on a 'poor
%                       mans method', i.e. reset after each step
%  'lambdaIterate' : (@ (iter)) a functional @(iter) computing the
%                        iterates value of lambda
%  'lambda'        : if no iterate (see above) is given, this value is used
%                        to set the iterate to @(iter) lambda/iter
%   Debug          : ([]) a function @ (x,xold,iter) producing debug
%                       output
%   Record         : (@(x,iter)) a function returning a column vector, if
%                       there's a second return value and this function is
%                       given, data is recorded in an array and returned
%
% R. Bergmann, M. Bacak, G. Steidl, A. Weinmann,
%     A second order non-smooth variational model for restoring
%     manifold-valued images,
%     SIAM Journal on Scientific Computing, 38, (1), A567-A597, 2016.
% ---
% MVIRT | R. Bergmann | 2018-01-22