<<

Int J Comput Vis DOI 10.1007/s11263-012-0584-x

Geodesic Warps by Conformal Mappings

Stephen Marsland · Robert I. McLachlan · Klas Modin · Matthew Perlmutter

Received: 2 December 2011 / Accepted: 2 October 2012 © Springer Science+Business Media New York 2012

Abstract In recent years there has been considerable 1 Introduction interest in methods for diffeomorphic warping of images, with applications in e.g. medical imaging and evolutionary The use of diffeomorphic transformations in both image reg- biology. The original work generally cited is that of the istration and shape analysis is now common, and utilised in evolutionary biologist D’Arcy Wentworth Thompson, who many machine vision and image analysis tasks. One image or demonstrated warps to deform images of one species into shape is brought into alignment with another by deforming another. However, unlike the deformations in modern meth- the image until some similarity measure, such as sum-of- ods, which are drawn from the full set of , squares distance between pixels in the two images, reaches a he deliberately chose lower-dimensional sets of transforma- minimum. The deformation is computed as a tions, such as planar conformal mappings. In this paper we with respect to some metric on the group. study warps composed of such conformal mappings. The For a general treatment and an overview of the subject see approach is to equip the infinite dimensional manifold of the monograph by Younes (2010) and references therein. conformal embeddings with a Riemannian metric, and then The standard approach to the deformation method is to use the corresponding geodesic equation in order to obtain first perform an affine registration (principally to remove diffeomorphic warps. After deriving the geodesic equation, a translation and ), and then to seek a geodesic warp numerical discretisation method is developed. Several exam- of the image in the full set of diffeomorphisms of a fixed ples of geodesic warps are then given. We also show that the domain. Typically the setting is to use the right- 1 equation admits totally geodesic solutions corresponding to Hα metric, which leads to the so-called EPDiff equation scaling and translation, but not to affine transformations. (see e.g. Holm and Marsden 2005). However, in what is arguably the most influential demonstration of the applica- Keywords Image registration · Conformal mappings · tion of warping methods—the evolutionary biologist D’Arcy Infinite dimensional manifolds · Geodesic warps · LDDMM Wentworth Thompson’s (1942) seminal book ‘On Growth and Form’—Thompson warps images of one biological species into another using relatively simple types of trans- S. Marsland formation so that the gross features of the two images match. School of Engineering and Advanced Technology (SEAT), Massey University, Palmerston North, New Zealand In a recent review of his work, biologist Arthur Wallace says: e-mail: [email protected] This theory cries out for causal explanation, which is · B · R. I. McLachlan K. Modin ( ) M. Perlmutter something the great man eschewed. [...] His trans- Institute of Fundamental Sciences (IFS), Massey University, Private Bag 11222, Palmerston North, New Zealand formations suggest coordinated rather than piecemeal e-mail: [email protected] changes to development in the course of evolution, an R. I. McLachlan issue which almost completely disappeared from view e-mail: [email protected] in the era of the ‘modern synthesis’ of evolutionary M. Perlmutter theory, but which is of central importance again in the e-mail: [email protected] era of evo-devo. [...] All the tools are now in place 123 Int J Comput Vis

