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 ROFmodel 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 easytouse 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 gitrepository. 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, R. (2017). MVIRT, A toolbox for manifoldvalued image registration. In IEEE International Conference on Image Processing, IEEE ICIP 2017, Beijing, China, September 17–20, 2017.
In many real life application measured data takes its values on Riemannian manifolds. For the special case of the Euclidean space this setting includes the classical grayscale and color images. Like these classical images, manifoldvalued data might suffer from measurement errors in form of noise or missing data. In this paper we present the manifoldvalued image restoration toolbox (MVIRT) that provides implementations of classical image processing tasks. Based on recent developments in variational methods for manifoldvalued image processing methods, like total variation regularization, the toolbox provides easy access to work with these algorithms. The toolbox is implemented in Matlab, open source, and easily extendible, e.g. with own manifolds, noise models or further algorithms. This paper introduces the main mathematical methods as well as numerical examples.@inproceedings{Ber17, author = {Bergmann, Ronny}, title = {{MVIRT}, A toolbox for manifoldvalued image registration}, year = {2017}, booktitle = {IEEE International Conference on Image Processing, IEEE ICIP 2017, Beijing, China, September 1720, 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 mexfiles, 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 MatlabImplementation 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 manifoldvalued 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 nonpriotising order
 The coauthors Miroslav Bačák, Friederike Laus, Gabriele Steidl and Andreas Weinmann for all discussions, writing sessions and meetings leading to the theory (see Literature below) all these implementations are built on.
 The ManOpt toolbox by Nicolas Boumal inspired a few function and interface design decisions and is a great toolbox for optimization on manifolds.
 The MFOPT Matlab Library by Jan Lellmann also does TV regularization of manifold valued images, though with a different algorithmical approach.
 The SSNUnit for bringing up the need of regularizing phasevalued data which started the project.
 UCL Camino Diffusion MRI Toolkit for providing real life diffusion data and allowing us to provide a small part of that data within one of the examples.
 The eigen library for their nice C++ matrixvector classes.
 The overwiew of InSAR Interferometry for providing phase valued data of the Mount Vesuvius.
References

Bergmann, R., Chan, R. H., Hielscher, R., Persch, J., & Steidl, G. (2016). Restoration of manifoldvalued images by halfquadratic minimization. Inverse Problems and Imaging, 10(2), 281–304.
The paper addresses the generalization of the halfquadratic minimization method for the restoration of images having values in a complete, connected Riemannian manifold. We recall the halfquadratic minimization method using the notation of the ctransform and adapt the algorithm to our special variational setting. We prove the convergence of the method for Hadamard spaces. Extensive numerical examples for images with values on spheres, in the rotation group \operatornameSO(3), and in the manifold of positive definite matrices demonstrate the excellent performance of the algorithm. In particular, the method with \operatornameSO(3)valued data shows promising results for the restoration of images obtained from Electron Backscattered Diffraction which are of interest in material science.@article{BCHPS16, author = {Bergmann, R. and Chan, R. H. and Hielscher, R. and Persch, J. and Steidl, G.}, title = {Restoration of manifoldvalued images by halfquadratic minimization}, journal = {Inverse Problems and Imaging}, year = {2016}, volume = {10}, number = {2}, pages = {281304}, doi = {10.3934/ipi.2016001}, eprint = {1505.07029}, eprinttype = {arXiv} }

Bergmann, R., & Weinmann, A. (2016). A second order TVtype approach for inpainting and denoising higher dimensional combined cyclic and vector space data. Journal of Mathematical Imaging and Vision, 55(3), 401–427.
In this paper we consider denoising and inpainting problems for higher dimensional combined cyclic and linear space valued data. These kind of data appear when dealing with nonlinear color spaces such as HSV, and they can be obtained by changing the space domain of, e.g., an optical flow field to polar coordinates. For such nonlinear data spaces, we develop algorithms for the solution of the corresponding second order total variation (TV) type problems for denoising, inpainting as well as the combination of both. We provide a convergence analysis and we apply the algorithms to concrete problems.@article{BW16, author = {Bergmann, R. and Weinmann, A.}, title = {A second order {TV}type approach for inpainting and denoising higher dimensional combined cyclic and vector space data}, journal = {Journal of Mathematical Imaging and Vision}, year = {2016}, volume = {55}, number = {3}, pages = {401427}, doi = {10.1007/s1085101506273}, eprint = {1501.02684}, eprinttype = {arXiv} }

Bačák, M., Bergmann, R., Steidl, G., & Weinmann, A. (2016). A second order nonsmooth variational model for restoring manifoldvalued images. SIAM Journal on Scientific Computing, 38(1), A567–A597.
We introduce a new nonsmooth variational model for the restoration of manifoldvalued data which includes second order differences in the regularization term. While such models were successfully applied for realvalued images, we introduce the second order difference and the corresponding variational models for manifold data, which up to now only existed for cyclic data. The approach requires a combination of techniques from numerical analysis, convex optimization and differential geometry. First, we establish a suitable definition of absolute second order differences for signals and images with values in a manifold. Employing this definition, we introduce a variational denoising model based on first and second order differences in the manifold setup. In order to minimize the corresponding functional, we develop an algorithm using an inexact cyclic proximal point algorithm. We propose an efficient strategy for the computation of the corresponding proximal mappings in symmetric spaces utilizing the machinery of Jacobi fields. For the nsphere and the manifold of symmetric positive definite matrices, we demonstrate the performance of our algorithm in practice. We prove the convergence of the proposed exact and inexact variant of the cyclic proximal point algorithm in Hadamard spaces. These results which are of interest on its own include, e.g., the manifold of symmetric positive definite matrices.@article{BBSW16, author = {Ba{\v c}{\'a}k, M. and Bergmann, R. and Steidl, G. and Weinmann, A.}, title = {A second order nonsmooth variational model for restoring manifoldvalued images}, journal = {SIAM Journal on Scientific Computing}, year = {2016}, volume = {38}, number = {1}, pages = {A567A597}, doi = {10.1137/15M101988X}, eprint = {1506.02409}, eprinttype = {arXiv} }

Bergmann, R., Persch, J., & Steidl, G. (2016). A parallel Douglas–Rachford algorithm for minimizing ROFlike functionals on images with values in symmetric Hadamard manifolds. SIAM Journal on Imaging Sciences, 9(3), 901–937.
We are interested in restoring images having values in a symmetric Hadamard manifold by minimizing a functional with a quadratic data term and a total variation like regularizing term. To solve the convex minimization problem, we extend the DouglasRachford algorithm and its parallel version to symmetric Hadamard manifolds. The core of the DouglasRachford algorithm are reflections of the functions involved in the functional to be minimized. In the Euclidean setting the reflections of convex lower semicontinuous functions are nonexpansive. As a consequence, convergence results for KrasnoselskiMann iterations imply the convergence of the DouglasRachford algorithm. Unfortunately, this general results does not carry over to Hadamard manifolds, where proper convex lower semicontinuous functions can have expansive reflections. However, splitting our restoration functional in an appropriate way, we have only to deal with special functions namely, several distancelike functions and an indicator functions of a special convex sets. We prove that the reflections of certain distancelike functions on Hadamard manifolds are nonexpansive which is an interesting result on its own. Furthermore, the reflection of the involved indicator function is nonexpansive on Hadamard manifolds with constant curvature so that the DouglasRachford algorithm converges here. Several numerical examples demonstrate the advantageous performance of the suggested algorithm compared to other existing methods as the cyclic proximal point algorithm or halfquadratic minimization. Numerical convergence is also observed in our experiments on the Hadamard manifold of symmetric positive definite matrices with the affine invariant metric which does not have a constant curvature.@article{BPS16, author = {Bergmann, R. and Persch, J. and Steidl, G.}, title = {A parallel {D}ouglas–{R}achford algorithm for minimizing {ROF}like functionals on images with values in symmetric {H}adamard manifolds}, journal = {SIAM Journal on Imaging Sciences}, year = {2016}, volume = {9}, number = {3}, pages = {901937}, doi = {10.1137/15M1052858}, eprint = {1512.02814}, eprinttype = {arXiv} }

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.
In many image and signal processing applications, such as interferometric synthetic aperture radar (SAR), electroencephalogram (EEG) data analysis, groundbased astronomy, and color image restoration, in HSV or LCh spaces the data has its range on the onedimensional sphere \mathbb S^1. Although the minimization of total variation (TV) regularized functionals is among the most popular methods for edgepreserving image restoration , such methods were only very recently applied to cyclic structures. However, as for Euclidean data, TV regularized variational methods suffer from the socalled staircasing effect. This effect can be avoided by involving higher order derivatives into the functional. This is the first paper which uses higher order differences of cyclic data in regularization terms of energy functionals for image restoration. We introduce absolute higher order differences for \mathbb S^1valued data in a sound way which is independent of the chosen representation system on the circle. Our absolute cyclic first order difference is just the geodesic distance between points. Similar to the geodesic distances, the absolute cyclic second order differences have only values in [0,\pi]. We update the cyclic variational TV approach by our new cyclic second order differences. To minimize the corresponding functional we apply a cyclic proximal point method which was recently successfully proposed for Hadamard manifolds. Choosing appropriate cycles this algorithm can be implemented in an efficient way. The main steps require the evaluation of proximal mappings of our cyclic differences for which we provide analytical expressions. Under certain conditions we prove the convergence of our algorithm. Various numerical examples with artificial as well as realworld data demonstrate the advantageous performance of our algorithm.@article{BLSW14, author = {Bergmann, R. and Laus, F. and Steidl, G. and Weinmann, A.}, title = {Second order differences of cyclic data and applications in variational denoising}, journal = {SIAM Journal on Imaging Sciences}, year = {2014}, volume = {7}, number = {4}, pages = {2916–2953}, doi = {10.1137/140969993}, eprint = {1405.5349}, eprinttype = {arXiv} }

Bergmann, R. (2017). MVIRT, A toolbox for manifoldvalued image registration. In IEEE International Conference on Image Processing, IEEE ICIP 2017, Beijing, China, September 17–20, 2017.
In many real life application measured data takes its values on Riemannian manifolds. For the special case of the Euclidean space this setting includes the classical grayscale and color images. Like these classical images, manifoldvalued data might suffer from measurement errors in form of noise or missing data. In this paper we present the manifoldvalued image restoration toolbox (MVIRT) that provides implementations of classical image processing tasks. Based on recent developments in variational methods for manifoldvalued image processing methods, like total variation regularization, the toolbox provides easy access to work with these algorithms. The toolbox is implemented in Matlab, open source, and easily extendible, e.g. with own manifolds, noise models or further algorithms. This paper introduces the main mathematical methods as well as numerical examples.@inproceedings{Ber17, author = {Bergmann, Ronny}, title = {{MVIRT}, A toolbox for manifoldvalued image registration}, year = {2017}, booktitle = {IEEE International Conference on Image Processing, IEEE ICIP 2017, Beijing, China, September 1720, 2017} }