103
Image Registration – Introduction Jan Kybic December 5, 2007

Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Image Registration – Introduction

Jan Kybic

December 5, 2007

Page 2: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Outline

What is image registration

The purpose of image registration

Warping and interpolation

Classification of registration methods

Manual landmark registration

Automatic elastic B-spline registration

Automatic elastic dense PDE based registration

ITK Registration Toolkit

Page 3: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Find corresponding points

American Tux Tux bordelais

Page 4: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Find corresponding points

American Tux Tux bordelais

Page 5: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Find corresponding points

American Tux Tux bordelais

Page 6: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Registration example 2

Michael Unser Philippe Thevenaz

Page 7: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Registration example 3

James Bond Lupe

Page 8: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Registration example 4

EPI MRI anatomical MRI

Page 9: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Correspondence function

source

destination

Reference image Test image

Page 10: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Correspondence function

(x , y)(x ′, y ′)

Reference image Test image

g(

[x y ]T)

= [x ′ y ′]T

Page 11: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Deformation field

0 % deformation

Page 12: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Deformation field

25 % deformation

Page 13: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Deformation field

50 % deformation

Page 14: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Deformation field

75 % deformation

Page 15: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Deformation field

100 % deformation

Page 16: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Image warping

0 % deformation

Page 17: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Image warping

25 % deformation

Page 18: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Image warping

50 % deformation

Page 19: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Image warping

75 % deformation

Page 20: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Image warping

100 % deformation

Page 21: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Image warping = geometric transformation

Rozepıseme vektorovou transformaci T do dvou slozek

x′ = T (x) → x ′ = Tx(x , y) , y ′ = Ty (x , y) .

Page 22: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Transformace souradnic + interpolace

Transformace souradnic bodu pocıta se nova poloha kazdehobodu ve spojitych souradnicıch (realna cısla). x′ = T (x)

Aproximace jasove funkce z necelocıselnych pozic x ′, y ′ hledahodnotu jasu v celocıselnych pozicıch

Problemy:

Nekdy x′ mimo obraz.

Interpolace z neusporadanych (scattered) dat je tezka uloha.

Page 23: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Dualnı transformace

Souradnice bodu (x , y) ve vstupnım obraze lze vypocıtatinvertovanım vztahu (x ′, y ′) = T (x , y), tj.

(x, y) = T−1 (x′, y′) .

Aproximuje se jas ve vstupnım obraze, ktery odpovıda jasuhledaneho bodu x ′, y ′ ve vystupnı mrızce.Interpolace z usporadanych dat (pravouhla sıt) je ‘lehka’ uloha.

Page 24: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Transformace souradnic bodu

Obvykle se x ′ = Tx(x , y), y ′ = Ty (x , y) aproximuje polynomemm-teho stupne.

x ′ =

m∑

r=0

m−r∑

k=0

ark x r yk , y ′ =

m∑

r=0

m−r∑

k=0

brk x r yk .

Vztah je linearnı vzhledem ke koeficientum ark , brk ⇒ odhadmetodou nejmensıch ctvercu.Potrebne dvojice sobe odpovıdajıcıch (vlıcovacıch/klıcovych) bodux , y a x ′, y ′.

Page 25: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Bilinearnı, afinnı transformace souradnic

Kdyz se geometricka transformace v zavislosti na pozici v obrazeprılis nahle nemenı, postacujı aproximacnı polynomy nızkehostupne m = 2 nebo m = 3.Bilinearnı transformace

x ′ = a0 + a1x + a2y + a3xy ,

y ′ = b0 + b1x + b2y + b3xy .

Jeste specialnejsı je afinnı transformace ktera zahrnuje v praxipotrebnou rotaci, translaci a zkosenı.

x ′ = a0 + a1x + a2y ,

y ′ = b0 + b1x + b2y .

Page 26: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Homogennı souradnice

Homogennı souradnice jsou obvykle v teoreticke mechanice,projektivnı geometrii, pocıtacove grafice a robotice.