to examine the mechanistic basis of transformations. domain. The invertible conformal maps from the disk to itself Not only do we have phylogenetic systematics and evo- do form a group, the disk-preserving Möbius group, but it devo, but, so obvious that it is easy to forget, we have is only three-dimensional. We are therefore led to consider computers, and especially, in this context, advanced the infinite dimensional configuration space Con(U, R2) computer graphics. We owe it to the great man to put of conformal embeddings of a simply connected compact these three things together to investigate the mecha- domain U ⊂ R2 into the . This set is not a group, but it nisms that produce the morphological changes that he is a pseudogroup. captured so elegantly with little more than sheets of In Marsland et al. (2011a) the authors study a geodesic graph paper and, of course, a brilliant mind (Wallace equation using an L2-metric on the infinite dimensional man- 2006). ifold of conformal embeddings and a numerical method is developed for the initial value problem, based on the repro- We draw attention to two key aspects of Thompson’s ducing Bergman kernel. Using numerical examples, it is examples: (i) the transformations are as simple as possi- shown that the geodesic equation is ill-conditioned as an ini- ble to achieve what he considers a good enough match (see tial value problem, and that cusps are developed in finite time, Table 1); and (ii) the classes of transformations that he con- which leads to a break-down of the dynamics. siders all forms groups (or pseudogroups), either finite or In this paper we continue the study of on the infinite dimensional. Mostly, he uses conformal transforma- manifold of conformal embeddings, but now with respect 1 tions, a constraint he is reluctant to give up: to a more general class of Sobolev type Hα metrics. Fur- thermore, we develop a new numerical algorithm for solving It is true that, in a mathematical sense, it is not a per- the equations. The new method is based on a discrete varia- fectly satisfactory or perfectly regular deformation, for tional principle, and directly solves the two point boundary the system is no longer isogonal; but [...] approaches to value problem. Our new numerical method behaves well, an isogonal system under certain conditions of friction i.e., converges fast, for all the examples we tried as long or constraint (Thompson 1942, p. 1064). as the distance between the initial and final point on the [...] it will perhaps be noticed that the correspondence manifold is not too large. From this observation we expect is not always quite accurate in small details. It could that the initial value problem with α>0 is well-posed in easily have been made much more accurate by giving a the H s Banach space topology, which would imply that the slightly sinuous to certain of the coordinates. Riemann exponential is a local diffeomorphism (see Lang But as they stand, the correspondence indicated is very 1999; Ebin and Marsden 1970; Shkoller 1998). This ques- close, and the simplicity of the figures illustrates all the tion will be investigated in detail in future work, as it is out better the general character of the transformation [ibid., of the scope of the current paper. The experimental results in p. 1074]. this paper (Sect. 6) are limiting to confirming that the discrete Lagrangian method can reproduce the known geodesics con- For applications in image registration we therefore suggest sisting of linear conformal maps and can also calculate non- varying the group of transformations from which warps are linear geodesics with moderately large deformations. This drawn. If a low dimensional group gives a close match, then is a first step towards exploring the metric geometry of the it should be preferred over a similar match from a higher- conformal embeddings, similar to what was done for metrics dimensional group. If necessary, local deformations from the on planar by Michor and Mumford (2006). full diffeomorphism group can be added later to account for For analysis of 2D shapes, a setting using conformal map- fine details. In this paper we consider the case of conformal pings is developed in Sharon and Mumford (2005). There it transformations. More precisely, we consider the problem of is shown that the space of planar shapes is isomorphic to formulating and solving a geodesic equation on the space the quotient space Diff(S1)/PSL(2, R), where PSL(2, R) of conformal mappings. This is a fundamental sub-task in acts on Diff(S1) by right composition of its correspond- the framework of large deformation diffeomorphic metric ing disk-preserving Möbius transformation restricted to S1. mapping (LDDMM) (Trouvé 1995; Dupuis and Grenander Furthermore it is shown that there is a natural metric on 1998; Trouvé 1998; Joshi and Miller 2000; Miller and Younes Diff(S1)/PSL(2, R), the Weil–Petersson metric, which has 2001; Beg 2003; Beg et al. 2005; Bruveris et al. 2011), which non-positive sectional curvature. The setting in this paper is the standard setup for diffeomorphic image registration. is related but different: rather than studying planar shapes Based on the geodesic equation derived in this paper, the full we study conformal transformations between planar domains conformal image registration problem will be considered in and we think of the manifold of conformal embeddings as future work. a submanifold of the full space of planar embeddings. The Although the composition of two conformal maps is con- equation we obtain can be seen as a generalisation and a formal, it need not be invertible: we need to restrict the restriction of the EPDiff equation. First, a generalisation by 123 Int J Comput Vis

Table 1 Transformation groups used in some transformations in Figure no. in Thompson (1942) Transformation group Chap. XII, ‘On the Theory of 515 x → ax, y → y Transformations, or the Comparison of Related Forms’, 513.2 x → ax, y → by of Thompson (1942) 509, 510, 518 x → ax, y → cx + dy (shears) 521–522, 513.5 x → ax + by, y → cx + dy (affine) 506, 508 x → ax, y → g(y) 511 x → f (x), y → g(y) 517–520, 523, 513.1, 513.3, 513.4, 513.6, 514, 525 Conformal 524 ‘Peculiar’

∞( , R2) ={φ ∈ ∞( , R2); φ∗ = , ∈ F( )}. going from the group of diffeomorphisms of a fixed domain Cc U C U g Fg F U to the manifold of embeddings from a planar domain into the , entire plane.1 2 Second, a restriction by restricting to con- This subspace is topologically closed in C∞(U, R2).The formal embeddings. The approach we take is similar to (and set of conformal embeddings Con(U, R2) = Emb(U, R2) ∩ much influenced by) the recent paper of Gay-Balmaz et al. ∞( , R2) ∞( , R2) Cc U is an open subset of Cc U and a Fréchet 2 (2012), in which a geometric framework for moving bound- submanifold of Emb(U, R ). The tangent space TIdCon ary continuum equations in is developed. (U, R2) is given by

