1: \documentclass[12pt]{iopart}
2: %\usepackage{amsmath}
3: \usepackage{amsfonts}
4: \usepackage{color}
5: %\usepackage{lineno}
6: \usepackage{graphicx}
7: %\DeclareMathOperator{\ad}{ad}
8: %\DeclareMathOperator{\Vol}{Vol}
9: %\DeclareMathOperator{\diff}{d}
10: %\DeclareMathOperator{\Emb}{Emb}
11: %\DeclareMathOperator{\Diff}{Diff}
12: %\DeclareMathOperator{\Id}{Id}
13: %\DeclareMathOperator{\Tr}{Tr}
14:
15: \newtheorem{theorem}{Theorem}
16: \newtheorem{lemma}[theorem]{Lemma}
17: \newtheorem{corollary}[theorem]{Corollary}
18: \newtheorem{definition}[theorem]{Definition}
19: \newtheorem{example}[theorem]{Example}
20: \newtheorem{proposition}[theorem]{Proposition}
21: \newtheorem{remark}[theorem]{Remark}
22: \def\MM#1{\bi{#1}}
23: \newcommand{\diff}{\rmd}
24: \newcommand{\pp}[2]{\frac{\partial #1}{\partial #2}}
25: \newcommand{\dede}[2]{\frac{\delta #1}{\delta #2}}
26: \newcommand{\dd}[2]{\frac{\diff#1}{\diff #2}}
27: \newcommand{\eqnref}[1]{(\ref{#1})}
28: \newcommand{\Vol}{\mathrm{Vol}}
29: \newcommand{\Id}{\mathrm{Id}}
30: \bibliographystyle{alpha}
31:
32: \begin{document}
33:
34: \title[The variational particle-mesh method]
35: {The variational particle-mesh method for matching curves}
36: \author{C J Cotter}
37: \address{Department of Aeronautics, Imperial College
38: London, SW7 2AZ}
39: \ead{colin.cotter@imperial.ac.uk}
40: \begin{abstract}
41: Diffeomorphic matching (only one of several names for this
42: technique) is a technique for non-rigid registration of curves
43: and surfaces in which the curve or surface is embedded in the flow
44: of a time-series of vector fields. One seeks the flow between two
45: topologically-equivalent curves or surfaces which minimises some
46: metric defined on the vector fields, \emph{i.e.} the flow closest
47: to the identity in some sense.
48:
49: In this paper, we describe a new particle-mesh discretisation for the
50: evolution of the geodesic flow and the embedded shape. Particle-mesh
51: algorithms are very natural for this problem because Lagrangian
52: particles (particles moving with the flow) can represent the movement
53: of the shape whereas the vector field is Eulerian and hence best
54: represented on a static mesh. We explain the derivation of the method,
55: and prove conservation properties: the discrete method has a set of
56: conserved momenta corresponding to the particle-relabelling symmetry
57: which converge to conserved quantities in the continuous problem. We
58: also introduce a new discretisation for the geometric current matching
59: condition of (Vaillant and Glaunes, 2005). We illustrate the method
60: and the derived properties with numerical examples.
61:
62: \noindent{\it Keywords\/}: symplectic integrators, diffeomorphic shape
63: matching, geodesics on the diffeomorphism group, EPDiff
64: \end{abstract}
65:
66: \ams{65P10,65N21} \pacs{87.57.N-}
67: \submitto{\JPA}
68: \maketitle
69:
70: \begin{center}
71: \emph{For Darryl Holm on the occasion of his 60th birthday}
72: \end{center}
73:
74: \section{Introduction}
75: Diffeomorphic matching is a numerical framework for quantifying the
76: differences between geometric information (such as curves, surfaces,
77: images or vector fields) using deformations from one geometric object
78: to another. The geometric object is embedded in the flow generated by
79: a time-series of vector fields with a chosen norm (such as the
80: $H^1$-norm) defining the distance along the path between geometric
81: objects. The computational task is to calculate the velocity fields
82: which minimise this distance such that one geometric object is mapped
83: to another. This framework was originally introduced in a series of
84: papers including \cite{GrMi1998,CaYo01,miller-younes-2001,MiTrYo03}
85: being extended to match distributions (which can model curves and
86: surfaces) in \cite{GlTrYo04}, and to match geometric currents (also
87: for modelling curves and surfaces) in \cite{VaGl2005}. Various
88: numerical approaches have been proposed for solving the optimisation
89: problem, either by optimising the functional directly (with an extra
90: term to penalise flows which do not map close to the target shape) as
91: described in \cite{BeMiTrYo2003}, or by solving the equations of
92: motion and shooting for a match between shapes by adjusting the
93: initial conditions as in \cite{tmt02,McMa2006a,MiMaSh2006}. The main
94: challenge remains to find a numerical approach which is accurate and
95: efficient, since the problem of computing the shortest path is a
96: high-dimensional optimisation problem.
97:
98: In this paper we introduce a new numerical discretisation for the
99: diffeomorphic matching problem in the context of matching (although it
100: can also be used for matching surfaces, images and vector
101: fields). This method uses a similar approach to the Hamiltonian
102: Particle-Mesh (HPM) method \cite{FrGoRe2002}, with the difference
103: being that HPM uses the particle-mesh discretisation to interpolate
104: density from the particles to the mesh, whereas in this application
105: the particle-mesh discretisation is used to interpolate momentum
106: (which takes a central role in the diffeomorphic matching framework).
107:
108: In section \ref{diffeo} we give a review of the diffeomorphic matching
109: approach applied to curves in the plane, and establish the notation
110: which will be used in the other sections. We also discuss the role of
111: momentum, the conditions used to establish whether the curves have
112: been matched, and the implications of the particle-relabelling
113: symmetry satisfied by the equations of motion, as well as the
114: connection with EPDiff and the Camassa-Holm equation. In section
115: \ref{particle mesh} we introduce the particle-mesh discretisation and
116: discuss the discrete symmetries and conservation laws, as well as a
117: discretisation of the current matching condition and a description of
118: solution methods. In section \ref{numerics} we illustrate the
119: properties of the numerical method applied to computing the shortest
120: path between two test shapes. Finally, in section \ref{summary} we
121: give a summary and outlook.
122:
123: \section{Diffeomorphic matching of embedded curves}
124: \label{diffeo}
125: In this section we describe the problem of matching one embedded curve
126: onto another using diffeomorphisms. For simplicity we shall focus on
127: simple closed curves in the plane although the approach is easily
128: generalised to other structures.
129:
130: \subsection{Parameterisations of curves}
131: We take two simple curves embedded in $\mathbb{R}^2$, $C_A$ and $C_B$,
132: with parameterisations
133: \[
134: \MM{Q}_A(s), \quad \MM{Q}_B(s), \qquad s \in [0,2\pi).
135: \]
136: Note that the curves can equally well be represented by
137: reparameterisations of the curves \emph{i.e.} by
138: \[
139: \MM{Q}_A(\eta(s)), \quad \MM{Q}_B(\eta(s)), \qquad s \in [0,2\pi),
140: \]
141: where $\eta(s)$ is a diffeomorphism of the circle. Our aim is to find
142: a matching process which is independent of such reparameterisations.
143:
144: \subsection{Curves embedded in a flow}
145: If we take a vector field which defines a fluid flow
146: $\MM{u}(\MM{x},t)$, and embed a curve in that flow, then the curve
147: satisfies
148: \begin{equation}
149: \label{Q advection}
150: \pp{}{t}\MM{Q}(t;s) = \MM{u}(\MM{Q}(t;s),t),
151: \end{equation}
152: \emph{i.e.} each point of the curve moves with the vector evaluated
153: at that point.
154:
155: The aim of the calculation is to search amongst time-series of
156: vector fields $\MM{u}(\MM{x},t)$, $t\in[0,1]$ such that
157: \eqnref{Q advection} is satisfied, with the boundary conditions
158: \[
159: \MM{Q}(0;s) = \MM{Q}_A(s), \quad \MM{Q}(1;s) = \MM{Q}_B(\eta(s)),
160: \]
161: for some (unspecified) reparameterisation $\eta$. If these conditions
162: are satisfied then we say that $\MM{Q}_A$ is matched onto $\MM{Q}_B$
163: by the vector field time series $\MM{u}(\MM{x},t)$.
164:
165: \subsection{Optimisation problem}
166: We choose a norm for vector fields, such as the $H^n_\alpha$ norm defined by
167: \[
168: \|\MM{u}\|^2_{H^n_\alpha}= \int_{\mathbb{R}^2} \MM{u}(\MM{x})\cdot
169: (1-\alpha^2\nabla^2)^n \MM{u}(\MM{x})\rmd\Vol(\MM{x})
170: \]
171: Given a time series $\MM{u}(\MM{x},t)$, we can measure the total
172: amount of deformation in the flow generated by $\MM{u}$ by the
173: integral
174: \begin{equation}
175: \label{functional}
176: S(\MM{u}) = \int_0^1\frac{1}{2}\|\MM{u}\|^2\rmd t.
177: \end{equation}
178: We wish to find the flow that maps $C_A$ to $C_B$ which is ``nearest
179: to the identity'' with respect to the choice of norm. This leads to
180: the following optimal control problem \cite{GlTrYo2006}:
181: \begin{definition}[Optimisation problem for curve matching]
182: \label{opti}
183: Let $\MM{Q}_A,\MM{Q}_B:S^1\to\mathbb{R}^2$ be parameterisations of two
184: curves $C_A$, $C_B$ in the plane, and let $\|\cdot\|^2$ be a norm for
185: vector fields in the plane. Then the \emph{distance} between curve $C_A$
186: and $C_B$ is defined to be the minimum over all vector fields $\MM{u}$
187: of the functional
188: \[
189: \int_0^1\frac{1}{2}\|\MM{u}\|^2 \rmd t
190: \]
191: subject to the following constraints:
192: \begin{itemize}
193: \item {\bfseries Dynamic constraint}: $\pp{}{t}\MM{Q}(t;s) =
194: \MM{u}(\MM{Q}(t;s),t)$, $\forall t\in[0,1]$.
195: \item {\bfseries Matching conditions}: $\MM{Q}(0;s) = \MM{Q}_A(s)$,
196: $\MM{Q}(1;s) = \MM{Q}_B(\eta(s))$, where $\eta$ is some
197: reparameterisation of the circle.
198: \end{itemize}
199: \end{definition}
200:
201: \subsection{Momentum}
202: \label{momentum}
203: We can enforce the dynamic constraint by introducing Lagrange
204: multipliers $\MM{P}(t;s)$, so that the optimisation problem becomes
205: \begin{eqnarray}
206: \label{optimisation problem}
207: \delta \int_0^1 \frac{1}{2}\|\MM{u}\|^2 + \int_{s=0}^{2\pi}
208: \MM{P}\cdot(\dot{\MM{Q}}-\MM{u}(\MM{Q}))\rmd s \rmd t = 0,
209: \end{eqnarray}
210: subject to the matching conditions give above. The Euler-Lagrange
211: equations then give
212: \begin{eqnarray}
213: \label{mom map}
214: \dede{l}{\MM{u}} & = & \int_{s=0}^{2\pi}\MM{P}\delta(\MM{x}-\MM{Q})\rmd s, \\
215: \label{Q eqn}
216: \dot{\MM{Q}} & = & \MM{u}(\MM{Q}), \\
217: \label{P eqn}
218: \dot{\MM{P}} & = & -\MM{P}\cdot\nabla\MM{u}(\MM{Q}),
219: \end{eqnarray}
220: where $l = \|\MM{u}\|^2/2$. For example, if we choose the $H^n_\alpha$-norm
221: then
222: \[
223: \dede{l}{\MM{u}} = (1-\alpha^2\nabla^2)^n\MM{u}.
224: \]
225: We see that optimal velocity fields take the form
226: \begin{equation}
227: \label{opt vels}
228: \int_{s=0}^{2\pi}\MM{P}G(\MM{x}-\MM{Q})\rmd s,
229: \end{equation}
230: where $G$ is the Green's function associated with the chosen norm,
231: \emph{e.g.} for the $H^n_\alpha$-norm it is the Green's function for
232: the operator $(1-\alpha^2\nabla^2)^n$.
233:
234: Equation \eqnref{mom map} allows us to write $\MM{u}$ as a function of
235: $\MM{P}$ and $\MM{Q}$, leading us to notice that equations (\ref{Q
236: eqn}-\ref{P eqn}) are canonically Hamiltonian, with Hamiltonian
237: function given by
238: \[
239: H = l(\MM{u}(\MM{P},\MM{Q})) = \frac{1}{2}\|\MM{u}(\MM{P},\MM{Q})\|^2,
240: \]
241: \emph{i.e.}, half the square of the norm of the velocity field written as a
242: function of $\MM{P}$ and $\MM{Q}$. It is for this reason that we
243: refer to the Lagrange multiplier $\MM{P}$ as the \emph{momentum}
244: associated with the curve. This Hamiltonian structure arises from the
245: fact that the equations have been derived from a variational principle
246: defined by the extreme points of the functional. Since the
247: Hamiltonian for this system is time-independent, it is conserved along
248: the trajectory, and hence the norm of the velocity is also conserved.
249:
250: \subsection{Matching condition}
251: \label{matching condition}
252: There are a number of different possible ways to pose the matching
253: condition mathematically. One matching condition which is invariant
254: under reparameterisations is based on defining a singular vector field
255: \begin{equation}
256: \label{singular vector field}
257: \MM{v}^{\MM{Q}}(\MM{x}) =
258: \int_{s=0}^{2\pi}\pp{\MM{Q}}{s}\delta(\MM{x}-\MM{Q})\rmd s.
259: \end{equation}
260: We define a functional for these singular vector fields
261: \begin{eqnarray}
262: \nonumber
263: f\left[\MM{v}^{\MM{Q}}\right] &=& \int\MM{v}^{\MM{Q}}
264: \cdot K * \MM{v}^{\MM{Q}}\rmd\Vol(\MM{x}) \\
265: &=& \int_{s=0}^{2\pi}\pp{\MM{Q}}{s}\cdot
266: \int_{s'=0}^{2\pi}\pp{\MM{Q}}{s'}K(\MM{Q}(s)-\MM{Q}(s'))\rmd s\rmd s'.
267: \label{current matching}
268: \end{eqnarray}
269: where $K$ is some smooth kernel function. When $\MM{Q}$ matches
270: $\MM{Q}_B$ then $f[\MM{v}^{\MM{Q}}-\MM{v}^{\MM{Q}_B}]$ vanishes. This is
271: called the \emph{current matching} condition \cite{VaGl2005}.
272:
273: %If we add the matching condition to the optimisation problem
274: %\eqnref{optimisation problem} by introducing another Lagrange
275: %multiplier $\lambda$ then we get the boundary condition for $\MM{P}$:
276: %\[
277: %\MM{P} = \lambda\pp{\MM{Q}}{s}K*\MM{v}(\MM{x};\MM{Q}-\MM{Q}_B)
278: %+ ...
279: %\]
280: %and so the momentum $\MM{P}$ is normal to the curve at time $t=1$.
281:
282: This is a weaker condition that setting the value of $\MM{Q}(s)$ for
283: each $s$ at time $t=1$, and hence we need to add another boundary
284: condition to get a unique solution to equations (\ref{mom map}-\ref{P
285: eqn}). In \cite{MiTrYo03} it was shown that the solution which
286: minimises the functional is the one with $\MM{P}$ initially normal to
287: the curve \emph{i.e.}
288: \[
289: \MM{P}\cdot\pp{\MM{Q}}{s} = 0, \qquad \mathrm{at}\quad t=0,
290: \]
291: and this extra boundary condition means that equations (\ref{mom
292: map}-\ref{P eqn}) have a unique solution.
293:
294: \subsection{Relabelling}
295: \label{relabelling}
296: The optimisation problem in definition \ref{opti} is invariant under
297: symmetries given by reparameterisations of the curve $\eta$. Noether's
298: theorem tells us that the equations of motion (\ref{mom map}-\ref{P
299: eqn}) have conserved quantities which are generated by these
300: symmetries.
301:
302: To compute the conserved quantities we compute the infinitesimal
303: generators of these symmetries
304: \[
305: \delta\MM{Q}(s;t) = \pp{\MM{Q}}{s}\cdot\xi(s)
306: \]
307: where $\xi(s)$ is a vector field on the circle. The cotangent
308: lift of this infinitesimal symmetry is
309: \[
310: \delta\left(\MM{Q}(s;t),\MM{P}(s;t)\right) =
311: \left(\pp{\MM{Q}}{s}\cdot\xi(s), -\MM{P}(s;t)\cdot
312: \pp{\MM{Q}}{s}\cdot\xi(s)\right)
313: \]
314: which is a Hamiltonian flow generated by the Hamiltonian functional
315: \[
316: h_{\xi} = \int_{s=0}^{2\pi}\MM{P}(s)\cdot\pp{\MM{Q}}{s}\cdot\xi(s)\rmd s.
317: \]
318: By Noether's theorem, $h_{\xi}$ is conserved along solutions of
319: \eqnref{mom map}-\eqnref{P eqn}, and since $\xi(s)$ is arbitrary, we
320: see that
321: \[
322: \MM{P}(s)\cdot\pp{\MM{Q}}{s}
323: \]
324: is conserved along solution trajectories, for each $s$. In particular,
325: this means that if the momentum is initially normal to the curve
326: \emph{i.e.}
327: \[
328: \MM{P}(s;0)\cdot\pp{\MM{Q}}{s}(s;0)=0,
329: \]
330: then the momentum is normal to the curve for all values of $t$ along
331: the solution. Therefore, optimal velocity fields take the form of
332: equation \eqnref{opt vels} with the added constraint that the momentum
333: $\MM{P}$ is normal to the curve.
334:
335: \subsection{EPDiff}
336: \label{epdiff}
337: As described in \cite{CoHo2007,CoHoHy2007}, because the dynamic
338: constraint is given by a Lie algebra action of velocity fields on
339: embedded curves, it is possible to eliminate $\MM{P}$ and $\MM{Q}$ by
340: taking the time derivative of equation \eqnref{mom map} and making use
341: of equations (\ref{Q eqn}-\ref{P eqn}). This leads to a PDE defined on
342: the whole of $\mathbb{R}^2$ given by
343: \[
344: \MM{m}_t + \nabla\cdot(\MM{u}\MM{m}) + (\nabla\MM{u})^T\MM{m} = 0,
345: \qquad \MM{m} = \dede{l}{\MM{u}}.
346: \]
347: This is the Euler-Poinc\'are equation on the diffeomorphism group,
348: abbreviated as EPDiff \cite{HoMa2004,HoMaRa1998}, which is the
349: equation for geodesic flow on the diffeomorphism group. Although we do
350: not explicitly solve EPDiff during the computation of the optimal
351: flow, it is useful to understand the computed solutions as singular
352: solutions of EPDiff. In one dimension and with the $H^1_\alpha$-norm,
353: EPDiff becomes the Camassa-Holm equation \cite{CaHo1993} which is
354: completely integrable with singular soliton solutions.
355:
356: \section{Particle-mesh discretisation}
357: \label{particle mesh}
358: We take a \emph{discrete mechanics and optimal control}
359: \cite{JuMaOb2005} approach by applying the discretisation directly to
360: the functional \eqnref{optimisation problem} and deriving the
361: resulting equations. The discretisation used is a particle-mesh method
362: with:
363: \begin{itemize}
364: \item the vector fields discretised on a fixed, finite \emph{mesh}, and
365: \item the curve discretised as a set of moving points.
366: \end{itemize}
367: The principle benefits of this discretisation are that different norms
368: can be defined on the mesh without the need to calculate Green's
369: functions. With large numbers of points the method becomes very
370: efficient as particle momenta can be interpolated to the mesh, then
371: the norm operator can be inverted, then the velocity values can be
372: interpolated back to the particle positions.
373:
374: \subsection{Mesh discretisation of vector fields}
375: We take a fixed set of points on a mesh $\{\MM{x}_k\}_{k=1}^{n_g}$
376: (for the numerical examples in this paper we used an equispaced square
377: mesh) and give each mesh point $\MM{x}_k$ a vector
378: $\MM{u}_k$. We interpolate from the set $\{\MM{u}_k\}_{k=1}^{n_g}$ of
379: vectors to a general point $\MM{x}$ in the plane using a linear
380: interpolation
381: \begin{equation}
382: \label{u formula}
383: \MM{u}(\MM{x}) = \sum_{k=1}^{n_g}\MM{u}_k\psi_k(\MM{x}).
384: \end{equation}
385: For the examples in this paper we set $\psi_k$ to be a tensor product
386: of cubic B-spline functions centred on $\MM{x}=\MM{x}_k$.
387:
388: \begin{remark}
389: The set of vectors on the mesh generate a finite dimensional subspace
390: of the infinite dimensional space of vector fields. However, the
391: finite dimensional subspace is not closed under the Lie bracket for
392: vector fields which means we will not be able to obtain a discrete EPDiff
393: equation from the discrete equations of motion by eliminating $\MM{Q}$
394: and $\MM{P}$ as in section \eqnref{epdiff}.
395: \end{remark}
396:
397: Once we have this discrete representation of the vector fields we can
398: define a discretised norm using standard mesh methods (such as finite
399: difference, finite volume \emph{etc.}). For the the examples in this
400: paper we took periodic boundary conditions, and used a spectral
401: discretisation of the $(1-\alpha^2\nabla^2)^n$ operator using discrete
402: Fourier transforms, and a simple Riemann sum for the integration
403: (which gives spectral accuracy in this case). Since the Green's
404: functions decay exponentially over the lengthscale $\alpha$, the
405: boundary conditions should not affect the solution as long as the
406: curve is sufficiently far from the boundary. Other boundary conditions
407: are possible if, for example, a finite-difference method is used to
408: discretise the norm operator.
409:
410: \subsection{Particle discretisation of curves}
411: We replace the parameterised curve $\MM{Q}(s)$ by a finite set of
412: points in the plane $\{\MM{Q}_\beta\}_{\beta=1}^{n_p}$. The equation
413: \eqnref{Q advection} gets replaced by the semi-discrete (continuous
414: time/discrete space) equation
415: \begin{equation}
416: \label{semidiscrete Q advection}
417: \dot{\MM{Q}}_\beta = \sum_{k=1}^{n_g}\MM{u}_k\psi_k(\MM{Q}_\beta).
418: \end{equation}
419: We also have to choose a discretisation of integration around the
420: loop; again for the examples in this paper we use a Riemann sum.
421:
422: \subsection{Semi-discrete functional and equations of motion}
423: After the particle-mesh discretisation we obtain a semi-discrete
424: functional by integrating the discrete vector field norm from $t=0$ to
425: $t=1$ and introducing Lagrange multipliers to enforce the constraint
426: \eqnref{semidiscrete Q advection} to get
427: \begin{equation}
428: \label{semidiscrete action}
429: \int_0^1\frac{1}{2} \|\MM{u}\|^2_g + \sum_\beta\MM{P}_\beta\cdot
430: \left(\dot{\MM{Q}}_\beta - \sum_{k=1}^{n_g}\MM{u}_k\psi_k(\MM{Q}_\beta)
431: \right) \rmd t.
432: \end{equation}
433: The Euler-Lagrange equations for the optimal values of this functional
434: are
435: \begin{eqnarray}
436: \label{semidiscrete mom map}
437: \pp{}{\MM{u_k}}\frac{1}{2}\|\MM{u}\|^2_g
438: &=& \sum_\beta\MM{P}_\beta\psi_k(\MM{Q}_\beta), \\
439: \label{semidiscrete Q eqn}
440: \dot{\MM{Q}}_\beta & = & \sum_{k=1}^{n_g}\MM{u}_k\psi_k(\MM{Q}_\beta), \\
441: \label{semidiscrete P eqn}
442: \dot{\MM{P}}_\beta & = & -\MM{P}_\beta\cdot\sum_k\MM{u}_k\nabla
443: \psi_k(\MM{Q}_\beta).
444: \end{eqnarray}
445: Once again, equation \eqnref{semidiscrete mom map} allows us to write
446: $\MM{u}$ as a function of $\MM{P}$ and $\MM{Q}$, leading us to notice
447: that equations (\ref{semidiscrete Q eqn}-\ref{semidiscrete P eqn}) are
448: canonically Hamiltonian, with Hamiltonian function given by
449: $\|\MM{u}(\MM{P},\MM{Q})\|^2_g/2$.
450:
451: \subsection{Time discretisation}
452: \label{time discretisation}
453: Equation \eqnref{semidiscrete Q advection} can be discretised using
454: any one-step method, such as a Runge-Kutta method. For simplicity,
455: in this paper we use the forward Euler discretisation, but the derivation
456: of the equations is very similar for other methods. The equation becomes
457: \[
458: \MM{Q}^{n+1}_\beta = \MM{Q}^n_\beta +
459: \Delta t\sum_k\MM{u}^{n+1}\psi_k(\MM{Q}^n).
460: \]
461: The discrete functional becomes
462: \begin{equation}
463: \label{discrete functional}
464: \sum_{n=1}^N\left(
465: \Delta t\frac{1}{2}\|\MM{u}\|^2_g + \sum_\beta\MM{P}^{n+1}_\beta\cdot
466: \left(\MM{Q}^{n+1}_\beta -\MM{Q}^n_\beta
467: - \Delta t\sum_{k=1}^{n_g}\MM{u}_k^{n+1}\psi_k(\MM{Q}_\beta^n)
468: \right)\right),
469: \end{equation}
470: where $\Delta t = 1/N$, and the discrete Euler-Lagrange equations are
471: \begin{eqnarray}
472: \label{discrete mom map}
473: \pp{}{\MM{u_k}}\frac{1}{2}\|\MM{u}^{n+1}\|^2_g
474: &=& \sum_\beta\MM{P}_\beta^{n+1}\psi_k(\MM{Q}_\beta^n), \\
475: \label{discrete Q eqn}
476: \MM{Q}^{n+1}_\beta & = & \MM{Q}^n_\beta
477: + \Delta t \sum_k\MM{u}^{n+1}_k\psi_k(\MM{Q}_\beta^n), \\
478: \label{discrete P eqn}
479: \MM{P}^{n+1}_\beta & = & \MM{P}^n_\beta
480: - \Delta t\MM{P}^{n+1}\cdot\sum_k\MM{u}_k^{n+1}\nabla\psi_k(\MM{Q}_\beta^n).
481: \end{eqnarray}
482:
483: These equations provide a variational integrator \cite{LeMaOrWe2003}
484: for the semi-discrete equations (\ref{semidiscrete mom
485: map}-\ref{semidiscrete P eqn}). Hence, they give a symplectic
486: integrator (see \cite{LeRe2005} for a survey of these methods) for the
487: semi-discrete equations in Hamiltonian form. In this particular case
488: we obtain the first-order symplectic Euler method; higher-order
489: partitioned Runge-Kutta methods can be obtained by discretising
490: \eqnref{semidiscrete Q advection} using any Runge-Kutta method.
491:
492: \subsection{Discrete symmetries}
493: \label{discrete relabelling}
494: In this section we discuss the properties of applying a variational
495: integrator to equations \eqnref{semidiscrete mom
496: map}-\eqnref{semidiscrete P eqn}, and their possible benefits for
497: the problem of matching curves.
498:
499: The properties that make variational integrators the best choice for
500: long integrations are:
501: \begin{itemize}
502: \item {\bfseries Modified Hamiltonian}: if the Hamiltonian
503: $H(\MM{P},\MM{Q})$ is analytic then it is possible to use
504: \emph{backward error analysis} to find a
505: modified Hamiltonian
506: \[
507: \tilde{H} = H + \Delta t^p \Delta H(\MM{P},\MM{Q};\Delta t)
508: \]
509: which is conserved over times
510: \[
511: |t|\leq c_0\exp^{c_1/\Delta t}.
512: \]
513: See \cite{LeRe2005} for a summary and references.
514: \item {\bfseries Conserved momenta}: if the continuous-time
515: Euler-Lagrange equations have conserved momenta associated with
516: symmetries of the Lagrangian, then discrete Euler-Lagrange equations
517: also conserve these momenta \cite{LeMaOrWe2003}.
518: \end{itemize}
519: \subsection{Modified Hamiltonian}
520:
521: In the problem of matching curves, the Hamiltonian is half the squared
522: norm for vector fields, which is conserved along trajectories as
523: described in section \ref{momentum}. If a symplectic integrator is
524: used then backward error analysis guarantees that the Hamiltonian will
525: be approximately conserved for long times (although it should be noted
526: that no theory exists for the piecewise-cubic functions used in the
527: examples of this paper). It remains an open question as to whether the
528: conservation of the Hamiltonian is important for these problems on
529: finite-time intervals, since they are on short time intervals and so
530: the value of the Hamiltonian will also be approximately preserved by
531: variable step-size methods using error control.
532:
533: The main cost of using variational integrators is that they are
534: implicit for this type of system where the Hamiltonian is a function
535: of $\MM{P}$ and $\MM{Q}$, but during the optimisation algorithm we are
536: able to store values along the trajectory from previous integrations
537: which can be used as initial guesses for solving the implicit
538: equations using Newton iteration. The variational integrator allows
539: large timesteps to be taken in that case (although of course this is
540: the case for any implicit method, symplectic or otherwise).
541: \subsection{Momentum conservation}
542: As described in section \ref{relabelling}, the equations (\ref{mom
543: map}-\ref{P eqn}) have a symmetry under reparameterisation of the
544: curve which has an associated conserved momentum
545: $\MM{P}\cdot\partial\MM{Q}/\partial s$. This means that for the
546: optimal solution, $\MM{P}$ remains normal to the curve along the
547: trajectory. Since we have discretised the curve we have broken that
548: symmetry, but as we shall show in this section, it is still possible
549: to recover a sense in which $\MM{P}$ is normal to the curve along the
550: solution.
551:
552: Equation \eqnref{u formula} defines a vector field over the whole
553: space parameterised by the vectors $\{\MM{u}_k\}_{k=1}^{n_g}$
554: associated with the mesh points. This means that we can choose a
555: parameterised curve $\MM{Q}(s)$ which passes through our discrete
556: points $\{\MM{Q}_\beta\}_{\beta=1}^{n_p}$ in sequence and follow its
557: evolution along the flow by solving
558: \begin{equation}
559: \label{continuous curve}
560: \pp{}{t}\MM{Q}(s) = \sum_k\MM{u}_k\psi_k(\MM{Q}(s)).
561: \end{equation}
562: More generally, we can follow how the flow generated by the vector
563: fields evolves over the whole space
564: \[
565: \pp{}{t}\MM{g}(\MM{x},t) = \sum_k\MM{u}_k\psi_k(\MM{g}(\MM{x},t)),
566: \]
567: where $g(\MM{x},t)$ is the flow map taking points from their position
568: at time $0$ to their position at time $t$ ($\MM{x}$ plays the role of
569: a coordinate on ``label space'' here), and we can follow the Jacobian
570: of this map
571: \[
572: \pp{}{t}\pp{\MM{g}(\MM{x},t)}{\MM{x}}
573: = \sum_k\MM{u}_k\nabla\psi_k(\MM{g}(\MM{x},t))\cdot
574: \pp{\MM{g}(\MM{x},t)}{\MM{x}}.
575: \]
576: In particular, we can evaluate this equation at each of our
577: discrete points $\MM{Q}_\beta$:
578: \begin{equation}
579: \dot{J}_\beta = \sum_k\MM{u}_k\nabla\psi_k(\MM{Q}_\beta)\cdot
580: J_\beta, \qquad J_\beta = \pp{\MM{g}}{\MM{x}}(\MM{Q}_\beta(0),t),
581: \qquad J_\beta(0) = \Id.
582: \label{J evolution}
583: \end{equation}
584:
585: A variation $\delta\MM{Q}_\beta(0)$ in the initial conditions
586: $\MM{Q}_\beta(0)$ leads to a variation in the entire trajectory given
587: by
588: \begin{equation}
589: \label{delta Q}
590: \delta\MM{Q}_\beta(t) = J_\beta(t)\delta\MM{Q}_\beta(0).
591: \end{equation}
592: This variation generates a symmetry of the equations, as shown in
593: the following lemma.
594: \begin{lemma}
595: The infinitesimal transformation given by equations \eqnref{J
596: evolution}-\eqnref{delta Q} together with
597: \[
598: \delta\MM{P}_\beta=0, \quad \beta=1,\ldots,n_p, \qquad
599: \delta\MM{u}_k=0, \quad k=1,\ldots,n_k,
600: \]
601: is a symmetry of equations
602: \eqnref{semidiscrete mom map}-\eqnref{semidiscrete P eqn}.
603: \end{lemma}
604: \noindent\emph{Proof.} Since the equations have been derived from an
605: action principle, we
606: simply need to show that the infinitesimal transformation causes the
607: action \eqnref{semidiscrete action} to vanish. If we apply the
608: transformation to the integrand (the Lagrangian) then we obtain
609: \begin{eqnarray*}
610: \delta L & = & \delta\left(\frac{1}{2}\|\MM{u}\|^2_g + \sum_\beta\MM{P}_\beta\cdot
611: \left(\dot{\MM{Q}}_\beta - \sum_{k=1}^{n_g}\MM{u}_k\psi_k(\MM{Q}_\beta)\right)
612: \right), \\
613: & = & \sum_\beta\MM{P}_\beta\cdot
614: \left(\delta\dot{\MM{Q}}_\beta -
615: \sum_{k=1}^{n_g}\MM{u}_k\nabla\psi_k(\MM{Q}_\beta)\cdot\delta\MM{Q}_\beta
616: \right), \\
617: & = & \sum_\beta\MM{P}_\beta\cdot
618: \left(\dot{J}_\beta\cdot\delta\MM{Q}_\beta(0) -
619: \sum_{k=1}^{n_g}\MM{u}_k\nabla\psi_k(\MM{Q}_\beta)\cdot J_\beta\delta\MM{Q}_\beta
620: (0)
621: \right), \\
622: & = & \sum_\beta\MM{P}_\beta\cdot
623: \left(\sum_k\MM{u}_k\nabla\psi_k(\MM{Q}_\beta)\cdot
624: {J}_\beta\cdot\delta\MM{Q}_\beta(0) -
625: \sum_{k=1}^{n_g}\MM{u}_k\nabla\psi_k(\MM{Q}_\beta)\cdot J_\beta\delta\MM{Q}_\beta
626: (0)
627: \right), \\
628: & = & 0,
629: \end{eqnarray*}
630: and hence the result.
631:
632: \noindent $\square$
633:
634: This symmetry of the equations has an associated conserved momenta following
635: Noether's theorem, as described in the following proposition.
636: \begin{proposition}
637: For each $\beta = 1,\ldots, n_p$, the quantity $J^T_\beta\MM{P}_\beta$
638: is conserved.
639: \end{proposition}
640: \noindent\emph{Proof.} Applying the symmetry to the action principle
641: and substituting the equations of motion \eqnref{semidiscrete mom
642: map}-\eqnref{semidiscrete P eqn} gives
643: \begin{eqnarray*}
644: 0 &=& \delta
645: \int_0^1 \frac{1}{2}\|\MM{u}\|^2_g + \sum_\beta\MM{P}_\beta\cdot
646: \left(\dot{\MM{Q}}_\beta - \sum_{k=1}^{n_g}\MM{u}_k\psi_k(\MM{Q}_\beta)
647: \right) \rmd t \\
648: & = & \int_0^1
649: \sum_\beta\left(
650: \dot{\MM{Q}}_\beta - \sum_{k=1}^{n_g}\MM{u}_k\psi_k(\MM{Q}_\beta)
651: \right)\cdot\delta\MM{Q}_\beta \\
652: & & \quad +
653: \dd{}{t}\left(\sum_\beta\MM{P}_\beta J_\beta\cdot\delta\MM{Q}_\beta(0)\right)
654: \rmd t \\
655: &= &\sum_\beta\left(\MM{P}_\beta(t_1)J_\beta(t_1)-\MM{P}_\beta(t_0)
656: J_\beta(t_0)\right)\cdot\delta\MM{Q}_\beta(0).
657: \end{eqnarray*}
658: We obtain the result since $\delta\MM{Q}_\beta(0)$ is an arbitrary
659: vector.
660:
661: \noindent $\square$
662:
663: As described in \cite{LeMaOrWe2003}, these conservation laws satisfied
664: by the semi-discrete equations will be preserved by numerical methods
665: provided that they are derived from a discrete variational principle
666: \emph{i.e.} following the framework described in section \ref{time
667: discretisation}.
668:
669: If we choose a continuous curve through our set of points that moves
670: with the flow according to equation \eqnref{continuous curve}, then an
671: approximation to $\partial\MM{Q}(s_\beta)/\partial s\cdot\rmd s$ is
672: given at time $t$ by
673: \[
674: J_\beta\Delta\MM{Q}_\beta(0), \qquad \beta=1,\ldots,n_p,
675: \]
676: where $\Delta\MM{Q}_\beta(0)$ is an approximation to
677: $\partial\MM{Q}(s_\beta)/\partial s\cdot\rmd s$ at time $t=0$. This leads
678: to the following corollary:
679: \begin{corollary}
680: If $\MM{P}_\beta$ is chosen to be normal to $\Delta\MM{Q}_\beta(0)$ at time
681: $t=0$ for all $\beta$ \emph{i.e.} $\MM{P}$ is initially normal to the curve,
682: then $\MM{P}$ is normal to $J_\beta\Delta\MM{Q}_\beta(0)$ for all $t$ along
683: the flow, \emph{i.e.} $\MM{P}$ stays normal to the curve.
684: \end{corollary}
685: \noindent\emph{Proof.} For each $\beta=1,\ldots,n_p$, the component of
686: $\MM{P}$ tangential to the shape is
687: \begin{eqnarray*}
688: \MM{P}_\beta(t)\cdot J_\beta(t)\Delta\MM{Q}_\beta(0)
689: &=& \MM{P}_\beta(0)\cdot J_\beta(0)\Delta\MM{Q}_\beta(0) \\
690: &=& \MM{P}_\beta(0)\cdot \Id\Delta\MM{Q}_\beta(0) \\
691: &=& \MM{P}_\beta(0)\Delta\MM{Q}_\beta(0)=0.
692: \end{eqnarray*}
693:
694: \noindent $\square$
695:
696: If the equations of motion for $\MM{Q}$ and $\MM{P}$ are discretised
697: using a variational integrator then this property is preserved,
698: provided that the discrete equation for the evolution of $J$ is
699: defined as the gradient of the evolution equation for $\MM{Q}$, since
700: then it generates a symmetry of the discrete variational principle
701: just as in the continuous time case.
702:
703: For example, the discrete equation for the gradient of the
704: time-discrete flow for $\MM{Q}$ obtained from the symplectic Euler
705: method is
706: \begin{equation}
707: \label{J discrete}
708: J_\beta^{n+1} = J_\beta^n + \Delta t\sum_k\MM{u}_k^{n+1}\nabla\psi(\MM{Q}_\beta^n)
709: J_\beta^n.
710: \end{equation}
711: \begin{proposition}
712: For each $\beta = 1,\ldots, n_p$, the quantity $J^T_\beta\MM{P}_\beta$
713: is conserved when the equations are integrated using the symplectic
714: Euler method, and $J$ is obtained from equation \ref{J discrete}.
715: \end{proposition}
716: \noindent\emph{Proof.}
717: \begin{eqnarray*}
718: \delta A & = & \delta
719: \sum_{n=1}^N\left(
720: \frac{1}{2}\Delta t\|\MM{u}\|^2_g + \sum_\beta\MM{P}^{n+1}_\beta\cdot
721: \left(\MM{Q}^{n+1}_\beta -\MM{Q}^n_\beta
722: - \Delta t\sum_{k=1}^{n_g}\MM{u}_k^{n+1}\psi_k(\MM{Q}_\beta^n)
723: \right)
724: \right), \\
725: & = & \sum_{n=1}^N\left(\sum_\beta\MM{P}^{n+1}_\beta\cdot
726: \left(\delta\MM{Q}^{n+1}_\beta -\delta\MM{Q}^n_\beta -
727: \sum_{k=1}^{n_g}\MM{u}_k^{n+1}\nabla\psi_k(\MM{Q}_\beta^n)\cdot
728: \delta\MM{Q}_\beta^n
729: \right)\right), \\
730: & = & \sum_{n=1}^N\sum_\beta\MM{P}^{n+1}_\beta\cdot
731: \left((J_\beta^{n+1}-J_\beta^n)\cdot\delta\MM{Q}_\beta^0-
732: \sum_{k=1}^{n_g}\MM{u}_k^{n+1}
733: \nabla\psi_k(\MM{Q}_\beta^n)\cdot J_\beta^n\delta\MM{Q}_\beta^0
734: \right), \\
735: & = & \sum_\beta\MM{P}_\beta^{n+1}\cdot
736: \left(\sum_k\MM{u}_k^{n+1}\nabla\psi_k(\MM{Q}_\beta^n)\cdot
737: {J}_\beta^n\cdot\delta\MM{Q}_\beta^0 -
738: \sum_{k=1}^{n_g}\MM{u}_k^{n+1}
739: \nabla\psi_k(\MM{Q}_\beta^n)\cdot J_\beta^n\delta\MM{Q}_\beta^0
740: \right), \\
741: & = & 0,
742: \end{eqnarray*}
743: Applying the symmetry to the discrete
744: action principle \ref{discrete functional}
745: and substituting the equations of motion \eqnref{semidiscrete mom
746: map}-\eqnref{semidiscrete P eqn} gives
747: \begin{eqnarray*}
748: 0 &=& \sum_\beta\left(\MM{P}_\beta^{n+1}J_\beta^{n+1}-\MM{P}_\beta^n
749: J_\beta^n\right)\cdot\delta\MM{Q}_\beta^0.
750: \end{eqnarray*}
751: We obtain the result since $\delta\MM{Q}_\beta^0$ is an arbitrary
752: vector.
753: \noindent $\square$
754:
755: We can verify the discrete conservation of $\MM{P}_\beta J_\beta$
756: directly since
757: \begin{eqnarray*}
758: \MM{P}^n_\beta J_\beta^n & = & \MM{P}^{n+1}_\beta
759: (\Id + \sum_k\MM{u}_k^{n+1}\nabla\psi_k(\MM{Q}^n_\beta))J_\beta^n \\
760: & = & \MM{P}^{n+1}_\beta J^{n+1}_\beta.
761: \end{eqnarray*}
762: Similar results can be obtained when higher-order variational
763: integrators are used by discretising the $\MM{Q}$ equation using a
764: Runge-Kutta method.
765:
766: As discussed in section \ref{matching condition}, the norm-minimising
767: solution has momentum normal to the shape along the whole trajectory.
768: Good preservation of the tangential component of momentum is important
769: because it means that it is only necessary to constrain the momentum
770: to be normal to the shape in the initial conditions when a shooting
771: algorithm is used (discussed in section \ref{solution methods}).
772:
773: \subsection{Discrete matching condition}
774: \label{discrete matching condition}
775: We can also apply a particle-mesh discretisation to the matching
776: condition described in section \ref{matching condition}. The
777: particle-mesh representation of equation \eqnref{singular vector field}
778: is
779: \[
780: \MM{v}^{\MM{Q}}_k = \sum_\beta\Delta\MM{Q}_\beta\psi_k(\MM{Q}_\beta),
781: \]
782: where $\Delta\MM{Q}_\beta$ is an approximation to $\partial\MM{Q}(s)/
783: \partial s\,\rmd s$ at $s=s_\beta$. For example, a simple finite
784: difference approximation gives
785: \[
786: \MM{v}^{\MM{Q}}_k =
787: \sum_\beta(\MM{Q}_\beta-\MM{Q}_{\beta-1})\psi_k(\MM{Q}_\beta).
788: \]
789: This is the approximation which we will use in the computed numerical
790: examples used in this paper.
791:
792: Once the singular vector field is evaluated on the mesh we can apply
793: standard mesh discretisation methods to compute the functional
794: \eqnref{current matching}:
795: \[
796: \hat{f}[\MM{v}^{\MM{Q}}] = \sum_{kl}K_{kl}\MM{v}^{\MM{Q}}_k\MM{v}^{\MM{Q}}_l
797: \]
798: where $K_{kl}$ is a discretisation of the kernel operator $K$. For the
799: computed numerical examples used in this paper, the kernel operator
800: used was the inverse operator $(1-\alpha^2\nabla^2)^{-2}$ discretised
801: using discrete Fourier transforms.
802:
803: This results in a numerical discretisation of the functional used for
804: the current matching condition. After numerical discretisation the
805: functional will not have a minimum at zero any more, and we must aim
806: to minimise this functional rather than find the zero to achieve
807: matching.
808:
809: \subsection{Efficiency}
810: In \cite{VaGl2005}, a mesh-free method was applied to the current
811: matching problem. The main cost in this type of method is in summing
812: up Green's functions on each of the points on the curve to calculate
813: their velocity, and the value of the matching condition. They employed
814: a fast multipoles algorithm \cite{GrSt1991} which has a computational
815: cost of size $\mathcal{O}(N\log N)$ (where $N$ is the total number of
816: particles), although the multiplicative constant in the scaling can be
817: relatively big, requiring larger $N$ before benefits are seen.
818:
819: For a particle-mesh method, the cost of evaluating the momentum on the
820: grid is $\mathcal{O}(N)$, and the cost of the FFT is
821: $\mathcal{O}(M^2\log M)$ (where $M$ is the number of rows of
822: gridpoints \emph{i.e.} the total number of grid points is $M^2$),
823: although one could reduce this by discretising the operator used in
824: the norm for velocity (\emph{e.g.} the Helmholtz operator in the
825: examples given here) and just performing a few iterations of a method
826: such as Jacobi, resulting in an $\mathcal{O}(M^2)$ cost. In the case
827: where one is matching dense information (images or measures, for
828: example), then typically $N=c M^2$ (with $c>1$) and the particle-mesh
829: approach produces a method which is competitive with fast multipoles
830: methods. For the case of matching curves, typically $N = c M$ (with
831: $c>1$) and a good fast multipole implementation will be more
832: efficient. However, any mesh-based operator inversion is easily
833: parallelised using standard methods (as is the particle-mesh
834: operation), and so this could be a strength of the particle-mesh
835: approach in the curve case. There are also other advantages to using a
836: mesh, for example it is very easy to modify the operator to
837: investigate the behaviour with different kernels.
838:
839: \section{Solution methods}
840: \label{solution methods}
841: As discussed in section \ref{discrete matching condition}, numerical
842: discretisation of the matching condition means that we cannot require
843: that the matching functional vanishes, and so we must take this into
844: account in the solution approach. There are two main approaches to
845: obtaining a numerical approximation to the optimal flow between
846: embedded curves:
847: \begin{enumerate}
848: \item {\bfseries Inexact matching}:
849: In this approach, suggested in \cite{MiTrYo03}, we
850: ``softly'' enforce the matching condition by adding a penalty term
851: to the functional \eqnref{functional}:
852: \begin{equation}
853: \label{inexact functional}
854: S(\MM{u}) = \int_0^1\|\MM{u}\|^2\rmd t + \frac{1}{\sigma^2}
855: f[\MM{v}^{\MM{Q}}].
856: \end{equation}
857: One then attempts to minimise this functional directly by applying a
858: descent algorithm (such as nonlinear conjugate gradients) by varying
859: the time series of vector fields and computing the implicit gradient
860: of the functional $f$. An alternative method is to introduce the
861: dynamical constraint using the Lagrange multipliers $\MM{P}$ as in
862: section \ref{momentum}, and to solve the resulting Euler-Lagrange
863: equations (\ref{mom map}-\ref{P eqn}) (modified to accomodate the
864: penalty functional) using Newton iteration. This approach becomes
865: attractive when it is possible to find a good initial guess at the
866: solution \emph{e.g.} by specifying a path of curves between $C_A$ and
867: $C_B$ and approximately solving equation \eqnref{P eqn} to get an
868: initial guess for $\MM{P}$ given the initial guess for $\MM{Q}$.
869:
870: It is worth mentioning that the minimisation of the functional
871: \ref{inexact functional} becomes ill-conditioned as $\sigma\to 0$ and
872: so it is not always possible to match one curve onto another with the
873: desired accuracy (or to within the size of numerical errors, having
874: discretised the functional). A modification of the functional called
875: \emph{method of multipliers}, described in \cite{Be82}, introduces
876: Lagrange multiplier variables along with the penalty parameter
877: $\sigma$ and allows a reduction of the error in matching without
878: making $\sigma$ arbitrarily large.
879:
880: \item {\bfseries Minimisation by shooting}: In this approach,
881: advocated in \cite{McMa2006}, we seek initial conditions for
882: $\MM{P}$ such that the functional \ref{current matching} is
883: minimised. The gradient of the functional with respect to the
884: initial conditions for $\MM{P}$ is computed by solving the
885: Euler-Lagrange equations (\ref{mom map}-\ref{P eqn}) from $t=0$ to
886: $t=1$ with those initial conditions, computing the gradients of
887: $f[\MM{u}^{\MM{Q}^N}]$ with respect to $\MM{Q}^N_\beta$, and
888: propagating those gradients back to $\MM{P}^0_\beta$ using the
889: adjoint equations (see \cite{Gu03}, for example). The problem can
890: then be solved using a nonlinear gradient algorithm such as
891: nonlinear conjugate gradients. As described in section \ref{matching
892: condition}, $\MM{P}$ must be constrained to be normal to the curve
893: in order to obtain the optimal path.
894:
895: This is the approach which we used in computing the numerical
896: examples.
897: \end{enumerate}
898:
899: \section{Numerical examples}
900: \label{numerics}
901: %In this section we illustrate the particle-mesh discretisation using
902: %some numerical examples.
903:
904: %\subsection{Forward integration}
905: %In this section we test the numerical method on the momentum sheet
906: %solutions of \cite{McMa2006b} which examined the stability of solutions
907: %in two dimensions of the form
908: %\[
909: %\MM{Q}(s) = (ct,s), \qquad \MM{P}(s) = (c/G(0),0),
910: %\]
911: %where $G$ is the Green's function for the vector-field norm in one
912: %dimension. These solutions, which are infinite straight lines
913: %propagating at speed $c$, were shown in \cite{McMa2006b} to be
914: %unstable for equations with the $H^n_\alpha$-norm and $n>1$. In the
915: %$n=1$ case, the solutions are algebraically unstable, with the
916: %unstable direction being a reparameterisation of $\MM{Q}(s)$ such that
917: %the vector field $\MM{u}$ does not change; this means the solution is
918: %stable for $n=1$ if viewed as a singular solution of EPDiff.
919:
920: %\subsection{Numerical curve-matching calculation}
921: In this section we show a computed curve-matching calculation of two
922: curves in the plane. The curve was parameterised using 420 points,
923: with a square $128\times128$ mesh of size $2\pi\times2\pi$. The
924: velocity norm used was the $H^2_\alpha$-norm with $\alpha=0.4$,
925: discretised on the mesh using discrete Fourier transform, and the
926: kernel used for the current matching was the Green's function of the
927: $(1-\alpha^2\nabla^2)^{-2}$ operator with $\alpha=0.4$.
928:
929: \begin{figure}
930: \begin{center}
931: \includegraphics[width=12cm]{dandh}
932: \end{center}
933: \caption{\label{dandh}Test curves used for the example matching computation.}
934: \end{figure}
935:
936: \begin{figure}
937: \begin{center}
938: \includegraphics[width=14cm]{d2h}
939: \end{center}
940: \caption{\label{d2h}Snapshots of the optimal path between two test
941: curves computed using the particle-mesh discretisation. The computed
942: curve is plotted with a continuous line, superimposed on the target
943: curve plotted with a dashed line. Top row: the curve at $t=[0,0.2,0.4]$.
944: Bottom row: the curve at $t=[0.6,0.8,1]$. }
945: \end{figure}
946:
947: \begin{figure}
948: \begin{center}
949: \includegraphics[width=10cm]{gridd}
950: \includegraphics[width=10cm]{gridh}
951: \end{center}
952: \caption{\label{grid}Plots illustrating the optimal deformation map
953: which maps between our two test curves. The numerical solution
954: specifies a vector field which is defined everywhere, which can be
955: used to transport other points which are not on the curve. This
956: calculation was performed on a set of points on equispaced grid
957: lines to show how space is being deformed around the curve. Top: the
958: grid lines and curve before deformation. Bottom: the grid lines and
959: curve after deformation. Note that the flow vector fields are far
960: from divergence-free, as can be seen by inspecting the areas of the
961: squares on the deformed grid. Note also that the optimal flow only
962: deforms space near to the curve.}
963: \end{figure}
964:
965: \begin{figure}\begin{center}
966: \includegraphics[width=12cm]{momentum}
967: \end{center}
968: \caption{\label{momentum plot}Plots showing the evolution of the momentum $\MM{P}$
969: along the optimal flow. The plots are taken from the same snapshots
970: as in figure \ref{d2h}, with vectors showing the direction and
971: magnitude of $\MM{P}$ on the curve. Note that $\MM{P}$ remains
972: normal to the curve throughout.}
973: \end{figure}
974:
975: \begin{figure}\begin{center}
976: \includegraphics[width=12cm]{dQ}
977: \end{center}
978: \caption{\label{dQ}Plots showing $J_\beta\Delta\MM{Q}_\beta$ around
979: the curve which is an approximation to $\partial\MM{Q}/\partial
980: s\rmd s$ as described in section \ref{discrete relabelling}. This
981: approximation remains normal to the curve throughout, with the
982: increase in magnitudes showing regions of stretching in the flow.}
983: \end{figure}
984:
985: %\begin{figure}\begin{center}
986: %\includegraphics[width=12cm]{tangential_P}
987: %\end{center}
988: %\caption{\label{tangential_P}Plot showing the evolution of $\sum_\beta
989: % \MM{P}_\beta\cdot\Delta\MM{Q}_\beta$ along the flow, which measures
990: % the component of $\MM{P}$ in the direction tangential to the
991: % curve. The plot stays very close to zero without, with all
992: % deviations from zero arising from round-off error. With exact
993: % arithmetic this plot would be identically zero throughout.}
994: %\end{figure}
995:
996: The solution was obtained by the ``minimisation by shooting'' method
997: as described in section \ref{solution methods}. The minimisation was
998: performed using the Scientific Python \cite{scipy} {\ttfamily
999: optimize.fmin\_ncg} routine which applies the Newton conjugate
1000: gradients algorithm with the hessian computed by applying finite
1001: differences to the gradient. The algorithm was run out until the
1002: functional was reduced to a value of $1.748\times 10^{-5}$
1003: (with an initial value of $0.0108$).
1004:
1005: A plot of the two curves used for the tests is given in figure
1006: \ref{dandh}. These two curves are quite different and require large
1007: deformations to transform one curve into the other. The calculated
1008: path is illustrated in figure \ref{d2h} with a few snapshots of the
1009: curve during the transformation at various times. The effect of the
1010: deforming flow on the surrounding space is illustrated in figure
1011: \ref{grid}.
1012:
1013: To illustrate the results of section \ref{discrete relabelling}, a
1014: plot showing momentum vectors at various times is given in figure
1015: \ref{momentum plot} which suggests that the momentum stays normal to
1016: the curve. This is confirmed by figure \ref{dQ}, showing the evolution of
1017: $J_\beta\Delta\MM{Q}_\beta(0)$ which is an approximation to
1018: $\partial\MM{Q}/\partial s \rmd s$.
1019: The quantity
1020: $\sum_\beta\MM{P}_\beta\cdot J_\beta\Delta\MM{Q}_\beta$
1021: remains within round-off error of zero throughout, confirming the results
1022: of section \ref{discrete relabelling}.
1023:
1024: \section{Summary and outlook}
1025: \label{summary}
1026: In this paper we introduced a new particle-mesh discretisation for
1027: diffeomorphic matching of curves, which can also be used
1028: for matching images. In this method the vector fields used to
1029: transport the curves are represented on a fixed mesh, whilst the
1030: curves themselves are represented by a finite set of moving
1031: points. Since the discrete equations arise from discretising an action
1032: principle, they are variational integrators which have many favourable
1033: properties. As discussed in \cite{McMa2006a}, whilst the benefits of
1034: variational integrators have been established for long integrations
1035: such as those for celestial mechanics or molecular dynamics, the
1036: benefits for short time optimal control problems such as the curve
1037: matching problem discussed in this paper are not so clear. There are a
1038: number of drawbacks and benefits which need to be investigated with
1039: further testing. In this paper we showed that the variational
1040: integrators that arise from the particle-mesh discretisation have a
1041: discrete form of the momentum conservation law which leads to the
1042: curve momentum remaining normal to the curve throughout the computed
1043: trajectory between shapes. We also noted that the integrators have a
1044: modified Hamiltonian which is conserved over long times (but not
1045: exponentially long since the compactly supported basis functions
1046: $\psi_k(\MM{x})$ are not analytic) which can be interpreted as a
1047: modified metric for the discrete equations. We then showed
1048: illustrative examples obtained from the calculation of the optimal
1049: trajectory between two closed curves in the plane.
1050:
1051: The main computational challenge for diffeomorphic matching remains
1052: the design of efficient algorithms to obtain optimal trajectories for
1053: large datasets. Of the two solution methods described in section
1054: \ref{solution methods}, the inexact matching method applied to the
1055: particle-mesh discretisation may be best applied in parallel by using
1056: a Newton-Krylov method to solve the Euler-Lagrange equations
1057: (including the penalty term) since it is possible to obtain a good
1058: initial guess for the optimal path by other methods. The
1059: minimisation-by-shooting approach might be best applied using a
1060: multilevel scheme where the problem is first solved with a small
1061: number of particles, with more particles being introduced once the
1062: lower dimensional problem has been solved to sufficient
1063: accuracy. These approaches will need to be developed in order for the
1064: discretisation to be applied to practical engineering applications, as
1065: well as convergence studies and error estimates.
1066:
1067: In future work we shall investigate the convergence properties of this
1068: method in the limit as the number of points in the discretisation of
1069: the curve goes to infinity (together with the number of mesh points),
1070: and apply the method to investigate practical datasets.
1071:
1072: Although we do not compute examples here, this method could also be
1073: used for matching surfaces in three dimensions using a
1074: current-matching approach. The main modifications are that equation
1075: (\ref{u formula}) needs to be evaluated in three dimensions using a
1076: tensor product of three B-splines (one for each Cartesian component),
1077: and the parameterisation of the surface should become a triangulation
1078: with a singular current being interpolated from the surface to a
1079: three-dimensional mesh using the same basis functions. We will develop
1080: and investigate such a method in future work. We will also investigate
1081: efficiency of the particle-mesh versus the mesh-free fast multipoles
1082: approach of \cite{VaGl2005} in numerical tests on real data.
1083:
1084: Further developments will be to apply the particle mesh to the related
1085: problem of metamorphosis \cite{TrYo2004}, and to problems where
1086: quantities such as vector and tensor fields associated with images
1087: also need to be matched together.
1088:
1089: \nocite{CoHo2006,Co2005}
1090: \bibliography{VPM}
1091:
1092: \end{document}
1093:
1094: