109
Outline Shape Analysis in R GM library in the light of recent methodological developments Stanislav Katina [email protected] Department of Applied Mathematics and Statistics, Comenius University, Bratislava, Slovakia Neurospin, Institut d’Imagerie BioM ´ edicale Commissariat ´ a l’Energie Atomique, Gif sur Yvette, France 5 th R useR Conference, Rennes, France, July 8-10, 2009

Shape Analysis in R - r- · PDF fileShape Analysis in R ... ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Embed Size (px)

Citation preview

Page 1: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Outline

Shape Analysis in RGM library in the light of recent methodological

developments

Stanislav [email protected]

Department of Applied Mathematics and Statistics, Comenius University,Bratislava, Slovakia

Neurospin, Institut d’Imagerie BioMedicale Commissariat a l’Energie Atomique, Gifsur Yvette, France

5th R useR Conference, Rennes, France, July 8-10, 2009

Page 2: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

Outline

1 IntroductionNotation and problems

2 Cubic splinesExample 1 – shape dataNCS for bivariate data

3 TPS for shape dataTPS for shape dataTPS relaxation along curves

4 Acknowledgement

Page 3: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

Outline

1 IntroductionNotation and problems

2 Cubic splinesExample 1 – shape dataNCS for bivariate data

3 TPS for shape dataTPS for shape dataTPS relaxation along curves

4 Acknowledgement

Page 4: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

Notation and problems

Ian Dryden’s R-package — shapes

Statistical shape analysis

Version: 1.1-3

http://www.maths.nott.ac.uk/ ild/shapes

Generalized Procrustes Analysis (GPA), Relative WarpAnalysis (RWA), statistical inference

Thin-plate spline grids, 3D visualization via librariesscatterplot3d and rgl

Page 5: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

Notation and problems

Ian Dryden’s R-package — shapes

Statistical shape analysis

Version: 1.1-3

http://www.maths.nott.ac.uk/ ild/shapes

Generalized Procrustes Analysis (GPA), Relative WarpAnalysis (RWA), statistical inference

Thin-plate spline grids, 3D visualization via librariesscatterplot3d and rgl

Page 6: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

Notation and problems

Ian Dryden’s R-package — shapes

Statistical shape analysis

Version: 1.1-3

http://www.maths.nott.ac.uk/ ild/shapes

Generalized Procrustes Analysis (GPA), Relative WarpAnalysis (RWA), statistical inference

Thin-plate spline grids, 3D visualization via librariesscatterplot3d and rgl

Page 7: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

Notation and problems

Ian Dryden’s R-package — shapes

Statistical shape analysis

Version: 1.1-3

http://www.maths.nott.ac.uk/ ild/shapes

Generalized Procrustes Analysis (GPA), Relative WarpAnalysis (RWA), statistical inference

Thin-plate spline grids, 3D visualization via librariesscatterplot3d and rgl

Page 8: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

Notation and problems

Ian Dryden’s R-package — shapes

Statistical shape analysis

Version: 1.1-3

http://www.maths.nott.ac.uk/ ild/shapes

Generalized Procrustes Analysis (GPA), Relative WarpAnalysis (RWA), statistical inference

Thin-plate spline grids, 3D visualization via librariesscatterplot3d and rgl

Page 9: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

Notation and problems

New R-package — GMM

Statistical shape analysis

upcoming in autumn 2009

http://www.defm.fmph.uniba.sk/ katina/katina.htm

sliding of semilandmarks on open and closed curvesand surfaces, missing value estimation, affine andnon-affine component, unwarping, Multivariate MultipleLinear Regression Model of shape on size, Relative WarpAnalysis, shape-space PCA, form-space PCA ,size-adjusted PCA, 2-block PLS (two shape blocks, oneshape block and one block of external variables), analysisof asymmetry, statistical inference

GMM toolbox (Hull/York Medical School, University ofVienna)

Page 10: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

Notation and problems

New R-package — GMM

Statistical shape analysis

upcoming in autumn 2009

http://www.defm.fmph.uniba.sk/ katina/katina.htm

sliding of semilandmarks on open and closed curvesand surfaces, missing value estimation, affine andnon-affine component, unwarping, Multivariate MultipleLinear Regression Model of shape on size, Relative WarpAnalysis, shape-space PCA, form-space PCA ,size-adjusted PCA, 2-block PLS (two shape blocks, oneshape block and one block of external variables), analysisof asymmetry, statistical inference

GMM toolbox (Hull/York Medical School, University ofVienna)

Page 11: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

Notation and problems

New R-package — GMM

Statistical shape analysis

upcoming in autumn 2009

http://www.defm.fmph.uniba.sk/ katina/katina.htm

sliding of semilandmarks on open and closed curvesand surfaces, missing value estimation, affine andnon-affine component, unwarping, Multivariate MultipleLinear Regression Model of shape on size, Relative WarpAnalysis, shape-space PCA, form-space PCA ,size-adjusted PCA, 2-block PLS (two shape blocks, oneshape block and one block of external variables), analysisof asymmetry, statistical inference

GMM toolbox (Hull/York Medical School, University ofVienna)

Page 12: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

Notation and problems

New R-package — GMM

Statistical shape analysis

upcoming in autumn 2009

http://www.defm.fmph.uniba.sk/ katina/katina.htm

sliding of semilandmarks on open and closed curvesand surfaces, missing value estimation, affine andnon-affine component, unwarping, Multivariate MultipleLinear Regression Model of shape on size, Relative WarpAnalysis, shape-space PCA, form-space PCA ,size-adjusted PCA, 2-block PLS (two shape blocks, oneshape block and one block of external variables), analysisof asymmetry, statistical inference

GMM toolbox (Hull/York Medical School, University ofVienna)

Page 13: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

Notation and problems

New R-package — GMM

Statistical shape analysis

upcoming in autumn 2009

http://www.defm.fmph.uniba.sk/ katina/katina.htm

sliding of semilandmarks on open and closed curvesand surfaces, missing value estimation, affine andnon-affine component, unwarping, Multivariate MultipleLinear Regression Model of shape on size, Relative WarpAnalysis, shape-space PCA, form-space PCA ,size-adjusted PCA, 2-block PLS (two shape blocks, oneshape block and one block of external variables), analysisof asymmetry, statistical inference

GMM toolbox (Hull/York Medical School, University ofVienna)

Page 14: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

Notation and problems

Introduction

xj ∈ R, k-vector x

yj ∈ R, k-vector y

x j =(

x (1)j , x (2)

j

)T∈ R

2, k × 2 matrix X

y j =(

y (1)j , y (2)

j

)T∈ R

2, k × 2 matrix Y

j = 1, 2, . . . k

Page 15: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

Notation and problems

Introduction

xj ∈ R, k-vector x

yj ∈ R, k-vector y

x j =(

x (1)j , x (2)

j

)T∈ R

2, k × 2 matrix X

y j =(

y (1)j , y (2)

j

)T∈ R

2, k × 2 matrix Y

j = 1, 2, . . . k

Page 16: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

Notation and problems

Introduction

xj ∈ R, k-vector x

yj ∈ R, k-vector y

x j =(

x (1)j , x (2)

j

)T∈ R

2, k × 2 matrix X

y j =(

y (1)j , y (2)

j

)T∈ R

2, k × 2 matrix Y

j = 1, 2, . . . k

Page 17: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

Notation and problems

Introduction

xj ∈ R, k-vector x

yj ∈ R, k-vector y

x j =(

x (1)j , x (2)

j

)T∈ R

2, k × 2 matrix X

y j =(

y (1)j , y (2)

j

)T∈ R

2, k × 2 matrix Y

j = 1, 2, . . . k

Page 18: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

Notation and problems

Introduction

xj ∈ R, k-vector x

yj ∈ R, k-vector y

x j =(

x (1)j , x (2)

j

)T∈ R

2, k × 2 matrix X

y j =(

y (1)j , y (2)

j

)T∈ R

2, k × 2 matrix Y

j = 1, 2, . . . k

Page 19: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

Notation and problems

Introduction

natural cubic splines

thin-plate splines

Page 20: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

Notation and problems

Introduction

natural cubic splines

thin-plate splines

Page 21: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

Notation and problems

Introduction

f : R → R

f : R2 → R

2

Page 22: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

Notation and problems

Introduction

f : R → R

f : R2 → R

2

Page 23: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

Notation and problems

Introduction

yj = f(

xj)

+ εj

y j = f(

x j)

+ εj

Page 24: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

Notation and problems

Introduction

yj = f(

xj)

+ εj

y j = f(

x j)

+ εj

Page 25: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

Outline

1 IntroductionNotation and problems

2 Cubic splinesExample 1 – shape dataNCS for bivariate data

3 TPS for shape dataTPS for shape dataTPS relaxation along curves

4 Acknowledgement

Page 26: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

Example 1 – shape data

Data

Coquerelle M, Bookstein FL, Braga J, Halazonetis DJ,Katina S , Weber GW, 2009. Visualizing mandibular shapechanges of modern humans and chimpanzees (Pantroglodytes) from fetal life to the complete eruption of thedeciduous dentition. The Anatomical Record (accepted)

computed tomographies (CT) of 151 modern humans(78 females and 73 males) of mixed ethnicity, living inFrance, from birth to adulthood. [Pellegrin Hospital(Bordeaux), Necker Hospital (Paris) and Clinique Pasteur(Toulouse)]

Page 27: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

Example 1 – shape data

Data

Coquerelle M, Bookstein FL, Braga J, Halazonetis DJ,Katina S , Weber GW, 2009. Visualizing mandibular shapechanges of modern humans and chimpanzees (Pantroglodytes) from fetal life to the complete eruption of thedeciduous dentition. The Anatomical Record (accepted)

computed tomographies (CT) of 151 modern humans(78 females and 73 males) of mixed ethnicity, living inFrance, from birth to adulthood. [Pellegrin Hospital(Bordeaux), Necker Hospital (Paris) and Clinique Pasteur(Toulouse)]

Page 28: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

Example 1 – shape data

Data

each mandibular surface was reconstructed from theCT-scans via the software package Amira (MercuryComputer Systems, Chelmsford, MA)

open-source software Edgewarp3D (Bookstein & Green2002), a 3D-template of 415 landmarks andsemilandmarks was created to measure the mandibularsurface and was warped onto each mandible

Page 29: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

Example 1 – shape data

Data

each mandibular surface was reconstructed from theCT-scans via the software package Amira (MercuryComputer Systems, Chelmsford, MA)

open-source software Edgewarp3D (Bookstein & Green2002), a 3D-template of 415 landmarks andsemilandmarks was created to measure the mandibularsurface and was warped onto each mandible

Page 30: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

Example 1 – shape data

Data

Page 31: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

NCS for bivariate data

Interpolation model

Consider a NCS given by

f (x) = c + ax +k

j=1

wjφj (x) , j = 1, 2, . . . k ,

where

xj are the knots, φj (x) = φ(

x−xj)

= 112

∣x − xj∣

3 with theconstraints

∑kj=1 wj =