Zakladnı myslenkou je reprezentovat bod ve vektorovemprostoru o jednu dimenzi vetsım.

Bod [x , y ]T se v homogennıch souradnicıch vyjadrı ve 3Dvektorovem prostoru jako [λx , λy , λ]T , kde λ 6= 0.

Pro jednoduchost se obvykle pouzıva jedno z nekonecnemnoha vyjadrenı [x , y , 1]T .

Page 27: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Afinnı transformace

Affinnı zobrazenı se po zavedenı homogennıch souradnic vyjadrı

x ′

y ′

1

=

a1 a2 a0

b1 b2 b0

0 0 1

x

y

1

.

Po castech afinnı transformace.

Page 28: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

(Uniform) splines

Page 29: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

(Uniform) splines

Piecewise polynomial of degree n

Continuous (n − 1)th derivative

(Uniform) knots

Page 30: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Non-uniform splines (1D)

Polynomial in each interval

Continuous derivatives

Boundary conditions (natural)

−→ band system of linear equations

Example: cubic splines

Page 31: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Uniform B-splines

Haar β0

−2 −1.5 −1 −0.5 0 0.5 1 1.5 20

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

linear β1

quadratic β2

cubic β3

Page 32: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Uniform B-splines

Haar β0

−2 −1.5 −1 −0.5 0 0.5 1 1.5 20

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

linear β1

quadratic β2

cubic β3

Generation: βn+1 = βn ∗ β0

Basis for splines: s(x) =∑

i ci β(x − i)

Page 33: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Practical B-splines

Separability speed

B-spline transform (finding coefficients) fast through IIRfiltering

Interpolation fast (small support)

Extension to n-D by Cartesian product. Separability.

Software

Spliny Matlab, Numerical Recipes, . . .

rmnı B-spliny Unser, Thevenaz, bigwww.epfl.ch

Page 34: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Interpolace = Aproximace jasove funkce

Transformovane souradnice x ′, y ′ lezı mimo rastr. Mame jeninformaci o vstupnım obraze f (x , y) v celocıselnych vzorcıch.

Take geometricky transformovany obraz se ma reprezentovatmaticı. Proto i zde mame predepsanou pravouhlou vzorkovacımrızku.

Prıklad: topograficka predstava.

Principialne spravnou odpoved poskytuje teorie aproximace.Ze vzorku odhadneme spojitou funkci.

Obvykle se aproximuje polynomem.

Page 35: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Interpolace jako 2D konvoluce

Vzorkovana verze gs(l ∆ x , k ∆ y) spojite funkce f (x , y).Interpolace −→ spojita fn(x , y) aproximujıcı f .Linearita + nezavislost na posunutı (LTI) −→ konvoluce.

fn(x , y) =

∞∑

l=−∞

∞∑

k=−∞

gs(l ∆ x , k ∆ y) hn(x − l ∆ x , y − k ∆ y) .

hn je interpolacnı jadro, obvykle male pokrytı (support).

Page 36: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Nejblizsı soused

Priradı bodu (x , y) hodnotu jasu nejblizsıho bodu gs v diskretnımrızce.

f1(x , y) = gs(round (x), round (y)) .

h

0 0.5-0.5x

1

P0 - po castech konstantnı.

Page 37: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Linearnı interpolace

4 body v okolı (x , y), linearnı kombinace. Vliv kazdeho ze ctyrbodu klesa se vzdalenostı.

f2(x , y) = (1− a)(1− b) gs(l , k) + a(1− b) gs(l + 1, k)+b(1− a) gs(l , k + 1) + ab gs(l + 1, k + 1) ,

kde l = round (x) , a = x − l ,k = round (y) , b = y − k .

h2

-1 0 1x

P1 - po castech linearnı.

Page 38: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Bikubicka interpolace

Lokalne interpolovan obrazovou funkci bikubickym polynomemz 16 bodu v okolı. 1D interpolacnı jadro (pro prehledne zobrazenı)

h3 =

