returns a 4x4 (3x3 in 2D case) transformation matrix or an object of class "tpsCoeff" in case of type="tps".
Arguments
x
fix landmarks. Can be a k x m matrix or mesh3d.
y
moving landmarks. Can be a k x m matrix or mesh3d.
type
set type of affine transformation: options are "rigid", "similarity" (rigid + scale) and "affine",
reflection
logical: if TRUE "rigid" and "similarity" allow reflections.
lambda
numeric: regularisation parameter of the TPS.
weights
vector of length k, containing weights for each landmark (only used in type="rigid" or "similarity").
centerweight
logical or vector of weights: if weights are defined and
centerweigths=TRUE, the matrix will be centered according to these weights instead of the
barycenter. If centerweight is a vector of length nrow(x), the barycenter will be weighted accordingly.
threads
number of threads to use in TPS interpolation.
Details
x and y can also be a pair of meshes with corresponding vertices.