∑kj=1 wjxj = 0, f ′′ and f ′′′ are both

zero outside the interval [x1, xk ]

function φ (x) = 112 |x |3 is a continuous function known as a

radial (nodal) basis function (Jackson 1989)

Page 32: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

NCS for bivariate data

Interpolation model

Consider a NCS given by

f (x) = c + ax +k

j=1

wjφj (x) , j = 1, 2, . . . k ,

where

xj are the knots, φj (x) = φ(

x−xj)

= 112

∣x − xj∣

3 with theconstraints

∑kj=1 wj =

∑kj=1 wjxj = 0, f ′′ and f ′′′ are both

zero outside the interval [x1, xk ]

function φ (x) = 112 |x |3 is a continuous function known as a

radial (nodal) basis function (Jackson 1989)

Page 33: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

NCS for bivariate data

Interpolation model

Consider a NCS given by

f (x) = c + ax +k

j=1

wjφj (x) , j = 1, 2, . . . k ,

where

xj are the knots, φj (x) = φ(

x−xj)

= 112

∣x − xj∣

3 with theconstraints

∑kj=1 wj =

∑kj=1 wjxj = 0, f ′′ and f ′′′ are both

zero outside the interval [x1, xk ]

function φ (x) = 112 |x |3 is a continuous function known as a

radial (nodal) basis function (Jackson 1989)

Page 34: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

NCS for bivariate data

Interpolation model

Let (S)ij = φj(xi) = φ(xi − xj) = 112

∣xi − xj∣

3,w = (w1, . . . wk )T

constraint (1k , x)T w = 0

NCS interpolation to the data(

xj , yj)

y00

=

S 1k x1T

k 0 0xT 0 0

wca

, (1)

where xk×1 = (x1, . . . xk )T and yk×1=(y1, y2, . . . yk )T

Page 35: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

NCS for bivariate data

Interpolation model

Let (S)ij = φj(xi) = φ(xi − xj) = 112

∣xi − xj∣

3,w = (w1, . . . wk )T

constraint (1k , x)T w = 0

NCS interpolation to the data(

xj , yj)

y00

=

S 1k x1T

k 0 0xT 0 0

wca

, (1)

where xk×1 = (x1, . . . xk )T and yk×1=(y1, y2, . . . yk )T

Page 36: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

NCS for bivariate data

Interpolation model

Let (S)ij = φj(xi) = φ(xi − xj) = 112

∣xi − xj∣

3,w = (w1, . . . wk )T

constraint (1k , x)T w = 0

NCS interpolation to the data(

xj , yj)

y00

=

S 1k x1T

k 0 0xT 0 0

wca

, (1)

where xk×1 = (x1, . . . xk )T and yk×1=(y1, y2, . . . yk )T

Page 37: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

NCS for bivariate data

Interpolation model

Let (S)ij = φj(xi) = φ(xi − xj) = 112

∣xi − xj∣

3,w = (w1, . . . wk )T

constraint (1k , x)T w = 0

NCS interpolation to the data(

xj , yj)

y00

=

S 1k x1T

k 0 0xT 0 0

wca

, (1)

where xk×1 = (x1, . . . xk )T and yk×1=(y1, y2, . . . yk )T

Page 38: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

NCS for bivariate data

Interpolation model

Let matrix L be defined as

L =

S 1k x1T

k 0 0xT 0 0

inverse of L is equal to

L−1=

(

L11k×k L12

k×2L21

2×k L222×2

)

Page 39: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

NCS for bivariate data

Interpolation model

Let matrix L be defined as

L =

S 1k x1T

k 0 0xT 0 0

inverse of L is equal to

L−1=

(

L11k×k L12

k×2L21

2×k L222×2

)

Page 40: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

NCS for bivariate data

Interpolation model

bending energy matrix – k × k matrix Be = L11

constrains of this matrix 1Tk Be = 0, xT Be = 0, so the rank

of the Be is k − 2

w = Bey

(c, a)T = L21y

J (f ) = wT Sw = yT Bey

Page 41: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

NCS for bivariate data

Interpolation model

bending energy matrix – k × k matrix Be = L11

constrains of this matrix 1Tk Be = 0, xT Be = 0, so the rank

of the Be is k − 2

w = Bey

(c, a)T = L21y

J (f ) = wT Sw = yT Bey

Page 42: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

NCS for bivariate data

Interpolation model

bending energy matrix – k × k matrix Be = L11

constrains of this matrix 1Tk Be = 0, xT Be = 0, so the rank

of the Be is k − 2

w = Bey

(c, a)T = L21y

J (f ) = wT Sw = yT Bey

Page 43: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

NCS for bivariate data

Interpolation model

bending energy matrix – k × k matrix Be = L11

constrains of this matrix 1Tk Be = 0, xT Be = 0, so the rank

of the Be is k − 2

w = Bey

(c, a)T = L21y

J (f ) = wT Sw = yT Bey

Page 44: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

NCS for bivariate data

Interpolation model

bending energy matrix – k × k matrix Be = L11

constrains of this matrix 1Tk Be = 0, xT Be = 0, so the rank

of the Be is k − 2

w = Bey

(c, a)T = L21y

J (f ) = wT Sw = yT Bey

Page 45: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

NCS for bivariate data

Data pre-processing

SVD of Xc = ΓΛΓT =

∑2j=1 λjγjγ

Tj , Xc = X − 1kxT (Mardia

et al. 2000) [principal component analysis ]

the 1th principal component of X is equal to z1 = Xcγ1,where γ1 is the 1th column of Γ, and z1j , j = 1, 2, ...k areprincipal component scores of j th landmark (z1j is j thelement of k-vector z1)