1− 2|x |2 + |x |3 pro 0 ≤ |x | < 1 ,4− 8|x | + 5|x |2 − |x |3 pro 1 ≤ |x | < 2 ,0 jinde.

-0.1

0.2

0.4

0.6

0.8

2.0-2.0

Interpolace P3.

Page 39: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Interpolace obrazu B-spliny

f (x , y) =∑

i ,j

cijβn(x − i)βn(x − j)

Interpolace spliny je globalnı, zatımco P0,P1,P2,P3. . . jsoulokalnı v obou osach

Pixely na pravidelne mrızce lze predpocıtat B-splinecoeficienty (FIR filtr)

Vyhodnocenı β3 je stejne rychle jako u P3, kvalita lepsı.

Okrajove podmınky (nulove, periodicke, zrcadlo na bodu,mezi body)

Vyssı rady vedou ke vzniku Gibbsovych artefaktu na hranach(ringing).

Page 40: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Interpolace sinc

Bandlimited (frekvencne omezeny) signal f ,supp f ⊆ [−Fs/2,Fs/2], f ∈ L2

Jednoznacne urceny svymi vzorky f (i/Fs):

f (x) =∑

i

f (i/Fs) sinc(Fsx − n)

sinc(τ) =sin(πτ)

πτ

Interpolacnı jadro sinc nenı kompaktnı −→ vypocetne narocne.Nekdy lze pocıtat pomocı FFT (zero-padding).

Page 41: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Image registration

reference image test image

deformation

registration

Page 42: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Image registration

reference image test image

deformation

warping

registration

warped image

Page 43: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

(Biomedical) applications

. . . of image registration

Comparing images Different times Different methods Different subjects

Analyzing sequences Motion estimation Segmentation

Qualitative and quantitative information.

Page 44: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Other applications of image registration

video stabilization

video compression

image mosaicking

stereo matching

structure from motion

Page 45: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

video ultrazvuk srdce (2C,4C)

Page 46: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Image alignment

reference test

before

Page 47: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Image alignment

reference test

before warped

Page 48: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Classification of registration methods

Feature space — intermediate data extracted from image

Search space — representation of the deformation

Similarity metric — measuring the dissimilarity

Search strategy — how to find the minimum

User interaction level

Page 49: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Registration methods – Feature space

pixels

Fourier wavelet

transforms

intrinsic extrinsic

landmarks curves surfaces templates

features

Feature space

Page 50: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Registration methods – Search space

Local Variational PDE

Semi-local (Quad)tree B-splines Wavelets

Global linear polynomial harmonic

RBF, krigging

Image dependent models (e.g. adaptive quadtrees)

Page 51: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Similarity metrics

Data term for pixel based criteria l2 norm (SSD) l1 norm correlation, normalized correlation mutual information, normalized mutual information

Other data terms image interpolation — important feature-based methods — distance template-based methods — windowed pixel-based criteria transform-based methods — norm in the transform domain preprocessing — filtering, histogram equalization,. . .

Regularization Norm (lp) of the derivatives Implicit regularization (constrained model) Smoothing

Page 52: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Search strategy

Direct solution

Exhaustive search

Dynamic programming

PDE evolution

Multidimensional optimisation gradient descent Newton-like methods, exact/estimated Hessian,

Marquardt-Levenberg, conjugated gradients, BFGS, . . .

Multiresolution

Page 53: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

User interaction level

Manual

Automatic

Semi-automatic

Page 54: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Manual registration

Landmark identification

Page 55: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Manual registration

?

Landmark identification

Landmark interpolation

Page 56: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Landmark interpolation (2)

Constraints

Hard constraints

g(xi ) =

[

gx(xi )gy (xi)

]

= zi for all i ∈ 1, . . . , N

Soft constraintsN

i=1

‖g(xi )− zi‖2≤ ε

Properties invariance to scale, shifts, rotations representability of linear transforms

Page 57: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Thin-plate splines

Minimize an energy

J(g) =

∫(

∂2g

∂x2

)2