2 Mathematical Setting and Choice of Metric Xc(U) ={ξ ∈ X(U); £ξ g = div(ξ)g}, → R2 The linear space of smooth maps U is denoted which follows by straightforward calculations. Notice that C∞(U, R2). Recall that this space is a Fréchet space, i.e., Xc(U) is a subalgebra of X(U), since it has a topology defined by a countable set of semi-norms (see Hamilton 1982, Sect. I.1 for details on the Fréchet topol- £ g = £ξ £ηg − £η£ξ g = £ξ (div(η)g) − £η(div(ξ)g) ogy used). The full set of embeddings U → R2, denoted £ξη   ∞ = (η) − (ξ) + (η) − (ξ) Emb(U, R2), is an open subset of C (U, R2). In particu- £ξ div £ηdiv g div £ξ g  div £ηg 2 lar, this implies that Emb(U, R ) is a Fréchet manifold (see 0 Hamilton 1982, Sect. I.4.1). = div(£ξη)g. Since U ⊂ R2 it holds that Emb(U, R2) contains the iden- tity mapping on U, which we denote by Id. The tangent space In the forthcoming, we identify the plane R2 with the ( , R2) TIdEmb U at the identity is given by the smooth vector complex numbers C through (x, y) → z = x+iy. Hence, the fields on U, which we denote by X(U). Notice that the vector vector fields X(U) are identified with smooth complex valued ∂U fields need not be tangential to the boundary . Also notice functions on U, and Xc(U) with the space of holomorphic that X(U) is a Fréchet Lie algebra with bracket given by functions. minus the Lie on vector fields, i.e., if ξ,η ∈ X(U), The complex L2 inner product on X(U) is given by then adξ (η) =−£ξ η.  Let g = dx ⊗ dx + dy ⊗ dy be the standard Euclidean ∞ ξ,η := ξ( )η( ) ( ), metric on R2. Consider the subspace of C (U, R2) consist- L2(U) z z dA z ing of maps that preserve the metric up to multiplication with U elements in the space F(U) of smooth real valued functions on U. That is, the subspace where dA = dx ∧ dy is the canonical volume form on R2. Correspondingly, we also have the real L2 inner product 1 This generalisation of EPDiff has not yet been worked out in detail in given by the literature. However, it is likely that the approach developed in Gay- Balmaz et al. (2012) for free boundary flow can be used with only minor  modifications. ξ,η := (ξ, η) = ξ,η . L2(U) g dA Re L2(U) 2 One can also look at the generalisation of EPDiff to embeddings 2 U from a Klein geometry perspective. Indeed, let DiffU(R ) denote the diffeomorphisms that leaves the domain U invariant. Then the embeddings Emb(U, R2) can be identified with the space of co-sets Also, we have the more general class of real and complex 2 2 1 Diff(R )/DiffU(R ). Hα inner products given by 123 Int J Comput Vis α ( ) =˙ϕ( )ϕ(˙ ) ξ,η 1( ) := ξ,η 2( ) + ξx ,ηx 2( ) For the first term we take f z z z which yields Hα U L U 2 L U  α −1 −1  2 + ξy,ηy 2( ), ϕ ˙ ◦ ϕ , ϕ˙ ◦ ϕ 2(ϕ( )) = ϕ(˙ z)ϕ(˙ z)|ϕ (z)| dA(z) 2 L U L U α ξ,η := ξ,η + ξ ,η U Hα1(U) L2(U) x x L2(U)   2 = ϕ ϕ,ϕ˙ ϕ˙ 2( ). α L U + ξy,ηy 2( ), 2 L U For the second term we take first notice that ϕ˙ ◦ ϕ−1(w) where α ≥ 0 and ξx ,ξy respectively denotes with (ϕ˙ ◦ ϕ−1)(w) =  − respect to the Cartesian coordinates (x, y). Notice that if ϕ ◦ ϕ 1(w) ξ,η ∈ X ( ) c U , then and then we take f (z) =˙ϕ(z)/ϕ(z). The result now  ξ,η = ξ,η + α ξ ,η follows. Hα1(U) L2(U) L2(U)   We are now ready to derive the Euler–Lagrange equa- where ξ and η denote complex derivatives. 2 tions from the variational principle. We look for at curve The class of inner products · , · 1( ) on TIdEmb(U, R ) Hα U ϕ :[0, 1]→Con(U, R2) such that = X(U) induces a corresponding class of Riemannian met- rics on Emb(U, R2) by 1 d 1 −1 −1 ϕ ˙ ε( ) ◦ ϕε( ) , ϕ˙ε( ) ◦ ϕε( ) 2 2 t t t t Hα1(ϕ(U)) TϕEmb(U, R ) × TϕEmb(U, R )  (U, V ) → dε ε=0 2 −1 −1 0 U ◦ ϕ , V ◦ ϕ 1 . (1) Hα (ϕ(U)) dt = 0 − Note that ϕ 1 is well-defined as a map ϕ(U) → U since ϕ is for all variations ϕε :[0, 1]→Con(U, R2) such that an embedding. Also note that the restriction of the metric ϕε(0) = ϕ(0), ϕε(1) = ϕ(1) and ϕ0 = ϕ. To simplify nota- (1) to the submanifold of diffeomorphisms Diff(U) ⊂ tion we introduce 2 1 Emb(U, R ) yields the “ordinary” Hα metric on Diff(U) cor- d ψ = ϕε. responding to the EPDiff equations. dε ε=0 Notice that ψ(0) = ψ(1) = 0. Using Lemma 1 and the fact that differentiation commutes with integration we obtain 3 Derivation of the Geodesic Equation 1 In this section we derive the geodesic equation on Con(U, R2)  d   d  0 = ϕ ϕ,˙ ϕεϕ˙ε 2 +α ϕ ˙ , ϕ˙ε 2 dt 1 ε ε L (U) ε ε L (U) for the class of Hα (U) metrics given by (1). These equations d d 0 are given by the Euler–Lagrange equations with respect to 1 ( , R2) the quadratic Lagrangian on Con U given by = ϕϕ,ψ˙ ϕ˙+ϕψ˙ +α ϕ ˙ , ψ˙  L2(U) L2(U) dt (ϕ, ϕ)˙ = 1 ˙ϕ ◦ ϕ−1, ϕ˙ ◦ ϕ−1 0 L H 1(ϕ(U)) 2 α 1    d    1 − − = ϕ ϕ,ψ˙ ϕ˙−˙ϕ ψ+ (ϕ ψ) −α ϕ ¨ ,ψ = ϕ ˙ ◦ ϕ 1, ϕ˙ ◦ ϕ 1 , L2(U) L2(U) dt Hα1(ϕ(U)) (2) dt 2 0 1 ϕ˙ ∈ ϕ ( , R2) where T Emb U corresponds to the time deriva- d   = − (ϕ ϕ),ϕ˙ ψ 2( ) tive. dt L U As a first step, we have the following result. 0 + ϕϕ,ψ˙ ϕ˙−˙ϕψ −α ϕ ¨ ,ψ , L2(U) L2(U) dt Lemma 1 For any (ϕ, ϕ)˙ ∈ T Emb(U, R2) it holds that where in the last two equalities we use integration by parts ϕ ˙ ◦ ϕ−1, ϕ˙ ◦ ϕ−1 = ϕϕ,ϕ˙ ϕ˙ Hα1(ϕ(U)) L2(U) over the time variable and the fact that ψ vanishes at the end- +α ϕ ˙ , ϕ˙ . L2(U) points. Notice that there are now no time derivatives on ψ. Thus, by the fundamental lemma of calculus of variations we Proof Let f be any complex valued on U.Bya can remove the time integration and thereby obtain a weak change of variables w = ϕ(z) we obtain equation which must be fulfilled at each point in time. In   order to obtain a strong formulation, we also need to isolate −  f ◦ ϕ 1(w)dA(w) = f (z)|ϕ (z)|2dA(z). ψ from spatial derivatives. The standard approach of using ϕ(U) U integration by parts introduces a boundary integral term. 123 Int J Comput Vis