re-ordering of the rows of X is done based on the ranks ofz1j in z1

Page 46: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

NCS for bivariate data

Data pre-processing

SVD of Xc = ΓΛΓT =

∑2j=1 λjγjγ

Tj , Xc = X − 1kxT (Mardia

et al. 2000) [principal component analysis ]

the 1th principal component of X is equal to z1 = Xcγ1,where γ1 is the 1th column of Γ, and z1j , j = 1, 2, ...k areprincipal component scores of j th landmark (z1j is j thelement of k-vector z1)

re-ordering of the rows of X is done based on the ranks ofz1j in z1

Page 47: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

NCS for bivariate data

Data pre-processing

SVD of Xc = ΓΛΓT =

∑2j=1 λjγjγ

Tj , Xc = X − 1kxT (Mardia

et al. 2000) [principal component analysis ]

the 1th principal component of X is equal to z1 = Xcγ1,where γ1 is the 1th column of Γ, and z1j , j = 1, 2, ...k areprincipal component scores of j th landmark (z1j is j thelement of k-vector z1)

re-ordering of the rows of X is done based on the ranks ofz1j in z1

Page 48: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

NCS for bivariate data

Data pre-processing

SVD of Ddc (Gower 1966) [principal coordinate analysis ]

D1 is k × k matrix of squared interlandmark Euklideandistances, D2 = −1

2D1 and

Ddc = D2 −1k

1k1Tk D2 −

1k

D21k1Tk +

1k2 1k1T

k D21k1Tk

doubly centered (both row- and column-centered)

Page 49: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

NCS for bivariate data

Data pre-processing

SVD of Ddc (Gower 1966) [principal coordinate analysis ]

D1 is k × k matrix of squared interlandmark Euklideandistances, D2 = −1

2D1 and

Ddc = D2 −1k

1k1Tk D2 −

1k

D21k1Tk +

1k2 1k1T

k D21k1Tk

doubly centered (both row- and column-centered)

Page 50: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

NCS for bivariate data

Data pre-processing

SVD of Ddc (Gower 1966) [principal coordinate analysis ]

D1 is k × k matrix of squared interlandmark Euklideandistances, D2 = −1

2D1 and

Ddc = D2 −1k

1k1Tk D2 −

1k

D21k1Tk +

1k2 1k1T

k D21k1Tk

doubly centered (both row- and column-centered)

Page 51: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

NCS for bivariate data

Modified interpolation model

chordal distance d (j)ch of the rows j − 1 and j of (x, y),

j = 2, 3, ...k

cumulative chordal distance d (j)cch =

∑ji=2 d (i)

ch ,j = 2, 3, ...k

d (j)cch = dj , j = 1, 2, ...k , dcch = (d1, d2, ...dk )T , d1 = 0

NCS of x on dcch

NCS of y on dcch

Page 52: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

NCS for bivariate data

Modified interpolation model

chordal distance d (j)ch of the rows j − 1 and j of (x, y),

j = 2, 3, ...k

cumulative chordal distance d (j)cch =

∑ji=2 d (i)

ch ,j = 2, 3, ...k

d (j)cch = dj , j = 1, 2, ...k , dcch = (d1, d2, ...dk )T , d1 = 0

NCS of x on dcch

NCS of y on dcch

Page 53: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

NCS for bivariate data

Modified interpolation model

chordal distance d (j)ch of the rows j − 1 and j of (x, y),

j = 2, 3, ...k

cumulative chordal distance d (j)cch =

∑ji=2 d (i)

ch ,j = 2, 3, ...k

d (j)cch = dj , j = 1, 2, ...k , dcch = (d1, d2, ...dk )T , d1 = 0

NCS of x on dcch

NCS of y on dcch

Page 54: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

NCS for bivariate data

Modified interpolation model

chordal distance d (j)ch of the rows j − 1 and j of (x, y),

j = 2, 3, ...k

cumulative chordal distance d (j)cch =

∑ji=2 d (i)

ch ,j = 2, 3, ...k

d (j)cch = dj , j = 1, 2, ...k , dcch = (d1, d2, ...dk )T , d1 = 0

NCS of x on dcch

NCS of y on dcch

Page 55: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

NCS for bivariate data

Modified interpolation model

chordal distance d (j)ch of the rows j − 1 and j of (x, y),

j = 2, 3, ...k

cumulative chordal distance d (j)cch =

∑ji=2 d (i)

ch ,j = 2, 3, ...k

d (j)cch = dj , j = 1, 2, ...k , dcch = (d1, d2, ...dk )T , d1 = 0

NCS of x on dcch

NCS of y on dcch

Page 56: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

NCS for bivariate data

Data

For the purpose of re-sampling

21 digitized semilandmarks on the symphisisXP,2 = (xP,21, xP,22), dcch,2 (subject No.2)

NCS of y = xP,21 on x = dcch,2

NCS of y = xP,22 on x = dcch,2

Page 57: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

NCS for bivariate data

Data

For the purpose of re-sampling

21 digitized semilandmarks on the symphisisXP,2 = (xP,21, xP,22), dcch,2 (subject No.2)

NCS of y = xP,21 on x = dcch,2

NCS of y = xP,22 on x = dcch,2

Page 58: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

NCS for bivariate data

Data

For the purpose of re-sampling

21 digitized semilandmarks on the symphisisXP,2 = (xP,21, xP,22), dcch,2 (subject No.2)

NCS of y = xP,21 on x = dcch,2

NCS of y = xP,22 on x = dcch,2

Page 59: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

NCS for bivariate data

Data

−0.3 −0.2 −0.1 0.0 0.1 0.2

−0.

2−

0.1

0.0

0.1

0.2

subject Nr.1Procrustes shape coordinates, symphisis

−0.3 −0.2 −0.1 0.0 0.1 0.2

−0.

2−

0.1

0.0

0.1

0.2

subject Nr.1Procrustes shape coordinates, symphisis

−0.3 −0.2 −0.1 0.0 0.1 0.2

−0.

2−

0.1

0.0

0.1

0.2

subject Nr.1Procrustes shape coordinates, symphisis

Page 60: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

Outline

1 IntroductionNotation and problems

2 Cubic splinesExample 1 – shape dataNCS for bivariate data

3 TPS for shape dataTPS for shape dataTPS relaxation along curves

4 Acknowledgement

Page 61: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

TPS for shape data

Penalized LRM

Penalized linear regression model (LRM)

y j = f(

x j)

+ εj , j = 1, 2, . . . k ,

where x j , y j ∈ R2, f = (f1, f2) ∈ D(2) (the class of

twice-differentiable, absolutely continuous functions f withsquare integrable second derivative (Wahba 1990)),fm:R2 → R, m = 1, 2

penalized sum of squares

Spen (f) =k

j=1

∥y j − f(x j)∥

2+ λJ (f)

Page 62: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

TPS for shape data

Penalized LRM

Penalized linear regression model (LRM)

y j = f(

x j)

+ εj , j = 1, 2, . . . k ,

where x j , y j ∈ R2, f = (f1, f2) ∈ D(2) (the class of

twice-differentiable, absolutely continuous functions f withsquare integrable second derivative (Wahba 1990)),fm:R2 → R, m = 1, 2

penalized sum of squares

Spen (f) =k

j=1

∥y j − f(x j)∥

2+ λJ (f)

Page 63: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

TPS for shape data

Penalized LRM

Penalized linear regression model (LRM)

y j = f(

x j)

+ εj , j = 1, 2, . . . k ,

where x j , y j ∈ R2, f = (f1, f2) ∈ D(2) (the class of

twice-differentiable, absolutely continuous functions f withsquare integrable second derivative (Wahba 1990)),fm:R2 → R, m = 1, 2

penalized sum of squares

Spen (f) =k

j=1

∥y j − f(x j)∥

2+ λJ (f)

Page 64: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

TPS for shape data

Penalized LRM

penalty

J (f) =2

m=1

∫ ∫

R2

i,j

(

∂2fm∂x (i)∂x (j)

)2

dx (1)dx (2)

penalized least square estimator f is defined to be theminimizer of the functional Spen (f) over the class D(2) of fs,where

f = arg minf∈D(2)

Spen (f)

Page 65: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

TPS for shape data

Penalized LRM

penalty

J (f) =2

m=1

∫ ∫

R2

i,j

(

∂2fm∂x (i)∂x (j)

)2

dx (1)dx (2)

penalized least square estimator f is defined to be theminimizer of the functional Spen (f) over the class D(2) of fs,where

f = arg minf∈D(2)

Spen (f)

Page 66: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

TPS for shape data

Interpolation model

Consider a TPS given by

fm (x) = cm + aTmx+

k∑

j=1

wjmφj (x)

f (x) = c + AT x + WT s (x) ,

where

c = (c1, c2)T , A =(a1, a2), wm = (w1m, w2m, . . . wkm)T ,

m = 1, 2, W = (w1, w2), s (x)k×1 = [φ1 (x) , . . . φk (x)]T

function φ (x) = ‖x‖22 log

(

‖x‖22

)

is a continuous function

known as a radial (nodal) basis function (Jackson 1989)

Page 67: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

TPS for shape data

Interpolation model

Consider a TPS given by

fm (x) = cm + aTmx+

k∑

j=1

wjmφj (x)

f (x) = c + AT x + WT s (x) ,

where

c = (c1, c2)T , A =(a1, a2), wm = (w1m, w2m, . . . wkm)T ,

m = 1, 2, W = (w1, w2), s (x)k×1 = [φ1 (x) , . . . φk (x)]T

function φ (x) = ‖x‖22 log

(

‖x‖22

)

is a continuous function

known as a radial (nodal) basis function (Jackson 1989)

Page 68: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

TPS for shape data

Interpolation model

Consider a TPS given by

fm (x) = cm + aTmx+

k∑

j=1

wjmφj (x)

f (x) = c + AT x + WT s (x) ,

where

c = (c1, c2)T , A =(a1, a2), wm = (w1m, w2m, . . . wkm)T ,

m = 1, 2, W = (w1, w2), s (x)k×1 = [φ1 (x) , . . . φk (x)]T

function φ (x) = ‖x‖22 log

(

‖x‖22

)

is a continuous function

known as a radial (nodal) basis function (Jackson 1989)

Page 69: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

TPS for shape data

Interpolation model

(S)ij = φj (x i) = φ(

x i−x j)

, i , j = 1, 2, ...k , ∀ ‖x‖2 > 0

constraint(

1k...X

)T

W = 0

TPS interpolation to the data(

x j , y j)

Y00

=

S 1k X1T

k 0 0XT 0 0

WcT

A

, (2)

where Yk×2 = (y1, . . . yk )T and Xk×2 = (x1, . . . xk )T

Page 70: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

TPS for shape data

Interpolation model

(S)ij = φj (x i) = φ(

x i−x j)

, i , j = 1, 2, ...k , ∀ ‖x‖2 > 0

constraint(

1k...X

)T

W = 0

TPS interpolation to the data(

x j , y j)

Y00

=

S 1k X1T

k 0 0XT 0 0

WcT

A

, (2)

where Yk×2 = (y1, . . . yk )T and Xk×2 = (x1, . . . xk )T

Page 71: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

TPS for shape data

Interpolation model

(S)ij = φj (x i) = φ(

x i−x j)

, i , j = 1, 2, ...k , ∀ ‖x‖2 > 0

constraint(

1k...X

)T

W = 0

TPS interpolation to the data(

x j , y j)

Y00

=

S 1k X1T

k 0 0XT 0 0

WcT

A

, (2)

where Yk×2 = (y1, . . . yk )T and Xk×2 = (x1, . . . xk )T

Page 72: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

TPS for shape data

Interpolation model

(S)ij = φj (x i) = φ(

x i−x j)

, i , j = 1, 2, ...k , ∀ ‖x‖2 > 0

constraint(

1k...X

)T

W = 0

TPS interpolation to the data(

x j , y j)

Y00

=

S 1k X1T

k 0 0XT 0 0

WcT

A

, (2)

where Yk×2 = (y1, . . . yk )T and Xk×2 = (x1, . . . xk )T

Page 73: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

TPS for shape data

Interpolation model

Let matrix L be defined as

L =

S 1k X1T

k 0 0XT 0 0

inverse of L is equal to

L−1=

(

L11k×k L12

k×3L21

3×k L223×3

)

Page 74: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

TPS for shape data

Interpolation model

Let matrix L be defined as

L =

S 1k X1T

k 0 0XT 0 0

inverse of L is equal to

L−1=

(

L11k×k L12

k×3L21

3×k L223×3

)

Page 75: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

TPS for shape data

Interpolation model

bending energy matrix – k × k matrix Be = L11

constrains of this matrix 1Tk Be = 0, XT Be = 0, so the rank

of the Be is k − 2

W = BeY(

c, AT)T

= L21Y

J (f) = tr(WT SW) = tr(YT BeY)

Page 76: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

TPS for shape data

Interpolation model

bending energy matrix – k × k matrix Be = L11

constrains of this matrix 1Tk Be = 0, XT Be = 0, so the rank

of the Be is k − 2

W = BeY(

c, AT)T

= L21Y

J (f) = tr(WT SW) = tr(YT BeY)

Page 77: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

TPS for shape data

Interpolation model

bending energy matrix – k × k matrix Be = L11

constrains of this matrix 1Tk Be = 0, XT Be = 0, so the rank

of the Be is k − 2

W = BeY(

c, AT)T

= L21Y

J (f) = tr(WT SW) = tr(YT BeY)

Page 78: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

TPS for shape data

Interpolation model

bending energy matrix – k × k matrix Be = L11

constrains of this matrix 1Tk Be = 0, XT Be = 0, so the rank

of the Be is k − 2

W = BeY(

c, AT)T

= L21Y

J (f) = tr(WT SW) = tr(YT BeY)

Page 79: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

TPS for shape data

Interpolation model

bending energy matrix – k × k matrix Be = L11

constrains of this matrix 1Tk Be = 0, XT Be = 0, so the rank

of the Be is k − 2

W = BeY(

c, AT)T

= L21Y

J (f) = tr(WT SW) = tr(YT BeY)

Page 80: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

TPS relaxation along curves

Data

−1 0 1 2 3 4 5

−1

01

23

45

−6 −4 −2 0 2 4

−4

−2

02

46

−1 0 1 2 3 4 5

−1

01

23

45

−6 −4 −2 0 2 4

−4

−2

02

46

−1 0 1 2 3 4 5

−1

01

23

45

−6 −4 −2 0 2 4

−4

−2

02

46

Page 81: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

TPS relaxation along curves

Data

For the purpose of relaxation

21 digitized semilandmarks on the symphisis from subjectNo.2

its Procrustes shape coordinates Y = XP,2 were relaxedonto Procrustes shape coordinates X = XP,1 of subjectNo.1, seeking the configuration Yr

Page 82: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

TPS relaxation along curves

Data

For the purpose of relaxation

21 digitized semilandmarks on the symphisis from subjectNo.2

its Procrustes shape coordinates Y = XP,2 were relaxedonto Procrustes shape coordinates X = XP,1 of subjectNo.1, seeking the configuration Yr

Page 83: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

TPS relaxation along curves

Data

Page 84: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

TPS relaxation along curves

TPS relaxation along curves

Let Yk×2 = (y1, . . . yk )T be configuration matrix with the

rows y j=(

y (1)j , y (2)

j

)T

y(r)j is free to slid away from their old position y j along the

tangent directions u j =(

u(1)j , u(2)

j

)Twith ‖u‖2 = 1

new position y (r)j = y j + tju j

tangent directions u j =y j+1−y j−1

‖y j+1−y j−1‖2

U is a matrix of 2k rows and k columns in which the (j , j)thentry is u(1)

j and (k + j , j)th entry is u(2)j , otherwise zeros

Page 85: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

TPS relaxation along curves

TPS relaxation along curves

Let Yk×2 = (y1, . . . yk )T be configuration matrix with the

rows y j=(

y (1)j , y (2)

j

)T

y(r)j is free to slid away from their old position y j along the

tangent directions u j =(

u(1)j , u(2)

j

)Twith ‖u‖2 = 1

new position y (r)j = y j + tju j

tangent directions u j =y j+1−y j−1

‖y j+1−y j−1‖2

U is a matrix of 2k rows and k columns in which the (j , j)thentry is u(1)

j and (k + j , j)th entry is u(2)j , otherwise zeros

Page 86: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

TPS relaxation along curves

TPS relaxation along curves

Let Yk×2 = (y1, . . . yk )T be configuration matrix with the

rows y j=(

y (1)j , y (2)

j

)T

y(r)j is free to slid away from their old position y j along the

tangent directions u j =(

u(1)j , u(2)

j

)Twith ‖u‖2 = 1

new position y (r)j = y j + tju j

tangent directions u j =y j+1−y j−1

‖y j+1−y j−1‖2

U is a matrix of 2k rows and k columns in which the (j , j)thentry is u(1)

j and (k + j , j)th entry is u(2)j , otherwise zeros

Page 87: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

TPS relaxation along curves

TPS relaxation along curves

Let Yk×2 = (y1, . . . yk )T be configuration matrix with the

rows y j=(

y (1)j , y (2)

j

)T

y(r)j is free to slid away from their old position y j along the

tangent directions u j =(

u(1)j , u(2)

j

)Twith ‖u‖2 = 1

new position y (r)j = y j + tju j

tangent directions u j =y j+1−y j−1

‖y j+1−y j−1‖2

U is a matrix of 2k rows and k columns in which the (j , j)thentry is u(1)

j and (k + j , j)th entry is u(2)j , otherwise zeros

Page 88: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

TPS relaxation along curves

TPS relaxation along curves

Let Yk×2 = (y1, . . . yk )T be configuration matrix with the

rows y j=(

y (1)j , y (2)

j

)T

y(r)j is free to slid away from their old position y j along the

tangent directions u j =(

u(1)j , u(2)

j

)Twith ‖u‖2 = 1

new position y (r)j = y j + tju j

tangent directions u j =y j+1−y j−1

‖y j+1−y j−1‖2

U is a matrix of 2k rows and k columns in which the (j , j)thentry is u(1)

j and (k + j , j)th entry is u(2)j , otherwise zeros

Page 89: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

TPS relaxation along curves

TPS relaxation along curves

yr = Vec(Yr ), B = diag(Be, Be), Be depends only on someconfiguration X

yr = y + Ut

the task is now to minimize the form

yTr By r = (y + Ut)T B (y + Ut)

setting the gradient of this expression to zerostraightforwardly generates the solution (Bookstein 1997)

t = −(

UT BU)−1

UT By

Page 90: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

TPS relaxation along curves

TPS relaxation along curves

yr = Vec(Yr ), B = diag(Be, Be), Be depends only on someconfiguration X

yr = y + Ut

the task is now to minimize the form

yTr By r = (y + Ut)T B (y + Ut)

setting the gradient of this expression to zerostraightforwardly generates the solution (Bookstein 1997)

t = −(

UT BU)−1

UT By

Page 91: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

TPS relaxation along curves

TPS relaxation along curves

yr = Vec(Yr ), B = diag(Be, Be), Be depends only on someconfiguration X

yr = y + Ut

the task is now to minimize the form

yTr By r = (y + Ut)T B (y + Ut)

setting the gradient of this expression to zerostraightforwardly generates the solution (Bookstein 1997)

t = −(

UT BU)−1

UT By

Page 92: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

TPS relaxation along curves

TPS relaxation along curves

yr = Vec(Yr ), B = diag(Be, Be), Be depends only on someconfiguration X

yr = y + Ut

the task is now to minimize the form

yTr By r = (y + Ut)T B (y + Ut)

setting the gradient of this expression to zerostraightforwardly generates the solution (Bookstein 1997)

t = −(

UT BU)−1

UT By

Page 93: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

TPS relaxation along curves

Data

Page 94: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

TPS relaxation along curves

Data

Page 95: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

TPS relaxation along curves

TPS relaxation along curves

Let the curve defined by y j be interpolated by cubic splineor B-spline f (De Boor (1972) or Eilers & Marx (1996)),y j = (y (1)

j , y (2)j )T ∈ f , j = 1, 2, . . . k

re-sampled points y i = (y (1)i , y (2)

i )T ∈ f , i = 1, 2, . . . M(M = 500) and M = {y1, y2, ...yM}

suppose that y(s)j = (y (1)

sj , y (2)sj )T ∈ f (the rows of Ys) are

free to slid away from their old position y j along the curve f

Page 96: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

TPS relaxation along curves

TPS relaxation along curves

Let the curve defined by y j be interpolated by cubic splineor B-spline f (De Boor (1972) or Eilers & Marx (1996)),y j = (y (1)

j , y (2)j )T ∈ f , j = 1, 2, . . . k

re-sampled points y i = (y (1)i , y (2)

i )T ∈ f , i = 1, 2, . . . M(M = 500) and M = {y1, y2, ...yM}

suppose that y(s)j = (y (1)

sj , y (2)sj )T ∈ f (the rows of Ys) are

free to slid away from their old position y j along the curve f

Page 97: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

TPS relaxation along curves

TPS relaxation along curves

Let the curve defined by y j be interpolated by cubic splineor B-spline f (De Boor (1972) or Eilers & Marx (1996)),y j = (y (1)

j , y (2)j )T ∈ f , j = 1, 2, . . . k

re-sampled points y i = (y (1)i , y (2)

i )T ∈ f , i = 1, 2, . . . M(M = 500) and M = {y1, y2, ...yM}

suppose that y(s)j = (y (1)

sj , y (2)sj )T ∈ f (the rows of Ys) are

free to slid away from their old position y j along the curve f

Page 98: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

TPS relaxation along curves

TPS relaxation along curves

J(ys) = yTs By s, has to be minimized and yr is obtained as

a minimizer of J(ys) given by

