Learn R Programming

shapes (version 1.0-2)

tpsgrid: Thin-plate spline transformation grids

Description

Thin-plate spline transformation grids from one planar object to another. A square grid on the first object is deformed smoothly using a pair of thin-plate splines to a curved grid on the second object.

Usage

tpsgrid(TT, YY, xbegin, ybegin, xwidth, opt, ext, ngrid)

Arguments

TT
First object (source): (k x 2 matrix)
YY
Second object (target): (k x 2 matrix)
xbegin
lowest x value for plot
ybegin
lowest y value for plot
xwidth
width of plot
opt
Option 1: (just deformed grid on YY is displayed), option 2: both grids are displayed
ext
Amount that grid extends over object.
ngrid
Number of grid points: size is ngrid * (ngrid -1)

Value

  • No returned value

Details

Note - only for $m=2$ planar objects

References

Bookstein, F.L. (1989). Principal warps: thin-plate splines and the decomposition of deformations, IEEE Transactions on Pattern Analysis and Machine Intelligence, 11, 567--585.

Dryden, I.L. and Mardia, K.V. (1998) Statistical Shape Analysis. Wiley, Chichester. Chapter 10.

See Also

procGPA

Examples

Run this code
data(gorf.dat)
data(gorm.dat)

#TPS grid with shape change exaggerated (2x)
gorf<-procGPA(gorf.dat)
gorm<-procGPA(gorm.dat)
mag<-2
TT<-gorf$mshape
YY<-gorm$mshape
par(mfrow=c(1,2))
YY<-TT+(YY-TT)*mag
tpsgrid(TT,YY,-0.6,-0.6,1.2,2,0.1,22) 
title("TPS grid: Female mean (left) to Male mean (right)")

Run the code above in your browser using DataLab