# Riemannian Imaging

## Outline

• Motivation: image registration
• Background: topological hydrodynamics
• Shape matching
• LDDMM (abstract)
• Geometry of diffeomorphism group
• EPDiff equation
• Gradient flows on Lie groups
• Toy example: gradient flow for $$QR$$
• Examples

## Image registration

Find transformation warping $$I_0$$ to $$I_1$$

I_0
$I_0$
I_1
$I_1$

## Topological hydrodynamics

Geodesics on Lie group $$G$$

Right-invariant metric

defined by $$\mathcal A: \mathfrak{g}\to\mathfrak{g}^*$$

Euler-Poincaré equation

in variable $$\xi=g'\cdot g^{-1}$$

$\mathcal A \xi'+\mathrm{ad}^*_\xi \mathcal A\xi = 0$

## Two examples

Rigid body

$G=\mathrm{SO}(3), \quad \mathfrak{so}(3)\simeq \mathbb{R}^3$
\mathbb{I}\dot\omega + \mathbb{I}\omega\times\omega = 0
$\mathbb{I}\dot\omega + \mathbb{I}\omega\times\omega = 0$

Incompressible Euler equations

$G=\mathrm{Diff}_\mu(M), \quad \mathfrak{g} = \mathfrak{X}_\mu(M)$
\dot v + \nabla_v v = -\nabla p
$\dot v + \nabla_v v = -\nabla p$

## Shape matching

Lie group $$G$$ with left action on manifold $$Q$$

Minimization problem

\displaystyle\min_{g\in G} F_{q_1}(g\cdot q_0)
$\displaystyle\min_{g\in G} F_{q_1}(g\cdot q_0)$
+ \sigma R(g)
$+ \sigma R(g)$
g
$g$
q_0
$q_0$
q_1
$q_1$

## LDDMM framework

Right-invariant metric on $$G$$ defined by $$\mathcal A: \mathfrak{g}\to \mathfrak{g}^*$$

Distance function $$d_Q$$ on $$Q$$

Minimization problem

\displaystyle\min_{g\in G} d_Q^2(g\cdot q_0,q_1) + \sigma d_G^2(g,e)
$\displaystyle\min_{g\in G} d_Q^2(g\cdot q_0,q_1) + \sigma d_G^2(g,e)$

(Large Deformation Diffeomorphic Metric Matching)

Reformulation as curve on $$\mathfrak{g}$$

\displaystyle\min_{\xi\in C^\infty([0,1],\mathfrak{g})} d_Q^2(g(1)\cdot q_0,q_1) + \sigma \int_0^1 |\xi(t)|_{\mathcal{A}}^2 dt
$\displaystyle\min_{\xi\in C^\infty([0,1],\mathfrak{g})} d_Q^2(g(1)\cdot q_0,q_1) + \sigma \int_0^1 |\xi(t)|_{\mathcal{A}}^2 dt$
\dot g = \xi \cdot g
$\dot g = \xi \cdot g$
\displaystyle\min_{\xi\in L^2([0,1],\mathfrak{g})} d_Q^2(g(1)\cdot q_0,q_1) + \sigma \int_0^1 |\xi(t)|_{\mathcal{A}}^2 dt
$\displaystyle\min_{\xi\in L^2([0,1],\mathfrak{g})} d_Q^2(g(1)\cdot q_0,q_1) + \sigma \int_0^1 |\xi(t)|_{\mathcal{A}}^2 dt$

Lemma:

Minimizer $$\xi(t)$$ fulfills the Euler-Poincaré equation

Proof:

L(g,\dot g) = \langle \mathcal A\dot g\cdot g^{-1},\dot g\cdot g^{-1}\rangle = |\xi|_\mathcal A^2
$L(g,\dot g) = \langle \mathcal A\dot g\cdot g^{-1},\dot g\cdot g^{-1}\rangle = |\xi|_\mathcal A^2$

## Riemannian geometry of diffeomorphisms

$G=\mathrm{Diff}(M), \quad \mathfrak{g} = \mathfrak{X}(M)$
\displaystyle\langle \mathcal A v, v\rangle = \int_M \mathsf{g}((1-\alpha\Delta)^k v, v) \mu
$\displaystyle\langle \mathcal A v, v\rangle = \int_M \mathsf{g}((1-\alpha\Delta)^k v, v) \mu$
\dot m + \nabla_v m + m\, \mathrm{div}(v) + (\nabla v)^\top m = 0
$\dot m + \nabla_v m + m\, \mathrm{div}(v) + (\nabla v)^\top m = 0$
m = (1-\Delta)^k v
$m = (1-\Delta)^k v$

## Numerics for LDDMM

Approach 1

Gradient flow on curve $$v = v(t)$$

Approach 2

Geodesic shooting to minimize $$d_Q^2(\varphi(1)\cdot q_0,q_1)$$

Both are expensive!

Right-invariant metric on $$G$$ defined by $$\mathcal A: \mathfrak{g}\to \mathfrak{g}^*$$

Distance function $$d_S$$ on $$S$$

Minimization problem

\displaystyle\min_{g\in G} d_S^2(g\cdot s_0,s_1)
$\displaystyle\min_{g\in G} d_S^2(g\cdot s_0,s_1)$
+ \sigma d_G^2(g,e)
$+ \sigma d_G^2(g,e)$