In most examples of calculus of variations, this boundary Now we finally arrive at the strong formulation of the term either vanishes (in the case of a space of tangential vec- Euler–Lagrange equations tor fields), or can be treated separately, giving rise to natural boundary conditions (in the case of a space where vector    d A(ϕ)ϕ˙ − ϕ∂˙ (ϕϕ)˙ = A(ϕ) ∂ − ∂ fields can have arbitrary small compact support). However, z x F i y F dt  in the case of conformal mappings, there is always a global + ∂y G + i∂x G , (3) dependence between interior points, and points on the bound- ∂ ϕ = , ary (since holomorphic functions cannot have local support). z¯ 0 Hence, we need an appropriate analogue of integration by F|∂U = G|∂U = 0, parts that avoids boundary integrals. For this, consider the adjoint operator of complex differentiation, i.e., an operator where A(ϕ) =|ϕ|2 + α∂∂ is the inertia operator (self ∂ : X ( ) → X ( ) z z z c U c U such that adjoint with respect to the L2 inner product) and where the second equation means that ϕ is constrained to be holo- ξ,η = ∂ξ,η , ∀ ξ,η ∈ X ( ). L2(U) z L2(U) c U morphic. Indeed, one may think of Eq. (3) as a Lagrange– D’Alembert equation for a system with configuration space ∂ Emb(U, R2) which, by Lagrangian multipliers (F, G),is Notice that z depends on the domain U. In the case of = D ∂ξ( ) = ∂ ( 2ξ( )) = constrained to the submanifold Con(U, R2). the U , it holds that z z z z z  = D 2zξ(z) + z2ξ (z). In the general case, this operator is more In the special case U we get complicated, but can still be computed under the assumption → D    that a conformal embedding U is known (see Marsland d 2  A(ϕ)ϕ˙ − ϕ∂˙ z(z ϕ ϕ)˙ = A(ϕ) ∂x F − i∂y F et al. 2011b). dt  ∂ Using the operator z we can now proceed as follows +∂y G + i∂x G , (4)

∂z¯ϕ = 0, d      0 =− (ϕ ϕ),ϕ˙ ψ 2( ) + ϕ ϕ,ψ˙ ϕ˙ −˙ϕ ψ 2( ) F|∂U = G|∂U = 0. dt L U L U − α ϕ ¨ ,ψ L2(U) =− |ϕ|2ϕ¨ +˙ϕϕ˙ϕ,ψ − ˙ϕϕϕ˙,ψ L2(U) L2(U) 3.1 Weak Geodesic Equation in the Right Reduced Variable      + ϕ ϕ,(ψ˙ ϕ)˙ − ψϕ˙ 2( ) − α ∂ ϕ¨ ,ψ 2( ) L U z L U It is also possible to derive the geodesic equation using the =− |ϕ|2ϕ¨ +˙ϕϕ˙ϕ +˙ϕϕϕ˙ + α∂ϕ¨,ψ − z L2(U) right reduced variable ξ =˙ϕ ◦ ϕ 1, as is typically done for + ∂(ϕϕ),ψ˙ ϕ˙ z L2(U) geodesic equations on diffeomorphism groups with invari- =− (|ϕ|2 + α∂∂ )ϕ¨ +˙ϕ(ϕ˙ϕ + ϕϕ˙) ant metric (see e.g. Arnold and Khesin 1998; Khesin and z z Wendt 2009; Modin et al. 2011). However, there is a dif- − ϕ∂˙ (ϕϕ),ψ˙ . z L2(U) ference between the setting of embeddings and that of dif- feomorphism groups, since ξ is defined on ϕ(U), which is Thus, this relation must hold for all holomorphic functions ψ. not fixed in the embedding setting. Nevertheless, the “mov- However, the expression in the first slot of the inner product ing domain” = ϕ(U) simply moves along the flow, i.e., is not holomorphic, so it needs to be orthogonally projected points on the boundary follows the flow of the vector field ξ. back to the set of holomorphic functions. Using Hodge theory For details of this setting in the two cases of unconstrained for manifolds with boundary, one can show that the orthog- embeddings and volume preserving embeddings, see Gay- onal complement of Xc(U) in X(U) with respect to the real Balmaz et al. (2012). ·, · γ γ ξ =˙γ ◦ γ −1 inner product L2(U) is given by Let ε be a variation of as above, and let ε ε ε . Using the calculus of Lie derivatives, direct calculations yield X ( )⊥ ={ξ ∈ X( ); ξ( ) c U U z = ∂ − ∂ + ∂ + ∂ , , ∈ F ( )}, d x F i y F y G i x G F G 0 U ξε =˙η + £ηξ ε ε= d 0 d 1 F ( ) ={ ∈ F( ); | = } ξ,ξ = ξ, ξ where 0 U F U F ∂U 0 are the smooth H 1(γε(U)) £η L2(γ (U)) dε ε=0 2 α functions that vanish at the boundary. This result is obtained + α ξ , ξ  ⊥ £η L2(γ (U)) in Marsland et al. (2011b). Since Xc(U) is invariant under + ξ, (η)ξ multiplication with i, it is also the orthogonal complement div L2(γ (U)) 2 + α ξ , (η)ξ  with respect to the complex L inner product. div L2(γ (U)) 123 Int J Comput Vis

