1 Introduction

In the last decade, many PDE-based image-analysis techniques for tracking and enhancement of curvilinear structures in images took advantage of lifting image data, typically defined on \(\mathbb {R}^d\), to a multi-orientation distribution (e.g., an orientation score) defined on the homogeneous space \(\mathbb {M}_d\) of d-dimensional positions and orientations, see Fig. 1 and [5, 8, 11, 14, 20, 53]. After lifting the image to a multi-orientation distribution, the distribution is taken as an initial condition of a PDE flow. After solving a limited number of iterations of the PDE model, one obtains a regularized version of the original distribution, and by integration over all orientations, one obtains a regularized version of the original image.

The key advantage of lifting the images from \(\mathbb {R}^d\) to the homogeneous space \(\mathbb {M}_d\) is that the PDE flow can act differently on substructures with different orientations [5, 11, 24]. For instance, if the image contains two crossing lines, the PDE can regularize the two lines independently, rather than regularizing the whole crossing. Similarly, if the image contains a corner, the corner is preserved in the regularized image.

This idea of lifting images has been successfully implemented for image enhancement [13, 30], geodesic tracking [6, 11, 51], image denoising [31], contrast perception and optical illusions [7]. For instance, Perona–Malik diffusion has been lifted to the homogeneous space \(\mathbb {M}_d\) [17] and coherence enhancing diffusion (CED) [54] has been lifted to the method of coherence enhancing diffusion on invertible orientation scores (CED-OS) [30] and to its 3D generalization [33].

Fig. 1
figure 1

Instead of direct PDE-based processing of an image, we apply PDE-based processing on a lifted image \(U: \mathbb {R}^{d} \rtimes S^{d-1} \rightarrow \mathbb {R}\) (e.g., an orientation score: OS). The OS is obtained by convolving the image with a set of rotated wavelets allowing for stable reconstruction [5, 20, 33]. 2nd row: vessel tracking in a 2D image via geodesic PDE flows in OS that underlay TVF: [5, 11, 24], with \(\varvec{n}=(\cos \theta , \sin \theta )^T \in S^1\). 3rd row: CED-OS diffusion of a 3D image [23, 33] visualized as a field of angular profiles (see Remark 1). In this article we study image enhancement and denoising via TVF and MCF on \(\mathbb {M}_d=\mathbb {R}^{d} \rtimes S^{d-1}\) and compare to nonlinear diffusion methods

PDE flows on orientation lifts of 3D images are relevant for applications such as fiber enhancement [17, 21, 46, 53] and fiber tracking [45] in diffusion-weighted magnetic resonance imaging (DW-MRI), and in enhancement [33] and tracking [15] of blood vessels in 3D images.

The general workflow is illustrated in Fig. 1. The original image is described by a function \(f:\Omega _f \rightarrow \mathbb {R}^{+}\), where \(\Omega _f \subset \mathbb {R}^d\) is its support. From \(f \in \mathbb {L}_2 \left( \Omega _f \right) \), one computes an orientation lift \(U: \mathbb {M}_{d} \rightarrow \mathbb {C} \), compactly supported within

$$\begin{aligned} \Omega = \Omega _f \times S^{d-1} \subset \mathbb {M}_d. \end{aligned}$$

There are various ways to construct such a lift: it can be (the real part of) an invertible orientation score [22] (cf. Fig. 1), a channel representation [28], a lift by Gabor wavelets [3], or a fiber orientation density [44]. In all of these approaches the absolute value \(|U(\varvec{x},\varvec{n})|\) can be regarded (after normalization) as a probability density of finding a fiber structure at position \(\varvec{x} \in \mathbb {R}^d\) with local orientation \(\mathbf {n} \in S^{d\!-\!1}\). We set the orientation lift U as an initial condition of a PDE flow \(U \mapsto \Phi _t(U)\) with evolution time \(t > 0\). Finally, the processed multi-orientation representation \(\Phi _t(U)\) is integrated over all orientations to obtain the enhanced image \(f_t\). In this article, we will work with the orientation score, with the main motivation being that this operation is invertible [20], so that when taking \(t \downarrow 0\), the output equals the input, i.e., \(\lim _{t \downarrow 0} f_t = f\) in \(\mathbb {L}_{2}\)-sense.

Table 1 We formulate our PDEs independently of our choice of frame and metric and then apply it to both the left-invariant and gauge geometries

The enhanced image that one obtains after running a PDE flow, (the bottom-right picture in Fig. 1), naturally depends on the type of flow used. One flow may be more suitable than another, depending on the requirements imposed on the resulting image. In case it is important to preserve sharp transitions in the image, while maintaining plateaus, nonlinear flows such as total variation flows (TVF) and mean curvature flow (MCF) [49] are typically more suited than nonlinear diffusion flows (such as Perona and Malik diffusion [42] and coherence-enhancing diffusion [54]).

For \(d=2\), TVF and MCF were recently generalized to lifted images by Chambolle and Pock [11] and Citti et al. [13], respectively.

Their promising results have motivated us to generalize TVF and MCF to lifted images for general dimension d and provide a general geometric and algorithmic framework that can accommodate features such as locally adaptive frames and coherence enhancement.

The benefits of our approach are that we obtain a single unifying geometric and algorithmic framework for arbitrary d, with efficient algorithms (for \(d=2,3\)) that preserve crossing lines, corners, plateaus, edges and bundle boundaries and can improve curvature adaptation via the optional inclusion of locally adaptive frames. Such frames account for curvature of lines and allow us to remove bias toward sampled orientations in orientation scores.

Our PDE methods on \(\mathbb {M}_{d}\) are computationally more expensive than their counterparts acting only on \(\mathbb {R}^d\), but they are still practical. Similar to crossing-preserving nonlinear diffusion on \(\hbox {SE}(2)\equiv \mathbb {M}_{2}\), locally adaptive frames allow us to remove orientation sampling bias in orientation scores [29, Fig. 6.11] and to use only 4 orientation samples [30]. For our crossing-preserving MCF and TVF on \(\mathbb {M}_{2}\) we sample our (processed) orientation scores only on 8 orientations. On \(\mathbb {M}_{3}\) we compute regularized orientation lifts on a grid with 162 orientations, where we rely on efficient numerical schemes for PDEs on \(\mathbb {M}_3\) relying on the low-order PDE discretization schemes explained in [17, 37], instead of higher-order schemes via spherical harmonics [34, Ch. 3.4], in order to reduce computation time.

The structure of this article is as follows. We start by recapitulating orientation scores and explaining the homogeneous space \(\mathbb {M}_d\) as a Lie group quotient in the rigid body motion group \(\hbox {SE}(d)\) in Sect. 2 and explain the necessary geometric concepts. In Sect. 3, we introduce the PDEs for total variation and mean curvature flow on \(\mathbb {M}_d\) and explain our explicit discretization scheme. Our numerical scheme includes regularization for which we prove convergence in Sect. 4. In Sect. 5 we evaluate the potential of our methods with 2D and 3D experiments.

Remark 1

(Visualization of 3D orientation scores) In the 3rd row of Fig. 1, and henceforth, we visualize a lifted image \(U: \mathbb {R}^{3} \rtimes S^{2} \rightarrow \mathbb {R}^+\) by a grid of angular profiles \(\{\, \mu \, U(\mathbf {x},\mathbf {n})\, \mathbf {n}\;|\; \mathbf {x} \in \mathbb {Z}^{3}, \mathbf {n} \in S^{2}\,\}\), with fixed \(\mu >0\).

Remark 2

(Additional content in this version) This article is an extended version of the authors’ SSVM article by the same name [25]. The following content is new:

  • A coordinate-free formulation of gauge-frame fitting in Sect. 2.4 that generalizes our previous coordinate-dependent approach of [23].

  • An introduction of distinct geometric setups (with or without locally adaptive frames) for any dimension of \(\mathbb {M}_d\) that admits the formulation of TVF and MCF PDEs. A quick overview of the two distinct geometric approaches is provided in Table 1.

  • A general formulation of our “coherence enhancement technique” for TVF and MCF on \(\mathbb {M}_d\) in Sect. 2.5.

  • A proof for the theorem of the strong convergence, stability and accuracy of TV flows. This result was announced in [25] but not yet proven.

  • Extensions of our 2D denoising/enhancing experiments, Sect. 5, Figs. 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, and Table 4. These experiments now include a full comparison of isotropic and anisotropic processing, and the effect of the including coherence enhancement (via locally adaptive frames) in TVF and MCF. They also include additional comparisons to Perona–Malik [42] diffusion and to a well-established denoising method: BM3D [18, 35].

  • A more comprehensive treatment of the geometric tools used such as vector fields and metric tensors. We now clearly distinguish between the group \(\hbox {SE}(d)\) and the homogeneous space \(\mathbb {M}_d\). We also explain how to transfer geometric tools on these sets in Sect. 2.6 and Table 2.

Table 2 The two geometries we developed on \(\hbox {SE}(d)\) can be naturally applied to the homogeneous space \(\mathbb {M}_d\) using the natural extension of scalar functions (39) and vector fields (40)

2 Preliminary Theory

Before we can provide the generalized PDEs, which include TVF and MCF as special cases, we need to construct the necessary tools.

In this section, we review orientation scores, the rigid-body motion group SE(d), and the homogeneous space \(\mathbb {M}_d\) of positions and orientations. For further reading on engineering applications and harmonic analysis on Lie group \(\hbox {SE}(d)\) we refer to [12, Ch. 6]. For theory on homogeneous spaces we refer to [36, Ch. 21]. For image processing on \(\hbox {SE}(2)\), see for example [5, 8, 11, 14], for image processing on \(\hbox {SE}(3)\), see for example [39, 45, 47].

2.1 Orientation Scores: Lifting the Image Domain from \(\mathbb {R}^d\) to \(\mathbb {M}_d\)

In order to disentangle all local orientations in an image we lift the data from position space \(\mathbb {R}^d\) to the homogeneous space \(\mathbb {M}_{d}\) of positions and orientations. This means that we extend the domain of an image. See Fig. 1, where we lift the data from \(\mathbb {R}^d\) toward \(\mathbb {M}_{d}\) via invertible orientation scores.

Building an orientation score starts with selecting an orientation-sensitive filter (or wavelet) \(\psi \in \mathbb {L}_1 \cap \mathbb {L}_2\left( \mathbb {R}^d\right) \). We can then (under appropriate conditions [20, 33]) filter out a particular direction from an image \(f\in \mathbb {L}_2\left( \mathbb {R}^d\right) \) by convolving the image with this filter aligned to that direction. An orientation score \(\mathcal {W}_\psi f\) can then be constructed by applying this filtering for all directions \(\varvec{n}\in S^{d-1}\):

$$\begin{aligned} \mathcal {W}_{\psi }f(\varvec{x},\varvec{n})=\int _{\mathbb {R}^{d}} \overline{\psi (\varvec{R}^{-1}_{\varvec{n}}(\varvec{y}-\varvec{x}))}\, f(\varvec{y}) \, {\hbox {d}}\varvec{y}, \end{aligned}$$

for all \(\varvec{x} \in \mathbb {R}^d\) and rotations \(\varvec{R}_{\varvec{n}}\) that map a reference axis \(\varvec{a}\in S^{d-1}\) to \(\varvec{n}\).

For this paper we will be using cake wavelets [20, 33] for our filter \(\psi \), illustrated in Fig. 2 for \(d=2\). These wavelets are directional filters that have the property that we can accurately reconstruct the original image from the orientation score (again under appropriate conditions) by integration over \(S^{d-1}\), i.e.,

$$\begin{aligned} f(\varvec{x}) \approx \int _{S^{d-1}} \mathcal {W}_\psi f\left( \varvec{x}, \varvec{n} \right) {\hbox {d}} \sigma (\varvec{n}), \end{aligned}$$

where \(\sigma \) denotes the usual surface measure over \(S^{d-1}\). We always use standard cake wavelet parameter settings from [37] in our experiments.

The explicit formulas for these cake wavelets that allow invertible orientation scores are available in [5, 20] and specifically for \(d=3\) in [33]. An intuitive illustration of an orientation score is given in Fig. 2.

Fig. 2
figure 2

Top: cake wavelets [20] for \(d=2\) used to directionally filter an image and construct an orientation score. Bottom: How orientation scores disentangle orientations

