# Manifold-valued Image Restoration Toolbox

In many application data is nonlinear, i.e. restricted in a certain range and equipped with a different distance measure. For example measuring angles in InSAR imaging or when working on the phase of complex valued wavelets. Other applications include denoising in several color spaces like RGB, HSV and CB. These data live on the circle $$\mathbb S^1$$, the sphere $$\mathbb S^2$$ and vector spaces of combined real valued and phase valued data $$(\mathbb S^1)^m\times\mathbb R^n$$. Furthermore, in Diffusion Tensor Imaging (DTI) every data item of an image is given by an $$r\times r$$ symmetric positive definite matrix, i.e. from the space Sym(r). Often, all these data are obstructed by noise due to measurement or data transfer.

All mentioned spaces are (products of) manifold(s). A very common model for denoising is the well known ROF-model of TV denoising, which was recently generalised to manifolds and has several generalisations itself to overcome the well known stair casing effect. This package provides an easy-to-use Toolbox for processing manifold valued data. Several examples illustrate and explain the usage of the Toolbox.

You can get started by downloading the source code from Github or visiting the git-repository. If you are using the toolbox, it would be nice, if you give us a note. The Toolbox is available under the GPL 3 license, so you can use as long as you stick to the terms of that license. If you use the toolbox within one of your scientific works, please cite (Bergmann, 2017)

1. Bergmann, R. (2017). MVIRT, A toolbox for manifold-valued image registration. In IEEE International Conference on Image Processing, IEEE ICIP 2017, Beijing, China, September 17–20, 2017.

and if you use a specific algorithm, the corresponding paper, too.

## Manifolds

While the algorithms are able to cope with a general manifold as long as it provides a few functions (for example the logarithmic, exponential and involved proximal maps), the specific manifolds itself are able to employ mex-files, i.e. several functions are written in a vectorial form in C++. The C++ code is also included and the initialisation script initMVIRT.m can be used to compile these to your needs (by calling it with the option ‘Make’ set to true). Furthermore all manifolds still have the Matlab-Implementation as a fallback by setting M.useMex = false for a manifold object M (e.g. if the C++ code does not compile on your machine). The following are available

• the Spheres $$\mathbb S^n$$, $$n\in\mathbb N$$, especially a class for phase valued data, the $$\mathbb S^1$$
• the space of $$r\times r$$ symmetric positive definite matrices, $$r\in\mathbb R$$
• the Euclidean space $$\mathbb R^n$$, $$n\in\mathbb N$$
• the product manifold of combined vector space and phase valued components, $$(\mathbb S^1)^m\times\mathbb R^n$$, $$m,n\in\mathbb N$$

## Algorithms

### Variational Methods for Denoising and Inpainting

An implementation minimizing a model of first and second order differences, i.e. for given Data $$f$$ $\operatorname*{argmin}_u F(u;f)+\alpha TV(u)+\beta TV_2(u),$ where $$F$$ is the data fidelity term. The minimization includes

• weightening the first and second order differences, even their horizontal, vertical and/or diagonal, and mixed differences by $$\alpha=(\alpha_1,\alpha_2,\alpha_3,\alpha_4)$$ and $$\beta=(\beta_1,\beta_2,\beta_3)$$.
• fast computation by employing an efficient splitting of the functional for the cyclic proximal point algorithm (CPPA)
• inpaint missing data by specifying an unknown data mask
• fixing data items by constraints, i.e. specifying a regularisation mask
• specify convergence criteria
• for the subgradient method inside the second order differences as number of steps
• for the CPPA a number of maximal iterations or a lower bound ϵ for the maximal movement of the data items in u

### Second Order Statistics for Denoising

Another algorithms models tangential Gaussian noise and employes a patch based approximation of means and variances of the local noise to denoise manifold-valued images.

## Visualisation

The following visualizations are available for different export formats

• plot $$\mathbb S^2$$-valued data on the sphere (Asymptote, Matlab)
• plot $$\mathbb S^2$$-valued images as vector fields encoding elevation in color (Asymptote)
• plot $$\mathrm{Sym}(3)$$ signals and images as ellipsoids (Asymptote, Matlab, POVRay) using directional encoding, Geodesic Anisotropy Index (GA) or Fractional Anisotropy Index (FA) color coding in any colormap (Asymptote, Matlab)

## Acknowledgements

There are a few people, toolboxes, and data sources, this toolbox owes kudos to, they are in a non-priotising order

# References

1. Bergmann, R., Chan, R. H., Hielscher, R., Persch, J., & Steidl, G. (2016). Restoration of manifold-valued images by half-quadratic minimization. Inverse Problems and Imaging, 10(2), 281–304.
2. Bergmann, R., & Weinmann, A. (2016). A second order TV-type approach for inpainting and denoising higher dimensional combined cyclic and vector space data. Journal of Mathematical Imaging and Vision, 55(3), 401–427.
3. Bačák, M., Bergmann, R., Steidl, G., & Weinmann, A. (2016). A second order non-smooth variational model for restoring manifold-valued images. SIAM Journal on Scientific Computing, 38(1), A567–A597.
4. Bergmann, R., Persch, J., & Steidl, G. (2016). A parallel Douglas–Rachford algorithm for minimizing ROF-like functionals on images with values in symmetric Hadamard manifolds. SIAM Journal on Imaging Sciences, 9(3), 901–937.
5. Bergmann, R., Laus, F., Steidl, G., & Weinmann, A. (2014). Second order differences of cyclic data and applications in variational denoising. SIAM Journal on Imaging Sciences, 7(4), 2916–2953.

(Bergmann, 2017)

1. Bergmann, R. (2017). MVIRT, A toolbox for manifold-valued image registration. In IEEE International Conference on Image Processing, IEEE ICIP 2017, Beijing, China, September 17–20, 2017.