d − η = ϕε ◦ ϕ 1 η( ) = ∈ C where dε ε=0 . From the variational principle each variation of the form z bz with b . We need to show that t → (ϕ, ξ) then fulfills the equation for any 1 1 d d 1 variation of the form η(z) = zk (since the monomials span (ϕ , ϕ˙ ) = ξ ,ξ L ε ε dt ε ε H 1(γε(U)) dt dε ε=0 dε ε=0 2 α the space of holomorphic functions). Thus, for the first term 0 0 in (5) we get = 0  ξ,η˙ + 2£ηξ + 2η ξ 2(ϕ(D)) we now obtain the weak form of the equation in terms of the L = ξ,η˙ + ηξ − ξ η variables (ϕ, ξ) as 4 2 L2(ϕ(D))     = ϕ · ξ ◦ ϕ,ϕ · (η˙ + 4η ξ − 2ξ η) ◦ ϕ 2(D) (6) 1 L 4 ˙ k k k ξ,η˙ + ξ + (η)ξ =|c| az, bz + 4kbaz − 2abz 2(D). 2£η div L2(γ (U)) L 0 where in the first line we use the conformal change of +α ξ , η˙ + ∂ ξ + ξ  + (η)ξ  = . z£η £η div L2(γ (U)) dt 0 variables formula for integrals. Now, since the monomi- als are orthogonal with respect to · , · D the expression Passing now to the complex inner product, we use the vanish whenever k = 1. For the second term, notice that formulas ξ  = a is constant. Now, if η is constant, then all the terms    η˙ ,ηξ, ηξ η = k ≥ ξ,η 2 = ξ,η 2 + i ξ,iη 2 £ vanish. If z with k 2, then the second L (U) L (U) L (U)     term α ξ , η˙ + ∂ (ξη ) + 2£ηξ is of the form (ξ, (η)ξ) + (ξ, ( η)ξ) = ξηξ z g div ig div i 2   £ ηξ = i£ηξ − i α a(b˙ + 3ab)kzk−1 dA(z) = α|c|2a(b˙ + 3ab) kzk 1 which yields the weak equation cD D 1 which vanishes for every a, c1 ∈ C. This concludes the proof. ξ,η˙ + ξ + ηξ 2£η 2 L2(γ (U))  0 + α ξ , η˙ + ∂ (ηξ)+ ξ  = . We now derive a differential equation for the totally geo- z 2£η L2(γ (U)) dt 0 (5) desic solutions in Lin(D, C) in term of the variables (c, a) Together with the equation ϕ˙ = ξ ◦ ϕ, this is thus a weak corresponding to ϕ(z) = cz and ξ(z) = az.Fromϕ˙ = ξ ◦ ϕ form of Eq. (3), but expressed in the variables (ϕ, ξ). it follows that c˙ = ac. Next, we plug the ansatz into the weak Eq. (5), and use that b vanishes at the endpoints, which yields 4 Totally Geodesic Submanifolds the equations

In this section we investigate special solutions to Eq. (4). The c˙ = ac (7) approach for doing so is to find a finite dimensional subman- a˙(2c + α) =−4a2c − αa2 ifold of Con(D, R2) such that solutions curves starting and ending on this submanifold actually lie on the submanifold. These equations thus give special solutions to Eq. (4). We 2 Recall that a submanifold N ⊂ M of a Riemannian man- obtain that d (c2 +αc) = 0, so we can analytically compute dt2 ifold (M, g) is totally geodesic with respect to (M, g) if these special solutions. Notice that if a and c are initially real, geodesics in N (with respect to g restricted to N)arealso then both a and c stay real, so the even smaller submanifold geodesics in M. For a thorough treatment of totally geo- of pure scalings is also totally geodesic. desic subgroups of Diff(M) with respect to various metrics, Figure 1 gives a visualization of total geodesic solutions see Modin et al. (2011). where the two end transformations are given first by a pure Consider now the submanifold of linear conformal trans- scaling and second by a pure rotation. Notice that within the formations (D, C) submanifold Lin , the smaller submanifold of scalings is totally geodesic, as is shown in the left figure. However, Lin(D, R2) = ϕ ∈ Con(D, R2); ϕ(z) = cz, c ∈ C . the submanifold of rotations is not, as is shown in the right Proposition 1 Lin(D, C) is totally geodesic in Con(D, C) figure. 1 with respect to the Hα metric given by (1). Remark 1 By using again the weak form (5)ofthegovern- Proof If t → ϕ(t) is a path in Lin(D, C), i.e., ϕ(z) = cz ing equation one can further show that the submanifold of with c ∈ C, then ξ =˙ϕ ◦ ϕ−1 is of the form ξ(z) = az with translations is not totally geodesic in Con(D, C). Nor is the a ∈ C.Now,lett → (ϕ, ξ) fulfill the variational Eq. (5)for submanifold of affine conformal transformations. 123 Int J Comput Vis