2.2 \(\hbox {SE}(d)\) and the Homogeneous Space of Positions and Orientations \(\mathbb {M}_d\)

Consider the rigid body motion group \(\hbox {SE}(d)= \mathbb {R}^d \rtimes SO(d)\), the semidirect product of the translation group \(\mathbb {R}^d\) and the rotation group \(\hbox {SO}(d)\) of orthogonal \(d \times d\) matrices. We call elements of \(\hbox {SE}(d)\) roto-translations. The product of two roto-translations \(g_i = (\varvec{x}_i, \varvec{R}_i)\) in \(\hbox {SE}(d)\) is given by

$$\begin{aligned}&g_1 g_2=\left( \varvec{x}_1, \varvec{R}_1 \right) \left( \varvec{x}_2, \varvec{R}_2 \right) :=\left( \varvec{x}_1 + \varvec{R}_1 \varvec{x}_2 ,\, \varvec{R}_1 \varvec{R}_2 \right) . \end{aligned}$$

These roto-translations act transitively on the space \(\mathbb {R}^d \times S^{d-1}\) by

$$\begin{aligned} (\varvec{x}, \varvec{R}) \odot (\varvec{y},\varvec{n}):= (\varvec{x}+\varvec{R}\varvec{y}, \varvec{R}\varvec{n}), \end{aligned}$$

for all \((\varvec{y},\varvec{n}) \in \mathbb {R}^{d}\times S^{d-1}\) and all roto-translations \((\varvec{x},\varvec{R}) \in SE(d)\).

We choose an a priori reference vector \(\varvec{a} \in S^{d-1}\), say \(\varvec{a}=(1,0)^T\) if \(d=2\) or \(\varvec{a}=(0,0,1)^T\) if \(d=3\). Then the stabilizer of the element \((\varvec{0},\varvec{a})\) is given by

$$\begin{aligned} H_d := \left\{ g \in \hbox {SE}(d) \ \vert \ g \odot (\varvec{0},\varvec{a}) = (\varvec{0},\varvec{a}) \right\} , \end{aligned}$$

which is isomorphic to \(\hbox {SO}(d-1)\).

The homogeneous space of positions and orientations is the partition of left cosets

$$\begin{aligned} \mathbb {M}_d := \mathbb {R}^d \rtimes S^{d-1} := \hbox {SE}(d)/H_d. \end{aligned}$$

The left cosets are equivalence classes in \(\hbox {SE}(d)\) with respect to the equivalence relation

$$\begin{aligned} g_1 \sim g_2 \iff g_1^{-1} g_2 \in H_d. \end{aligned}$$

For \(d=2\), the subgroup \(H_2=\{(\mathbf {0},\mathbf {I})\}\) consists only of the unit element, and thereby the manifold \(\mathbb {M}_2\) is diffeomorphic to \(\hbox {SE}(2)\). However, for \(d > 2\) the manifolds \(\mathbb {M}_d\) and \(\hbox {SE}(d)\) are not diffeomorphic.

For \(d=3\), the stabilizer can be described by

$$\begin{aligned} H_3 = \left\{ {\Big \vert } h_\alpha := \left( \varvec{0}, \varvec{R}_{\varvec{a},\alpha } \right) \ \Big \vert \ \alpha \in [0,2\pi ) \right\} , \end{aligned}$$

where \(\varvec{R}_{\varvec{a},\alpha }\) denotes a (counter-clockwise) rotation over angle \(\alpha \) around the reference axis \(\varvec{a}\). This means that two roto-translations \(g_1 = (\varvec{x}_1,\varvec{R}_1)\) and \(g_2 = (\varvec{x}_2,\varvec{R}_2)\) are equivalent if and only if

$$\begin{aligned} \varvec{x}_1 = \varvec{x}_2 \ \text { and }\ \exists \alpha \in [0,2\pi ): \varvec{R}_1 = \varvec{R}_2 \varvec{R}_{\varvec{a},\alpha }. \end{aligned}$$

The equivalence classes \(\left[ g \right] = \left\{ g' \in \hbox {SE}(3) \ \big \vert \ g' \sim g \right\} \) are usually just denoted by \(p=(\varvec{x},\varvec{n})\) as they consist of all rigid body motions \(g=\left( \varvec{x},\varvec{R}_{\varvec{n}} \right) \) that map the reference point \((\varvec{0},\varvec{a})\) onto \((\varvec{x},\varvec{n}) \in \mathbb {R}^3 \times S^2\):

$$\begin{aligned} g \odot (\varvec{0}, \varvec{a}) = (\varvec{x},\varvec{n}). \end{aligned}$$

Remark 3

(Distinguishing \(\hbox {SE}(d)\) from \(\mathbb {M}_d\)) As the distinction between the group \(\hbox {SE}(d)\) and the homogeneous space \(\mathbb {M}_d\) (which is not a group for \(d=3\) and above) is important, we will use gh for elements of \(\hbox {SE}(d)\), and pq for points in \(\mathbb {M}_d\).

To understand why the situation changes from \(d=2\) to \(d >2\) observe that in 2 dimensions we need one angle to specify orientation and have one rotational degree of freedom, in 3 dimensions we need 2 angles to specify orientation, but we have 3 rotational degrees of freedom, i.e., \(\mathbb {M}_3\) has one dimension less than \(\hbox {SE}(3)\). See also Fig. 3 for an illustration of this difference.

For \(d > 3\) this situation persists as we have more rotational degrees of freedom that do not change the orientation.

Remark 4

(Domain of an orientation score) The orientation score is well defined on the domain \(\mathbb {M}_d\) if we assume \(\psi \) is not affected under the action of subgroup \(H_d\). For \(d=3\) this means we must impose axial symmetry on the wavelets, for details see [33].

2.3 Differential Structure on \(\hbox {SE}(d)\), \({\mathbf {\mathbb {M}}}_d\)

As a manifold, we view the group \(\hbox {SE}(d)\) in a standard way as a submanifold of \(\mathbb {R}^d \times \mathbb {R}^{d \times d}\). The Lie algebra is, as a vector space, the tangent space at the unit element (see [36, Ch. 7]). We view elements of tangent spaces (i.e., tangent vectors) as derivations acting on functions: If v is an ordinary vector in \(\mathbb {R}^d \times \mathbb {R}^{d\times d}\) tangent to \(\hbox {SE}(d)\), the corresponding derivation acting on a function \(f \in C^1 \left( \hbox {SE}(d) \right) \) is just the derivative of f in the direction of v.

The Lie algebra has dimension \(D=\frac{1}{2}d(d+1)\). We choose a basis \(\left( A_i \right) _{i=1}^{D}\) for the Lie algebra of \(\hbox {SE}(d)\) with the following properties. The basis is orthonormal with respect to the inner product belonging to the standard Euclidean metric on \(\mathbb {R}^d \times \mathbb {R}^{d \times d}\); the vectors \(\{A_1, \dots , A_d \}\) span the spatial part of the Lie algebra, which is isomorphic to \(\mathbb {R}^d\) with the vector \(A_d\) corresponding to the derivative in the direction of \(\varvec{a}\). Recall that for \(d=2\) the subgroup \(H_d\) is trivial. For \(d\ge 3\) one has that the set \(\{A_{2d}, \dots , A_{D}\}\) forms a basis for the stabilizer subgroup \(H_d\). We take the convention that the Lie algebra vector \(A_{i+d}\) generates the in-plane rotation in the plane spanned by \(A_i\) and \(\varvec{a}\) for \(i=1,\ldots ,d-1\).

For the case \(d=2\) this gives us two spatial generators, \(A_1\) and \(A_2\), and one rotation generator \(A_3\). Moving to \(d=3\) we have 3 spatial degrees of freedom and 3 rotational degrees of freedom, but only 2 of those rotational degrees of freedom will change the orientation, we denote the generator corresponding to the rotation that preserves the reference axis by \(A_6\). This gives us the following basis:

$$\begin{aligned} \left\{ \; \; \underbrace{{\Big \vert }A_1,A_2,A_3}_{\begin{array}{c} \text {spatial}\\ \text {generators} \end{array}} ,\ \underbrace{{\Big \vert }A_4,A_5,}_{\begin{array}{c} \text {generators of rotations}\\ \text {that move}~\varvec{a} \end{array}} \ \underbrace{{\Big \vert }A_6}_{\begin{array}{c} \text {generator of rotation}\\ \ \text {that fixes}~\varvec{a} \end{array}} \right\} . \end{aligned}$$

As is illustrated in Fig. 3 for \(d=3\) we have a rotational degree of freedom that does not change the orientation reference axis. As a result \(\mathbb {M}_3\) is not isomorphic to \(\hbox {SE}(3)\). It is rather a 5-dimensional quotient of the 6-dimensional Lie group \(\hbox {SE}(3)\), see also Remark 3.

Fig. 3
figure 3

Illustration of the Lie algebra of left-invariant vector fields \(\left( \mathcal {A}_i \right) _{i=1}^D\) of \(\hbox {SE}(d)\) for left: \(d=2\) and right: \(d=3\), note the orientation-preserving rotation generator \(\mathcal {A}_6\)

Remark 5

(Generalization for \(d>3\)) Generalizing this scheme for \(d > 3\) we would have the following basis for the Lie algebra:

$$\begin{aligned} \left\{ \; \underbrace{{\Big \vert }A_1,\ \ldots \ ,\ A_d}_{\begin{array}{c} \text {spatial}\\ \text {generators} \end{array}} ,\ \underbrace{{\Big \vert }A_{d+1},\ \ldots \ ,\ A_{2d-1}}_{\begin{array}{c} \text {generators of rotations}\\ \text {that move}~\varvec{a} \end{array}} ,\ \underbrace{{\Big \vert }A_{2d},\ \ldots \ ,\ A_D}_{\begin{array}{c} \text {generators of rotations}\\ \ \text {that fix}~\varvec{a} \end{array}} \right\} . \end{aligned}$$

We extend the vectors \(A_i\) to left-invariant vector fields \(\mathcal {A}_i\) as follows. The group acts on itself by left multiplication,

$$\begin{aligned} L_g h := g h, \quad \forall g,h \in \hbox {SE}(d), \end{aligned}$$

and the derivation \((\mathcal {A}_i)_g\), evaluated in a point g, is given by the pushforward

$$\begin{aligned} \mathcal {A}_i\big \vert _g f := (\left( L_g \right) _* A_i) f = A_i \left( f \circ L_g \right) , \end{aligned}$$

for all \(f\in C^\infty \left( \hbox {SE}(d), \mathbb {R} \right) \). We denote the corresponding covector fields by \(\omega ^i:g \mapsto \omega ^i \vert _g\). For each \(g \in \hbox {SE}(d)\), the covector \(\omega ^i\vert _g\) is an element of the dual to the tangent space of \(\hbox {SE}(d)\) at g. The covector fields are characterized by

$$\begin{aligned} \left\langle \omega ^{i} , \mathcal {A}_{j} \right\rangle = \delta ^{i}_{j}, \end{aligned}$$

where \(\delta ^i_j\) denotes the Kronecker delta.

Note that

$$\begin{aligned} A_d = \varvec{a} \cdot \nabla _{\mathbb {R}^d} \Big \vert _{\varvec{0}} = \sum _{i=1}^d a^i \frac{\partial }{\partial x^i} \bigg \vert _{\varvec{0}}, \end{aligned}$$

and so for all \(g=\left( \varvec{x},\varvec{R}_{\varvec{n}}\right) \in \hbox {SE}(d)\):

$$\begin{aligned} \mathcal {A}_d \Big \vert _g= & {} \left( L_g \right) _* A_d = \sum _{i=1}^d \left( \varvec{R}_{\varvec{n}} \varvec{a} \right) ^i \frac{\partial }{\partial x^i} \bigg \vert _{\varvec{x}}\nonumber \\= & {} \sum _{i=1}^d n^i \frac{\partial }{\partial x^i} \bigg \vert _{\varvec{x}} = \varvec{n} \cdot \nabla _{\mathbb {R}^d} \Big \vert _{\varvec{x}}, \end{aligned}$$

from which we infer that the left-invariant frame is aligned with the direction \(\varvec{n} \in S^{d-1}\).

Remark 6

(Left-Invariant Basis in 2D) We can represent an element of \(\hbox {SE}(2)\) by its position and angle as \((\varvec{x}, \theta )\in \mathbb {R}^2 \times \left[ 0, 2\pi \right) \) which allows us to write the left-invariant vector fields \(\mathcal {A}_i\) as:

$$\begin{aligned} \mathcal {A}_1 \big \vert _{(\varvec{x},\theta )}= & {} -\sin \theta \partial _x \big \vert _{\varvec{x}} + \cos \theta \partial _y \big \vert _{\varvec{x}} , \\ \mathcal {A}_2 \big \vert _{(\varvec{x},\theta )}= & {} \quad \cos \theta \partial _x \big \vert _{\varvec{x}} + \sin \theta \partial _y \big \vert _{\varvec{x}} = \varvec{n} \cdot \nabla _{\mathbb {R}^2} \big \vert _{\varvec{x}} , \\ \mathcal {A}_3 \big \vert _{(\varvec{x},\theta )}= & {} \quad \partial _\theta . \end{aligned}$$

For an explicit form of the left-invariant vector fields \(\mathcal {A}_i\) in case \(d=3\), see “Appendix A.”

We introduce the following metric tensor field in terms of the left-invariant co-vector fields \(\left( \omega ^i \right) _{i=1}^{2d-1}\).

Definition 1

(Left-invariant metric tensor field) Given positive constants \(D_S > 0\) and \(D_A > 0\), and a nonnegative real number \(\mathfrak {e} \ge 0\), we define the left-invariant metric tensor field \(\mathcal {G}\) by

$$\begin{aligned} \mathcal {G}= \left\{ {\begin{array}{ll} \frac{\omega ^d \otimes \omega ^d}{D_S} + \frac{\sum \nolimits _{i=1}^{d-1} \omega ^i \,\otimes \, \omega ^i }{\mathfrak {e}^2 D_S} + \frac{\sum \nolimits _{i=d+1}^{2d-1} \omega ^i \, \otimes \, \omega ^i }{D_A}&{} \text {if }\mathfrak {e} > 0,\\ \frac{\omega ^d \, \otimes \, \omega ^d}{D_S} + \frac{\sum \nolimits _{i=d+1}^{2d-1} \omega ^i \, \otimes \, \omega ^i }{D_A} &{} \text {if }\mathfrak {e} = 0. \end{array}}\right. \end{aligned}$$

Remark 7

(Sub-Riemannian case) Henceforth we refer to \(\mathfrak {e}=0\) as the sub-Riemannian case where tangent vectors are constrained to the span of \(\mathcal {A}_d,\ldots ,\mathcal {A}_{2d-1}\). Intuitively when \(\mathfrak {e} \downarrow 0\) the other tangent directions get infinite cost and become prohibited. This means that we restrict ourselves to so-called horizontal tangent vectors:

$$\begin{aligned} (\dot{\mathbf {x}},\dot{\mathbf {n}}) \in T_{(\mathbf {x},\mathbf {n})}(\mathbb {M}_d) \text { is horizontal } \iff \mathbf {n} \wedge \dot{\mathbf {x}}=0. \end{aligned}$$

Observe that this sub-Riemannian metric tensor is defined (and invertible) on a sub-bundle of the tangent bundle on the group as it does not contain any of the covectors dual to the sub-bundle induced by subgroup \(H_d\). Furthermore it is spatially isotropic orthogonal to the primary spatial direction. Also spherically we impose isotropy in the metric as can be seen from the last term in the above definition.

This metric induces an associated norm: If \(\dot{g} \in T_g \left( \hbox {SE}(d)\right) \), then

$$\begin{aligned} \left\| \dot{g} \right\| _{\mathcal {G}} := \sqrt{\mathcal {G} \big \vert _g \left( \dot{g}, \dot{g} \right) } , \end{aligned}$$

where again in the sub-Riemannian case we only allow \(\dot{g}\) to be in the span of \(\mathcal {A}_d,\ldots ,\mathcal {A}_{2d-1}\).

Now that we have \(\hbox {SE}(d)\) equipped with a (sub)-Riemannian metric tensor, we can derive the basic tools that are required to formulate our geometric PDEs. These basic tools include the gradient, its norm, and the divergence of a vector field. Let us relabel our parameters as

$$\begin{aligned} D_i =\left\{ {\begin{array}{ll} D_S \qquad &{}\text { if } i=d,\\ \mathfrak {e}^2 D_S \quad &{}\text { if } 1 \le i \le d-1,\\ D_A \quad &{}\text { if } d+1 \le i \le 2d-1. \end{array}}\right. \end{aligned}$$

Let \(\tilde{U}:\hbox {SE}(d) \rightarrow \mathbb {R}\) carry the axial symmetry:

$$\begin{aligned} \tilde{U}(\varvec{x},\varvec{R})=U(\varvec{x},\varvec{R} \varvec{a}), \end{aligned}$$

for some \(U:\mathbb {R}^{d} \times S^{d-1} \rightarrow \mathbb {R}\).

Then in the Riemannian setting the gradient of a differentiable function \(\tilde{U}:\hbox {SE}(d) \rightarrow \mathbb {R}\) on the group induced by this metric tensor becomes

$$\begin{aligned} \nabla _\mathcal {G} \tilde{U} = \sum _{i=1}^{2d-1} D_i \left( \mathcal {A}_i \tilde{U} \right) \mathcal {A}_i, \end{aligned}$$

where the sum only runs to \(2d-1\) and not to \(\text {dim}(\hbox {SE}(d))=D= \frac{1}{2}d(d+1)\) since (16) implies that

$$\begin{aligned} \mathcal {A}_{i}\tilde{U}=0 \text { for }2d-1 < i \le D. \end{aligned}$$

The gradient then has the following norm

$$\begin{aligned} \left\| \nabla _\mathcal {G} \tilde{U} \right\| ^2_\mathcal {G} = \sum _{i=1}^{2d-1} D_i \left( \mathcal {A}_i \tilde{U} \right) ^2 . \end{aligned}$$

The divergence of a vector field is given by

$$\begin{aligned} \text {div}_\mathcal {G} \varvec{v} = \sum _{i=1}^{2d-1} \mathcal {A}_i v^i \ \ \text { for all }\ \ \varvec{v}=\sum _{i=1}^{2d-1} v^i \mathcal {A}_i. \end{aligned}$$

In the sub-Riemannian setting, where we restrict ourselves to vector fields spanned by \(\left( \mathcal {A}_i \right) _{i=d}^{2d-1}\), we have

$$\begin{aligned} \nabla _\mathcal {G} \tilde{U}= & {} \sum \limits _{i=d}^{2d-1} D_i \left( \mathcal {A}_i \tilde{U} \right) \mathcal {A}_i , \text { and }\nonumber \\ \text {div}_\mathcal {G} \,\mathbf {v}= & {} \sum \limits _{i=d}^{2d-1} \mathcal {A}_i v^i \ \ \text { for all }\ \ \varvec{v}=\sum \limits _{i=d}^{2d-1} v^i \mathcal {A}_i. \end{aligned}$$

2.4 Locally Adaptive Frames on \(\hbox {SE}(d)\) as SVD of the Hessian

As an alternative to the left-invariant frame we can choose a frame (and subsequently a metric tensor field) that is adapted to the data (which we also refer to as gauge frames in analogy with [23]). Specifically, instead of having the vector field \(\mathcal {A}_d = \varvec{n} \cdot \nabla \) as a static forward direction we want to choose a vector field \(\mathcal {B}_d\) that locally aligns with the data [23]. In particular, \(\mathcal {B}_d\) can take on a angular component, meaning the local “straight forward” will follow the curve of the data; consequently, flows can better follow curved structures, see Fig. 4 for an example.

Remark 8

(Fitting a frame) We can induce an entire frame in \(\hbox {SE}(d)\) from a choice of main vector, see [23, Appendix A] for details. For an intuitive illustration see Fig. 4. In this article we will focus on the method by which the main gauge vector is obtained.

Next we will present a singular value decomposition of the Hessian; we will choose the eigenvector associated with the smallest eigenvalue as \(\mathcal {B}_d\). Geometrically, this can be seen as the direction in which the gradient changes the least. Before we can formulate this procedure we explain the concept of exponential curves (see Fig. 5).

Fig. 4
figure 4

Illustrating gauge frame fitting. Top: left-invariant frame where \(\mathcal {A}_d=\varvec{n}\cdot \nabla _{\mathbb {R}^2}\), recall (11), the red line indicates the exponential curve associated with \(\mathcal {A}_2\). Bottom: we choose a frame that takes into account the local curvature; here the green line indicates the exponential curve associated with \(\mathcal {B}_2\)

Definition 2

(Exponential curve) Let \(\dot{g}\in T_g \left( \hbox {SE}(d)\right) \) then the exponential curve parameterized by t through g with tangent vector \(\dot{g}\) is written as \(e^{\dot{g}t}_g\) and is the curve for which \(e^{\dot{g}0}_g=g\) and which has the property that for all \(t\in \mathbb {R}\):

$$\begin{aligned} \left( \frac{\mathrm{{d}}}{\hbox {d}t} e^{\dot{g} t}_g \right) (t) = \sum _{i=1}^{2d-1} \omega ^i \vert _g \left( \dot{g} \right) \, \mathcal {A}_i \big \vert _{e^{\dot{g}t}_g}. \end{aligned}$$

Or more explicitly in coordinates, if \(\dot{g}=\sum _{i=1}^{2d-1} \dot{g}^i \mathcal {A}_i \big \vert _g\) we have that:

$$\begin{aligned} \left( \frac{\mathrm{{d}}}{\hbox {d}t} e^{\dot{g} t}_g \right) (t) = \sum _{i=1}^{2d-1} \dot{g}^i \, \mathcal {A}_i \big \vert _{e^{\dot{g}t}_g}. \end{aligned}$$

Hence the exponential curves are those curves whose tangent vector components with respect to the left-invariant frame do not change. For an illustration of such curves for the case \(d=2\) see Fig. 5.

Fig. 5
figure 5

A set of exponential curves through a common point for \(d=2\). Exponential curves are those curves whose tangent vectors are part of a left-invariant vector field. Taken with permission from [5]

In view of (16) and (18) we define

$$\begin{aligned} T(g) := \text {span}\, \{\mathcal {A}_1,\ldots ,\mathcal {A}_{2d-1}\} \subset T_{g}(\hbox {SE}(d)). \end{aligned}$$

Now we want to select \(\mathcal {B}_d \big \vert _g\) (normalized with respect to the existing metric tensor \(\mathcal {G} \big \vert _g\)) so that the gradient of the data \(\tilde{U} \in C^1\left( \hbox {SE}(d), \mathbb {R} \right) \) changes as little as possible (recall Fig. 4) in the following manner.

Definition 3

(Main gauge vector) We define the main gauge vector as

$$\begin{aligned} \mathcal {B}_d \Big \vert _g:= & {} \text {argmin}_{\begin{array}{c} \dot{g} \in T(g), \\ ||\dot{g}||_{\mathcal {G}}=1 \end{array}} \left\| \text {Hess} \vert _g (\tilde{U}) (\dot{g}, \ \cdot \ ) \right\| ^2_{\mathcal {G}*} \\= & {} \text {argmin}_{\begin{array}{c} \dot{g} \in T(g) \\ ||\dot{g}||_{\mathcal {G}}=1 \end{array}} \left\| \ \left. \frac{d}{dt}\left[ \left( L_{g e_g^{-t\dot{g}}} \right) _* \nabla _\mathcal {G} \tilde{U} \left( e^{t\dot{g}}_g\right) \right] \right| _{t=0}\ \right\| _{\mathcal {G}}^2 , \end{aligned}$$

where we assume that \(\tilde{U}\) is such that we have a unique minimizer. The Hessian in the previous equation is induced by a Cartan connection as outlined in [23, Appendix 4, (133)].

Writing the tangent vector in terms of the local left-invariant frame as \(\dot{g}=\sum _{i=1}^{2d-1} \dot{g}^i \mathcal {A}_i \big \vert _g \in T(g)\) let us write out the Hessian as follows:

$$\begin{aligned} \mathcal {B}_d \big \vert _g= & {} \text {argmin}_{\begin{array}{c} \dot{g} \in T(g), \\ ||\dot{g}||_{\mathcal {G}}=1 \end{array}} \ \ \sum _{i=1}^{2d-1} D_i \left( \dot{g} \left( \mathcal {A}_i \tilde{U} \right) \right) ^2\nonumber \\= & {} \text {argmin}_{\begin{array}{c} \dot{g} \in T(g) \\ ||\dot{g}||_{\mathcal {G}}=1 \end{array}} \ \ \sum _{i=1}^{2d-1} D_i \left( \sum _{j=1}^{2d-1} \dot{g}^j \mathcal {A}_j \left( \mathcal {A}_i \tilde{U} \right) \right) ^2 .\nonumber \\ \end{aligned}$$

We can write this problem in terms of matrices by defining the following:

$$\begin{aligned} \dot{\varvec{g}}= & {} \left( \dot{g}^1 , \dot{g}^2, \ldots , \dot{g}^{2d-1} \right) ^T, \\ M= & {} \mathrm {diag}\left( \sqrt{D_1}, \sqrt{D_2}, \ldots , \sqrt{D_{2d-1}} \right) , \\ K= & {} K \left( \tilde{U} \right) \big \vert _g := \left( \mathcal {A}_j \big \vert _g \left( \mathcal {A}_i \big \vert _g \tilde{U} \right) \right) _{i,j}. \end{aligned}$$

with i as row index and j as column index.

Using these the objective function in (22) becomes

$$\begin{aligned} \left( M K \dot{\varvec{g}}\right) ^T \left( M K \dot{\varvec{g}}\right) = \dot{\varvec{g}}^T K^T M^2 K \dot{\varvec{g}}, \end{aligned}$$

which we want to minimize under the constraint

$$\begin{aligned} \sum _{i=1}^{2d-1} \frac{\left( \dot{g}^i \right) ^2}{D_i} = \left\| M^{-2} \dot{\varvec{g}} \right\| ^2 =1 . \end{aligned}$$

Taking the derivative of the Lagrangian of this convex optimization problem gives us optimality under the following condition (\(\lambda \in \mathbb {R}\)):

$$\begin{aligned} K^T M^2 K \dot{\varvec{g}} = \lambda M^{-2} \dot{\varvec{g}} \iff M^2 K^T M^2 K \dot{\varvec{g}} = \lambda \dot{\varvec{g}}, \end{aligned}$$

i.e., \(\dot{\varvec{g}}\) needs to be an eigenvector of the matrix \(M^2 K^T M^2 K\) with eigenvalue \(\lambda \) (serving as the Lagrangian multiplier). If for a moment we rewrite (25) as

$$\begin{aligned} \left( M K M \right) ^T \left( M K M \right) \left( M^{-1} \dot{\varvec{g}} \right) = \lambda \left( M^{-1} \dot{\varvec{g}} \right) , \end{aligned}$$

we see that \(\lambda \) is indeed real since \(\left( M K M \right) ^T \left( M K M \right) \) is symmetric. With this eigenvalue and vector objective function (23) evaluates to

$$\begin{aligned} \dot{\varvec{g}}^T K^T M^2 K \dot{\varvec{g}}= & {} \dot{\varvec{g}}^T M^{-2} M^2 K^T M^2 K \dot{\varvec{g}} \\= & {} \dot{\varvec{g}}^T M^{-2} \lambda \dot{\varvec{g}} \\= & {} \lambda \dot{\varvec{g}}^T M^{-2} \dot{\varvec{g}} \\= & {} \lambda \left\| \dot{g} \right\| _{\mathcal {G}}^2 = \lambda . \end{aligned}$$

This last equation incidentally proves that \(M^2 K^T M^2 K\) is positive semidefinite and, more importantly, that to minimize the change in gradient we need to look at the eigenvector belonging to the smallest eigenvalue.

In practice, we do not immediately calculate the eigenvectors and eigenvalues from the scheme we have just proposed, but for the purpose of stability we first apply a componentwise Gaussian smoothing on the matrix K as follows:

$$\begin{aligned} \tilde{K} \big \vert _g:= & {} \left( G * K \right) \left( \varvec{x}, \varvec{R_n} \right) \nonumber \\= & {} \int _{\mathbb {R}^d} \int _{S^{d-1}} G\left( \varvec{x}-\varvec{y},\ R^T_{\varvec{m}} \varvec{n} \right) \ K \big \vert _{\left( \varvec{y},\, \varvec{R_m} \right) }\ \hbox {d}\sigma (\varvec{m}) \hbox {d}\varvec{y} ,\nonumber \\ \end{aligned}$$

ergen with the usual surface measure \(\sigma \) on \(S^{d-1}\) and with the smoothing kernel

$$\begin{aligned} G(\varvec{y},\varvec{m}) := G^{\mathbb {R}^d}_{\rho _s} \left( \varvec{0}, \varvec{y} \right) \cdot G^{S^{d-1}}_{\rho _a} \left( \varvec{a},\varvec{m} \right) , \end{aligned}$$

where \(G^M_{\rho }\) is the heat kernel on the Riemannian manifold M with timescale \(\rho >0\), the spatial kernel is centered on \(\varvec{0}\), and the orientation kernel is centered on the reference direction \(\varvec{a}\).

Remark 9

(Diffusion on \(\mathbb {M}_d\)) It is important in the context of \(\mathbb {M}_d\) to choose diffusion that is isotropic spatially (with timescale \(\rho _s\)) and spherically (with timescale \(\rho _a\)) since this is the only diffusion that commutes with the left-invariant vector fields. Note that \(G^{\mathbb {R}^d}_{\rho _s}(\varvec{0},\varvec{y})\) depends only on \(\left\| \varvec{y} \right\| \) and \(G^{S^{d-1}}_{\rho _a }(\varvec{a},\varvec{m})\) depends only on \(\arccos {\left( \varvec{a} \cdot \varvec{m} \right) }\) making \(G(\varvec{y},\varvec{m})\) the heat kernel on the product manifold \(\mathbb {R}^d \times S^{d-1}\). This smoothing method is a variant on the one used in [23].

The remaining basis vectors are determined by considering a rotation that maps \(\mathcal {A}_d \big \vert _g\) to \(\mathcal {B}_d \big \vert _g\) and then applying a specific rotation to the remaining \(\mathcal {A}_i \big \vert _g\) that keeps the remaining spatial generators spatial. For an illustration see Fig. 4. How this rotation is chosen and applied is detailed in [23, App.B].

Having determined a data-adaptive frame \(\left( \mathcal {B}_i\right) _{i=1}^{2d-1}\) (induced by \(\mathcal {B}_d\), recall Fig. 4), we equip it with the following straightforward metric, where again we rely on the corresponding dual frame \(\left( \beta ^i \right) _{i=1}^{2d-1}\) given by

$$\begin{aligned} \left\langle \beta ^{i}, \mathcal {B}_{j} \right\rangle = \delta ^{i}_{j}. \end{aligned}$$

Definition 4

(Gauge metric tensor field) We define the gauge metric tensor field \(g \mapsto \mathcal {J} \big \vert _g \left( \cdot , \cdot \right) \) as

$$\begin{aligned} \mathcal {J} := \sum _{i=1}^{2d-1} \beta ^i \otimes \beta ^i, \end{aligned}$$

which induces a norm on \(\dot{g} \in T_g \left( \hbox {SE}(d)\right) \):

$$\begin{aligned} \left\| \dot{g} \right\| _{\mathcal {J}} := \sqrt{\mathcal {J} \big \vert _g \left( \dot{g},\dot{g}\right) }, \end{aligned}$$

a gradient on \(\tilde{U} \in C^1\left( \hbox {SE}(d)\right) \):

$$\begin{aligned} \nabla _{\mathcal {J}} \tilde{U} := \sum _{i=1}^{2d-1} \left( \mathcal {B}_i \tilde{U} \right) \mathcal {B}_i, \end{aligned}$$

with norm

$$\begin{aligned} \left\| \nabla _{\mathcal {J}} \tilde{U} \right\| ^2_{\mathcal {J}} = \sum _{i=1}^{2d-1} \left( \mathcal {B}_i \tilde{U} \right) ^2, \end{aligned}$$

and finally gives the divergence of a vector field as:

$$\begin{aligned} \text {div}_{\mathcal {J}} = \sum _{i=1}^{2d-1} \mathcal {B}_i \circ \left( g \mapsto \beta ^i \big \vert _g \right) , \end{aligned}$$

which means that if we apply it to a vector field expressed in the gauge frame as \(\varvec{u}=\sum _{i=1}^{2d-1} u^i \mathcal {B}_i\) we have:

$$\begin{aligned} \text {div}_\mathcal {J} \varvec{u} = \sum _{i=1}^{2d-1} \mathcal {B}_i u^i. \end{aligned}$$

2.5 Coherence Enhancement Operator

Coherence-enhancing diffusion is a well-known technique for image enhancement [54]. It is intended for line amplification rather than strictly denoising. Crossing-preserving versions on \(\mathbb {M}_d\) have been developed [23] and evaluated for denoising. Here, crossing lines are well enhanced, but plateaus and boundaries of line structures are damaged. Therefore we propose to include the coherence enhancement technique into TV and MC flows.

Next we explain how this coherence enhancement operator is constructed from an orientation confidence.

In \(\mathbb {R}^3\), orientation confidence is calculated by the Laplacian in the subspace orthogonal to the line structure. We can take a similar approach in \(\mathbb {M}_d\) by taking the Laplacian in the space spanned by \(\left( \mathcal {A}_i\right) _{i=1, i\ne d}^{2d-1}\). Recall that \(\mathcal {A}_d\) is implicitly aligned with the local line structure along \(\varvec{n}\). In the gauge-frame setting \(\mathcal {B}_d\) is explicitly aligned with the line structure (see Fig. 4), and therefore we take the Laplacian in the span of \(\left( \mathcal {B}_i \right) _{i=1,i\ne d}^{2d-1}\).

In the sub-Riemannian case (i.e., \(D_1=\cdots =D_{d-1}=0\)) this just reduces to the second derivatives in the \((d-1)\)-dimensional spaces spanned by \(\left( \mathcal {A}_i\right) _{i=d+1}^{2d-1}\) and \(\left( \mathcal {B}_i\right) _{i=d+1}^{2d-1}\), respectively. With that in mind we define orientation confidence in \(\hbox {SE}(d)\) as follows.

Let \(\tilde{U}:\hbox {SE}(d) \rightarrow \mathbb {R}\), then in the left-invariant case we define

$$\begin{aligned} C_{\tilde{U},\text {LI}}(g):= & {} \left| \sum _{i=1,i\ne d}^{2d-1} D_i\ \mathcal {A}_i \big \vert _g \left( \mathcal {A}_i \tilde{U}\right) \right| , \end{aligned}$$
$$\begin{aligned} \text {or}&\nonumber \\ C_{\tilde{U},\text {GF}}(g):= & {} \left| \sum _{i=1,i\ne d}^{2d-1} \, \mathcal {B}_i \big \vert _g \ \left( \mathcal {B}_i \tilde{U}\right) \right| . \end{aligned}$$

in the gauge-frame case.

Note that the \(\mathcal {B}_i\)’s are normalized with respect to old metric (12) and as such the parameters \(D_i\) are still included in (36). In the case that \(\mathcal {B}_d\) is aligned with \(\mathcal {A}_d\) we have \(\mathcal {B}_i = \sqrt{D_i}\mathcal {A}_i\) and (35) and (36) coincide.

Definition 5

(Isotropy factor) Let \(c>0\) be a chosen scaling constant, then the isotropy factor is defined as:

$$\begin{aligned} \alpha _{\tilde{U}} (g) := e^{-\frac{C_{\tilde{U}}(g)}{c}}, \end{aligned}$$

with \(C_{\tilde{U}}\) defined by (35), respectively (36).

What is convenient about this quantity is that it gives a number in the range \(\left( 0,1\right] \) with a number close to zero indicating a high degree of anisotropy and a 1 indicating perfect isotropy. This is the quantity that we can use to steer flow.

The choice of c controls how steep the decline of the isotropy factor is. Its appropriate value depends on the application and on exactly how the data are represented numerically (normalized to [0, 1] in our case) and are best determined heuristically or by histogram. For our experiments we have used \(c=0.2\).

Using this scalar function \(\alpha _{\tilde{U}}\) on the group \(\hbox {SE}(d)\), we can locally modify vectors based on how certain we are the data are locally aligned. We refer to this modification of vector fields as coherence enhancement (as in coherence enhancing diffusion [30]). Tangent vectors (such as the gradient as we will see) are modified as follows. Let \(\varvec{v}\) be a vector field on \(\hbox {SE}(d)\). Then the coherence-enhanced vector field is given as

$$\begin{aligned} E_{\mathcal {G}}\left( \varvec{v}\right) := \left\langle \omega ^d ,\, \varvec{v} \right\rangle \mathcal {A}_d + \alpha _{\tilde{U}} \sum _{\begin{array}{c} i=1\\ i\ne d \end{array}}^{2d-1} \left\langle \omega ^d,\, \varvec{v} \right\rangle \mathcal {A}_i, \end{aligned}$$

for the left-invariant geometry and as

$$\begin{aligned} E_{\mathcal {J}}\left( \varvec{v}\right) := \left\langle \beta ^d ,\, \varvec{v} \right\rangle \mathcal {B}_d + \alpha _{\tilde{U}} \sum _{\begin{array}{c} i=1\\ i\ne d \end{array}}^{2d-1} \left\langle \beta ^d,\, \varvec{v} \right\rangle \mathcal {B}_i. \end{aligned}$$

and for the gauge geometry.

Intuitively, these linear operators \(E_\mathcal {G}, E_\mathcal {J}:T(G) \rightarrow T(G)\) preserve the magnitude of the vector in the main direction and weaken it orthogonal to the main direction if we are certain the data are locally aligned to the main direction.

2.6 Descending to the Homogeneous Space

So far we have developed two distinct geometries on the group \(\hbox {SE}(d)\) that are summarized in Table 1. We can bring these geometries down to the homogeneous space \(\mathbb {M}_d\) by considering the natural extension of functions and vector fields on \(\mathbb {M}_d\) to \(\hbox {SE}(d)\). Consider a function \(U \in C^{\infty }(\mathbb {M}_d)\), then the function \(\tilde{U}\), given by

$$\begin{aligned} \tilde{U}(g) = \tilde{U}(\varvec{x},\varvec{R}) := U(\varvec{x},\varvec{Ra}) \end{aligned}$$

for all \(g=(\varvec{x},\varvec{R}) \in \hbox {SE}(d)\), is its natural extension to \(\hbox {SE}(d)\) and is clearly also smooth. Similarly, a tangent vector field (recall that we understand these as differential operators acting on scalar functions) \(\varvec{v}\) on \(\mathbb {M}_d\) can be extended as follows:

$$\begin{aligned} \left( \tilde{\varvec{v}} \tilde{U} \right) \left( g \right) = \left( \tilde{\varvec{v}} \tilde{U} \right) \left( \varvec{x}, \varvec{R} \right) := \left( \varvec{v} U \right) \left( \varvec{x}, \varvec{Ra} \right) , \end{aligned}$$

under the additional constraint that \(\tilde{\varvec{v}}\) vanishes in the direction induced by the subgroup \(H_d\) (i.e., for all \(i \ge 2d\) we have \(\left\langle \mathcal {\omega }^i,\, \tilde{\varvec{v}} \right\rangle =0\)) this extension is unique.

Having extended functions and vector fields upward to the group, we can apply the tools from Table 1 to them and subsequently project the results back to the homogeneous space by the mapping \((\varvec{x},\varvec{R}) \mapsto (\varvec{x},\varvec{Ra})\). This mapping is not injective. Nevertheless, thanks to metrics (12), (30) being laterally and spherically isotropic and the way we extend functions to the group by (39), (40), all the tools we list in Table 2 are well defined on \(\mathbb {M}_d\).

Remark 10

(Choice of \(\varvec{R_n}\)) While the choice of mapping \(\varvec{n} \mapsto \varvec{R_n}\) does not matter for the final result, a choice does have to be made for an implementation when \(d \ge 3\). The most straightforward manner is selecting that \(\varvec{R_n}\) which is an in-plane rotation, meaning the plane of rotation is spanned by \(\varvec{a}\) and \(\varvec{n}\). In the two cases where this is not possible (i.e., \(\varvec{n}=\pm \varvec{a}\)) we pick \(\varvec{R_a}=\varvec{0}\) and \(\varvec{R}_{-\varvec{a}} = \varvec{R}_{\varvec{e}_z,\pi }\), where \(\varvec{R}_{\varvec{e}_y,\pi }\) denotes the rotation around the axis \(\varvec{e}_y\) by an angle \(\pi \). Concretely the in-plane rotation in 3D is given in terms of the ZYZ-Euler angles \(\alpha ,\beta ,\gamma \) by requiring that \(\alpha =-\gamma \), which gives the mapping

$$\begin{aligned} \varvec{n} \mapsto \varvec{R}_{\varvec{e}_z,-\alpha } \varvec{R}_{\varvec{e}_y,\beta } \varvec{R}_{\varvec{e}_z,\alpha }, \end{aligned}$$

for the unique \(\alpha \in [0,2\pi )\) and \(\beta \in (0,\pi )\) so that the resulting rotation maps \(\varvec{a}\) to \(\varvec{n}\).

3 Total Variation, Mean Curvature PDE Flows on \(\mathbb {M}_d\)

3.1 PDE System

On \(\mathbb {R}^n\) the formulation of total variation is built on the identity \(\text {div}(f\varvec{v}) = f\, \text {div}(\varvec{v}) + \nabla f \cdot \varvec{v}\). Similarly on \(\mathbb {M}_d\) we have:

$$\begin{aligned} \text {div}\left( U \varvec{v} \right)= & {} U~\text {div}(\varvec{v}) + {d}U \left( \varvec{v} \right) \nonumber \\= & {} U~\text {div}(\varvec{v}) + \left( \nabla U,~\varvec{v}\right) _{\mathbb {M}_d}. \end{aligned}$$

From the last equation we deduce the following integration by parts formula:

$$\begin{aligned} \int _{\Omega } U(p)\, \text {div} \varvec{v}(p) \hbox {d}\mu (p) = \int _{\Omega } \left( \nabla U(p) , \varvec{v}(p) \right) _{\mathbb {M}_d} \hbox {d}\mu (p), \end{aligned}$$

for all \(U\in C^1(\Omega )\) and all smooth vector fields \(\varvec{v}\) vanishing at the boundary \(\partial \Omega \). This formula allows us to build a weak formulation of TVF on \(\mathbb {M}_d\) starting from functions of bounded variation (BV) [1].

Definition 6

(Weak formulation of TVF on \(\mathbb {M}_d\)) Let \(\mathfrak {e}\ge 0\). Let \(U \in \mathbb {L}_1(\Omega )\) (recall (1)). Let \(\chi _0(\Omega )\) denote the vector space of smooth vector fields that vanish at the boundary \(\partial \Omega \) and let \(\varepsilon \ge 0\). Then we define

$$\begin{aligned} \hbox {TV}_{\varepsilon }(U) := \quad \sup \limits _{ {\begin{array}{c} \psi \in C^{\infty }_c(\Omega ) \\ \mathbf {v} \in \chi _0(\Omega ) \\ \Vert \mathbf {v}(p)\Vert ^2_{\mathfrak {e}} + |\psi (p)|^2\le 1 \end{array} }} \int \limits _{\Omega }\;\, {\left( \begin{array}{c} \varepsilon \\ U(p) \end{array} \right) \cdot \left( \begin{array}{c} \psi (p) \\ \mathrm{\text {div}}\, \mathbf {v}(p) \end{array} \right) }\; \mathrm{d}\mu (p). \end{aligned}$$

If \(\hbox {TV}_0 (U) < \infty \) we say that \(U \in BV(\Omega )\).

For all \(U \in BV(\Omega )\) we have

$$\begin{aligned} \hbox {TV}_0(U) \le \hbox {TV}_{\varepsilon }(U) \le \hbox {TV}_{0}(U) + \varepsilon |\Omega |. \end{aligned}$$

Recall Remark 7 about the sub-Riemannian setting, and recall the notion of horizontal tangent vectors (13). So (44) also covers the sub-Riemannian setting (i.e., \(\mathfrak {e}=0\)) when setting

$$\begin{aligned} \Vert \mathbf {v}(p)\Vert _{\mathfrak {e}=0}= \left\{ \begin{array}{ll} \left. \mathcal {G}\right| _{p}(\mathbf {v}(p),\mathbf {v}(p)) &{}\text { if }\mathbf {v}(p) \text { is horizontal },\\ \infty &{}\text {else}, \end{array} \right. \end{aligned}$$

for tangent vector \(\mathbf {v}(p)=(\dot{\mathbf {x}}(p),\dot{\mathbf {n}}(p)) \in T_{p}(\mathbb {M}_d)\) at base point \(p=(\mathbf {x},\mathbf {n}) \in \mathbb {M}_d\).

Lemma 1

Let \(\varepsilon \ge 0\). For \(U \in C^{1}(\Omega ,\mathbb {R})\) we have

$$\begin{aligned} \hbox {TV}_{\varepsilon }(U)= \int _{\Omega } \sqrt{\left\| \nabla U(p)\right\| ^2_{\mathbb {M}_d} + \varepsilon ^2}\;\, \mathrm{d}\mu (p). \end{aligned}$$

Furthermore for \(U \in C^{2}(\mathbb {M}_d,\mathbb {R})\) and \(\mathfrak {e}, \varepsilon >0\) we have that

$$\begin{aligned} \partial \, \hbox {TV}_{\varepsilon }(U)= \mathrm {div} \circ \left( \frac{\nabla U}{\sqrt{\left\| \nabla U \right\| ^2_{\mathbb {M}_d}+\varepsilon ^2}} \right) . \end{aligned}$$


First we substitute (43) into (44), then we apply Gauss theorem and use \(\left. U\varvec{v} \right| _{\partial \Omega }=0\). Then we apply Cauchy–Schwarz on \(V_p:=\mathbb {R} \times T_p \mathbb {M}_d\) for each \(p \in \mathbb {M}_d\), with inner product

$$\begin{aligned} (\epsilon _1, \varvec{v}_1) \cdot (\epsilon _2, \varvec{v}_2)= \epsilon _1 \epsilon _2 + \left( \varvec{v}_{1},\varvec{v}_{2} \right) _{\mathbb {M}_d}, \end{aligned}$$

which holds with equality iff the vectors are linearly dependent. Therefore we smoothly approximate

$$\begin{aligned} \frac{1}{\sqrt{\varepsilon ^2+ \Vert \nabla U\Vert ^2_{\mathbb {M}_d}}}(\varepsilon , \nabla U) \end{aligned}$$

by \((\psi ,\varvec{v})\) one obtains (46).

For \(U \in C^{2}(\Omega ,\mathbb {R})\), \(\delta \in C_{c}^{\infty }(\Omega ,\mathbb {R})\) we obtain

$$\begin{aligned}&\left( \partial \, \hbox {TV}_{\varepsilon }(U),\ \delta \right) _{\mathbb {L}_{2}(\Omega )} =\lim \limits _{h \downarrow 0} \frac{\hbox {TV}_{\varepsilon }(U+h\, \delta )-\hbox {TV}_{\varepsilon }(U)}{h}\\&\qquad \overset{(43)}{=} \left( \text {div} \circ \left( \frac{\nabla U }{\sqrt{\Vert \nabla U \Vert ^2_{\mathbb {M}_d}+\varepsilon ^2}} \right) ,\, \delta \right) _{\mathbb {L}_{2}(\Omega )} , \end{aligned}$$

and the result follows. \(\square \)

For vector fields \(\varvec{v}\) on \(\mathbb {M}_d\) define the regularized norm:

$$\begin{aligned} \left\| \varvec{v} \right\| _\varepsilon := \sqrt{\left\| \varvec{v} \right\| ^2_{\mathbb {M}_d} + \varepsilon ^2} . \end{aligned}$$

This is a common way to regularize denominators, and we will use Sect. 4 to prove that this approach converges for \(\varepsilon \rightarrow 0\).

Now we propose the following roto-translation equivariant enhancement PDE on \(\Omega \subset \mathbb {M}_d\), recall (1).

Definition 7

(Equivariant enhancement PDE) Given \(U \in BV(\Omega )\) with \(\varepsilon > 0\) then we call \(W^\varepsilon :\mathbb {M}_d \times \mathbb {R}_{\ge 0} \rightarrow \mathbb {R}\) (being smooth) obeying

$$\begin{aligned} \left\{ {\begin{array}{ll} \frac{\partial W^\varepsilon }{\partial t} (p,t) = \left\| \nabla W^\varepsilon (p,t) \right\| ^a_\varepsilon &{}\text {div} \left( \dfrac{\nabla W^\varepsilon (\cdot , t)}{\left\| \nabla W^\varepsilon (\cdot ,t) \right\| _\varepsilon ^b} \right) (p),\\ \nabla _{\mathbb {R}^d} W^\varepsilon (p,t) \cdot \mathbf {N}(\mathbf {x})=0 &{} \mathrm{for} p = (\mathbf {x},\mathbf {n}){\in } \partial \Omega ,\, t{\ge } 0,\\ W^\varepsilon (p,0) = U(p) &{} \mathrm{for} p \in \Omega , \end{array}}\right. \nonumber \\ \end{aligned}$$

the gradient flow started at U with evolution time \(t \ge 0\) and parameters \(a,b \in \{0,1\}\). Here we use Neumann boundary conditions with \(\mathbf {N}(\varvec{x})\) as the normal to the spatial boundary at \(\varvec{x} \in \Omega _f\).

The coherence enhancement version of this PDE is given by replacing \(\text {div}\) by \(\text {div} \circ E\) (recall (37) and (38)):

$$\begin{aligned} \frac{\partial W^\varepsilon }{\partial t} (p,t) = \left\| \nabla W^\varepsilon (p,t) \right\| ^a_\varepsilon \quad \text {div} \circ \, E\, \left( \dfrac{\nabla W^\varepsilon (\cdot , t)}{\left\| \nabla W^\varepsilon (\cdot ,t) \right\| _\varepsilon ^b} \right) (p). \end{aligned}$$

Remark 11

(Two versions of the PDE) This PDE system on the quotient \(\mathbb {M}_d\) has two versions depending on whether one chooses the left invariant or gauge geometry as outlined in Tables 1 and 2.

We then have the following cases:

  • For \((a,b)=(1,1)\) we arrive at mean curvature flow (MCF), studied for \(d=2\) in [13].

  • For \((a,b)=(0,1)\) we arrive at total variation flow, studied for \(d=2\) in [11].

  • For \((a,b)=(0,0)\) we arrive at a linear diffusion for which exact smooth solutions exist for both \(d=2\) and \(d=3\) [43].

Remark 12

(PDE in terms of curvature) By product rule (42) the right-hand side of (49) for \(\varepsilon \downarrow 0\) becomes

$$\begin{aligned} \frac{\partial W^{0}}{\partial t}= \Vert \nabla W^0\Vert ^{a-b}\Delta W^0 + 2b \, \overline{\kappa }_{I}\; \Vert \nabla W^0\Vert ^{a}, \end{aligned}$$

with the mean curvature \(\overline{\kappa }_{I}(p,t)\) of level set

$$\begin{aligned} \left\{ q \in \mathbb {M}_d\;\big \vert \; W^{0}(q,t)=W^{0}(p,t)\right\} , \end{aligned}$$

akin to [49, ch;3.2], and with (possibly hypo-elliptic) Laplacian \(\Delta =\text {div} \circ \nabla \).

Remark 13

(Lack of regularity and weak solutions) For MCF and TVF smooth solutions to PDE (49) exist only under special circumstances. This lack of regularity is an advantage in image processing to preserve step edges and plateaus in images, yet it forces us to define a concept of weak solutions. Here, we distinguish between MCF and TVF.

For MCF one relies on viscosity solution theory developed by Evans–Spruck [26], see also [32, 50] for the case of MCF with Neumann boundary conditions. In [13, Thm 3.6] existence of \(C^{1}\)-viscosity solutions is shown for \(d=2\).

For TVF we will rely on gradient flow theory by Brezis–Komura [2, 9].

Remark 14

In this article we do not address convergence of our PDE solutions toward the sub-Riemannian setting \(\mathfrak {e} \downarrow 0\), and we only focus on convergence results for \(\varepsilon \downarrow 0\). In previous work (by others) convergence to the sub-Riemannian setting is addressed for special cases. For the special case \((a,b)=(0,0)\) convergence of the solutions with respect to \(\mathfrak {e} \downarrow 0\) is clear from the exact solutions see [43, ch:2.7]. For such convergence in the challenging case \((a,b)=(1,1)\) (MCF), see Citti et al. [4, 13]. For Eikonal PDEs convergence of viscosity solutions toward the sub-Riemannian setting holds as well, see [24, Thm.2]. It is therefore interesting to see whether convergence results toward the sub-Riemannian setting hold for the general case including the TVF case, but this falls outside the scope of this article. In Sect. 4 we only focus on convergence results for \(\varepsilon \downarrow 0\) for \(\mathfrak {e}>0\) fixed.

3.2 Numerics

We implemented PDE system (49) by Euler forward time discretization, relying on standard B-spline or linear interpolation techniques for derivatives in the underlying tools on \(\mathbb {M}_d\) given in Table 2. For details see [17, 30]. Also, the explicit upperbounds for stable choices of stepsizes can be derived by the Gershgorin circle theorem [17, 30].

For \(d=2\) the discretization is straightforward [30], for \(d=3\) we discretized per [17] in the software package Lie Analysis for Mathematica developed by Martin et al. [37], to our PDEs of interest (49) on \(\mathbb {M}_3\).

The Euler-forward discretizations are not unconditionally stable. For \(a=b=0\), the Gershgorin circle theorem [17, ch.4.2] gives the stability bound

$$\begin{aligned} \Delta t \le (\Delta t)_\mathrm{{crit}}:={\left( \frac{(d-1)D_A+D_S}{2h^2}+\frac{(d-1)D_A}{2h_a^2}\right) ^{-1}}, \end{aligned}$$

when using linear interpolation with spatial stepsize h and angular stepsize \(h_{a}\). In our experiments, for \(d=2\) we set \(h=1\) and for \(d=3\) we took \(h_{a}=\frac{\pi }{25}\) using an almost uniform spherical sampling from a tessellated icosahedron with \(N_A=162\) points. TVF required smaller times steps when \(\varepsilon \) decreases. Keeping in mind (50) but then applying product rule (42) to the case \(0<\varepsilon \ll 1\), we concentrate on the first term as it is of order \(\varepsilon ^{-1}\) when the gradient vanishes. Then we find \(\Delta t \le \varepsilon \cdot (\Delta t)_\mathrm{{crit}}\) for TVF. For MCF we do not have this limitation.

While both the quantitative and qualitative results of our proposed methods are encouraging we have to end our numerics section mentioning the computational cost. In Table 3 we summarize the relative computational time of our methods versus spatial Perona–Malik, and this summary shows our methods being several orders of magnitude slower. In the interest of fairness we need to add that benchmarking our prototype Mathematica implementation against the built-in Perona–Malik implementation is not a fair comparison, we are confident that an optimized native implementation would fare much better in a performance comparison.

Table 3 Relative computational time needed by our methods relative to spatial Perona–Malik for the denoising results in Fig. 11

4 Gradient Flow and Convergence

In this section we provide a gradient flow formulation that we will use to prove the convergence of our regularization scheme for TVF. The reader who is more interested in the experimental results than the technical convergence results can safely choose to skip this section and continue reading Sect. 5.

4.1 Preliminaries

The total variation flow can be seen as a gradient flow of a lower-semicontinuous, convex functional in a Hilbert space, as we explain next.

If \(F: H \rightarrow [0,\infty ]\) is a proper (i.e., not everywhere equal to infinity), lower semicontinuous, convex functional on a Hilbert space H (not to be confused with the subgroup H above, as we will not need the subgroup anymore we will stick with convention and use H for the Hilbert space from now on), the subdifferential of F in a point u in the finiteness domain of F is defined as

$$\begin{aligned} \partial F (u) := \left\{ z \in H | \ (z, v-u) \le F(v) - F(u) \text { for all } v \in H \right\} . \end{aligned}$$

The subdifferential is closed and convex, and thereby it has an element of minimal norm, called “the gradient of F in u” denoted by \(\mathrm {grad} F(u)\). Let \(u_0\) be in the closure of the finiteness domain of F. By Brezis–Komura theory, [9, 2, Thm 2.4.15] there is a unique locally absolutely continuous curve \(u: [0,\infty ) \rightarrow H\) such that

$$\begin{aligned} - u'(t) = \mathrm {grad} F(u(t)) \text { for a.e. } t > 0 \text { and } \lim _{t \downarrow 0} u(t) = u_0. \end{aligned}$$

We call \(u:[0,\infty ) \rightarrow H\) the gradient flow of F starting at \(u_0\).

Recall the definition of \(\Omega \) in (1), then the function \(\hbox {TV}_\epsilon : \mathbb {L}_2(\Omega ) \rightarrow [0,\infty ]\) is lower-semicontinuous and convex for every \(\epsilon \ge 0\). This allows us to generalize solutions to PDE (49) as follows:

Definition 8

Let \(U \in \Xi := BV(\Omega ) \cap \mathbb {L}_{2}(\Omega )\). We define by \(t \mapsto W^\epsilon (\cdot , t)\) the gradient flow of \(\hbox {TV}_\epsilon \) starting at U.

Remark 15

(Smooth solutions) A smooth solution \(W^\epsilon \) to (49) with \((a,b)=(0,1)\) is a gradient flow.

A functional \(\Phi : H \rightarrow (-\infty , \infty ]\) is said to be \(\lambda \)-convex for some \(\lambda \in \mathbb {R}\) if

$$\begin{aligned} u \mapsto \Phi (u) - \frac{\lambda }{2} \Vert u \Vert ^2 \end{aligned}$$

is convex. In that case, the functional

$$\begin{aligned} u \mapsto \Phi (u) - \frac{\lambda }{2} \Vert u - v\Vert ^2 \end{aligned}$$

is convex as well, for arbitrary \(v \in H\), because the latter functional deviates from the first by an affine functional.

We first prove a stability estimate for the minimization of \(1/\tau \)-convex functionals.

Lemma 2

Let \(\tau > 0\). If a functional \(\Phi : H \rightarrow (-\infty , \infty ]\) on H is \(1/\tau \)-convex, and \(u^*\) is its unique minimizer, then for all \(u \in H\),

$$\begin{aligned} \frac{1}{2\tau } \Vert u - u^* \Vert ^2 \le \Phi (u) - \Phi (u^*). \end{aligned}$$

This lemma is an extension of a standard result regarding strongly convex functionals (see, e.g., [41, Thm. 2.1.7]) but with no assumptions on differentiability. We include the proof in “Appendix B.”

For a proper (i.e., not everywhere equal to \(\infty \)), lower semicontinuous, convex functional F, and \(\tau > 0\), define the so-called [48] proximal operator \(J_\tau ^F: H \rightarrow H\) by

$$\begin{aligned} J_\tau ^F[u_0] := \text {argmin}_{u \in H} \left( \frac{1}{2\tau } \Vert u - u_0\Vert ^2 + F(u) \right) . \end{aligned}$$

Proposition 1

Let \(\delta >0\) and let \(F, G: H \rightarrow [0,\infty ]\) be two nonnegative, proper, lower semicontinuous, convex functionals on a Hilbert space H, such that for all \(u \in H\),

$$\begin{aligned} F(u) - \delta \le G(u) \le F(u) + \delta . \end{aligned}$$

Let \(u_0, v_0 \in H\), such that

$$\begin{aligned} |\partial F|(u_0) \le L \quad \hbox { and } \quad |\partial G|(v_0) \le L. \end{aligned}$$

Then, we have the following estimate for the gradient flow \(u:[0,\infty ) \rightarrow H\) of F starting at \(u_0\) and the gradient flow \(v:[0,\infty ) \rightarrow H\) of G starting at \(v_0\):

$$\begin{aligned} \Vert u(t) - v(t)\Vert \le \left\{ {\begin{array}{ll} 4 \sqrt{\delta t} + \Vert u_0 - v_0\Vert &{} \hbox {for } 0 \le t \le \frac{\delta }{L^2} \\ 8 \root 3 \of {L \delta t^{2}} + \Vert u_0 - v_0\Vert &{} \hbox {for } t > \frac{\delta }{L^2}. \end{array}}\right. \end{aligned}$$

We provide the proof in “Appendix C.” The idea is that the stability estimate in Lemma 2 will allow us to conclude that \(J_\tau ^F[u_0]\) and \(J_\tau ^G[v_0]\) are close when \(u_0\) and \(v_0\) are close. By iterating the operators \(J_\tau ^F\) and \(J_\tau ^G\), we approximate the gradient flows of F and G, respectively, and from slope estimate (51) we will derive that this approximation is uniform. This will allow us to derive bounds for the gradient flows from the bounds for \(J_\tau ^F\) and \(J_\tau ^G\).

We now know that the gradient flows of F and G are close when the slopes \(|\partial F|(u_0)\) and \(|\partial G|(v_0)\) are bounded. This assumption can be rather stringent. We will relax it and merely require that \(F(u_0)\) and \(G(v_0)\) are bounded by some constant \(E > 0\), in exchange for a bound between gradient flows that is slightly worse. Our approach will be to run the gradient flow for a small time s from \(u_0\) and \(v_0\) and use the regularizing property of the gradient flow to conclude a slope bound. On the other hand, if s is small, u(s) and v(s) will be close to \(u_0\) and \(v_0\). We will then choose s (almost) optimally to derive a bound between the gradient flows.

4.2 Strong \(\mathbb {L}_2\)-Convergence of TV Flows

We prove the convergence, stability, and accuracy of TV flows by considering them as the gradient flows of the family of functionals \(\hbox {TV}_{\varepsilon }\). The theory of contraction semigroups [2, Ch. 4] will allow us to show that as \(\varepsilon \rightarrow 0\) the gradient flow of \(\hbox {TV}_{\varepsilon }\) converges to the gradient flow of \(\hbox {TV}_0\) in the \(\mathbb {L}_2\) sense.

Just like Lemma 1 and Proposition 1 the following theorem was already announced in [25] but similarly lacked a proof, which we now include.

Theorem 1

Let \(F:H \rightarrow [0,\infty ]\) and \(G:H \rightarrow [0,\infty ]\) be two proper, lower semicontinuous, convex functionals on a Hilbert space H, such that

$$\begin{aligned} F(u) - \delta \le G(u) \le F(u) + \delta \end{aligned}$$

for all \(u \in H\). Let \(u_0, v_0 \in H\) be such that \(F(u_0) \le E\) and \(G(v_0) \le E\) and \(\Vert u_0 - u^*\Vert \le M\) and \(\Vert v_0 - v^*\Vert \le M\), for some constants \(E, M > 0\), where \(u^*\) and \(v^*\) minimize F and G, respectively.

Then the gradient flow \(u:[0,\infty ) \rightarrow H\) of F starting at \(u_0\) and the gradient flow \(v:[0,\infty ) \rightarrow H\) of G starting at \(v_0\) satisfy

$$\begin{aligned} \Vert u(t) - v(t) \Vert \le 16 (M E \delta t^2)^{1/5} + \Vert u_0 - v_0 \Vert \end{aligned}$$

for all \(0 \le t < E^6 M^6/\delta ^9\).


By the evolution variational inequality [2, Theorem 4.0.4, (iii)], we know that for all \(s > 0\)

$$\begin{aligned} \Vert u(s) - u_0\Vert \le \sqrt{2 s F(u_0) } \end{aligned}$$


$$\begin{aligned} \Vert v(s) - v_0 \Vert \le \sqrt{2 s G(v_0) }. \end{aligned}$$

By the regularizing property [2, Theorem 4.0.4, (ii)],

$$\begin{aligned} |\partial F|(u(s)) \le \frac{1}{s}\Vert u_0 - u^* \Vert \le \frac{M}{s} \end{aligned}$$


$$\begin{aligned} |\partial G|(v(s)) \le \frac{1}{s} \Vert v_0 - v^* \Vert \le \frac{M}{s} \end{aligned}$$

where \(u^*\) minimizes F and \(v^*\) minimizes G.

Fig. 6
figure 6

Isotropic (\(\mathfrak {e}=1\)) evolution of relative \(\mathbb {L}_1\) and \(\mathbb {L}_2\) errors over time of the collagen image with Gaussian noise benchmarked against spatial Perona–Malik. Remaining parameters are \(D_S=1\), \(D_A=.01\) and \(\varepsilon =.001\)

Fig. 7
figure 7

Anisotropic (\(\mathfrak {e}=.25\)) evolution of relative \(\mathbb {L}_1\) and \(\mathbb {L}_2\) errors over time of the collagen image with Gaussian noise benchmarked against spatial Perona–Malik. Run with parameters \(D_S=1\), \(D_A=.01\) and \(\varepsilon =.001\). The resulting errors are slightly worse than the isotropic setup from Fig. 6

Because the gradient flow is a nonexpansive semigroup [2, Theorem 4.0.4, (iv)], we obtain

$$\begin{aligned} \Vert u(t) - v(t) \Vert\le & {} \Vert u(t+s) - v(t+s) \Vert + \Vert u(t+s) - u(t) \Vert \\&\quad +\, \Vert v(t+s) - v(t) \Vert \\\le & {} \Vert u(t+s) - v(t+s) \Vert + \Vert u(s) - u_0 \Vert \\&\quad +\, \Vert v(s) - v_0 \Vert . \end{aligned}$$

Now assume \(t < E^6 M^6/\delta ^9\). We will want to choose s (almost) optimally, depending on t. We choose

$$\begin{aligned} s = \frac{M^{2/5} \delta ^{2/5} t^{4/5}}{E^{3/5}} \end{aligned}$$

and note that with \(L := M/s\), we have

$$\begin{aligned} t \ge \frac{\delta }{L^2}. \end{aligned}$$

By the slope estimates (54) we can apply Proposition 1 to the gradient flows starting at u(s) and v(s), to obtain

$$\begin{aligned} \Vert u(t) - v(t) \Vert\le & {} 8 M^{1/3} s^{-1/3} \delta ^{1/3} t^{2/3} + \Vert u(s) - v(s) \Vert \\&\quad +\, \Vert u(s) - u_0 \Vert + \Vert v(s) - v_0 \Vert \\\le & {} 8 M^{1/3} s^{-1/3} \delta ^{1/3} t^{2/3} + 2 \Vert u(s) - u_0 \Vert \\&\quad +\, 2\Vert v(s) - v_0\Vert + \Vert u_0 - v_0\Vert \\&\overset{(53)}{\le } 8 M^{1/3} s^{-1/3} \delta ^{1/3} t^{2/3} + \sqrt{ 32 s E } + \Vert u_0 - v_0 \Vert \\= & {} 16 M^{1/5} \delta ^{1/5} t^{2/5} E^{1/5} + \Vert u_0 - v_0\Vert . \end{aligned}$$

\(\square \)

If, for the general result of Theorem 1, we take \(F=\hbox {TV}_0\), \(G=\hbox {TV}_\varepsilon \) and \(\delta =\varepsilon \left| \Omega \right| \) we obtain the following result.

Corollary 1

(Strong \(\mathbb {L}_2\)-convergence, stability and accuracy of TV flows) Let \(U \in \mathbb {L}_{2}(\Omega )\) and let \(W^{\varepsilon }\) be the gradient flow of \(\hbox {TV}_{\varepsilon }\) starting at U and \(\varepsilon ,\mathfrak {e} \ge 0\). Let \(t\ge 0\). Let \(\delta =\varepsilon |\Omega |\). Then

$$\begin{aligned} \lim _{\varepsilon \downarrow 0}\ W^{\varepsilon }(\cdot ,t) = W^{0}(\cdot ,t)\quad \text { in }\quad \mathbb {L}_{2}(\Omega ). \end{aligned}$$

More precisely, for all \(U \in BV(\Omega )\), \(E \ge \hbox {TV}_0(U) + \delta \), \(M \ge \Vert U\Vert \) and \(0 \le t < E^6 M^6 / \delta ^9\) we have that

$$\begin{aligned} \Vert W^\varepsilon (\cdot , t) - W^0(\cdot , t)\Vert _{\mathbb {L}_{2}(\Omega )} \le 16 \Big (M E \delta t^2\Big )^{\frac{1}{5}}. \end{aligned}$$

5 Experiments

In our experiments, we aim to enhance contour and fiber trajectories in medical images and to remove noise. Lifting the image \(f:\mathbb {R}^{d} \rightarrow \mathbb {R}\) toward its orientation lift \(U:\mathbb {M}_d \rightarrow \mathbb {R}\) defined on the space of positions and orientations \(\mathbb {M}=\mathbb {R}^{d} \rtimes S^{d-1}\) preserves crossings [30] and avoids leakage of wavefronts [24].

Fig. 8
figure 8

Isotropic with coherence enhancement evolution of relative \(\mathbb {L}_1\) and \(\mathbb {L}_2\) errors over time of the collagen image with Gaussian noise benchmarked against spatial Perona–Malik. Run with parameters \(D_S=1\), \(D_A=.01\), \(\varepsilon =.001\) and \(c=.2\)

Fig. 9
figure 9

Qualitative comparison of over-smoothed collagen images starting from a noisy image with \(\sigma =.2\) Gaussian noise. Images are smoothed for twice the time needed to reach their minimal \(\mathbb {L}_2\) error per Fig. 8. We use isotropic processing with coherence enhancement

For our experiments for \(d=3\) the initial condition \(U: \mathbb {M}_3 \rightarrow \mathbb {R}^+\) is a fiber orientation density function (FODF) obtained from DW-MRI data [44].

For our experiments for \(d=2\) the initial condition U is an invertible orientation score (OS) that we sampled on 8 equidistant orientations.

For both \(d=2\) (Sect. 5.1) and \(d=3\) (Sect. 5.4), we show advantages of TVF and MCF over crossing-preserving diffusion flows [17, 30] on \(\mathbb {M}_d\).

Finally, we include denoising experiments where we show qualitative and quantitative results where comparison with the well-known denoising technique BM3D [18] shows advantages and good results.

Fig. 10
figure 10

Isotropic (\(\mathfrak {e}=1\)) evolution of relative \(\mathbb {L}_1\) and \(\mathbb {L}_2\) errors over time of the collagen image with correlated noise (\(\sigma =0.2\) Gaussian noise with \(r=2\) and \(\sigma =1\) Gaussian filter) benchmarked against spatial Perona–Malik. Remaining parameters are \(D_S=1\), \(D_A=.01\) and \(\varepsilon =.001\)

Fig. 11
figure 11

Isotropic with coherence enhancement evolution of relative \(\mathbb {L}_1\) and \(\mathbb {L}_2\) errors over time of the collagen image with correlated noise (\(\sigma =0.2\) Gaussian noise with \(r=2\) Gaussian filter) benchmarked against spatial Perona–Malik. Run with parameters \(D_S=1\), \(D_A=.01\), \(\varepsilon =.001\) and \(c=.2\)

5.1 Image Enhancement/Denoising

In accordance with the workflow in Fig. 1 we go through the following steps:

$$\begin{aligned}&f \mapsto \mathcal {W}_{\psi }f \mapsto \Phi _t \circ \mathcal {W}_{\psi } f \mapsto f_t^a := \mathcal {W}_{\psi }^* \circ \Phi _t \circ \mathcal {W}_{\psi } f \nonumber \\&\quad \approx \int _{S^{1}} \Phi _t(\mathcal {W}_{\psi }f)(\cdot ,\mathbf {n}) \,\mathrm{d}\mu _{S^1}(\mathbf {n}). \end{aligned}$$

for \(t\ge 0\). With respect to the final step we recall that we use cake wavelets that allow for sharp approximate reconstruction by integration over angles only. Here \(U \mapsto W(\cdot ,t)=\Phi _t(U)\) denotes the flow operator on \(\mathbb {M}_2\) (49). Hence the initial condition for our TVF/MCF-PDE (49) is set by an orientation score of image \(f:\mathbb {R}^2 \rightarrow \mathbb {R}\) given by (2).

By the invertibility of the orientation score one has \(f=f_0^a\), so all flows depart from the original image.

We refer to the different methods we experimented with, by the following terms.

  • MCF: we set \((a,b)=(1,1)\).

  • TVF: we set \((a,b)=(0,1)\).

  • Left invariant: we use the left-invariant geometry per the first column of Table 1.

  • Gauge: we use the locally adaptive-frames geometry per the second column of Table 1.

  • Isotropic: we set \(\mathfrak {e}=1\).

  • Anisotropic: we set \(\mathfrak {e}=0.25\).

  • With coherence enhancement: we use the PDE with the E operator per (49).

So that Isotropic Gauge TVF with coherence enhancement for example would equate to setting \((a,b)=(0,1)\), \(\mathfrak {e}=1\), includes the E operator in the PDE and uses the second column of Table 1 to define our geometric objects.

For quantitative comparison we will look at relative \(\mathbb {L}_1\) and \(\mathbb {L}_2\) errors, meaning if we have a (clean) source image \(f_{source}\) and a denoised image \(f_t\) that has been processed to time t we calculate the relative error as:

$$\begin{aligned} \frac{\left\| f_t - f_\mathrm{{source}} \right\| }{\left\| f_\mathrm{{source}} \right\| } , \end{aligned}$$

with the corresponding \(\mathbb {L}_1\) or \(\mathbb {L}_2\) norm.

We will test against two types of noise: Gaussian and correlated.

Fig. 12
figure 12

Qualitative comparison of over-smoothed collagen images starting from a noisy image with correlated noise (\(\sigma =0.2\) Gaussian noise with \(r=2\) Gaussian filter). Images are smoothed for twice the time needed to reach their minimal \(\mathbb {L}_2\) error per Fig. 11. We use isotropic processing with coherence enhancement

Fig. 13
figure 13

Comparison of left-invariant TVF with coherence enhancement against BM3D. The BM3D image is denoised at \(\sigma =0.12\) (\(1.5\times \) optimal \(\mathbb {L}_2\)) and the left-invariant TVF denoised for \(1.5\times \) optimal \(\mathbb {L}_2\) time. Pay particular attention to the diagonal edges where TVF exhibits superior performance

5.2 Gaussian Noise

We apply Gaussian noise with standard deviation 0.2 to our normalized (to [0, 1]) source image; the original and noisy images are shown in Fig. 9a, respectively, Fig. 9b.

In Fig. 6 we show how the errors progress with \(t\ge 0\) for the isotropic (\(\mathfrak {e}=1\)) case without coherence enhancement (i.e., without E). For comparison we plot the same error with spatial Perona–Malik. While Perona–Malik is clearly more stable and resilient to over-smoothing, both our proposed methods have much smaller minimal errors.

Remark 16

(Interpretation of timescales) The different methods work on different timescales, we scale these to be able to plot the results together, but no meaning should be attributed to one method obtaining a minimum earlier than another. The error graphs just show:

  • how large the minimal error is and

  • how fast the image deteriorates after this minimum has been reached.

In our next experiment we increase anisotropy by setting \(\mathfrak {e}=.25\), the resulting errors are plotted in Fig. 7. We gain no improvement in minimal error while requiring more computational cycles to reach the minimum, from which we conclude that for this application isotropic processing is more desirable.

In Fig. 8 we show the errors for the isotropic setup with coherence enhancement included (for \(c=.2\)). We get a very minor improvement in minimal errors and a decent improvement in over-smoothing stability, although still not on the level of Perona–Malik. It is remarkable that with coherence enhancement included the data-adaptive geometry is less stable than the left-invariant geometry, we observe that combining two different methods of adapting to the data is counter-productive in this instance.

For a qualitative comparison of the different isotropic methods with coherence enhancement we over-smooth the collagen image past the time of its lowest \(\mathbb {L}_2\) error with a factor of two, the corresponding qualitative results are shown in Fig. 9.

5.3 Correlated Noise

For correlated noise we apply a Gaussian filter with \(\sigma =1.0\) to Gaussian noise with \(\sigma =0.2\). The error evolution for the isotropic methods is plotted in Fig. 10. We observe that MCF performs worse in this setting against correlated noise; both in minimal error and in stability it does not do as well as spatial Perona–Malik. TVF on the other hand has a better minimal error than Perona–Malik at the cost of stability. The stability does somewhat improve if we turn on the locally adaptive frames.

Fig. 14
figure 14

A spiral test image and a monochrome Mona Lisa that were used for the PSNR experiments in Table 4

The error evolution of the experiment including the use of coherence enhancement is displayed in Fig. 11. Overall this improves the results, but MCF still exhibits an inferior performance in this setting. TVF sees both an improvement in minimal error and stability. As with the Gaussian noise experiment we see that turning on both coherence enhancement and locally adaptive frames is counterproductive.

A qualitative comparison of the methods against correlated noise is shown in Fig. 12, where again we smooth twice the optimal time. We observe the same general trend as in Fig. 9; all methods do a good job of preserving edges, but TVF stands out in clearing the plateaus.

As a final method to compare against we look at BM3D [18]. Both BM3D and our methods share a dependence on some prior knowledge for optimal performance: BM3D requires us to know the standard deviation of the noise, and our method requires us to know the optimal processing time.

We make a qualitative comparison of removing correlated noise between BM3D and left-invariant TVF by smoothing \(1.5 \times \) past the optimal \(\mathbb {L}_2\) error: \(1.5 \times \) the optimal standard deviation in case of BM3D and \(1.5\times \) the processing time in case of TVF. The resulting images are shown in Fig. 13.

For a broader comparison, we compute peak signal-to-noise ratios for the collagen image we already saw and for two additional images of different styles shown in Fig. 14. Results are summarized in Table 4.

As the gauge TVF method compares favorably against correlated noise according to the PSNR value in Table 4, we will look at its qualitative result and compare it against BM3D in Fig. 15.

Table 4 Comparing peak signal-to-noise ratio (dB) for the coherence-enhanced methods against BM3D and spatial Perona–Malik at the minimal \(\mathbb {L}_2\) error

5.4 Denoising and Fiber Enhancement on FODFs in DW-MRI

In DW-MRI image processing one obtains a field of angular diffusivity profiles (orientation density function) of water molecules. A high diffusivity in particular orientation correlates to biological fibers structure, in brain white matter, along that same direction. Crossing-preserving enhancement of FODF fields \(U:\mathbb {M}_3 \rightarrow \mathbb {R}^+\) helps to better identify structural pathways in brain white matter, which is relevant for surgery planning, see for example [38, 44].

For a quantitative comparison we applied TVF, MCF, and PM diffusion [17] to denoise a popular synthetic FODF \(U: \mathbb {M}_3 \rightarrow \mathbb {R}^+\) from the Fiberfox Tractometer challenge with realistic noise profiles [40]. In Fig. 16, we can observe the many crossing fibers in the dataset. Furthermore, we depicted the absolute \(\mathbb {L}_{2}\)-error \(t \mapsto \Vert U - \Phi _t(U)\Vert _{\mathbb {L}_{2}(\mathbb {M}_3)}\) as a function of the evolution parameter t, where \(\Phi _t(U)=W_{\varepsilon }(\cdot ,t)\) with optimized \(\varepsilon =0.02\) in the case of TVF (in green), and MCF (in blue), and where \(\Phi _t\) is the PM diffusion evolution [17] on \(\mathbb {M}_3\) with optimized PM parameter \(K=0.2\) (in red). We also depict results for \(K=0.1, 0.4\) (with the dashed lines) and \(\varepsilon =0.01, 0.04\). We see that the other parameter settings provide on average worse results, justifying our optimized parameter settings. We set \(D_{S}=1.0\), \(D_A=0.001\), \(\Delta t=0.01\). We observe that:

  • TVF can reach lower error values than MC flow with adequate \(\Delta t=0.01\),

  • MCF provides more stable errors for all \(t>0\) than TV flow with respect to \(\epsilon >0\),

  • TVF and MCF produce lower error values than PM diffusion,

  • PM diffusion provides the most variable results for all \(t>0\).

Fig. 15
figure 15

Comparing gauge TVF with coherence enhancement and BM3D against correlated noise, the standard deviation for BM3D and the evolution time for TVF were set at 1.5 times the number needed to reach the optimal \(\mathbb {L}_2\) error

Fig. 16
figure 16

Quantitative comparison of denoising a fiber orientation density function (FODF) obtained by (CSD) [19, 52] from the benchmark DW-MRI dataset Fiberfox [40]

Fig. 17
figure 17

Qualitative comparison of denoising a FODF obtained by (CSD) [19, 52] from a standard DW-MRI dataset (with b = 1000 s/mm\(^2\) and 54 gradient directions). For the CSD we used up to 8th order spherical harmonics, and the FODF is then spherically sampled on a tessellation of the icosahedron with 162 orientations

For a qualitative comparison we applied TVF, MCF, PM diffusion and linear diffusion to a FODF field \(U: \mathbb {M}_3 \rightarrow \mathbb {R}^+\) obtained from a standard DW-MRI dataset (with b = 1000 s/mm\(^2\), 54 gradient directions) via constrained spherical deconvolution (CSD) [19, 52]. See Fig. 17, where for each method, we used the optimal parameter settings with the artificial dataset. We see that

  • all methods perform well on the real datasets. Contextual alignment of the angular profiles better reflects the anatomical fiber bundles,

  • MCF and TVF better preserve boundaries and angular sharpness,

  • MCF better preserves the amplitude at crossings at longer times.

6 Conclusion

We have proposed a PDE system on the homogeneous space \(\mathbb {M}_d=\mathbb {R}^{d} \rtimes S^{d-1}\) of positions and orientations, for crossing-preserving denoising and enhancement of (lifted) images containing both complex-elongated structures and plateaus.

It includes TVF, MCF and diffusion flows as special cases and includes (sub-)Riemannian geometry. Thereby we generalized recent related works by Citti et al. [13] and Chambolle and Pock [11] from 2D to 3D using a different numerical scheme with new convergence results (Theorem 1) and stability bounds. We used the divergence and intrinsic gradient on a (sub)-Riemannian manifold above \(\mathbb {M}_d\) for a formal weak formulation of total variation flows, which simplifies if the lifted images are differentiable (Lemma 1).

For 2D image denoising and enhancement we have shown that in all cases TVF on \(\mathbb {M}_2\) has a better minimal error than Perona–Malik and MCF at the cost of being more sensitive to oversmoothing, recall Figs. 6, 7, 8, 9, 10, 11, and 12. The \(\mathbb {L}_1\), \(\mathbb {L}_2\) and PSNR measures indicate the potential of our proposed methods for denoising, and we manage to improve PSNR results against methods such as BM3D against correlated noise on some images, recall Figs. 13 and 15. Qualitatively this is mainly reflected in better clearing of plateaus while still preserving hard edges and crossings.

In 3D we compared to previous nonlinear crossing-preserving diffusion methods on \(\mathbb {M}_3\); we showed improvements over Perona–Malik and improvements over contextual fiber enhancement methods in DW-MRI processing [17, 21] on real medical image data. We observe that crossings and boundaries (of bundles and plateaus) are better preserved over time. We support this quantitatively by a denoising experiment on a benchmark DW-MRI dataset, where MCF performs better than TVF and both perform better than Perona–Malik diffusions, in view of error reduction and stability.

Altogether, we conclude that our TVF and MCF methods on \(\mathbb {M}_d\) work well for denoising and enhancement for both \(d=2\) and \(d=3\). In general we see clear benefits of the inclusion of locally adaptive frames and of limited inclusion of coherence enhancement. The code from our experiments is available as a Mathematica notebook at https://bmnsmets.com/files/tvf_mcf_denoising_jmiv.nb.

Future work While we have shown the potential of our PDE system on \(\mathbb {M}_d\) as a denoising/enhancement method some challenges remain for future work:

  • Determining stopping time, our methods show good minimal errors but are prone to degrading the image if left running for too long. For general applications a robust automatic stopping method would be helpful. Spectral analysis of nonlinear operators [10, 16] may apply here.

  • Coherence enhancement [54] was not originally conceived for denoising. It is therefore interesting to see how edge enhancing diffusion [27] (EED) performs when generalized to \(\mathbb {M}_d\), i.e., we would reformulate our enhancement operator E as:

    $$\begin{aligned} E := \int _{S^d} \varvec{c} \otimes \varvec{c} \ e^{\frac{ \left| \nabla U \cdot \varvec{c} \right| ^2 }{2 \kappa ^2}} \hbox {d}\mu (\varvec{c}), \end{aligned}$$

    and test its performance.

  • In this article we obtained convergence results of our PDE solutions for \(\epsilon \downarrow 0\) while keeping \(\mathfrak {e}>0\) fixed. It is interesting to study the full limiting case \((\epsilon , \mathfrak {e}) \rightarrow (0,0)\), for the general setting covering total variation flow.