We consider throughout this paper a bounded smooth domain \(\varOmega \subset \mathbb{R}^{d}\), where d∈{2,3} denotes the dimension, equipped with a continuous diffusion tensor \(\operatorname{\mathbf{D}}\). We do not impose any bound on the diffusion tensor anisotropy, and we are in fact interested in pronounced, non axis-aligned anisotropies. Anisotropic diffusion is here understood in the sense of [25]: the diffusion tensor \(\operatorname{\mathbf{D}}(z)\), at a point zΩ, is a symmetric positive definite matrix whose eigenvalues may have different orders of magnitude. Our results are not relevant for isotropic diffusion with a variable scalar coefficient, as in the pioneering work of Perona and Malik [20].

We address the discretization of the following energy \({\mathcal{E}}\), defined for uH 1(Ω):

$$ {\mathcal{E}}(u) := \int_\varOmega\bigl\|\nabla u(z) \bigr\|^2_{\operatorname{\mathbf{D}}(z)}dz. $$
(1)

We denote \(\|e\|_{M} := \sqrt{\langle e,M e\rangle }\), for any \(e \in \mathbb{R}^{d}\), and any M in the set \(S_{d}^{+}\) of symmetric positive definite d×d matrices. Gradient descent for the energy (1) has the form of a parabolic PDE:

$$ \partial_t u = \operatorname{div}( \operatorname{\mathbf{D}}\nabla u). $$
(2)

This equation, Anisotropic Diffusion, is with its variants at the foundation of powerful image processing techniques. Some variants include curvature terms [19], or diffusion-reaction terms [5]. Time varying and solution dependent diffusion tensors can also be considered. A general exposition can be found in [25], where various choices for the definition of the diffusion tensor \({\bf D}\) from the image u, adapted to various applications, are proposed and discussed.

Our contribution in the discretization of the energy (1) results in improved numerical solutions of (2), in terms of accuracy and stability, for a minor increase in complexity. This extends to applications, such as Coherence Enhancing Diffusion and Edge Preserving Diffusion [25], see the numerical experiments in Sect. 4, which involve solving (2) using a solution dependent diffusion tensor \({\bf D}= {\bf D}(u)\). For that purpose, one fixes a time step ΔT, and solves for each integer n≥0 the linear diffusion equation \(\partial_{t} u = \operatorname{div} (\operatorname{\mathbf{D}}_{n} \nabla u)\) on the interval [nΔT,(n+1)ΔT], with \(\operatorname{\mathbf{D}}_{n} := \operatorname{\mathbf{D}}(u(n \Delta T))\). In these applications, the diffusion tensor \({\bf D}(u)\) is typically defined in terms of the structure tensor [25] of u, in such way that diffusion is pronounced within image homogeneous regions, and tangentially along image edges, but not across edges.

In two dimensions, AD-LBR strictly speaking is not the first non-negative scheme for anisotropic diffusion: the proof of Theorem 6 in [25] implicitly defines an alternative 6-point non-negative scheme. This alternative scheme does however lack many of the qualities of AD-LBR: it leads to axis aligned artifacts, spectral aberrations, stencils of larger radius, reduced numerical accuracy, and does not extend to 3D. A detailed description and comparison is presented in Sect. 4.1.

Consider a scale parameter h>0, and a sampling Ω h of the domain Ω on the Cartesian grid \({\mathbb{Z}}^{d}\), rescaled by h: with obvious notations

$$ \varOmega_h := \varOmega\cap h {\mathbb{Z}}^d. $$

We introduce a novel discretization of the energy (1), referred to as AD-LBR (Anisotropic Diffusion using Lattice Basis Reduction). It is a sum of squared differences of a discrete map uL 2(Ω h )

$$ {\mathcal{E}}_h(u) := h^{d-2} \sum _{z\in\varOmega_h} \sum_{e \in V(z)} \gamma _z(e) \bigl|u(z+h e)-u(z)\bigr|^2. $$
(3)

The stencils \(V(z)\subset {\mathbb{Z}}^{d}\), zΩ h , are symmetric and have cardinality at most 6 in 2D, 12 in 3D. The coefficients γ z (e)≥0 are non-negative. They are constructed using a classical tool from discrete mathematics, Lattice Basis Reduction, which allows to cheaply build efficient stencils for grid discretizations of Partial Differential Equations (PDEs) involving strongly anisotropic diffusion tensors or Riemannian metrics. This approach has been applied to anisotropic static Hamilton-Jacobi PDEs in [14], resulting in a new numerical scheme: Fast Marching using Lattice Basis Reduction (FM-LBR). Substantial improvements were obtained in comparison with earlier methods, in terms of both accuracy and complexity.

The paper is organized as follows. We describe the stencils of the two dimensional AD-LBR in Sect. 1, and state our main 2D result: the asymptotic equivalence of AD-LBR with a finite element discretization on an Anisotropic Delaunay Triangulation. Section 2 provides additional details on the two dimensional stencils of AD-LBR, and describes the three dimensional ones. The more technical Sect. 3 details the proof of the 2D equivalence result stated in Sect. 1. Two and three dimensional numerical experiments are presented in Sect. 4, including qualitative and quantitative comparisons with five other numerical schemes.

1 Description of the Scheme, and Main Results

Our numerical scheme, Anisotropic Diffusion using Lattice Basis Reduction (AD-LBR), involves the construction of stencils whose geometry is tailored after the local diffusion tensor. Its essential feature is non-negativity: the discrete energy \({\mathcal{E}}_{h}(u)\) is written as a sum (3) of squared differences of values of u, with non-negative weights γ z (e)≥0. This discretization is consistent if for each zΩ h , and any smooth u,

$$ h^d \bigl\|\nabla u(z) \bigr\|_{\operatorname{\mathbf{D}}(z)}^2 = h^{d-2} \sum_{e \in V(z)} \gamma _z(e) \bigl\langle \nabla u(z), h e\bigr\rangle ^2. $$
(4)

Indeed, the left hand side approximates the contribution of the “voxel” z+[−h/2,h/2]d to the integral (1), while the right hand side is obtained by inserting the first order approximation u(z+he)≃u(z)+〈∇u(z),he〉 in (3). The identity (4) is in turn equivalent to

$$ \operatorname{\mathbf{D}}(z) = \sum_{e \in V(z)} \gamma_z(e) e e^\mathrm{T}. $$
(5)

The next lemma shows how to obtain such a decomposition in 2D. We denote by u :=(−b,a) the rotation of a vector \(u =(a,b)\in \mathbb{R}^{2}\) by π/2, in such way that for all \(v \in \mathbb{R}^{2}\):

$$ \bigl\langle u^\perp, v\bigr\rangle = \operatorname{det}(u,v). $$

Lemma 1

Let \(e_{0},e_{1},e_{2} \in \mathbb{R}^{2}\) be such that e 0+e 1+e 2=0, and |det(e 1,e 2)|=1. Then for any \(D \in S_{2}^{+}\), with the convention e 3+i :=e i :

$$ D = - \sum_{0 \leq i \leq2} \bigl\langle e_{i+1}^\perp,D e_{i+2}^\perp\bigr\rangle e_i e_i^\mathrm{T}. $$
(6)

Proof

Note that 1=|det(e 2,e 0)|=|det(e 0,e 1)|. Denoting by D′ the right hand side of (6), we obtain

Thus \(\|e_{1}^{\perp}\|_{D'} = \|e_{1}^{\perp}\|_{D}\). Likewise \(\|e_{2}^{\perp}\| _{D'} = \|e_{2}^{\perp}\|_{D}\), and \(\|e_{1}^{\perp}+e_{2}^{\perp}\|_{D'} = \| e_{0}^{\perp}\|_{D'} = \|e_{0}^{\perp}\|_{D} = \|e_{1}^{\perp}+e_{2}^{\perp}\|_{D}\). Since \((e_{1}^{\perp}, e_{2}^{\perp})\) is a basis of \(\mathbb{R}^{2}\), the result follows. □

The diffusion tensor \(\operatorname{\mathbf{D}}\) is meant to measure gradients, as in (1). In order to measure angles between vectors, we introduce a Riemannian metricFootnote 1 \(\operatorname{\mathbf{M}}\) on the domain Ω, which is proportional to the inverse of \(\operatorname{\mathbf{D}}\): for all zΩ

$$ \operatorname{\mathbf{M}}(z) := \operatorname{\mathbf{d}}(z) \operatorname{\mathbf{D}}(z)^{-1}, \quad \text{where}\ \operatorname{\mathbf{d}}(z) := \operatorname{det}\bigl(\operatorname{\mathbf{D}}(z)\bigr)^{\frac{1}{d}}. $$
(7)

The normalizing factor \(\operatorname{\mathbf{d}}(z)\) was chosen so as to normalize the metric determinant: \(\operatorname{det}(\operatorname{\mathbf{M}}(z)) = 1\). This normalization reflects the fact that the construction of our stencil V(z) depends on the preferred direction of diffusion, and on the amount of anisotropy, whereas the absolute strength of diffusion is irrelevant. In dimension d=2, one easily checks that for any zΩ and any \(e,f\in \mathbb{R}^{2}\), one has

$$ \bigl\langle e^\perp, \operatorname{\mathbf{D}}(z) f^\perp\bigr \rangle = \operatorname{\mathbf{d}}(z) \bigl\langle e, \operatorname{\mathbf{M}}(z) f\bigr\rangle . $$
(8)

The AD-LBR is based on decompositions (5), given by the previous lemma, with a family of vectors \((e_{i})_{i=0}^{2}\) chosen so that the scalar products appearing in (6) are non-positive. See Fig. 1 for an illustration. The adequate concept is that of M-obtuse superbase of \({\mathbb{Z}}^{d}\) [4].

Fig. 1
figure 1

Right: the stencils associated to three matrices M of anisotropy ratios κ(M) equal to 1.1, 3.5, 8 respectively. The ellipses \(\{z \in \mathbb{R}^{2}; \|z\|_{M}=1\}\) are shown left; their principal axis is aligned with (cos(π/3),sin(π/3)). More stencils are shown in [14]

Definition 1

  • A basis of \({\mathbb{Z}}^{d}\) is a family \((e_{i})_{i=1}^{d}\) of elements of \({\mathbb{Z}}^{d}\) such that |det(e 1,…,e d )|=1.

  • A superbase of \({\mathbb{Z}}^{d}\) is a family \((e_{i})_{i=0}^{d}\) such that e 0+⋯+e d =0, and \((e_{i})_{i=1}^{d}\) is a basis of \({\mathbb{Z}}^{d}\).

Definition 2

Let \(M \in S_{d}^{+}\). A family (e i ) iI of vectors in \(\mathbb{R}^{d}\) is said to be M-obtuse if 〈e i ,Me j 〉≤0 for all distinct i,jI.

In dimension d≤3, there exists for each \(M \in S_{d}^{+}\) at least one M-obtuse superbase of \({\mathbb{Z}}^{d}\) [4]. The practical construction of such superbases is discussed in Sect. 2, and based on lattice basis reduction algorithms described in [11, 17, 23] (hence the name of our numerical scheme). This construction has a logarithmic numerical cost \({\mathcal{O}}(\ln\kappa(M))\) in the anisotropy ratio of the matrix M:

$$ \kappa(M) := \max_{|u|=|v|=1} \frac{\|u\|_M}{\|v\|_M} = \sqrt{\|M\| \| M^{-1}\|}. $$
(9)

The AD-LBR energy \({\mathcal{E}}_{h} : L^{2}(\varOmega_{h}) \to \mathbb{R}_{+}\), see (3), is in two dimensions written in terms of the following stencils and coefficients. Let zΩ, and let e 0,e 1,e 2 be an \(\operatorname{\mathbf{M}}(z)\)-obtuse superbase of \({\mathbb{Z}}^{2}\). We set

$$ V(z) := \{e_0,e_1,e_2, -e_0,-e_1,-e_2\}, $$
(10)

and for 0≤i≤2, with the convention e i+3:=e i ,

$$ \gamma_z(\pm e_i) := -\frac{1}{2} \bigl\langle e^\perp_{i+1}, \operatorname{\mathbf{D}}(z) e^\perp _{i+2}\bigr\rangle . $$
(11)

Lemma 1 implies the announced decomposition (5), and the weights γ z are non-negative in view of (8). These weights \(\gamma_{z} : {\mathbb{Z}}^{2} \to \mathbb{R}_{+}\), extended by 0 outside V(z), do not depend on the choice of \(\operatorname{\mathbf{M}}(z)\)-obtuse superbase (e 0,e 1,e 2), see Lemma 11. Stencils of the three dimensional AD-LBR are described in Sect. 2, and involve a construction of SellingFootnote 2 [22]. The above description of the stencils V(z) is suitable for periodic, reflected, and Dirichlet boundary conditions (extending u by zero outside Ω h in the latter case). In the case of Neumann boundary conditions, a slight modification is in order:

$$ V(z; h) := \bigl\{e \in V(z); z+ h e \in\varOmega_h\bigr\}. $$