yr = arg minys

J(ys) (3)

the minimization starts with substitution of y1 by y i ∈ M, ...and ends with substitution of yk by y i ∈ M, wherey j , j = 1, 2, . . . k , are the rows of Y and i = 1, 2, . . . M:

y(r)j =

(

arg minys

J (ys)

)

j,k+j, (4)

where (j , k + j)th entry of ys is substituted by y(s)i ∈ M for

j = 1, 2, . . . k ; i = 1, 2, . . . M, yr = Vec(Yr ) and y(r)j are the

rows of Yr

Page 99: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

TPS relaxation along curves

TPS relaxation along curves

J(ys) = yTs By s, has to be minimized and yr is obtained as

a minimizer of J(ys) given by

yr = arg minys

J(ys) (3)

the minimization starts with substitution of y1 by y i ∈ M, ...and ends with substitution of yk by y i ∈ M, wherey j , j = 1, 2, . . . k , are the rows of Y and i = 1, 2, . . . M:

y(r)j =

(

arg minys

J (ys)

)

j,k+j, (4)

where (j , k + j)th entry of ys is substituted by y(s)i ∈ M for

j = 1, 2, . . . k ; i = 1, 2, . . . M, yr = Vec(Yr ) and y(r)j are the

rows of Yr

Page 100: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

TPS relaxation along curves

Data

Page 101: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

TPS relaxation along curves

Data

0 100 200 300 400 500

05

1015

2025

landmark 4 resampled 500 timesposition on the curve

TB

E

0 100 200 300 400 500

05

1015

2025

landmark 7 resampled 500 timesposition on the curve

TB

E

0 100 200 300 400 500

05

1015

2025

landmark 15 resampled 500 timesposition on the curve

TB

E

Page 102: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

TPS relaxation along curves

Results of form-space PCA

PC1 minus

PC1 plus

PC2 up

PC2 down

Page 103: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

TPS relaxation along curves

Results of form-space PCA

Page 104: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

Outline

1 IntroductionNotation and problems

2 Cubic splinesExample 1 – shape dataNCS for bivariate data

3 TPS for shape dataTPS for shape dataTPS relaxation along curves

4 Acknowledgement

Page 105: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

Acknowledgement

Supported by MRTN-CT-2005-019564 (EVAN) to GerhardWeber , 1/3023/06 (VEGA) to Franti sek Stulajter ,1/0077/09 (VEGA) to Andrej P azman

For data acquisition and pre-processing I thank MichaelCoquerelle

Fred L Bookstein – University of Vienna, Vienna, Austriaand University of Washington, Seattle, US

Jean-Francois Mangin – Neurospin, Institut d’ImagerieBioMedicale Commissariat a l’Energie Atomique, Gif surYvette, France

Paul O’Higgins – Hull/York Medical School, University ofYork, York, UK

Page 106: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

Acknowledgement

Supported by MRTN-CT-2005-019564 (EVAN) to GerhardWeber , 1/3023/06 (VEGA) to Franti sek Stulajter ,1/0077/09 (VEGA) to Andrej P azman

For data acquisition and pre-processing I thank MichaelCoquerelle

Fred L Bookstein – University of Vienna, Vienna, Austriaand University of Washington, Seattle, US

Jean-Francois Mangin – Neurospin, Institut d’ImagerieBioMedicale Commissariat a l’Energie Atomique, Gif surYvette, France

Paul O’Higgins – Hull/York Medical School, University ofYork, York, UK

Page 107: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

Acknowledgement

Supported by MRTN-CT-2005-019564 (EVAN) to GerhardWeber , 1/3023/06 (VEGA) to Franti sek Stulajter ,1/0077/09 (VEGA) to Andrej P azman

For data acquisition and pre-processing I thank MichaelCoquerelle

Fred L Bookstein – University of Vienna, Vienna, Austriaand University of Washington, Seattle, US

Jean-Francois Mangin – Neurospin, Institut d’ImagerieBioMedicale Commissariat a l’Energie Atomique, Gif surYvette, France

Paul O’Higgins – Hull/York Medical School, University ofYork, York, UK

Page 108: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

Acknowledgement

Supported by MRTN-CT-2005-019564 (EVAN) to GerhardWeber , 1/3023/06 (VEGA) to Franti sek Stulajter ,1/0077/09 (VEGA) to Andrej P azman

For data acquisition and pre-processing I thank MichaelCoquerelle

Fred L Bookstein – University of Vienna, Vienna, Austriaand University of Washington, Seattle, US

Jean-Francois Mangin – Neurospin, Institut d’ImagerieBioMedicale Commissariat a l’Energie Atomique, Gif surYvette, France

Paul O’Higgins – Hull/York Medical School, University ofYork, York, UK

Page 109: Shape Analysis in R - r-  · PDF fileShape Analysis in R ...   ild/shapes ... Introduction Cubic splines TPS for shape data Acknowledgement Notation and problems

Introduction Cubic splines TPS for shape data Acknowledgement

Acknowledgement

Supported by MRTN-CT-2005-019564 (EVAN) to GerhardWeber , 1/3023/06 (VEGA) to Franti sek Stulajter ,1/0077/09 (VEGA) to Andrej P azman

For data acquisition and pre-processing I thank MichaelCoquerelle

Fred L Bookstein – University of Vienna, Vienna, Austriaand University of Washington, Seattle, US

Jean-Francois Mangin – Neurospin, Institut d’ImagerieBioMedicale Commissariat a l’Energie Atomique, Gif surYvette, France

Paul O’Higgins – Hull/York Medical School, University ofYork, York, UK