# Cost Functions

The following cost functions are available

Manopt.costIntrICTV12Method
costIntrICTV12(M, f, u, v, α, β)

Compute the intrinsic infimal convolution model, where the addition is replaced by a mid point approach and the two functions involved are costTV2 and costTV. The model reads

$E(u,v) = \frac{1}{2}\sum_{i ∈ \mathcal G} d_{\mathcal M}\bigl(g(\frac{1}{2},v_i,w_i),f_i\bigr) +\alpha\bigl( \beta\mathrm{TV}(v) + (1-\beta)\mathrm{TV}_2(w) \bigr).$
source
Manopt.costL2TVMethod
costL2TV(M, f, α, x)

compute the $\ell^2$-TV functional on the PowerManifold manifoldMfor given (fixed) dataf(onM), a nonnegative weightα, and evaluated atx(onM), i.e.

$E(x) = d_{\mathcal M}^2(f,x) + \alpha \operatorname{TV}(x)$

costTV

source
Manopt.costL2TV2Method
costL2TV2(M, f, β, x)

compute the $\ell^2$-TV2 functional on the PowerManifold manifold M for given data f, nonnegative parameter β, and evaluated at x, i.e.

$E(x) = d_{\mathcal M}^2(f,x) + \beta\operatorname{TV}_2(x)$

costTV2

source
Manopt.costL2TVTV2Method
costL2TVTV2(M, f, α, β, x)

compute the $\ell^2$-TV-TV2 functional on the PowerManifold manifold M for given (fixed) data f (on M), nonnegative weight α, β, and evaluated at x (on M), i.e.

$E(x) = d_{\mathcal M}^2(f,x) + \alpha\operatorname{TV}(x) + \beta\operatorname{TV}_2(x)$

source
Manopt.costTVFunction
costTV(M,x [,p=2,q=1])

Compute the $\operatorname{TV}^p$ functional for data xon the PowerManifold manifold M, i.e. $\mathcal M = \mathcal N^n$, where $n ∈ \mathbb N^k$ denotes the dimensions of the data x. Let $\mathcal I_i$ denote the forward neighbors, i.e. with $\mathcal G$ as all indices from $\mathbf{1} ∈ \mathbb N^k$ to $n$ we have $\mathcal I_i = \{i+e_j, j=1,\ldots,k\}\cap \mathcal G$. The formula reads

$E^q(x) = \sum_{i ∈ \mathcal G} \bigl( \sum_{j ∈ \mathcal I_i} d^p_{\mathcal M}(x_i,x_j) \bigr)^{q/p}.$

source
Manopt.costTVMethod
costTV(M, x, p)

Compute the $\operatorname{TV}^p$ functional for a tuple pT of pointss on a Manifold M, i.e.

$E(x_1,x_2) = d_{\mathcal M}^p(x_1,x_2), \quad x_1,x_2 ∈ \mathcal M$

source
Manopt.costTV2Function
costTV2(M,x [,p=1])

compute the $\operatorname{TV}_2^p$ functional for data x on the PowerManifold manifoldmanifold M, i.e. $\mathcal M = \mathcal N^n$, where $n ∈ \mathbb N^k$ denotes the dimensions of the data x. Let $\mathcal I_i^{\pm}$ denote the forward and backward neighbors, respectively, i.e. with $\mathcal G$ as all indices from $\mathbf{1} ∈ \mathbb N^k$ to $n$ we have $\mathcal I^\pm_i = \{i\pm e_j, j=1,\ldots,k\}\cap \mathcal I$. The formula then reads

$E(x) = \sum_{i ∈ \mathcal I,\ j_1 ∈ \mathcal I^+_i,\ j_2 ∈ \mathcal I^-_i} d^p_{\mathcal M}(c_i(x_{j_1},x_{j_2}), x_i),$

where $c_i(\cdot,\cdot)$ denotes the mid point between its two arguments that is nearest to $x_i$.

source
Manopt.costTV2Method
costTV2(M,(x1,x2,x3) [,p=1])

Compute the $\operatorname{TV}_2^p$ functional for the 3-tuple of points (x1,x2,x3)on the Manifold M. Denote by

$\mathcal C = \bigl\{ c ∈ \mathcal M \ |\ g(\tfrac{1}{2};x_1,x_3) \text{ for some geodesic }g\bigr\}$

the set of mid points between $x_1$ and $x_3$. Then the functionr reads

$d_2^p(x_1,x_2,x_3) = \min_{c ∈ \mathcal C} d_{\mathcal M}(c,x_2).$

source
Manopt.cost_L2_acceleration_bezierMethod
cost_L2_acceleration_bezier(M,B,pts,λ,d)

compute the value of the discrete Acceleration of the composite Bezier curve together with a data term, i.e.

$\frac{\lambda}{2}\sum_{i=0}^{N} d_{\mathcal M}(d_i, c_B(i))^2+ \sum_{i=1}^{N-1}\frac{d^2_2 [ B(t_{i-1}), B(t_{i}), B(t_{i+1})]}{\Delta_t^3}$

where for this formula the pts along the curve are equispaced and denoted by $t_i$ and $d_2$ refers to the second order absolute difference costTV2 (squared), the junction points are denoted by $p_i$, and to each $p_i$ corresponds one data item in the manifold points given in d. For details on the acceleration approximation, see cost_acceleration_bezier. Note that the Beziér-curve is given in reduces form as a point on a PowerManifold, together with the degrees of the segments and assuming a differentiable curve, the segmenents can internally be reconstructed.

source
Manopt.cost_acceleration_bezierMethod
cost_acceleration_bezier(
M::Manifold,
B::AbstractVector{P},
degrees::AbstractVector{<:Integer},
T::AbstractVector{<:AbstractFloat},
) where {P}

compute the value of the discrete Acceleration of the composite Bezier curve

$\sum_{i=1}^{N-1}\frac{d^2_2 [ B(t_{i-1}), B(t_{i}), B(t_{i+1})]}{\Delta_t^3}$

where for this formula the pts along the curve are equispaced and denoted by $t_i$, $i=1,\ldots,N$, and $d_2$ refers to the second order absolute difference costTV2 (squared). Note that the Beziér-curve is given in reduces form as a point on a PowerManifold, together with the degrees` of the segments and assuming a differentiable curve, the segmenents can internally be reconstructed.

This acceleration discretization was introduced in[BergmannGousenbourger2018].