$ \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 manifold class

The Matlab class manifold represents a manifold in general and handles directly also everything as a product manifold using the vector and matrix features of Matlab.

All manifolds inherit from manifold, such that both the algorithms and several functions within the manifold are based on the following basic properties a child class should implement.

Basic terms on a manifold
On a manifold $\M$ this image illustrates the main terms on the manifold.

Variables

AllDims
an cell array of : strings with the length equal to the length of ItemSize – for internal use, but must be initialized within the constructor.
Dimension
an integer specifying the dimension of the finite dimensional Riemannian manifold.
ItemSize
The information on size(x) when x is a single point on the manifold. note that data is always stored with the manifold dimensions first, so an array Xof n manifold points has size(X) = [ItemSize,n].
type
a String representing the manifold mainly in debug informations

Abstract Functions

The following functions are the basic functions not only necessary for most algoeithms but also as the basis for forthcoming algorithms to base functions on these. If they are easy functions, they should be implemented within this class. In order to perform algorithms on images, these functions should always also be able to handle arbitrary sized arrays of manifold-points (see ItemSize above) and return the corresponding arrays.

dist(x,y)
distance function of two points (vectors of points) on a manifold, returns an array of the data dimensions.
dot(x,xi,nu)
inner product in of two tangent vectors .
exp(x,xi)
the exponential map at with direction might optionally be extended by a further parameter to scale before applying the exponential map
log(x,y)
the logarithmic map (or inverse exponential); though defined only locally it should return something deterministic otherwise, i.e. choose one of the possible values if the logaithm is not unique.
parallelTransport(x,y,xi)
parallel transport a vector from the tangent space of to the tangent space of .

Functions

The adjoint differential of the exponential map base point
1
%   nu = AdjDxExp(x,xi,eta) - Adjoint of the Derivative of Exp with

This function evaluates for with fixed the adjoint differenital

more
The adjoint differential of the start point of a geodesic
1
% AdjDxGeo(x,y,t,eta) Adjoint of the Derivative of geo(x,y,t) wrt x.

This function evaluates for with fixed and the adjoint differenital

more
The adjoint differential of the logarithmic map base point
1
%   nu = AdjDxLog(x,y,eta) - Adjoint of the Derivative of Log

This function evaluates for with fixed the adjoint differenital

more
The adjoint differential of the exponential map
1
% nu = AdjDxExp(x,xi,eta) - Adjoint of the Derivative of Exp with

This function evaluates for with fixed the adjoint differenital

more
The adjoint differential of the end point of a geodesic
1
% AdjDyGeo(x,y,t,eta) - Adjoint of the Derivative of geo(x,y,t) wrt y.

This function evaluates for with fixed and the adjoint differenital

more
The adjoint differential of the logarithmic map base point
1
%   nu = AdjDxLog(x,y,eta) - Adjoint of the Derivative of Log

This function evaluates for with fixed the adjoint differenital

more
Adjoint Jacobi field
1
% AdjJacobiField(x,y,t,eta) - evaluate a adjoint of a Jacobi field

Evaluates the adjoint of the Jacobi field along the geodesic at with initial conditions .

more
The differential of the exponential map base point
1
% nu = AdjDxExp(x,xi,eta) - Derivative of Exp w.r.t. base point x

This function evaluates for with fixed the differenital

more
The differential of the start point of a geodesic
1
% xi = DxGeo(x,y,t,eta) - Compute the Derivative D_xGeo(t; x,y)[eta]

This function evaluates for with fixed and the differenital

more
The differential of the logarithmic map base point
1
% nu = AdjDxExp(x,xi,eta) - Derivative of Exp w.r.t. base point x

This function evaluates for with fixed the differenital

more
The differential of the exponential
1
% nu = DxExp(x,xi,eta) - Derivative of Exp w.r.t. xi

This function evaluates for with fixed the differenital

more
The differential of the end point of a geodesic
1
% xi = DxGeo(x,y,t,eta) Derivative of the geodesic(x,y,t) wrt y.

This function evaluates for with fixed and the differenital

more
The differential of the logarithmic map
1
%   nu = DyLog(x,y,eta) - Adjoint of the Derivative of Log

This function evaluates for with fixed the differenital

more
Jacobi field
1
% xi = JacobiField(x,y,t,eta) - evaluate a Jacobi field

For the geodesic to a Jacobi field is a smooth vector field along fulfilling the ODE

where denotes the (partial) covariant derivative, is the curvature tensor and is a geodesic variation, , i.e. for any the function is a geodesic; and we have .

This function evaluates certain special Jacobi fields given a weight function , where refers to the index of the eigenvalue, and

more
Filter an image
1
% filteredImage = filter(this,image,filter)

This function performs a convolution or filtering of an image by reinterpreting the weightde sum in the convolution as a Karcher mean. For a given filter , this function computes

where adress a pixel of the image and one can specify boundary conditions (nearest, symmetric or periodic).

more
The geodesic
1
% geo = geodesic(this,x,y)

Returns evaluations of the geodesic , either equidistant at pts points (which is set to 100) by default. If t is given as a vector of evaluation poitns, this one dominates.

A point on the geodesic
1
% geopoint(x,y,t) - Gives the point \gamma_{x,y}(t)

The function evaluates a geodesic at , i.e. returns by using the exponential and logarithmic map. When the geodesic is not unique this function still returns a deterministic single value based on the choice of the logarithmic map. This also allows for evaluating the geodesic of an image pixelwise, i.e. if are images, we obtain a pixelwise evaluation.

The Riemannian center of mass
1
% mean(x) calculates the m means of the input data x [.,m,n]

The Riemannian center of mass can be computed for a matrix of m x n points, which computed n means simultaneously of m points each. The mean of one such set is defined as a (not necessarily unique) minimizer of

more
The Riemannian median
1
% median(x) calculates the m medians of x ([.,m,n])

The Riemannian median can be defined similarly to the mean, the Riemannian center of mass. We compute for a matrix of m x n points m medians in parallel, each consisting of n points. The median of one such set is defined as a (not necessarily unique) minimizer of

more
The mid point on a geodesic
1
% m = midPoint(x,z)

The function returns a mid point of the two input points. Since the logarithm is deterministic and returns a unique value, this function is also deterministic, though the mid point might not be unique.

more
Pole Ladder – approximate parallel transport
1
% poleladder(this,x,y,xi) approximates parallel Transport

The pole ladder is a way to approximate the parallel transport of a tangent vector to since the original function might be hard to compute. Schild’s ladder is given by the formula

more
Schild’s Ladder – approximate parallel transport
1
% schildsladder(this,x,y,xi) approximates parallel Transport

Schild’s ladder is a way to approximate the parallel transport of a tangent vector to since the original function might be hard to compute. Schild’s ladder is given by the formula

more
Variance
1
% var(f) computes the empirical variance

Compute the variance of the data, i.e. the mean distance to the mean.

For given data let denote the Riemannian center of mass. Then the variance is given by

more