Fig. 1 Geodesic curve from ϕ0(z) = z to ϕ1(z) = cz for different values of c and α = 0. The mesh lines show how the unit circle evolves. Notice that the scaling geodesic stays a scaling (left figure), whereas the rotation geodesic picks up some scaling during its time evolution (right figure)

 ϕ + ϕ ϕ − ϕ  5 Numerical Discretization k k+1 k+1 k Ld (ϕk,ϕk+1) = hL ,  2  h ϕ In this section we describe a method for numerical discretiza- k+1/2 tion of Eq. (4). The basic idea is to obtain a spatial discretiza- 1  = ϕ + / (ϕk+ − ϕk), tion of the phase space variables (ϕ, ϕ)˙ ∈ T Con(D, R2) by 2h k 1 2 1 ϕ (ϕ − ϕ ) truncation of the Taylor series. Thus, we use a Galerkin type k+1/2 k+1 k L2(D) approach for spatial discretization. For time discretization we α     + ϕ + − ϕ ,ϕ + − ϕ 2(D), take a variational approach, using the framework of discrete 2h k 1 k k 1 k L mechanics (cf. Marsden and West 2001). where h > 0 is the step size. The discrete action is thus given The discrete configuration space is given by by N−1 − n 1 Ad (ϕ0,...,ϕN ) = Ld (ϕk,ϕk+1). (8) 2 i Qn ={ϕ ∈ Con(D, R ); ϕ(z) = ci z , ci ∈ C}. k=0 = i 0 Now, a method for numerical computation of geodesics orig- inating from the identity and ending at a known configuration Notice that Qn is an n-dimensional submanifold of is obtained as follows. Con(D, R2). Since Con(D, R2) is a open subset of the vector Algorithm 1 Given ϕ ∈ Con(D, R2), an approximation to space of all holomorphic maps on D (in the Fréchet topology), the geodesic curve from the identity element ϕ0(z) = ztoϕ it holds that the discrete configuration space Qn is an open n−1 n is given by the following algorithm: subset of spanC{1, z,...,z }C . Thus, each tangent ϕ Cn space T Qn is identified with by taking the coefficients 2 1 1. Set ϕN = Pnϕ, where Pn : Con(D, R ) → Qn is pro- of the finite Taylor series. Together with the restricted Hα jection by truncation of Taylor series. metric, Qn is a . 2 ∞ ∞ 2. Set initial guess ϕk = (1 − k/N)ϕ0 + k/NϕN for k = Let U, V ∈ TϕCon(D, R ), and let (ak) = ,(bk) = k 0 k 0 ,...,N − respectively be their Taylor coefficients. Then it holds that 1 1. 3. Solve the minimization problem

∞ (ϕ ,...,ϕ ) 1  min Ad 0 N ϕ ,...,ϕ − ∈Q U, V 2 = ( + i)a b , 1 N 1 n L (D) π 1 i i k=0 with a numerical non-linear numerical minimization algorithm. i , j = δ ( + )/π which follows since z z L2(D) ij i 1 . The next step is to obtain a numerical method that approx- Remark 2 In practical computations we use Cn instead of imates the geodesics. For this we use the variational method Qn. Thus, as a last step one have to check that the solution × ϕ ∈ ϕ ( ) = ∈ D obtained by the discrete Lagrangian on Qn Qn given by obtained fulfils that k Qn, i.e., k z 0forz . 123 Int J Comput Vis

For short enough geodesics, this is guaranteed by the fact 2. Compute ϕ ( ) = that 0 z 1. N−1 α     A = ϕ − ϕ ,ϕ − ϕ 2 . Remark 3 Notice that we solve the problem as a two point 1 k+1 k k+1 k L (D) = 2h . Thus, we assume that the final state k 0 ϕ N is known. In future work we will consider the more gen- This requires O(Nn) operations. eral optimal control problem, where the final configuration a ∈ C2n ϕ 3. Set k to contain the Taylor coefficients of k+1/2 is determined by minimimizing a functional, such as sum-of- as its first n − 1 elements, and then zero padded. This squares of the pixel difference between the destination and requires O(Nn) operations. target image. 2n 4. Set bk ∈ C to contain the Taylor coefficients of (ϕk+1 − ϕk)/h as its first n elements, and then zero padded. This 5.1 Efficient Evaluation of the Discrete Action requires O(Nn) operations. 5. Compute Evaluation of the discrete action functional (8) requires com- ϕ aˆ = FFT(a ), bˆ = FFT(b ). putation of the Taylor coefficients of the product k+1/2 k k k k (ϕk+1 − ϕk). The “brute force” algorithm for doing this requires O(n2) operations. However, it is well known that This requires O(Nnlog n) operations. FFT techniques can be used to accelerate such computations. 6. Compute component-wise multiplication Using this, we now give an O(Nnlog n) algorithm for eval- ˆ uation of the discrete action. cˆk = aˆ kbk.