We have so far established three strongpoints of the AD-LBR:

Non-negativity.:

Off diagonal coefficients of the symmetric semi-definite N×N matrix, N=#(Ω h ), associated to the energy \({\mathcal{E}}_{h}\) are non-positive, while diagonal coefficients are positive.

Sparsity.:

Stencil cardinality is uniformly bounded, without restriction on the anisotropy ratio \(\kappa(\operatorname{\mathbf{D}}(z))\) of the diffusion tensor.

Complexity.:

The construction of the stencil V(z), and of the associated coefficients γ z , has a logarithmic cost \({\mathcal{O}}(\ln \kappa(\operatorname{\mathbf{D}}(z)))\) in the anisotropy ratio of the diffusion tensor.

The next result, Theorem 1, restricted to the two dimensional case, establishes that AD-LBR is asymptotically equivalent to a more involved and computationally intensive procedure: a finite element discretization of the energy (1), on an Anisotropic Delaunay Triangulation (ADT, see [10] and below) of the domain Ω. Under the assumptions of Theorem 1, AD-LBR benefits from two additional guarantees, that we state informally and without proof.

No chessboard artifacts.:

Some numerical schemes for anisotropic diffusion suffer from chessboard artifacts, in the sense that periodic artifacts develop at the pixel level. Such artifacts cannot develop in finite element discretizations, since they would lead to high frequency oscillations of the finite element interpolant, and therefore to an increase of the energy (12). The asymptotic equivalence of the AD-LBR with a finite element discretization also rules out these defects.

Spectral correctness.:

The n-th smallest eigenvalue λ n (h) of the symmetric matrix associated to \(h^{-d}{\mathcal{E}}_{h}\) (3), converges as h→0 towards the n-th smallest eigenvalue λ n of the continuous operator \(-\operatorname{div}(\operatorname{\mathbf{D}}\nabla)\), for any given integer n≥0. See Fig. 8 for an illustration. This follows from a similar property of the finite element energy \({\mathcal{E}}'_{h}\) (12), and from the asymptotic equivalence (13).

Our convergence result, Theorem 1 below, is specialized to the case of a square periodic domain, which covers reflecting boundary conditions frequently used in image processing. Since the grid discretization must be compatible with the boundary conditions, any scale parameter h appearing in the rest of the paper is assumed to be the inverse of a positive integer:

$$ h \in\{1/n; n \geq1\}. $$

Theorem 1

Let Ω be the unit square [0,1[2, equipped with periodic boundary conditions. Let \(\operatorname{\mathbf{D}}: \overline{\varOmega}\to S_{2}^{+}\) be a (periodic) diffusion tensor with Lipschitz regularity, and let \(\operatorname{\mathbf{M}}\) be the Riemannian metric defined by (7). When h is sufficiently small, the periodic Riemannian domain \((\varOmega ,\operatorname{\mathbf{M}})\) admits an Anisotropic Delaunay Triangulation \({\mathcal{T}}_{h}\), with collection of vertices \(\varOmega_{h} := \varOmega\cap h {\mathbb{Z}}^{2}\). For uL 2(Ω h ), define

$$ {\mathcal{E}}'_h(u) := \int_\varOmega \bigl\|\nabla \bigl(\operatorname{I}_{{\mathcal{T}}_h} u\bigr) (z) \bigr\|^2_{\operatorname{\mathbf{D}}(z)} dz, $$
(12)

where \(\operatorname{I}_{{\mathcal{T}}}\) denotes the piecewise linear interpolation operator on a triangulation \({\mathcal{T}}\). Then for some constant \(c=c(\operatorname{\mathbf{D}})\), independent of u and h,

$$ (1- c h) {\mathcal{E}}_h(u) \leq {\mathcal{E}}'_h(u) \leq(1+ c h) {\mathcal{E}}_h(u). $$
(13)

Let us mention that the finite element discretization on an ADT is a more general procedure than AD-LBR, since it does not require the domain Ω to be sampled on a grid. This flexibility can be used to locally increase the density of vertices, in places where the solution u is expected to be less regular, or to insert vertices exactly on ∂Ω for a better discretization of boundary conditions. (Such refinements are however generally incompatible with image processing since the unknowns, the pixel values, lie by construction on a fixed and given Cartesian grid.) Here and as often, the performance of AD-LBR is at the cost of its specialization.

The proof of Theorem 1 is postponed to Sect. 3, but for the sake of concreteness, we describe here the concept of Anisotropic Delaunay Triangulation (ADT) [10]. In the rest of this introduction, and in Sect. 3, we assume as in Theorem 1 that the diffusion tensor \(\operatorname{\mathbf{D}}\) is defined on the square [0,1]2 and satisfies periodic boundary conditions. We extend it, as well as the metric \(\operatorname{\mathbf{M}}\), to the whole plane \(\mathbb{R}^{2}\) by periodicity.

We specialize the concept of ADT [10], to the domain \(\mathbb{R}^{2}\) and the collection of vertices \(h {\mathbb{Z}}^{2}\). For that purpose, we introduce some notations. For all \(p,q \in \mathbb{R}^{2}\), we denote by δ p (q) the distance from p to q, as measured by the metric at the point p:

$$ \delta_p(q) := \|q-p\|_{\operatorname{\mathbf{M}}(p)}. $$
(14)

We denote by Δ h (q) the least distance from a point \(q\in \mathbb{R}^{2}\), to the grid \(h{\mathbb{Z}}^{2}\):

$$ \Delta_h(q) := \min_{p \in h{\mathbb{Z}}^2} \delta_p(q). $$
(15)

We introduce the Voronoi cell \(\operatorname{Vor}_{h}(p)\) of a grid point \(p \in h{\mathbb{Z}}^{2}\), which is the collection of points \(q\in \mathbb{R}^{2}\) closer to p than to any other grid point:

$$ \operatorname{Vor}_h(p) := \bigl\{q\in \mathbb{R}^2; \delta_p(q) = \Delta_h(q)\bigr\}. $$
(16)

The collection of Voronoi cells is referred to as the Voronoi diagram, see Fig. 2. A Voronoi vertex is a point \(q\in \mathbb{R}^{2}\) at which at least three distinct Voronoi regions intersect: \((\operatorname{Vor}_{h}(p_{i}))_{i=1}^{k}\), k≥3, \(p_{i} \in h {\mathbb{Z}}^{2}\). We attach to q a dual Voronoi cell T q , defined as the convex hull of the points \((p_{i})_{i=1}^{k}\), see Fig. 3.

Fig. 2
figure 2

The distance δ p (q), from a grid point p to \(q\in \mathbb{R}^{2}\), is defined in terms of the local metric \(\operatorname{\mathbf{M}}(p)\), see (14). The level lines \(\{q \in \mathbb{R}^{2}; \delta_{p}(q) = r\}\) are ellipses (left). The collection of points \(q\in \mathbb{R}^{2}\) closer to p than to any other grid point is the Voronoi region of p (left: the boundaries of Voronoi regions are shown dashed). The Voronoi diagram (right) is the collection of all Voronoi regions

Fig. 3
figure 3

A Voronoi vertex q is a point where the Voronoi regions of at least three grid points \((p_{i})_{i=1}^{k}\) intersect (left: Voronoi region boundaries are shown dashed); here k=3 (values k>3 are non-generic). The dual Voronoi cell T q , generically a triangle, is the convex envelope of the grid points {p i ;1≤ik} (left). The collection of dual Voronoi cells T q defines a polygonization \({\mathcal{Q}}_{h}\), generically a triangulation, and the Anisotropic Delaunay Triangulation \({\mathcal{T}}_{h}\) is obtained by arbitrarily triangulating (if necessary) the elements of \({\mathcal{Q}}_{h}\). Here \({\mathcal{T}}_{h} = {\mathcal{Q}}_{h}\) (right). The stencil V h (p), of a vertex p of \({\mathcal{T}}_{h}\), see (17), is represented by arrows (right)

Fig. 4
figure 4

Right: stencil of the AD-LBR, for a symmetric matrix of eigenvector M of anisotropy ratio κ(M) equal to 2 (top) or 6 (bottom). The anisotropy is of “needle” type: the two largest eigenvalues of M are equal, and the needle orientation is given by the vector (4,2,3). The ellipsoid \(\{z\in \mathbb{R}^{3}; \|z\| \leq 1\}\) is shown left

The geometric dual \({\mathcal{Q}}_{h}\), of the Voronoi diagram, is defined as the collection of all dual Voronoi cells T q . Note that, generically on the metric \(\operatorname{\mathbf{M}}\), no more than three Voronoi regions can intersect at any point in \(\mathbb{R}^{2}\), thus the elements of \({\mathcal{Q}}_{h}\) are generically triangles. If h is small enough, we show in Sect. 3 (using the Dual Triangulation Theorem in [10]) that T q is a strictly convex polygon, of vertices \((p_{i})_{i=1}^{k}\) with the above notations, and that \({\mathcal{Q}}_{h}\) is a polygonization (generically a triangulation) of \(\mathbb{R}^{2}\), with vertices \(h{\mathbb{Z}}^{2}\).

Since the metric \(\operatorname{\mathbf{M}}\) and the vertices \(h {\mathbb{Z}}^{2}\) are periodic (recall that h=1/n for some integer n≥1), arbitrarily triangulating the elements of \({\mathcal{Q}}_{h}\), respecting periodicity, yields a periodic triangulation \({\mathcal{T}}_{h}\).

Definition 3

(ADT, Labelle and Shewchuk [10])

The triangulation \({\mathcal{T}}_{h}\) obtained by the above construction is referred to as an ADT of the domain \(\mathbb{R}^{2}\), with collection of vertices \(h {\mathbb{Z}}^{2}\), and underlying Riemannian metric \(\operatorname{\mathbf{M}}\). Since \({\mathcal{T}}_{h}\) is \({\mathbb{Z}}^{2}\)-periodic, we also regard it as an ADT of the periodic unit square Ω.

We establish in Sect. 3.1 the existence of the ADT \({\mathcal{T}}_{h}\). Incidentally, we show in Lemma 7(iii) that the angles of the elements of \({\mathcal{T}}_{h}\), measured with respect to the local metric \(\operatorname{\mathbf{M}}\), are asymptotically acute. This geometrical property (which holds thanks to our special choice of triangulation vertices, on a grid) is linked to the non-negativity of AD-LBR: indeed, it is known that finite elements discretizations such as (12) yield non-negative numerical schemes, and the discrete maximum principle, if the mesh satisfies a non-obtuse angle condition, see Lemma 3.1 in [9].

Section 3.2 is devoted to the study of M-obtuse superbases of \({\mathbb{Z}}^{2}\), and their cousins M-reduced bases of \({\mathbb{Z}}^{2}\), on which the AD-LBR relies: we discuss their characterization, uniqueness and stability properties. We study in Sect. 3.3 the finite element stencils, defined for \(p\in h {\mathbb{Z}}^{2}\) by

$$ V_h(p) := \bigl\{e \in {\mathbb{Z}}^2; [p,p+h e] \ \text{is an edge of}\ {\mathcal{T}}_h\bigr\}, $$
(17)

see Fig. 3 (right). We show that V h (p) coincides with the AD-LBR stencil V(p), unless the lattice \({\mathbb{Z}}^{2}\) admits a basis almost orthogonal with respect to the scalar product associated to \(\operatorname{\mathbf{M}}(p)\), see Lemma 13. This is tied to the fact that orthogonal grids admit several (usual) Delaunay triangulations. Overcoming this technical difficulty, we conclude the proof of Theorem 1.

Note that the construction of the ADT \({\mathcal{T}}_{h}\) is not easy to parallelize, in particular when anisotropy is pronounced since the Voronoi regions of far away points interact. The construction of \({\mathcal{T}}_{h}\) also involves solving polynomial equations of degree four, because Voronoi regions boundaries are conics, and Voronoi vertices must be identified at their intersections. In contrast, the AD-LBR stencils are independent of each other, and the numerical cost of their construction only grows logarithmically with the metric anisotropy.

2 Construction of Obtuse Superbases, and Three-Dimensional Stencils

Algorithms for the construction of privileged bases of lattices, consisting of short and almost orthogonal vectors, have attracted an important research effort from the mathematical community, over a long period of time. The first such algorithm dates back to Lagrange [11], and is restricted to two dimensional lattices. Methods for high dimensional lattices, such as the LLL algorithm [12], are of key importance for integer programming and cryptography [18]. AD-LBR is based on the original algorithm of Lagrange [11], and on its recent extension to three dimensional lattices [17, 23]. These methods output a basis of \({\mathbb{Z}}^{d}\) reduced in the sense of Minkowski, which in dimension d≤4 is equivalent to the following definition.

We denote by \(e_{1}{\mathbb{Z}}+ \cdots+e_{k}{\mathbb{Z}}\) the sub-lattice of \({\mathbb{Z}}^{d}\) generated by vectors \(e_{1}, \ldots, e_{k}\in {\mathbb{Z}}^{d}\). This sub-lattice equals {0} by convention if k=0.

Definition 4

An M-reduced basis of \({\mathbb{Z}}^{d}\), where d≤4 and \(M \in S_{d}^{+}\), is a basis (e 1,…,e d ) of \({\mathbb{Z}}^{d}\) such that

$$ \|e_i\|_M = \min\bigl\{ \|e \|_M; e \in {\mathbb{Z}}^d \setminus (e_1 {\mathbb{Z}}+ \cdots+e_{i-1} {\mathbb{Z}})\bigr\}. $$
(18)

For each d≤4, and each \(M\in S_{d}^{+}\), there exists at least one M-reduced basis [17]. In contrast, there exists \(M\in S_{5}^{+}\) for which no basis of \({\mathbb{Z}}^{d}\) satisfies (18). The norms of the elements \((e_{i})_{i=1}^{d}\) of an M-reduced basis,

$$ \lambda_i(M) := \|e_i \|_M, $$
(19)

are called the Minkowski minima, and are independent of the choice of M-reduced basis. In particular, e 1 is the shortest vector of \({\mathbb{Z}}^{d}\), with respect to the norm ∥⋅∥ M , and e 2 is the shortest linearly independent vector.

Lemma 2

For any \(M \in S_{d}^{+}\), 1≤id,

$$ \bigl\|M^{-1} \bigr\|^{-\frac{1}{2}} \leq\lambda_i(M) \leq\|M \|^{\frac{1}{2}}. $$

Proof

Note that \(\|M^{-1 }\|^{-\frac{1}{2}} \|e\| \leq\|e\|_{M} \leq\|M\| ^{\frac{1}{2}} \|e\|\), for any \(e \in \mathbb{R}^{2}\). In addition: (i) any \(e \in {\mathbb{Z}}^{2}\setminus \{0\}\) satisfies ∥e∥≥1, and (ii) the set \({\mathbb{Z}}^{d} \setminus (e_{1} {\mathbb{Z}}+ \cdots+e_{i-1} {\mathbb{Z}})\) appearing in (18) always contains at least one element e of the canonical basis of \(\mathbb{R}^{d}\), so that ∥e∥≤1. The announced result easily follows. □

We emphasize that obtaining an M-reduced basis, i.e. solving the minimization problems (18), is both simple and cheap numerically. In dimension d=2, this is the object of Lagrange’s algorithm [11] (later rediscovered by Gauss and often erroneously called Gauss’s algorithm, see [17]): initialize (e,f) as the canonical basis of \({\mathbb{Z}}^{2}\), and

(20)

This algorithm can be regarded as a two dimensional geometrical generalization of greatest common divisor computation. It can be extended to higher dimension and, in dimension up to four, outputs an M-reduced basis after at most \({\mathcal{O}}(\ln\kappa(M))\) iterations [17], each consisting of \({\mathcal{O}}(1)\) operations among reals.

The elements of an M-reduced basis are heuristically never very far from being orthogonal, as illustrated by the following lemma.

Lemma 3

Let \(M \in S_{d}^{+}\), d≤4, and let (e 1,…,e d ) be an M-reduced basis. Then for any i,j∈{1,…,d},

$$ 2 \bigl|\langle e_i , M e_j \rangle \bigr| \leq \|e_i\|_M^2. $$
(21)

Proof

Since ∥e k M is an increasing function of k∈{1,…,d}, we may assume that i<j. If follows from (18) that ∥e j M ≤∥e j +e i M , and ∥e j M ≤∥e j e i M . Squaring these inequalities, and developing the scalar products, we obtain the announced result. □

Corollary 1

Let \(M \in S_{2}^{+}\), and let (e,f) be an M-reduced basis such thate,Mf〉≤0. Then (e,f,g) is an M-obtuse superbase of \({\mathbb{Z}}^{2}\), with g:=−ef. In addition

$$ \langle e, M g\rangle \leq-\|e\|_M^2/2, \qquad\langle f, M g\rangle \leq-\|f\|_M^2/2. $$
(22)

Proof

The previous lemma implies \(\langle e, M (e+f)\rangle \geq\|e\|_{M}^{2}-|\langle e,M f\rangle | \geq\frac{1}{2} \|e\|_{M}^{2}\). Likewise \(\langle f, M (e+f)\rangle \geq\frac{1}{2} \|f\|_{M}^{2}\). The result follows. □

The practical construction of the two dimensional AD-LBR stencil at a point zΩ amounts to (i) compute an \(\operatorname{\mathbf{M}}(z)\)-reduced basis (e,f) using Lagrange’s algorithm (20), (ii) replace f with −f, if necessary, so that 〈e,Mf〉≤0, and (iii) define the stencil V(z) and the weights γ z in terms of the M-obtuse superbase (e,f,g) of \({\mathbb{Z}}^{2}\), where g=−ef, as described in (10) and (11).

The rest of this section is devoted to the description of the three dimensional AD-LBR stencils. In contrast with the two dimensional case, the construction of the 3D stencil V(z) at a point zΩ, involves a \(\operatorname{\mathbf{D}}(z)\)-obtuse basis, instead of an \(\operatorname{\mathbf{M}}(z)\)-obtuse basis.

Proposition 1

Let \(D\in S_{3}^{+}\), and let (e 1,e 2,e 3) be a D-reduced basis. Let b i :=ε i e σ(i), for all 1≤i≤3, where the signs ε 1,ε 2,ε 3∈{−1,1}, and the permutation σ of {1,2,3} are chosen so that

$$ \bigl|\langle b_1, D b_2\rangle \bigr| \leq\min\bigl\{ - \langle b_1, D b_3\rangle , -\langle b_2, D b_3\rangle \bigr\}. $$
(23)

Then the following is a D-obtuse superbase:

$$ \left \{ \begin{array}{l@{\quad }l} (b_1,b_2,b_3,-b_1-b_2-b_3) & \mbox{\textit{if}}\ \langle b_1, D b_2\rangle \leq0,\\(-b_1,b_2,b_1+b_3,-b_2-b_3) & \mbox{\textit{otherwise}}. \end{array} \right . $$
(24)

Proof

To achieve (23), one can choose σ such that \(b'_{i} := e_{\sigma(i)}\) satisfies \(|\langle b'_{1}, D b'_{2}\rangle | \leq|\langle b'_{1}, D b'_{3}\rangle | \leq|\langle b'_{2}, D b'_{3}\rangle |\). Then choose the signs \((\varepsilon _{i})_{i=1}^{3}\) such that \(b_{i} := \varepsilon _{i} b'_{i}\) satisfies 〈b 1,Db 3〉≤0 and 〈b 2,Db 3〉≤0.

The two families of vectors appearing in (24) are clearly superbases. We thus only need to show that they are D-obtuse; in other words that 〈e,Df〉≤0 for any two distinct elements e,f of these families. Note that for all distinct i,j∈{1,2,3}, using (21),

$$ 2 \bigl|\langle b_i, D b_j\rangle \bigr| \leq\|b_i \|_D^2. $$

In the case where 〈b 1,Db 2〉≤0, the pairwise scalar products between b 1,b 2,b 3 are non-positive by construction. In addition

Likewise 〈b 1+b 2+b 3,Db i 〉≥0 for all i∈{1,2,3}, which concludes the proof.

We next turn to the second case, where 〈b 1,Db 2〉≥0. Enumerating all scalar products we obtain

and finally

This concludes the proof. □

In view of the previous proposition, obtaining a D-obtuse superbase of \({\mathbb{Z}}^{3}\) has numerical cost \({\mathcal{O}}(\ln\kappa(D))\). Indeed a D-reduced basis needs to be computed in a preliminary step, after what Proposition 1 is applied for a negligible \({\mathcal{O}}(1)\) cost. An alternative method for the construction of D-obtuse superbases of \({\mathbb{Z}}^{3}\) is presented in [4] and in Appendix B of [3], but its numerical complexity is not known to the authors.

The three dimensional AD-LBR is defined by the following stencils and coefficients. Let zΩ, let \(D := \operatorname{\mathbf{D}}(z)\), and let \((e_{i})_{i=0}^{3}\) be a D-obtuse superbase of \({\mathbb{Z}}^{3}\). We set

$$ V(z) := \bigl\{ e_k \times e_l; k,l \in\{0, 1,2, 3\}, k \neq l\bigr\}, $$

and if {i,j,k,l}={0,1,2,3}, ij and kl, then

$$ \gamma_z(e_k \times e_l) := -\frac{1}{2} \langle e_i, D e_j\rangle . $$

As announced, #(V(z))=12, and the weights γ z are non-negative. The proof of the scheme consistency (5), due to Selling [22], is reproduced in the next lemma for completeness. A generalization, appearing in Appendix B of [3], allows in arbitrary dimension to build a non-negative decomposition of the form (25) from a D-obtuse superbase of \({\mathbb{Z}}^{d}\). However the non existence of such a superbase, for some matrices \(D \in S_{4}^{+}\), forbids a straightforward extension of AD-LBR to higher dimension.

Lemma 4

(Selling [22])

Let \((e_{i})_{i=0}^{3}\) be a superbase of \({\mathbb{Z}}^{3}\). For all i,j,k,l such that {i,j,k,l}={0,1,2,3}, i<j, and k<l, let c ij :=e k ×e l . Then, for any \(D \in S_{3}^{+}\):

$$ D = -\sum_{0 \leq i<j \leq3} \langle e_i, D e_j\rangle c_{ij} c_{ij}^\mathrm{T}. $$
(25)

Proof

Let i,j,k,l be as in the definition of c ij . Then

$$ \langle e_i, c_{ij}\rangle = \langle e_i,e_k \times e_l\rangle = \operatorname{det}(e_i,e_k,e_l) \in\{ -1,1\}, $$

since (e i ,e k ,e l ) is a basis of \({\mathbb{Z}}^{3}\). Also

In addition, clearly, 〈e k ,c ij 〉=〈e l ,c ij 〉=0. Denoting by D′ the right hand side of (25), we obtain as a result

Likewise 〈e i ,De j 〉=〈e i ,De j 〉 for all i,j∈{1,2,3,4}. It follows as announced that D=D′. □

3 Equivalence to a Finite Element Discretization

This section is devoted to the proof of Theorem 1: the asymptotic equivalence of AD-LBR with a finite element discretization on an Anisotropic Delaunay Triangulation (ADT). We use the notations of Sect. 1. The existence of the ADT \({\mathcal{T}}_{h}\) is established in the first subsection, for h sufficiently small, as well as a few of its properties. The second subsection is devoted to the study of M-reduced bases. Theorem 1 is proved in the third subsection, by comparing the stencils of the AD-LBR and of the finite element discretization.

We denote by κ the maximum anisotropy ratio (9) of the diffusion tensor

$$ {\boldsymbol{\kappa}}:= \max_{z \in\varOmega} \kappa\bigl(\operatorname{\mathbf{D}}(z) \bigr). $$
(26)

Observing that \(\kappa(\operatorname{\mathbf{D}}(z)) = \kappa(\operatorname{\mathbf{M}}(z))\), and recalling that \(\operatorname{det}(\operatorname{\mathbf{M}}(z))=1\), one easily checks that

$$ {\boldsymbol{\kappa}}^{-\frac{1}{2}} \|e\| \leq\|e\|_{\operatorname{\mathbf{M}}(z)} \leq {\boldsymbol{\kappa}}^{\frac{1}{2}} \|e\|, $$
(27)

for all zΩ and all \(e \in \mathbb{R}^{2}\).

3.1 Existence of an ADT

Our first lemma provides an uniform bound on the size of the Voronoi regions, see Fig. 3, involved in the construction of the ADT.

Lemma 5

  1. (i)

    For all \(r \in \mathbb{R}^{2}\), one has \(\Delta_{h}(r) \leq {\boldsymbol{\kappa}}^{\frac{1}{2}} h\).

  2. (ii)

    If \(p,q\in h {\mathbb{Z}}^{2}\), and \(r \in \operatorname{Vor}_{h}(p) \cap \operatorname{Vor}_{h}(q)\), thenpr∥≤κ h andpq∥≤2κ h.

Proof

Point (i). Rounding the coordinates of r to a nearest multiple of h, we obtain a point \(p \in h{\mathbb{Z}}^{2}\) such that ∥pr∥≤h. Recalling (27) we obtain \(\delta_{p}(r) \leq {\boldsymbol{\kappa}}^{\frac{1}{2}} h\), and therefore \(\Delta_{h}(r) \leq {\boldsymbol{\kappa}}^{\frac{1}{2}} h\) in view of (15).

Point (ii). We have \({\boldsymbol{\kappa}}^{-\frac{1}{2} } \|p-r\| \leq\delta_{p}(r) = \Delta_{h}(r) \leq {\boldsymbol{\kappa}}^{\frac{1}{2}} h\). Thus ∥pr∥≤κ h, and likewise ∥qr∥≤κ h. Finally, by the triangle inequality, ∥pq∥≤∥pr∥+∥qr∥≤2κ h. □

Following the notations of [10], we denote by τ(p,q), \(p,q \in \mathbb{R}^{2}\), the smallest constant τ≥1 such that

$$ \tau^{-1} \delta_p(r) \leq\delta_q(r) \leq \tau\delta_p(r), \quad \text{for all}\ r \in \mathbb{R}^2. $$

Equivalently, in the sense of symmetric matrices,

$$ \tau^{-2} \operatorname{\mathbf{M}}(p) \leq \operatorname{\mathbf{M}}(q) \leq\tau^2 \operatorname{\mathbf{M}}(p). $$
(28)

We also define a quantity τ h ≥1, closely related to the modulus of continuity of the metric \(\operatorname{\mathbf{M}}\):

$$ \tau_h := \max\bigl\{ \tau(p,q); \|p-q\| \leq2 {\boldsymbol{\kappa}}h\bigr\}. $$
(29)

One has τ h →1 as h→0, for any continuous metric \(\operatorname{\mathbf{M}}\) (indeed \(\operatorname{\mathbf{M}}\) is periodic and therefore uniformly continuous). If \(\operatorname{\mathbf{M}}\) is Lipschitz, as assumed in Theorem 1, then \(\tau_{h} = 1+{\mathcal{O}}(h)\).

We show in the next lemma the existence of an ADT, by applying the main result of [10], under the assumption that τ h is sufficiently small. More precisely, we assume in the rest of this subsection that

$$ \tau_h < \sqrt{1+{\boldsymbol{\kappa}}^{-2}}. $$
(30)

Lemma 6

  1. (i)

    If \(p,q\in h{\mathbb{Z}}^{2}\), pq, and \(r\in \operatorname{Vor}_{h}(p) \cap \operatorname{Vor}_{h}(q)\), then \(\delta_{p}(r) < \delta_{p}(q)/\sqrt{\tau(p,q)^{2}-1}\).

  2. (ii)

    The geometric dual \({\mathcal{Q}}_{h}\) of the Voronoi diagram is, as announced in Sect1, a polygonization of \(\mathbb{R}^{2}\) into strictly convex polygons, with vertices \(h {\mathbb{Z}}^{2}\).

Proof

Point (i). We may assume that τ(p,q)>1, otherwise there is nothing to prove. Point (ii) of Lemma 5 implies that ∥pq∥≤2κ h, thus

$$ \sqrt{\tau(p,q)^2-1} \leq\sqrt{\tau_h^2-1} < {\boldsymbol{\kappa}}^{-1}. $$

On the other hand \(\delta_{p}(q) \geq {\boldsymbol{\kappa}}^{-\frac{1}{2}} \|q-p\| \geq {\boldsymbol{\kappa}}^{-\frac{1}{2}} h\), and \(\delta_{p}(r) \leq\Delta_{h}(r) \leq {\boldsymbol{\kappa}}^{\frac{1}{2}} h\). The announced inequality follows.

Point (ii). We apply Theorem 7 (Dual Triangulation Theorem) in [10]. Since the domain \(\mathbb{R}^{2}\) has no boundary, it suffices to check that all the Voronoi arcs and vertices are wedged, see [10]. This condition means that for any \(p,q \in h {\mathbb{Z}}^{2}\) such that pq, and any \(r \in \operatorname{Vor}_{h}(p)\cap \operatorname{Vor}_{h}(q)\), one has \((r-q) \operatorname{\mathbf{M}}(q) (p-q) >0\), and likewise exchanging the roles of p and q. Heuristically, it expresses the acuteness of some angles measured in the local metric. Lemma 5 in [10] shows that this condition follows from point (i) of this lemma, which concludes the proof. □

We recall that \({\mathcal{T}}_{h}\) is the triangulation obtained by arbitrarily triangulating the polygonization Q h of the previous lemma, respecting periodicity, see Definition 3. Generically Q h is already a triangulation, hence \({\mathcal{T}}_{h} = Q_{h}\), see Sect. 1. The Voronoi regions \(\operatorname{Vor}_{h}\), and the triangulation \({\mathcal{T}}_{h}\), are illustrated in Figs. 2 and 3.

The next lemma provides estimates of the diameter, the area, and the angles of the elements of \({\mathcal{T}}_{h}\). These geometrical properties also have an interpretation in the context of lattices: (ii) shows that the edges of any triangle \(T \in {\mathcal{T}}_{h}\) define a superbase (e,f,g) of \({\mathbb{Z}}^{2}\), and (iii) that this superbase is almost \(\operatorname{\mathbf{M}}(z)\)-obtuse, for any zT.

Note that the vertices p,q,r of any triangle \(T \in {\mathcal{T}}_{h}\) satisfy by construction

$$ \operatorname{Vor}_h(p) \cap \operatorname{Vor}_h(q) \cap \operatorname{Vor}_h(r) \neq\emptyset. $$
(31)

Lemma 7

Denote by he,hf,hg the edges of a triangle \(T\in {\mathcal{T}}_{h}\), where \(e,f,g \in {\mathbb{Z}}^{2}\) are oriented so that e+f+g=0. Then

  1. (i)

    max{∥e∥,∥f∥,∥g∥}≤2κ.

  2. (ii)

    |det(e,f)|=1, thus |T|=h 2/2.

  3. (iii)

    \(\langle e,\operatorname{\mathbf{M}}(z) f\rangle \leq\theta_{h}\), for any zT, where θ h →0 as h→0. (Explicitly: \(\theta_{h} = {\boldsymbol{\kappa}}(3+9 \tau_{2h}^{2}) (\tau_{2h}^{2}-1)\)).

Proof

Point (i). We denote by p,q,r the vertices of T, ordered in such way that p+he=q, q+hf=r, r+hg=p. The announced estimate follows from (31), and from point (ii) of Lemma 5.

Point (ii). Since \({\mathcal{T}}_{h}\) is a conforming triangulation, the intersection of T with the collection \(h {\mathbb{Z}}^{2}\) of all vertices of \({\mathcal{T}}_{h}\) consists of only three points: the vertices p,q,r of T. Thus the triangle of vertices −e,0,f, homothetic to T, contains no point of integer coordinates but its vertices. This implies that (e,f) is a basis of \({\mathbb{Z}}^{2}\), hence |det(e,f)|=1, as announced.

Point (iii). The pairwise distances between p,q,r are bounded by 2κ h, see point (i), and since zT so are the pairwise distances between p,q,r,z. Defining \(s := p-q+r \in h {\mathbb{Z}}^{2}\), and observing that ∥sp∥=∥rq∥≤2κ h, we find that the pairwise distances between p,q,r,z,s are bounded by 4κ h.

Let \(x\in \operatorname{Vor}_{h}(p) \cap \operatorname{Vor}_{h}(q) \cap \operatorname{Vor}_{h}(r)\). We have δ p (x)=δ q (x)=δ r (x)=Δ h (x)≤δ s (x), thus

$$ \delta_s(x)^2 \geq \delta_p(x)^2-\delta_q(x)^2 + \delta_r(x)^2. $$
(32)

(For intuition: in a classical Delaunay triangulation, x would be the circumcenter of T, and (32) would state that s is outside the circumcircle of T.) Denoting \(M := \operatorname{\mathbf{M}}(z)\), and δ:=Δ h (x), we obtain

(33)

using Lemma 5, and likewise for q,r. We also have

Thus, proceeding as in (33),

$$ \bigl|\delta_s(x) - \|s-x\|^2_M \bigr| \leq \delta_s(x)^2 \bigl(\tau_{2 h}^2-1 \bigr) \leq9 \delta^2 \tau^2_{2h} \bigl( \tau_{2 h}^2-1\bigr) . $$

Inserting in (32) these estimates of δ (x), ⋆∈{p,q,r,s}, and using the fact that \(\delta\leq {\boldsymbol{\kappa}}^{\frac{1}{2}} h\), see Lemma 5, we obtain after expansion the announced estimate of 〈e,Mf〉. □

We next rewrite the finite element energy \({\mathcal{E}}'_{h}\) (12) in a form similar to that of the AD-LBR energy \({\mathcal{E}}_{h}\) (3). Let \(\varphi _{p}^{h} : \mathbb{R}^{2} \to \mathbb{R}\) be the piecewise linear function on \({\mathcal{T}}_{h}\) such that \(\varphi _{p}^{h}(p)=1\), and \(\varphi _{p}^{h}(q)=0\) for any vertex \(q\in h {\mathbb{Z}}^{2}\) distinct from p. This is the classical “hat function” encountered in finite element analysis. For all \(p \in h{\mathbb{Z}}^{2}\), \(e\in {\mathbb{Z}}^{2}\setminus \{0\}\), let

$$ \gamma^h_p(e) := - \frac{1}{2} \int _{ \mathbb{R}^2} \bigl\langle \nabla \varphi _p^h(z), \operatorname{\mathbf{D}}(z) \nabla \varphi _{p+he}^h(z)\bigr\rangle dz. $$
(34)

Clearly, \(\gamma_{p}^{h}(e) = 0\) if [p,p+he] is not an edge of \({\mathcal{T}}_{h}\), in other words if e does not belong to the stencil V h (p), defined in (17). We express in the next lemma the finite element energy \({\mathcal{E}}'_{h}\) (12) in terms of the stencils V h and of the (potentially negative) weights \(\gamma^{h}_{p}\).

Lemma 8

For any uL 2(Ω h ), extended by periodicity to \(h{\mathbb{Z}}^{2}\), one has

$$ {\mathcal{E}}'_h(u) = \sum _{p \in\varOmega_h} \sum_{e \in V_h(p)} \gamma_p^h(e) \bigl|u(p+he)-u(p)\bigr|^2. $$
(35)

Proof

For any triangle \(T\in {\mathcal{T}}_{h}\), and any \(p,q \in h{\mathbb{Z}}^{2}\), we denote

$$ s_T(p,q) := \int_T \bigl\langle \nabla \varphi _p^h(z), \operatorname{\mathbf{D}}(z)\nabla \varphi _q^h(z) \bigr\rangle dz. $$

Clearly s T (p,q)=0 if q or p is not a vertex of T. The coefficient \(\gamma_{p}^{h}(e)\), \(e\in {\mathbb{Z}}^{2}\), is thus given by the following sum with at most two non-zero terms:

$$ \gamma_p^h(e) = -\frac{1}{2} \sum _{T \in {\mathcal{T}}_h} s_T(p,p+he). $$
(36)

Let \(p,q,r \in h{\mathbb{Z}}^{2}\) be the vertices of a triangle \(T \in {\mathcal{T}}_{h}\). Since the sum \(\varphi _{p}^{h}+\varphi _{q}^{h}+\varphi _{r}^{h}\) is constant on T, equal to 1, it has a null gradient on T, and therefore

$$ s_T(p,p)+s_T(p,q)+s_T(p,r)=0. $$

Using this relation, and the two similar ones obtained by a cyclic permutation of p,q,r, we obtain

Summing this expression over all \(T \in {\mathcal{T}}_{h}\), and combining it with (36), we obtain (35), which concludes the proof. □

Finally, we provide an approximation of the coefficients \(\gamma_{p}^{h}\) which will be easily compared with the AD-LBR weights γ p (11).

Lemma 9

Consider an edge [p,p+he] of \({\mathcal{T}}_{h}\), shared by the two distinct triangles \(T,T' \in {\mathcal{T}}_{h}\). Let hf,hg (resp. hf′,hg′) be the two other vector edges of T (resp. T′), oriented so that e+f+g=0 (resp. e+f′+g′=0). Then

$$ \biggl \vert \gamma_p^h(e) + \frac{1}{4} \bigl(\bigl \langle f^\perp,\operatorname{\mathbf{D}}(p) g^\perp\bigr\rangle + \bigl\langle f'^\perp, \operatorname{\mathbf{D}}(p) g'^\perp\bigr \rangle \bigr) \biggr \vert \leq \varepsilon _h, $$

where \(\varepsilon _{h} := 2 {\boldsymbol{\kappa}}^{2} \max\{ \|\operatorname{\mathbf{D}}(x) -\operatorname{\mathbf{D}}(y)\|; \|x-y\| \leq2 {\boldsymbol{\kappa}}h\}\).

Proof

We assume, up to exchanging f and g, that [p,phg] is an edge of T. Let \(\alpha:= \operatorname{det}(e,f) \in\{-1,1\}\), see point (ii) of Lemma 7; note that \(\alpha= \operatorname{det}(f,g) = \operatorname{det}(g,e)\). Let γ be the constant value of \(\nabla \varphi _{p}^{h}\) on T. Then 〈γ,he〉=−1 and 〈γ,hg〉=1. These two independent linear identities are also satisfied by αf /h, hence \(\nabla \varphi _{p}^{h} = \gamma= \alpha f^{\perp}/h\) on T.

Denoting q:=p+hg, we obtain likewise \(\nabla \varphi _{q}^{h} = \alpha g^{\perp}/h\) on T. Hence recalling that |T|=h 2/2:

Therefore, using point (i) of Lemma 7 in the last step,

Proceeding likewise on T′, and recalling (34) (or (36)), we conclude the proof. □

3.2 Some Properties of M-Reduced Bases

We establish some technical properties of M-reduced bases, thanks to which we will be able to compare in Sect. 3.3 the “geometric” construction of the ADT finite element stencils V h , with the lattice based construction of the AD-LBR stencils V.

Lemma 10

Let \(M \in S_{2}^{+}\), let \(e_{1},\ldots, e_{n} \in {\mathbb{Z}}^{2}\), n>2, and let ε∈{−1,1}. Assume that for all 1≤in, with the convention e n+1:=e 1:

(37)
(38)

Then any M-reduced basis (e,f) satisfies

$$ \{e,f\} \subset\{e_1, \ldots, e_n\}. $$

Proof

Let \(z\in {\mathbb{Z}}^{2}\setminus \{e_{1}, \ldots, e_{n}\}\). Our objective is to show that z cannot be an element of an M-reduced basis, and we may therefore assume that z has co-prime coordinates.

It follows from (37) that the closed polygonal line of consecutive vertices e 1,…,e n , circles at least once around the origin, see Fig. 5. Hence z=αe i +βe i+1, for some 1≤in and some α,β≥0. Since (e i ,e i+1) is a basis of \({\mathbb{Z}}^{2}\) (indeed |det(e i ,e i+1)|=1), the coefficients α and β are integers. Since z∉{e i ,e i+1}, α+β≥2. Since z has co-prime coordinates, αβ≠0.

Fig. 5
figure 5

(Left) A family e 1,…,e 11 satisfying condition (37) of Lemma 10: the closed polygonal line of vertices (e 1,…,e 11) circles (at least) once around the origin, and the triangles \(\widehat{(0,e_{i},e_{i+1})}\) have area 1/2. (Center and right) The lattice \({\mathbb{Z}}^{2}\), and an M-reduced basis (e,f), shown after a linear change of coordinates by A, such that \(A^{\mathrm{T}}A = M\in S_{2}^{+}\). Case μ(M)=0 (center), and case 2μ(M)=λ 1(M)2 (right)

Assuming without loss of generality that ∥e i M ≥∥e i+1 M , we obtain using (38):

Observing that α 2+β 2−1−αβ≥0 for all α,β∈ [1,∞[, we obtain ∥z M >∥e i M . Since e i and e i+1 are linearly independent, we have ∥e i M λ 2(M). Finally ∥z M >λ 2(M), hence z cannot be an element of an M-reduced basis, which concludes the proof. □

The next corollary reverses the construction, presented in Corollary 1, of an M-obtuse superbase from an M-reduced basis.

Corollary 2

Let \(M \in S_{2}^{+}\) and let (e,f,g) be an M-obtuse superbase of \({\mathbb{Z}}^{2}\), ordered so thate M ≤∥f M ≤∥g M . Then (e,f) is an M-reduced basis.

Proof

The family (e,−g,f,−e,g,−f) satisfies by construction the conditions of the previous lemma. Hence any \(\operatorname{\mathbf{M}}(z)\)-reduced basis (e′,f′) of \({\mathbb{Z}}^{2}\) satisfies {e′,f′}⊂{e,f,g,−e,−f,−g}. Observing that e′ and f′ are linearly independent, that ∥e′∥ M ≤∥f′∥ M , and that ∥e M ≤∥f M ≤∥g M , we obtain that ∥e M ≤∥e′∥ M and ∥f M ≤∥f′∥ M . Recalling that M-reduced bases are defined by the minimality of their ∥⋅∥ M -norms, see Definition 4, we obtain as announced that (e,f) is an M-reduced basis. □

The previous lemma shows that for any zΩ, there exists an \(\operatorname{\mathbf{M}}(z)\)-reduced basis (e,f) such that

$$ V(z) = \{e,f,e+f,-e,-f,-e-f\}. $$
(39)

Given \(M \in S_{2}^{+}\), and an M-reduced basis (e,f) of \({\mathbb{Z}}^{2}\), we denote μ(M):=|〈e,Mf〉|. This value can be expressed in terms of the Minkowski minima (19) and thus does not depend on the particular choice of M-reduced basis. Indeed, recalling the identity

$$ \langle e,M f\rangle ^2+\operatorname{det}(M) \operatorname{det}(e,f)^2 = \|e \|_M^2 \|f\|_M^2, $$

we obtain

$$ \mu(M) = \bigl|\langle e,M f\rangle \bigr| = \sqrt{\lambda_1(M)^2 \lambda_2(M)^2 - \operatorname{det}(M)}. $$
(40)

In addition one has

$$ 0 \leq2 \mu(M) \leq\lambda_1(M)^2, $$
(41)

where the right hand side follows from Lemma 3. A vanishing value, μ(M)=0, indicates that the lattice \({\mathbb{Z}}^{2}\) admits an M-orthogonal basis. In contrast, when the upper bound is met, 2μ(M)=λ 1(M)2, one has ∥f M =∥f+εe M for \(\varepsilon := -{\rm sign}\langle e,M f\rangle \), hence the reduced basis (e,f) is not unique even up to sign changes. See Fig. 5.

We next show that the stencils of the AD-LBR do not depend on the choices of reduced bases, as was announced in the introduction.

Lemma 11

The weights \(\gamma_{z} : {\mathbb{Z}}^{2} \to \mathbb{R}_{+}\) used in the AD-LBR at a point zΩ (defined on V(z) by (11) and extended to \({\mathbb{Z}}^{2}\) by 0), do not depend on the choice of \(\operatorname{\mathbf{M}}(z)\)-obtuse superbase of \({\mathbb{Z}}^{2}\).

Proof

We denote \(M := \operatorname{\mathbf{M}}(z)\) and \(D := \operatorname{\mathbf{D}}(z)\). Let (e,f,g) and (e′,f′,g′) be two M-obtuse superbases, and let V,V′ and \(\gamma, \gamma' : {\mathbb{Z}}^{2} \to \mathbb{R}_{+}\) be the corresponding AD-LBR stencils and weights defined by (10) and (11). We may assume, using Corollary 2 and up to reordering, that (e,f) and (e′,f′) are M-reduced bases.

Corollary 1 states that the scalar products 〈e,Mg〉, 〈f,Mg〉, 〈e′,Mg′〉 and 〈f′,Mg′〉 are (strictly) negative. On the other hand

$$ \langle e,M f\rangle = \bigl\langle e', M f'\bigr \rangle = - \mu(M) \leq0. $$
(42)

Applying Lemma 10 to the family

$$ \bigl(e',-g',f',-e',g',-f' \bigr) $$

we obtain that

$$ \{e,f\} \subset\bigl\{e',f',g', -e', -f', -g'\bigr\}. $$
(43)

If μ(M)≠0, then 〈e,Mf〉 and 〈e′,Mf′〉 are negative, and not merely non-positive, thus {e,f}⊂{e′,f′,g′}, or {e,f}⊂{−e′,−f′,−g′}. Since e+f+g=0=e′+f′+g′, it follows that {e,f,g}={e′,f′,g′}, or {e,f,g}={−e′,−f′,−g′}. The stencils V,V′ are thus identical, see (10), and so are the weights γ,γ′.

If μ(M)=0, then the stencils V,V′ may not be identical. Observe however that 〈e ,Df 〉=0=〈e,Df〉, using (8). Hence using the weights expression (11):

(44)

and likewise for γ′,e′,f′,g′. Note also that \(\|g'\|^{2}_{M} = \|e'\|_{M}^{2} +\|f'\|_{M}^{2} > \lambda_{2}(M)^{2}\), hence e and f are different from g′ and −g′. It follows from (43) that {e,f}={ε 1 e′,ε 2 f′} for some ε 1,ε 2∈{−1,1}. This implies γ=γ′ in view of (44), and concludes the proof. □

The next lemma establishes weak uniqueness and stability properties for M-reduced bases, in the case of a strict inequality 2μ(M)<λ 1(M)2.

Lemma 12

Consider \(M,M'\in S_{2}^{+}\), an M-reduced basis (e,f), and an M′-reduced basis (e′,f′). Let τ≥1 be such that τ −2 MM′≤τ 2 M, in the sense of symmetric matrices. Assume either:

  1. (i)

    2μ(M)<λ 1(M)2, and τ=1 (i.e. M′=M).

  2. (ii)

    4μ(M)≤λ 1(M)2, and \(\tau^{4}\leq 1+\frac{1}{3} {\kappa(M)^{-2}}\).

Then {e′,f′}⊂{e,f,−e,−f}.

Proof

Denoting α:=2μ(M)/λ 1(M)2, we obtain:

In the fourth line we used Lemma 2, which implies that ∥f M =λ 2(M)≤κ(M)λ 1(M)=κ(M)∥e M , and Lemma 3 to bound 2〈e,Mf〉. Replacing α and τ with their assumed upper bounds, we obtain \(2\langle e,M' f\rangle < \|e\|_{M'}^{2}\). Proceeding likewise, we obtain \(2 |\langle e, M' f\rangle | < \min\{\|e\|_{M'}^{2}, \|f\|_{M'}^{2}\}\). We may therefore apply Lemma 10 to M′ and (e,f,−e,−f), which implies {e′,f′}⊂{e,f,−e,−f} as announced. □

3.3 Comparison of the Stencils

We assume in this subsection that the scale parameter h is sufficiently small. Our assumption is stronger than the one used in Sect. 3.1, see (30), hence in particular there exists an Anisotropic Delaunay Triangulation \({\mathcal{T}}_{h}\). More precisely we assume that

$$ \tau_h \leq\sqrt[4]{1+1/\bigl(3 {\boldsymbol{\kappa}}^2\bigr)}\quad \text{and}\quad \theta_h \leq \theta_0 := 1/(4 {\boldsymbol{\kappa}}). $$
(45)

See (26), (29), and Lemma 7 for the definition of κ, τ h and θ h respectively. For Lipschitz metrics, \(\tau_{h} = 1+{\mathcal{O}}(h)\) and \(\theta_{h} = {\mathcal{O}}(h)\).

Our objective is to compare the stencils V(p), V h (p), of the AD-LBR (10) and of the ADT finite element discretization (17) respectively, at a point \(p \in h {\mathbb{Z}}^{2}\). The next lemma shows that they are equal unless the lattice \({\mathbb{Z}}^{2}\) is almost orthogonal with respect to the local metric; a property quantified via \(\mu(\operatorname{\mathbf{M}}(p))\), see (40).

Lemma 13

Let \(p \in h {\mathbb{Z}}^{2}\), and let \(M := \operatorname{\mathbf{M}}(p)\). If μ(M)>θ h , then V h (p)=V(p). In any case, one has for any M-reduced basis (e,f):

(46)
(47)

Proof

We assume that 〈e,Mf〉≤0, up to replacing f with −f. Let \(T \in {\mathcal{T}}_{h}\) be a triangle containing p, and let he 1,he 2,he 3 be the edges of T, oriented so that e 1+e 2+e 3=0. Using point (iii) of Lemma 7, and (27), we obtain for all 1≤i≤3, with the convention e 4:=e 1

$$ \langle e_i, M e_{i+1} \rangle \leq \theta_h \leq\theta_0 < \frac{1}{2 {\boldsymbol{\kappa}}}\leq\frac{1}{2} \min\bigl\{\|e_i\|_M^2, \|e_{i+1} \|_M^2\bigr\}. $$
(48)

Denote E:={e 1,e 2,e 3}, and −E:={−e 1,−e 2,−e 3}. Applying Lemma 10 to M and the points (e 1,−e 3,e 2,−e 1,e 3,−e 2), we obtain that {e,f}⊂E∪(−E). Up to exchanging E with −E, we thus have {e,f}⊂E or {e,−f}⊂E. Since the elements of E sum to zero, we conclude that

$$ E=\{e,f,-e-f\} \quad \text{or}\quad E = \{e,-f,-e+f\}, $$
(49)

which implies (47).

If μ(M)=|〈e,Mf〉|>θ h , then (48) forbids the second case in (49). Thus E={e,f,−ef}, and therefore V h (p)⊂V(p), using (39).

Let \(T\in {\mathcal{T}}_{h}\) be a triangle containing p and intersecting the half line L:={p+re;r>0}. We know (49) that he is a vector edge of T (i.e. the difference between two vertices of T). The corresponding edge segment must be [p,p+he], since otherwise TL would be empty. Thus eV h (p). Applying the same argument to −e,f,−f, we obtain (46).

If μ(M)>θ h , then h(e+f) is also a vector edge of any triangle \(T \in {\mathcal{T}}_{h}\) containing p, since we eliminated the second case in (49). Reasoning as above we find that {e+f,−ef}⊂V h (p), and therefore V(p)⊂V h (p). Thus V(p)=V h (p). This concludes the proof. □

We introduce new stencils W(p),W′(p), for \(p\in \mathbb{R}^{2}\), defined as follows. Let \(M := \operatorname{\mathbf{M}}(p)\). If μ(M)≤θ 0, then denoting by (e,f) an M-reduced basis,

(50)
(51)

On the other hand, if μ(M)>θ 0, then

$$ W(p) := V(p) =: W'(p). $$
(52)

See Fig. 6 for an illustration. The previous lemma implies that W(p)⊂V h (p)⊂W′(p) for any \(p \in h {\mathbb{Z}}^{2}\).

Fig. 6
figure 6

Consider a point \(p\in h {\mathbb{Z}}^{2}\), and denote \(M := \operatorname{\mathbf{M}}(p)\). From left to right: ellipse {∥z M ≤1}, AD-LBR stencil V(p), stencils W(p)⊂V h (p)⊂W′(p). For W(p) and W′(p) we assumed that μ(M)<θ 0, otherwise they are equal to V(p). Note that V(p), W(p), W′(p) only depend on M, while V h (p) depends on the structure of the triangulation \({\mathcal{T}}_{h}\)

Lemma 14

The stencils W(p), W′(p), do not depend on the choice of \(\operatorname{\mathbf{M}}(p)\)-reduced basis.

Proof

Let \(M := \operatorname{\mathbf{M}}(p)\). If μ(M)>θ 0, then W(p), W′(p) are defined by (52), hence there is nothing to prove. Otherwise we obtain μ(M)≤θ 0≤1/(4κ)≤λ 1(M)2/4. Hence, by Lemma 12, any two M-reduced bases (e,f), (e′,f′), need to satisfy {e′,f′}⊂{e,f,−e,−f}. In view of (50) and (51), they thus yield the same stencils W(p), W′(p). □

Let \({\mathcal{F}}_{h}, {\mathcal{F}}'_{h}\) be the energies associated to the stencils W,W′: for uL 2(Ω h ), extended to \(h{\mathbb{Z}}^{2}\) by periodicity,

The outline of the proof of Theorem 1 is as follows. We prove in Lemmas 16, 17 and 15 respectively that for any uL 2(Ω h ):

(53)
(54)
(55)

where the constants C 0,C 1,C 2 only depend on the metric \(\operatorname{\mathbf{M}}\). Combining these inequalities, and recalling that \(\theta_{h} = {\mathcal{O}}(h)\) and \(\varepsilon _{h} = {\mathcal{O}}(h)\) for Lipschitz metrics (ε h is defined in Lemma 9), we obtain

$$ \bigl|{\mathcal{E}}'_h(u) - {\mathcal{E}}_h(u)\bigr| \leq c h {\mathcal{E}}_h(u), $$

for some constant \(c = c(\operatorname{\mathbf{M}})\). This establishes (13), and concludes the proof of Theorem 1.

For each \(p \in \mathbb{R}^{2}\), we denote by η p , \(\eta'_{p} : {\mathbb{Z}}^{2} \to\{ 0,1\}\), the characteristic functions of W(p) and W′(p) respectively. The proofs of (53) and (55) immediately result from the comparison, in Lemmas 16 and 15 respectively, of the coefficients γ p , \(\gamma^{h}_{p}\), η p , \(\eta'_{p}\) appearing in the expressions of \({\mathcal{E}}_{h}, {\mathcal{E}}'_{h}, {\mathcal{F}}_{h}, {\mathcal{F}}'_{h}\).

In the following, it will be convenient to express the AD-LBR weights, and others, in terms of the scalar product associated to the Riemannian metric. We thus recall (8): for any zΩ, and any \(e,f \in \mathbb{R}^{2}\),

$$ \bigl\langle e^\perp, \operatorname{\mathbf{D}}(z) f^\perp\bigr\rangle = \operatorname{\mathbf{d}}(z) \bigl\langle e, \operatorname{\mathbf{M}}(z) f\bigr\rangle . $$

We also define the bounds (\(0 < \underline{\operatorname{\mathbf{d}}}\leq \overline{\operatorname{\mathbf{d}}}< \infty\))

$$ \underline{\operatorname{\mathbf{d}}}:= \min_{z\in\varOmega} \operatorname{\mathbf{d}}(z), \qquad \overline{\operatorname{\mathbf{d}}}:= \max _{z\in\varOmega} \operatorname{\mathbf{d}}(z). $$

Lemma 15

For any \(p\in \mathbb{R}^{2}\), one has on \({\mathbb{Z}}^{2}\)

$$ \eta_p \leq C_2 \gamma_p, \quad\mbox{\textit{with}}\ C_2 := 2\overline{\operatorname{\mathbf{d}}}/ \theta_0. $$

Proof

Let \(M := \operatorname{\mathbf{M}}(p)\), and let (e,f,g) be an M-obtuse superbase of \({\mathbb{Z}}^{2}\). We can assume, thanks to Corollary 2, that (e,f) is an M-reduced basis. Then using (22)

hence \(\gamma_{p}(\pm f) \geq\theta_{0}/\overline{\operatorname{\mathbf{d}}}\), and likewise \(\gamma _{p}(\pm e) \geq\theta_{0}/\overline{\operatorname{\mathbf{d}}}\). If μ(M)≤θ 0, then W(p)={e,f,−e,−f}, and this concludes the proof.

Assume now that μ(M)>θ 0. Then

$$ 2 \operatorname{\mathbf{d}}(p) \gamma_p(\pm g) = -\langle e,M f\rangle = \mu(M) \geq \theta_0, $$

hence \(\gamma_{p}(\pm g) \geq\theta_{0}/(2 \overline{\operatorname{\mathbf{d}}})\). The result follows since W(p)={e,f,g,−e,−f,−g}. □

Let \(p\in h {\mathbb{Z}}^{2}\) and let e 1,…,e k be the consecutive elements of V h (p), in trigonometric order. We define for all 1≤ik, denoting \(M:=\operatorname{\mathbf{M}}(p)\),

$$ \tilde{\gamma}_p^h(e_i) := - \frac{\operatorname{\mathbf{d}}(p)}{4} \bigl(\langle e_i-e_{i-1}, M e_{i-1}\rangle + \langle e_i-e_{i+1}, M e_{i+1}\rangle \bigr), $$

with the periodic conventions e k+1:=e 1, e 0:=e k . We also set \(\tilde{\gamma}_{p}^{h} = 0\) on \({\mathbb{Z}}^{2} \setminus \{e_{1}, \ldots, e_{k}\}\).

Lemma 16

For any \(p \in h {\mathbb{Z}}^{2}\), one has on \({\mathbb{Z}}^{2}\)

$$ \bigl| \gamma^h_p - \tilde{\gamma}^h_p\bigr| \leq \varepsilon _h \eta'_p, \quad\mbox{\textit{and}} \quad \bigl|\tilde{\gamma}^h_p - \gamma_p\bigr| \leq C_0 \theta_h \eta'_p, $$
(56)

where ε h is given in Lemma 9, and \(C_{0} = 1/\underline{\operatorname{\mathbf{d}}}\).

Proof

The coefficients γ p , \(\gamma^{h}_{p}\), \(\tilde{\gamma}^{h}_{p}\), are all equal to zero outside of W′(p). This holds by construction of γ p , and by Lemma 13 for \(\gamma ^{h}_{p}\), \(\tilde{\gamma}^{h}_{p}\). We may therefore forget about the presence of \(\eta'_{p}\) in (56).

First inequality. Lemma 9 states that \(| \gamma^{h}_{p} - \tilde{\gamma}^{h}_{p}| \leq \varepsilon _{h}\) on \({\mathbb{Z}}^{2}\), which concludes the proof.

Second inequality. If μ(M)>θ h , then V h (p)=V(p). Comparing the definition of \(\tilde{\gamma}^{h}_{p}\) with that of γ p (11) we observe that \(\tilde{\gamma}^{h}_{p} = \gamma_{p}\) on \({\mathbb{Z}}^{2}\), which concludes the proof in this case.

Assume now that μ(M)≤θ h . Let (e,f,g) be an M-obtuse superbase of \({\mathbb{Z}}^{2}\). We can assume, thanks to Corollary 2 that (e,f) is an M-reduced basis. Looking at (11) and denoting \(\delta:= 2 \operatorname{\mathbf{d}}(p)\), we find that

$$ \bigl|\delta\gamma_p(\pm e) - \|f\|_M^2\bigr| = \bigl| \langle e,M f\rangle \bigr| = \mu(M) \leq\theta_h. $$

Likewise \(|\delta\gamma_{p}(\pm f) - \|e\|_{M}^{2}| \leq\theta_{h}\). In addition

$$ \delta\gamma_p\bigl(\pm(e+f)\bigr) = \mu(M) \leq \theta_h, \quad \text{and}\quad \gamma _p\bigl(\pm(e-f)\bigr) = 0. $$

Combining the definition of \(\tilde{\gamma}^{h}_{p}\) with the description of the stencil V h (p) in Lemma 13, we obtain that

$$ 2 \delta\tilde{\gamma}^h_p(e) = \left \{ \begin{array}{c} \langle f-e, M f\rangle \\\text{or}\\\langle f+e, M f\rangle \end{array} \right \} + \left \{ \begin{array}{c} \langle f-e, M f\rangle \\\text{or}\\\langle f+e, M f\rangle \end{array} \right \}. $$

In any case \(|\delta \tilde{\gamma}^{h}_{p}(e) - \|f\|_{M}^{2}| \leq\theta_{h}\). The expressions and estimates of \(\tilde{\gamma}^{h}_{p}\) at the points −e,f,−f are obtained similarly. Likewise, using Lemma 13,

$$ 2 \delta \tilde{\gamma}^h_p(e+f) = \left \{ \begin{array}{l@{\quad }l} \langle e, M f\rangle + \langle e, M f\rangle &\text{if}\ e+f \in V_h(p),\\0 & \text{otherwise}. \end{array} \right . $$

In any case \(| \delta \tilde{\gamma}^{h}_{p}(e+f)| \leq\theta_{h}\). The expressions and estimates of \(\tilde{\gamma}_{p}^{h}\) at the points −(e+f),ef,−(ef) are similar. Comparing the above estimates of γ p , \(\tilde{\gamma}^{h}_{p}\), we obtain that \(\delta|\gamma_{p} - \tilde{\gamma}^{h}_{p}| \leq2 \theta_{h}\) on {e,f,e+f,ef,−e,−f,−ef,fe}=W′(p). Since \(\delta= 2 \operatorname{\mathbf{d}}(p) \geq2 \underline{\operatorname{\mathbf{d}}}= 2/ C_{0}\), this concludes the proof. □

In the last lemma of this section, we control the contribution to the energy \({\mathcal{F}}'_{h}\) of a stencil W′(p), \(p\in h {\mathbb{Z}}^{2}\), in terms of the contributions to \({\mathcal{F}}_{h}\) of W(p) and of the neighboring stencils W(p+he), eW(p). This leads to an estimate of \({\mathcal{F}}'_{h}\) in terms of \({\mathcal{F}}_{h}\), which concludes the proof of Theorem 1.

Lemma 17

One has \({\mathcal{F}}'_{h}(u) \leq C_{1} {\mathcal{F}}_{h}(u)\), for any uL 2(Ω h ), with C 1:=17.

Proof

Consider a grid point \(p\in h {\mathbb{Z}}^{2}\), and denote \(M := \operatorname{\mathbf{M}}(p)\). Assume first that μ(M)≤θ 0, so that W(p)⊆̷W′(p). Consider also an arbitrary gW′(p)∖W(p), and observe that g=e+f for some M-reduced basis (e,f).

We set p′:=p+e and \(M' := \operatorname{\mathbf{M}}(p')\). Applying point (ii) of Lemma 12, we find that (e,f) is also an M′-reduced basis. Indeed we have as required

$$ 4 \mu(M) \leq4\theta_0 = {\boldsymbol{\kappa}}^{-1} \leq \lambda_1(M)^2, $$

using (27), and the assumption on τ follows from (45) and (28). Therefore

$$ f \in W\bigl(p'\bigr), \quad \text{and}\quad h^{-1} \bigl(p'-p\bigr) =e \in W\bigl(p'\bigr). $$
(57)

We obtain

(58)

Denote, for all \(q \in h{\mathbb{Z}}^{2}\),

Using (58), we obtain

$$ {\mathcal{F}}'_h(u; p) - {\mathcal{F}}_h(u; p) \leq {\mathcal{G}}_h(u; p) $$
(59)

where \({\mathcal{G}}_{h}(u; p)\) is given by

$$ \left \{ \begin{array}{l@{\quad }l} \displaystyle 4 {\mathcal{F}}_h(u; p)+ 2 \sum_{g\in W(p)} {\mathcal{F}}_h(u; p+g), & \text{if}\ \mu(\operatorname{\mathbf{M}}(p)) \leq\theta_0\\0, & \text{if}\ \mu(\operatorname{\mathbf{M}}(p)) > \theta_0. \end{array} \right . $$

When \({\mathcal{F}}_{h}(u;p')\) appears in \({\mathcal{G}}_{h}(u; p)\), with \(p,p' \in h {\mathbb{Z}}^{2}\), pp′, we have h −1(p′−p)∈W(p′), see (57). For each \(p'\in h {\mathbb{Z}}^{2}\), there are thus at most #(W(p′))≤6 points \(p \in h{\mathbb{Z}}^{2}\setminus \{p'\}\) such that \({\mathcal{F}}_{h}(u;p')\) appears in \({\mathcal{G}}_{h}(u; p)\). Summing (59) over pΩ h , we thus obtain \({\mathcal{F}}'_{h}(u) -{\mathcal{F}}_{h}(u) \leq(4+2\times6) {\mathcal{F}}_{h}(u)\) (the constant could easily be improved), which concludes the proof. □

4 Numerical Experiments

We compare our scheme AD-LBR with a family of other schemes: finite difference, finite elements, and two schemes from the image processing literature. We begin with a quantitative comparison for the discretization of the restoration equation, in a synthetic case where the exact solution is analytically available for reference. The second test case is a qualitative comparison of Coherence-Enhancing Diffusion (CED) [25], on a real image and the quality assessment is by visual inspection. Finally we present a 3D implementation of AD-LBR for proof of feasibility, featuring a synthetic CED experiment, and a application of Edge Enhancing Diffusion to MRI data.

4.1 The Different Schemes

Our two dimensional numerical experiments feature the following six numerical schemes for anisotropic diffusion.

  • AD-LBR: the scheme presented in this work.

  • Finite Differences (FD). The gradient and the divergence are discretized using standard centered finite differences [15], see Remark 3 for details. This approach, arguably the most straightforward, leads to a 9 point stencil.

  • Bilinear Finite Elements (Q1). Bilinear finite elements, also referred to as Q1 finite elements, are linear with respect to each space direction. This amounts to use a 9 points stencil, where the coefficients are different from the previous scheme.

  • Weickert-Scharr scheme (WS). This scheme, introduced in [27], is based on a second order approximation of the gradient using a 3×3 centered stencil. As a result, it offers good accuracy and rotation invariance when applied to sufficiently smooth functions, but lacks robustness guarantees such as the discrete maximum principle and spectral correctness (see Sect. 1), even for \(\operatorname{\mathbf{D}}= {\rm Id}\). The stencil for this scheme has size 5×5.

  • Weickert’s Non-Negative scheme (W-NN). The coefficients of this scheme, detailed in [25] page 95, are non-negative as long as the anisotropy ratio (9) satisfies \(\kappa\le1+\sqrt{2}\sim2.41\).

  • Axes-directed Non-Negative scheme (A-NN). This six point non-negative scheme is implicitly defined in the proof Theorem 6 in [25], and can be regarded as a generalisation of W-NN. See Remark 1 below for details. Among the 6 points of the stencil, 4 points are along the axes of coordinates.

Note that other schemes exist, see for instance [16, 28]. While an exhaustive comparison is in principle desirable, it could not be done here due to time and space constraints.

To fix the ideas and illustrate the difference between the schemes, we propose to compute the stencil and the coefficients for different constant diffusion tensors \(\operatorname{\mathbf{D}}\), in isotropic and anisotropic cases. Denoting by R the matrix of rotation by the angle θ=π/6, and by κ≥1 the chosen anisotropy ratio, we set, identically on \(\mathbb{R}^{2}\):

$$ \operatorname{\mathbf{D}}:= R \left ( \begin{array}{c@{\quad }c} 1 & 0\\0 & \kappa^{-2} \end{array} \right ) R^\mathrm{T}. $$
(60)

The results are presented in Tables 1 and 2. Note that for the two last cases (anisotropy \(\kappa=\sqrt{10}\) and \(\kappa=\sqrt{50}\)) the AD-LBR stencil contains points that are outside the 3×3 neighborhood of the pixel. However the stencil contains 6 points, as expected. This contrasts with the schemes FD, Q1, W-NN where only the 3×3 neighborhood is involved. Another observation is that the off-center stencil coefficients of the AD-LBR are non-positive (this gives non-negative off-diagonal coefficients for \(\operatorname{div}({\bf D}\nabla)\)), in contrast with schemes FD, Q1, WS, and with scheme W-NN for anisotropy \(\kappa> 1+\sqrt{2}\). This is an essential property of AD-LBR (and A-NN), and as a consequence our scheme satisfies, unconditionally, the discrete maximum principle [1, 6].

Table 1 The stencil coefficients for different constant diffusion tensors, and the different schemes presented. The value of the anisotropy ratio κ is given in the second row, and the orientation of the principal axis is θ=π/6, see (60). The bold coefficient indicates the center node. In some examples we present for clarity reasons only half of the stencil (the other half can be deduced by symmetry). Stencil entries are cursive when they are positive and off-center—an undesirable property which gives rise to stability issues. For small anisotropies, \(\kappa\leq1+\sqrt{2}\), one has AD-LBR = W-NN = A-NN
Table 2 The stencil coefficients for different metrics and the different schemes presented, similarly to Table 1 but with more pronounced anisotropies. For the scheme A-NN some points of the stencil are too far from the center node to be represented here, so we indicate the coordinates of these points and the associated coefficient

The largest eigenvalue of the discrete operator \({-}\operatorname{div} ({\bf D}\nabla)\) is given in Table 3, for the different schemes. It turns out that AD-LBR has in most cases the smallest eigenvalues among all schemes, except for scheme WS and occasionally A-NN. This property allows (although this was not done in our numerical experiments) to use larger time steps for AD-LBR than for the other schemes, when solving parabolic equations (2) or (64) with an explicit time discretization.

Table 3 Largest eigenvalue of the discretized operator \(\mathrm{-}\operatorname{div} ({\bf D}\nabla)\), for the constant metric \(\operatorname{\mathbf{D}}=D\), where the matrix D is given on Tables 1 and 2. The time step, in the explicit discretization of (64), should not exceed the inverse of this value

Operator splitting is a classical approach to further increase the timestep in (potentially anisotropic and non-linear) diffusion PDEs [2, 25, 26]. The AD-LBR is compatible with Additive Operator Splitting, by applying Remark (e) page 111 in [25], although the efficiency of this technique is here compromised by the potentially large number of directions in our adaptive stencils. Let us also mention Multiplicative Operator Splittings, and Additive-Multiplicative Operator Splittings, which allow to combine different time-steps [2, 8]. None of these methods was used in our experiments.

Remark 1

(Axes-directed non-negative six point scheme)

The following six point scheme A-NN is, in our belief, the best possible implementation of the constructive proof in [25] of the existence of non-negative schemes for two dimensional anisotropic diffusion. Like AD-LBR, this scheme is defined by the data at each point zΩ of a stencil V(z), and of non-negative weights γ z .

Let . In the diagonal case b=0, the scheme A-NN relies on the classical four points stencil. Otherwise note that

$$ \frac{a}{|b|} - \frac{|b|}{c} = \frac{ac-b^2}{|b| c}> 0. $$

Let \(p,q \in {\mathbb{Z}}\setminus \{0\}\) be such that bpq≥0,

$$ \frac{|b|}{c} \leq\biggl \vert \frac{p}{q} \biggr \vert \leq \frac{a}{|b|}, $$
(61)

and max(|p|,|q|) is minimal. The scheme A-NN is defined by the six point stencil

$$ V(z) := \bigl\{(\pm1,0), (0,\pm1), \pm(p,q)\bigr\} $$

and the non-negative weights

These coefficients are non-negative by construction, and consistency (5) is easily checked. Contrary to AD-LBR, the coordinate axes play a privileged role in A-NN. This introduces axis aligned artifacts which are visible in Fig. 12(g).

Remark 2

(Stencil radius)

The two dimensional stencils of AD-LBR coincide with those of FM-LBR, a numerical scheme for anisotropic static Hamilton-Jacobi PDEs introduced in [14] by the second author. As shown in Proposition 1.6 of [14], the Euclidean radius

$$ r=\max\bigl\{\|v\|; v \in V(z)\bigr\} $$

of this stencil is bounded by \(\kappa(\operatorname{\mathbf{D}}(z))\).

In contrast, consider for 0<ε<1/4 the matrix

$$ D := \left ( \begin{array}{c@{\quad }c} 1 & 1-2 \varepsilon \\1-2 \varepsilon & 1-3 \varepsilon \end{array} \right ). $$

If follows from (61) that \(1+\varepsilon \leq p/q + {\mathcal{O}}(\varepsilon ^{2}) \leq 1+2 \varepsilon \). From this point, one easily obtains that qε −1κ(D)2. The radius of the A-NN stencil, at a point zΩ, may thus be of the order of \(\kappa(\operatorname{\mathbf{D}}(z))^{2}\). The radii of the AD-LBR and A-NN stencils, computed for diffusion tensors of anisotropy κ=10 and of various orientations, are illustrated on Fig. 7.

Fig. 7
figure 7

Radius of the AD-LBR stencil (plain), and of the A-NN stencil (dashed), for a matrix D θ of anisotropy ratio κ=10 and eigenvector (cosθ,sinθ). The AD-LBR stencil is here always the smallest, and its radius does not exceed 5.1, versus 36.1 for A-NN

Fig. 8
figure 8

The seven smallest eigenvalues of the operator \({-}\operatorname{div} (D \nabla)\), on [0,1]2 with periodic boundary conditions, discretized on a n×n grid with 4≤n≤12. Plain: AD-LBR discretization; Dashed: A-NN discretization. Some eigenvalues have multiplicities, hence less than 14 graphs are visible. Eigenvalues of the A-NN discretization here “oscillate” with the dimension. In contrast, thanks to its asymptotic equivalence with a finite element scheme, the smallest eigenvalues of the AD-LBR discretization converge towards those of the continuous partial differential operator

Remark 3

(Scheme FD)

The operator \(\operatorname{div}(\operatorname{\mathbf{D}}\nabla\cdot)\) is discretized using centered finite differences [15]. This involves quantities defined at half integer indices, and in particular the diffusion tensor is here given on the offsetted grid (i+1/2,j+1/2), \((i,j)\in {\mathbb{Z}}^{2}\). For the sake of readability, we thus define i +:=i+1/2 and i :=i−1/2. The gradient operator is discretized by:

$$ (\partial_x u)_{i^+,j}=u_{i+1,j}-u_{i,j}, \qquad (\partial_y u)_{i,j^+}=u_{i,j+1}-u_{i,j}. $$

The divergence is defined as follows:

with

and similar terms involving y u.

4.2 A Test Case with an Explicit Solution

Consider an image vL 2(Ω), defined on a domain Ω, and a diffusion tensor field \({\bf D}: \varOmega\to S_{2}^{+}\). A classical approach to restore the image v, if it has been corrupted by additive noise, is to find uH 1(Ω) which minimizes:

$$ j(u)=\int_\varOmega|u-v|^2 + \lambda\int_\varOmega \Vert \nabla u \Vert ^2_{{\bf D}}. $$
(62)

In other words, u is a penalized least squares approximation of v. The parameter λ>0 should be adjusted so as to avoid excessive smoothing (for large λ), or insufficient denoising (for small λ). The solution u can be characterized as the solution to the static elliptic PDE:

$$ \left \{ \begin{array}{l@{\quad }l} -\lambda\operatorname{div}({\bf D}\nabla u)+u = v, & \text{on}\ \varOmega, \\\langle \nabla u, n\rangle =0, & \text{on}\ \partial\varOmega. \end{array} \right . $$
(63)

In applications [20, 24] the diffusion tensor \(\operatorname{\mathbf{D}}\) is usually adapted to the local image structure, in order to avoid smoothing the edges of v. We construct below a test case (image v and tensor field \({\bf D}\)), for which the solution u is known analytically.

In order to obtain an analytic solution, we first consider a separable problem where the image is invariant by translation along the horizontal axis, and the metric is constant with axes parallel to the coordinate axes. This first problem is invariant under translations along the x-axis, and therefore boils down to a 1-dimensional problem. This separable problem is then transported by a diffeomorphism in order to obtain a new problem where the axes of the metric are no more parallel to the coordinate axes.

The analytical image is composed of a black and a white stripe: \(v_{0}(x,y)={\bf1}_{y<0.5}\), see Fig. 9. Given κ≥1, we consider the constant diffusion tensor

$$ {\bf D}_0=\left ( \begin{array}{c@{\quad }c} 1 & 0\\0 & \kappa^{-2} \end{array} \right ). $$
Fig. 9
figure 9

Left: image \(v_{\rm ana}\). Right: image \(v=v_{\rm ana}\circ f\) transformed by the diffeomorphism f

The analytical solution u 0 of (63), applied to \(\operatorname{\mathbf{D}}_{0}\) and v 0, is known in the case of the infinite domain \(\varOmega= \mathbb{R}^{2}\). In Fourier domain all the coefficients are real and:

$$ \widehat{u_0}(\xi)=\widehat{v_0}(\xi)/\bigl(1+\langle \xi,{\bf D}_0 \xi\rangle \bigr). $$

This separable problem is transformed using the following diffeomorphism: for (x,y)∈Ω

$$ f(x,y)=\bigl(x,y+\alpha\cos(2\pi x)\bigr). $$

The Jacobian of f is

$$ J(x,y)=\left ( \begin{array}{c@{\quad }c} 1 & 0\\-2\pi\alpha\sin(2\pi x) & 1 \end{array} \right ). $$

We apply the different restoration schemes to the image v=v 0f, and the following diffusion tensor:

where we denoted z=(x,y)∈Ω and s=2παsin(2πx). The numerical solution is compared to the analytical function u=u 0f, which is the exact solution in the case of the infinite domain \(\varOmega= \mathbb{R}^{2}\). This numerical solution was obtained on the bounded domain Ω=[0,1[2, equipped with reflecting boundary conditions. Numerical evidence suggests that this change of domain and of boundary conditions has only an anecdotic impact on the solution of (63), with the parameters chosen in this test case.

We used α:=1/3 in the numerical experiments. The maximum value of \(\kappa(\operatorname{\mathbf{D}}(x))\), among all xΩ, is equivalent to \(\kappa_{\max} := \kappa\sqrt{1+(2 \pi\alpha)^{2}} \simeq2.3 \kappa\).

4.3 Results for the Synthetic Test Case

We present in Fig. 10 the performance results of the different schemes, for different values of the anisotropy κ, obtained on a series of grids of size ranging from 100×100 to 1200×1200. The anisotropy varies from κ=2 to κ=10, which are relevant values for imaging applications, see the numerical experiments in Sect. 4.4. The quality of a scheme is measured by the L 2 difference and the H 1 semi-norm difference between the numerical solution and the analytical solution. Note that the error is concentrated close to the discontinuity, since the solution tends rapidly to a constant (0 or 1) far from the discontinuity. We chose the smoothing parameter λ=10−3 in (62). The linear equation obtained by the discretization of (63) is solved using Conjugate Gradient.

Fig. 10
figure 10

Numerical results for the synthetic test case, with different values of the anisotropy factor: κ=2 (top row), κ=5 (middle row), κ=10 (bottom row). Vertical axis: relative error in L 2 norm (left column), or H 1 semi-norm (right column), for the six schemes tested. Horizontal axis: integer N, where the image resolution is N×N. Since the tested schemes are first order, numerical error is expected to be proportional to N −1. Log-log scale

We also tested extreme anisotropies, κ≥100 (thus κ max≥230), which can be relevant in physics related applications. None of the tested schemes showed convincing results: methods based on fixed stencils fail because the discrete operator looses positivity, while the AD-LBR (and A-NN even more) suffers from under-sampling due to the large radius of its stencils. We thus refer to [7] for a radically different approach tailored for this setting. This method introduces an auxiliary one-dimensional unknown, which is constant on the field lines (obtained in a preprocessing step) of the anisotropy direction field, and varies orthogonally to them.

The performance advantage of the AD-LBR is particularly clear when the error is measured in the H 1 semi-norm: for the anisotropy κ=10 and the resolution 500×500, which are relevant values in image processing, AD-LBR outperforms its alternatives by a factor ranging from 3 to 5.

4.4 Coherence-Enhancing Diffusion

In order to document the interest of our discretization, we implement Coherence-Enhancing Diffusion [25] using the different numerical schemes at our disposal. The following parabolic equation is considered:

$$ \partial_t u=\operatorname{div}\bigl({\bf D}\bigl(J_\rho(\nabla u_\sigma)\bigr)\nabla u\bigr). $$
(64)

This equation is non-linear since the diffusion tensor depends on the solution u. This tensor also depends on four user defined parameters \(\sigma, \rho, C \in \mathbb{R}_{+}\), α∈ ]0,1[. Let K σ (resp. K ρ ), be the Gaussian kernel of variance σ (resp. ρ). Define the convolution u σ :=K σ u, and the structure tensor \(J_{\rho}:= K_{\rho}\star(\nabla u_{\sigma}\nabla u_{\sigma}^{T})\). The diffusion tensor \({\bf D}(J_{\rho})\) possesses the same eigenvectors (v 1,v 2) as J ρ , and if the eigenvalues of J ρ are μ 1μ 2 then the eigenvalues of \({\bf D}(J_{\rho})\) are

This ensures that one smoothes preferably along the coherence direction v 2, with a diffusivity that increases with respect to the coherence (μ 1μ 2)2. When the time parameter t becomes large, the image tends to a constant image, therefore it is necessary to stop the process at some finite time T. The ratio of the eigenvalues is bounded by λ 2/λ 1≤1/α, hence \(\kappa\le1/\sqrt {\alpha}\).

We used an explicit time discretization for (64), with time step Δt. The image u n+1 at time (n+1)Δt is defined by the explicit equation:

$$ \dfrac{u^{n+1}-u^n}{\Delta t}=\operatorname{div}\bigl({\bf D}\bigl(J_\rho\bigl(\nabla u_\sigma ^n\bigr)\bigr)\nabla u^n\bigr). $$

The parameters used in our simulation were: σ=0.5, ρ=4, C=10−5, α=10−2 and Δt=0.02. This gives a maximum anisotropy of κ=10. The algorithm was applied to a fingerprint image. The results obtained for T=10 are shown in Figs. 11 and 12, and they document the ability of our scheme to close interrupted lines more efficiently than the other schemes. The largest eigenvalue of the discrete operator \({-}\operatorname{div}({\bf D}\nabla)\) at t=0 is given in Table 4 for the different schemes. As was already noticed in the constant metric case, it turns out that AD-LBR has the smallest eigenvalues among all schemes, except for scheme WS. This property allows (although this was not done in our numerical experiments) to use larger time steps for AD-LBR than for the other schemes.

Fig. 11
figure 11

From top to bottom and from left to right: Original image (with one region highlighted); diffused image using AD-LBR; FD; Q1; WS; W-NN; A-NN. Here T=10

Fig. 12
figure 12

Detail of the region highlighted in Fig. 11(a). From top to bottom and from left to right: original image; diffused image using AD-LBR; FD; Q1; WS; W-NN; A-NN

Table 4 Largest eigenvalue of the discretized operator \(-\operatorname{div}({\bf D}\nabla)\), where \({\bf D}={\bf D}(J_{\rho}(\nabla u_{\sigma}))\) at t=0

Note also that ridges are clearer, and valleys are darker, using AD-LBR than with the other schemes. (Gray-scale range is the same for all images, see also Fig. 13). This reflects the fact that AD-LBR avoids, better than the other schemes, smoothing transversally to the orientation encoded in the continuous anisotropic PDE (64).

Fig. 13
figure 13

Evolution under CED of a section of the fingerprint image. The ridges in the evolved image are higher, and the valleys are deeper, with AD-LBR than with the other schemes. This illustrates the fact that AD-LBR, respecting the continuous PDE, diffuses more along the structure and less in the orthogonal direction. From top to bottom: location of the section of the image; section at T=10; section at T=50; section at T=100

Remark 4

(Computation time)

Numerical solvers of the parabolic PDE (64) combine three main components: (i) Constructing the diffusion tensor. (ii) Assembling the discretization stencils and the operator sparse matrix. (iii) Performing an explicit time step. Components (i) and (ii) are executed exactly the same number of times, while step (iii) is generally more frequent: in order to save CPU time, one typically does not update the diffusion operator at each time step. We produced a C++ implementation of AD-LBR, within the Insight Toolkit open source library. Although our code is neither parallel nor aggressively optimized, we believe that comparing the CPU times for steps (i), (ii) and (iii) is informative, and allows to estimate the additional cost of AD-LBR which is essentially contained in step (ii).

For our 2D Coherence-Enhancing Diffusion (CED) experiment, on the 512×512 fingerprint image, (i) takes 0.21 s, (ii) 0.027 s, (iii) 0.005 s. For our 3D CED Experiment, on 100×100×100 synthetic data, (i) takes 1.35 s, (ii) 0.51 s, (iii) 0.035 s. In both cases, the AD-LBR specific step (ii) is dominated by the construction of the diffusion tensor (i). Step (ii) may also be dominated by the mere cost (iii) of iterations, provided the operator is updated less than once every 6 explicit steps in 2D (14 in 3D). To our eyes, the limited additional cost (ii) of AD-LBR is acceptable in view of the strong theoretical guarantees, and qualitative improvements, brought by this scheme.

4.5 3-Dimensional Experiments

In order to illustrate the feasibility of our scheme in 3D space, we present the action of anisotropic diffusion PDEs on two examples. The first example is a 3D analog of the synthetic test case presented in [27], featuring Coherence-Enhancing Diffusion. The second one is the application of Edge-Enhancing Diffusion to a MRI scan.

Synthetic Example

The original, radially varying image is defined on the cube [0,1]3. The gray-level at a point x is defined by

$$ u^{0}(x)=\cos \bigl(2(r/R)^3 \bigr), $$

where r:=|x| and R:=1/2. This image presents a series of concentric level-sets. We present in Fig. 14 the level sets {u 0=0}, and a slice through the plane z=0.7.

Fig. 14
figure 14

Levelset 0 (top) and slice (bottom) of a 3D image. Original (left), noisy (center), and reconstructed (right) images. Slice in the plane z=0.7, with values clipped to the range [−1.3,1.3]

The image u 0 is perturbed by

$$ u:=u^{0}+n, $$

where n is an additive Gaussian noise of variance σ=0.5. The reconstructed image is obtained using a 3D Coherence-Enhancing Diffusion PDE [25], similar to the 2D one in Sect. 4.4:

$$ \partial_t u=\operatorname{div}\bigl({\bf D}\bigl(J_\rho( \nabla u_\sigma)\bigr)\nabla u\bigr), $$

where J ρ is the structure tensor defined by \(J_{\rho}:=K_{\rho}\star (\nabla u_{\sigma}\nabla u_{\sigma}^{T})\), u σ :=K σ u. The tensor \({\bf D}(J_{\rho})\) possesses the same eigenvectors (v 1,v 2,v 3) as J ρ , and if the eigenvalues of J ρ are μ 1μ 2μ 3 then the eigenvalues of \({\bf D}(J_{\rho})\) are

where α=10−2. The anisotropy ratio is bounded by \(\kappa= 1/\sqrt{\alpha} = 10\). We used the values σ=0.5, ρ=4. The problem is discretized using 1003 voxels. We present in Fig. 14 the noisy image u (levelset 0 and planar slice) and the result after 20 time-steps of Δt=10−3.

3D MRI Data

The data is a 256×256×100 Magnetic Resonance Imaging scan of a skull, and was obtained from the “University of North Carolina Volume Rendering Test Data Set” archive.

The reconstructed image is obtained using a 3D Edge-Enhancing Diffusion PDE [25], which differs from the above Coherence-Enhancing Diffusion one by the choice of the diffusion tensor eigenvalues. The optimal choice of these eigenvalues indeed depends on the application, and is still an active subject of research [13]. With the above notations, the eigenvalues of \({\bf D}(J_{\rho})\) are

We used the values σ=0.5, ρ=4. In our experiment, the maximum anisotropy ratio was κ=11.2. We present in Fig. 15 the original image and two slices of the result after 10 time-steps of Δt=10−4.

Fig. 15
figure 15

Top: MRI data. Bottom: Data processed via 3D Edge Enhancing diffusion, using AD-LBR. Left: 3D rendering of the original volume data and the processed volume, the 3D rendering was obtained using ImageJ 3D viewer [21] (the effect of anisotropic diffusion is not much visible in this first representation). Center: slice of the original and processed volume. Right: details of the original and processed slices

5 Conclusion

We introduced in this paper a new numerical scheme, AD-LBR, for anisotropic diffusion in image processing. This scheme is non-negative, and its stencils have a limited support: 6 points in 2D, 12 points in 3D. The former property implies that our scheme respects the maximum principle of Alvarez, Guichard, Lions and Morel, which is an essential feature of parabolic PDEs.

AD-LBR outperformed all tested alternatives in a quantitative numerical experiment: a test case in which approximate numerical solutions are compared against a known analytical solution. In a second qualitative test case, different schemes were used to enhance a fingerprint image. Our scheme appears here to close more efficiently the lines of the fingerprint, and to diffuse less orthogonally to the lines. This is precisely the purpose of the implemented PDE, coherence enhancing diffusion. We also presented a 3-dimensional implementation as a proof of feasibility.

The construction of the stencils of the AD-LBR is both original and non-trivial. The computational load for this aspect of the algorithm is fortunately not dominant, thanks to the use of a tool from discrete geometry: lattice basis reduction. The AD-LBR also allows to use larger time steps than most of its counterparts, in explicit discretizations of parabolic equations.

AD-LBR trivially extends to vector valued and matrix valued images, by applying it on each image component independently. (In other words, the coupling between image components lies in the construction of the common diffusion tensor \(\operatorname{\mathbf{D}}\), which AD-LBR regards as user input.) Future work will be devoted to the application of AD-LBR to the regularization of diffusion tensor fields, arising for instance from diffusion MRI, for which we expect it to be particularly appropriate: thanks to the scheme non-negativity, positive-definiteness is naturally preserved.