Origin of expensiveness: no formula for $$d_G$$

+ \sigma d_R^2(g\cdot r,r)
$+ \sigma d_R^2(g\cdot r,r)$

Regularization element $$r\in R$$

$$G$$ acts on $$Q = S\times R$$

$$E(g) = F_{q_1}(g\cdot q_0)$$ where $$q_i = (s_i,r)$$

\dot g = - \nabla_\mathcal{A} E(g)
$\dot g = - \nabla_\mathcal{A} E(g)$

Def: momentum map $$J: T^*Q\to \mathfrak{g}^*$$ for cotangent lifted action

\langle J(q,p),\xi \rangle = \langle p,\xi\cdot q \rangle
$\langle J(q,p),\xi \rangle = \langle p,\xi\cdot q \rangle$

\dot g = - u(g\cdot q_0)\cdot g
$\dot g = - u(g\cdot q_0)\cdot g$
u(q) = \mathcal A^{-1}J(q,d F_{q_1}(q))
$u(q) = \mathcal A^{-1}J(q,d F_{q_1}(q))$
G
$G$
Q
$Q$
e
$e$
q_0
$q_0$
g(t)
$g(t)$
q_1
$q_1$
q(t) = g(t)\cdot q_0
$q(t) = g(t)\cdot q_0$

\dot g = - u(g\cdot q_0)\cdot g
$\dot g = - u(g\cdot q_0)\cdot g$
u(q) = \mathcal A^{-1}J(q,F_{q_*}(q))
$u(q) = \mathcal A^{-1}J(q,F_{q_*}(q))$

Lie-Euler method

q_k = g_k\cdot q_0
$q_k = g_k\cdot q_0$
\xi_k = \mathcal{A}^{-1}J(q_k,d F_{q_*})
$\xi_k = \mathcal{A}^{-1}J(q_k,d F_{q_*})$
g_{k+1} = \exp(-h\xi_k)g_k
$g_{k+1} = \exp(-h\xi_k)g_k$

horizontal slice

I
$I$
R
$R$

fiber

\pi
$\pi$

fiber

I
$I$
W_1
$W_1$
K
$K$
P(n)
$P(n)$
A
$A$
Q
$Q$

## Toy example: $$QR$$ factorization

\mathrm{Hor}_A = \{ V\in T_A\mathrm{GL}(n) \mid \ell(VA^{-1}) = 0 \}
$\mathrm{Hor}_A = \{ V\in T_A\mathrm{GL}(n) \mid \ell(VA^{-1}) = 0 \}$
K = \{ R\in \mathrm{GL}(n)\mid \ell(R)=0, R_{ii}>0 \} \Rightarrow T_R K = \mathrm{Hor}_R
$K = \{ R\in \mathrm{GL}(n)\mid \ell(R)=0, R_{ii}>0 \} \Rightarrow T_R K = \mathrm{Hor}_R$

Take $$G = \mathrm{GL}(n)$$ and $$Q = P(n)$$

## Relative entropy as functional

F_{W_1}(W) = \frac{n}{2}- \frac{1}{2}\mathrm{tr}(W_1W^{-1}) + \frac{1}{2}\log(\det(W_1W^{-1}))
$F_{W_1}(W) = \frac{n}{2}- \frac{1}{2}\mathrm{tr}(W_1W^{-1}) + \frac{1}{2}\log(\det(W_1W^{-1}))$
\displaystyle \dot R = \nabla_{\mathcal A} E(R), \qquad E(R) = H(I\cdot R) = H(R^\top R)
$\displaystyle \dot R = \nabla_{\mathcal A} E(R), \qquad E(R) = H(I\cdot R) = H(R^\top R)$
\displaystyle \dot R = \frac{1}{2} R^{-\top}(W_1-R^\top R) + ZR, \qquad Z\in\mathfrak{o}(n)
$\displaystyle \dot R = \frac{1}{2} R^{-\top}(W_1-R^\top R) + ZR, \qquad Z\in\mathfrak{o}(n)$
R = \begin{bmatrix} 3 & -1 \\ 0 & 2 \end{bmatrix}
$R = \begin{bmatrix} 3 & -1 \\ 0 & 2 \end{bmatrix}$
W_1 = \pi(R) = R^\top R
$W_1 = \pi(R) = R^\top R$

## Inf-dim example

• $$G=\mathrm{Diff}(M)$$
• $$Q = \mathrm{Dens}(M)\times \mathrm{Met}(M)$$
• Action of $$G$$ on $$Q$$
\varphi\cdot (\mu,\mathsf{g}) = (\varphi_*\mu, \varphi_*\mathsf{g})
$\varphi\cdot (\mu,\mathsf{g}) = (\varphi_*\mu, \varphi_*\mathsf{g})$
• Right-invariant metric: $$H^1$$
• Energy functional
E(\varphi) = d^2_{FR}(\varphi_*\mu_0,\mu_1) + \sigma d_{\text{Met}}^2(\varphi_*\mathsf{g},\mathsf{g})
$E(\varphi) = d^2_{FR}(\varphi_*\mu_0,\mu_1) + \sigma d_{\text{Met}}^2(\varphi_*\mathsf{g},\mathsf{g})$

By Klas Modin

# Riemannian imaging

Presentation given at the MaGIC meeting in Vatnahalsen, Norway, 2017-03-04

• 1,545