This requires O(Nn) operations. Algorithm 2 Given ϕ0,...,ϕN , an efficient algorithm for 7. Compute computing the discrete action Ad (ϕ0,...,ϕN ) is given by:

ck = IFFT(cˆk). 1. For each k = 0,...,N, compute the Taylor coefficients ϕ O( ) O( ) of k. This requires Nn operations. This requires Nnlog n operations.

Table 2 Data used in the various examples. The Annotation Coefficients Choice of α Type polynomial for the final c = α = . conformal mapping is of the Example 1 (a,b) 0 0 0 1 in (a) Scaling ϕ ( ) = n−1 k = . α = form 1 z k=0 ck z with c1 0 5 100 in (b) n = 16. Coefficients not listed Example 2 (a,b) c0 = 0 α = 0.1 in (a) Rotation are zero. In all examples, we = ( . π )α= used N = 20 discretisation c1 exp 0 4 i 100 in (b) points in time Example 3 (a,b) c0 = 0.0185475 α = 0.1 in (a) Non-linear

c1 = 0.8034225 α = 10 in (b)

c2 =−0.13933275

c3 =−0.23849625

c4 =−0.18597975

c5 =−0.0125472

c6 = 0.18020775

c7 = 0.27937125

Example 4 (a,b) c0 = 0.00674 + 0.053125i α = 0.1 in (a) Non-linear

c1 = 0.77654 + 0.103125i α = 10 in (b)

c2 = 0.109424 + 0.103125i

c3 =−0.052777 + 0.103125i

c4 =−0.115049 + 0.103125i

c5 =−0.0409141 + 0.103125i

c6 = 0.126201 + 0.103125i

c7 = 0.288402 + 0.103125i

123 Int J Comput Vis

8. Let φk be the polynomial with Taylor coefficients given experiments is to demonstrate our numerical method: we by ck. Then compute leave further investigations of conformal image registration for another paper. In all the examples we compute geodesics − ϕ ( ) = h N1 starting from the identity 0 z z and ending at some poly- A2 = φk,φk 2(D). nomial ϕ (of relatively low order). We consider both simple 2 L 1 k=0 linear and heavily non-linear warpings. The simulations are carried out with two different values of the parameter α to O( ) This requires Nn operations. illustrate how the geodesics depend on the metric. The data is given in Table 2. Finally, the discrete action is now given by Ad (ϕ0,...,ϕN ) = Figure 2 shows the geodesics corresponding to scaling and A1 + A2. rotation. Notice that the geodesics stay in the submanifold Lin(D, R2), as predicted by Proposition 1. Also notice the difference between large and small α. For small α, the scaling 2 coefficient behaves (almost) like d c2 = 0, which is the dt2 1 α = 6 Experimental Results solution of Eq. (7) with 0, while the scaling coefficient 2 behaves (almost) like d c = 0, which is the asymptotic dt2 1 In this section we use the numerical method developed in solution of Eq. (7)asα →∞. the previous section to confirm that the discrete Lagrangian Figure 3 shows the geodesics corresponding to various method is able to calculate geodesics (solutions to (4)) non-linear transformations. Although the differences in the with moderately large deformations. The purpose of these geodesic paths for different values of α are small, we notice

Fig. 2 In Example 1, geodesics 1 in the Hα metric connecting the identity z → z to z → 0.5z are calculated using the discrete Lagrangian method. a α = 0.1 and b α = 100. Both geodesics coincide with the analytic solution to Eq. (7). In Example 2, the geodesic connecting z → z to z → e0.4πiz is calculated, again matching the analytic solution perfectly, illustrating the effect of α

123 Int J Comput Vis

Fig. 3 Examples 3 and 4 illustrate two geodesics in the 1 Hα metric on conformal embeddings calculated using the discrete Lagrangian method. a α = 0.1andb α = 100. In both examples, the target diffeomorphism ϕ1 has been chosen to be highly non-linear (see Table 2 for the exact data used). Little difference is visible to the eye between the two values of α: in Example 3, a small bump on the right side of the boundary behaves differently