+ 2

(

∂2g

∂x∂y

)2

+

(

∂2g

∂y2

)2

dxdy

J(g) = J(gx ) + J(gy )

under constraints

g(xi , yi ) = zi

Page 58: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Thin-plate splines

Minimize an energy

J(g) =

∫(

∂2g

∂x2

)2

+ 2

(

∂2g

∂x∂y

)2

+

(

∂2g

∂y2

)2

dxdy

J(g) = J(gx ) + J(gy )

under constraints

g(xi , yi ) = zi

Solution

g(x , y) =N

i=1

λi(‖x− xi‖) + a0x + a1y + a2

with ‖x− xi‖ =√

(x − xi)2 + (y − yi)2 = r

where (r) is a radial basis function and(r) = r2 log r

Page 59: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Automatic rigid registration

Look for rigid (euclidean or affine) transformation

To compensate different position, scale

. . . or to simplify a more complicated problem

Page 60: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Registration as minimization

deformation

optimization

test image

reference image

deformed image

difference

criterion E

deformation function g(x)

Page 61: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

ITK (Insight Registration and segmentation toolbox)

Page 62: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Automatic elastic B-spline registration

Look for elastic (non-linear) transformation

Smooth deformation wanted

Semi-local model with many parameters

Page 63: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Spline based warping

Approximationproperties precision

Short support speed

Scalability

Representability oflinear transforms

g(x) = x +∑

i∈Z2

c(i)β(x/h + d− i)

Page 64: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Evaluating the difference

Page 65: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Evaluating the difference

Page 66: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Evaluating the difference

E = (1/N)∑

i

(

f ct (g(i))− fr (i)

)2

Page 67: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Multiresolution

32× 32

Page 68: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Multiresolution

64× 64

Page 69: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Multiresolution

128× 128

Page 70: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Multiresolution

256× 256

Page 71: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

video of the registration

Page 72: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Applications

EPI distortion

Before (with Arto Nirkko)

Page 73: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Applications

EPI distortion

After

Page 74: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Applications

EPI distortion

MRI atlas

Atlas

Page 75: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Applications

EPI distortion

MRI atlas

Aligned

Page 76: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Applications

EPI distortion

MRI atlas

CT alignment

Before

Page 77: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Applications

EPI distortion

MRI atlas

CT alignment

After

Page 78: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Applications

EPI distortion

MRI atlas

CT alignment

SPECT atlas

(with University Hospital in Geneva)

Page 79: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Applications

EPI distortion

MRI atlas

CT alignment

SPECT atlas

Ultrasound

velocity (with Marıa J. Ledesma-Carbayo)

Page 80: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Applications

EPI distortion

MRI atlas

CT alignment

SPECT atlas

Ultrasound

MRI heartsequence

Page 81: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Applications

EPI distortion

MRI atlas

CT alignment

SPECT atlas

Ultrasound

MRI heartsequence

MRI perfusion

origin

al

unco

rrec

ted

corr

ecte

d

Page 82: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Automatic dense PDE-based registration

Look for elastic (non-linear) transformation

General motion (vector) field is sought

Criteria formulated in the continuous domain

Regularization to impose smoothness

Page 83: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Some facts about cervical cancer

Cervical cancer is the second most common cancer amongwomen worldwide

Nearly 380,000 new cases are diagonosed yearly

When detected early, cervical neoplasia is nearly 100% curable

Papanicolau test (Pap Smear) and Colposcopy are the mostwidespread tests for cancer screening

Female Anatomy

Page 84: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Diagnosis: Colposcopy

Colposcopy visually inspects inspects the cervix area at lowmagnification

The application of acetic-acid will temporally alter theappearence of cancerous tissue

Colposcopists must subjectively asses appearence changes insmall areas over prolonged periods of time

60 seconds 300 seconds

Page 85: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Deformation as a Vector Field

We represent correspondence function H as a dense vector field

H([x , y ]) = [x ′, y ′]

Original Image Deformation Field Deformed Image

Page 86: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Deformation as a Vector Field

We represent correspondence function H as a dense vector field

H([x , y ]) = [x ′, y ′]

Original Image Deformation Field Deformed Image

Page 87: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Deformation as a Vector Field

We represent correspondence function H as a dense vector field

H([x , y ]) = [x ′, y ′]

Original Image1 Deformation Field Deformed Image

Page 88: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Deformation as a Vector Field

We represent correspondence function H as a dense vector field

H([x , y ]) = [x ′, y ′]

Original Image1 Deformation Field Deformed Image

Page 89: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Deformation as a Vector Field

We represent correspondence function H as a dense vector field

H([x , y ]) = [x ′, y ′]

Original Image1 Deformation Field Deformed Image

Page 90: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Registration as optimization

Correspondence function H and vector field h are related by:

H([i , j]) = [i , j] + h(i , j) (1)

The problem is then formulated as the minimization of acriterion J with respect to vector field h:

h∗ = arg minh

(J(f h,g,h )) (2)

where h∗ is the optimal solution, f and g are the images to beregistered and J is a cost function measuring the dissimilaritybetween the images and the likelyhood of the transformation.

Cost function J is divided into a data and a regularizationterm multiplied by a proportionality constant:

J(f,g,h) = JD(f h,g) + αJR(h) (3)

Page 91: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Similarity criteria

The data term JD is the sum of squared differences (SSD)between the template image g and the moving image f

deformed by h:

JD(fh,g) =

(x ,y)⊂Ω(f(h(x , y)+[x , y ])−g(x , y))2 dx dy (4)

Discretized version:

JD(f h,g) =∑

(i ,j)⊂Ω

(f(h(i , j) + [i , j]) − g(i , j))2 (5)

Page 92: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Regularization

Regularization term penalizes un-smooth deformations andmakes the optimization of J a well-posed problem

Regularization criterion JR is chosen so its gradient coincideswith the linearized 2D elasticity operator describingequilibrium in an elastic material.

∇JR(h) = ξ∆h + (1− ξ)∇(∇ · h) (6)

JR(h) =1

2

(x ,y)⊂Ω

[

ξ (∂xhx)2 + (1− ξ)

(

(∂xhx)2 + ∂xhx · ∂yhy

)]

+[

ξ (∂yhy )2 + (1− ξ)(

(∂yhy )2 + ∂xhx · ∂yhy

)]

Page 93: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Gradient descent optimization

On every iteration:

Calculate the new deformation field

h′ = hi − λ(∇J(f,g,hi )) (8)

If the step is succesful, then the step is accepted and the stepsize is increased

λ← 2λ,hi+1 ← h′, Ji+1 ← J ′ (9)

Otherwise the step size is reduced

λ← λ/10 (10)

We iterate until convergence (given by a suitable threshold).

Page 94: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Other implementation details

Multi-resolution was used

ROI masks were automatically generated

Images were rigidly pre-registred

Green color channel only

Page 95: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Experiments

Algorithm tested with 45 image pairs

Images taken before and 60 seconds after acetic-acidapplication

Cross-polarization filters used to reduce the glint

Uncompressed 1125x750 pixel 16-bit images were used

Page 96: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Results

Template Moving

Page 97: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Results

Unregistered Checkerboard Unregistered Difference

Page 98: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Results

Deformation Field Registered

Page 99: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Results

Unregistered Checkerboard Registered Checkerboard

Page 100: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Results

Unregistered Difference Registered Difference

Page 101: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Insufficient Regularization

Deformation Field Registered

Page 102: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Video cervix registration

Page 103: Image Registration – Introductioncmp.felk.cvut.cz/cmp/courses/33DZOzima2007/slidy/...features Feature space Registration methods – Search space Local Variational PDE Semi-local

Registration conclusions

Many different approaches

Many different applications

Very frequent in medical imaging

. . . but also video processing, 3D reconstruction. . .

Trade-off between robustness, speed and generality

A priori knowledge always usefull, sometimes essential