that for higher values of α the geodesic are “more regular” at deformed into those of a related species, we have derived the cost of occupying more volume. This is especially clear the geodesic equation for planar conformal diffeomorphisms 1 in Example 3, where, halfway thorough the geodesic, the using the Hα metric. Wehave chosen conformal warps as they “bump” on the right of the shape behaves differently for the were used by Thompson, and are very simple. Of course, the two values of α. animals that Thompson was interested in are actually three- We anticipate that the method will allow us to study the dimensional, and for any number of dimensions bigger than 2 metric geometry of the conformal embeddings as was done the set of conformal warps is rather restricted. However, our by Michor and Mumford (2006) for metrics on planar curves intention is to start with conformal warps and to continue and to determine, for example, which conformal embeddings to build progressively more complex sets of deformations, are markedly closer in one metric than another, and how the rather than working always in the full diffeomorphism group geodesic paths differ between different metrics and between as is conventional. different groups, for example, by passing to a smaller group The conformal warps admit the rigid transformations of (e.g. the Möbius group) or to a larger one (e.g. the full dif- rotation and translation as special cases, and we have shown feomorphism pseudogroup for embeddings). that these linear conformal transformations are totally geo- 1 desic in the conformal warps with respect to the Hα metric that we have considered. 7 Conclusions We have also provided a numerical discretization of the geodesic equation, and used it to demonstrate the effects Motivated by the preference of Thompson (1942) for ‘simple’ of the parameters of the conformal warps. In future work warps in his examples of how images of one species can be we will use the algorithm that we have developed here to

123 Int J Comput Vis perform image registration based on conformal warps using Khesin, B., & Wendt, R. (2009). The Geometry of Infinite-dimensional the LDDMM framework and apply it to images such as real Groups. Volume 51 of a series of modern surveys in mathematics. examples of those drawn by Thompson. Berlin: Springer. Lang, S. (1999). Fundamentals of differential geometry. Volume 191 of Graduate texts in mathematics. New York: Springer. Acknowledgments This work was funded by the Royal Society of Marsden, J. E., & West, M. (2001). Discrete mechanics and variational New Zealand Marsden Fund and the Massey University Postdoctoral integrators. Acta Numerica,10, 357–514. Fellowship Fund. The authors would like to thank the reviewers for Marsland, S., McLachlan, R.I., Modin, K., & Perlmutter, M. (2011a). helpful comments and suggestions. On a geodesic equation for planar conformal template matching. In Proceedings of the 3rd MICCAI workshop on mathematical References foundations of computational anatomy (MFCA’11), Toronto. Marsland, S., McLachlan, R.I., Modin, K., & Perlmutter, M. (2011b). Arnold, V. I., & Khesin, B. A. (1998). Topological methods in hydrody- Application of the hodge decomposition to conformal variational namics. Volume 125 of applied mathematical sciences.NewYork: problems. arXiv:1203.4464v1 [math.DG]. Springer. Michor, P. W., & Mumford, D. (2006). Riemannian geometries on Beg, M. (2003). Variational and computational methods for flows of spaces of plane curves. Journal of European Mathematical Society diffeomorphisms in image matching and growth in computational (JEMS), 8, 1–48. anatomy. PhD thesis, John Hopkins University. Miller, M. I., & Younes, L. (2001). Group actions, homeomorphisms, Beg, M. F., Miller, M. I., Trouvé, A., & Younes, L. (2005). Computing and matching: A general framework. International Journal of Com- large deformation metric mappings via geodesic flows of diffeomor- puter Vision, 41, 61–84. phisms. International Journal of Computer Vision, 61, 139–157. Modin, K., Perlmutter, M., Marsland, S., & McLachlan, R. I. (2011). Bruveris, M., Gay-Balmaz, F., Holm, D. D., & Ratiu, T. S. (2011). On Euler–Arnold equations and totally geodesic subgroups. Journal The momentum map representation of images. Journal of Nonlinear of Geometry and Physics, 61, 1446–1461. Science, 21, 115–150. Sharon, E., & Mumford, D. (2006). 2D-shape analysis using conformal Dupuis, P., & Grenander, U. (1998). Variational problems on flows of mapping. International Journal of Computer Vision, 70, 55–75. diffeomorphisms for image matching. Quarterly of Applied Mathe- Shkoller, S. (1998). Geometry and curvature of diffeomorphism groups matics, LVI, 587–600. with H 1 metric and mean hydrodynamics. Journal of Functional Ebin, D. G., & Marsden, J. E. (1970). Groups of diffeomorphisms and Analysis, 160, 337–365. the notion of an incompressible fluid. Annals of Mathematics, 92, Thompson, D. (1942). On growth and form. New York: Cambridge 102–163. University Press. Gay-Balmaz, F., Marsden, J., & Ratiu, T. (2012). Reduced variational Trouvé, A. (1995). An infinite dimensional group approach for physics formulations in free boundary continuum mechanics. Journal of based models in patterns recognition. Technical report, Ecole Nonlinear Science, 22, 463–497. Normale Supérieure. Hamilton, R. S. (1982). The inverse function theorem of Nash and Trouvé, A. (1998). Diffeomorphisms groups and pattern matching in Moser. Bulletin of the American Mathematical Society (New Series), image analysis. International Journal of Computer Vision, 28, 213– 7, 65–222. 221. Holm, D. D., & Marsden, J. E. (2005). Momentum maps and measure- Wallace, A. (2006). D’Arcy Thompson and the theory of transforma- valued solutions (peakons, filaments, and sheets) for the EPDiff equa- tions. Nature Reviews Genetics, 7, 401–406. tion. In The breadth of symplectic and Poisson geometry. Progress Younes, L. (2010). Shapes and diffeomorphisms. Applied mathematical in Mathematics (Vol. 232, pp. 203–235). Boston, MA: Birkhäuser. sciences. New York: Springer. Joshi, S., & Miller, M. (2000). Landmark matching via large deforma- tion diffeomorphisms. IEEE Transactions on Image Processing, 9, 1357–1370.

123