# Thin plate spline

Thin plate spline

This is a brief derivation for the closed form solutions for "smoothing Thin Plate Spline". Details about these splines can be found in (Wahba, 1990).

Thin plate splines (TPS) were introduced to geometric design by Duchon (Duchon, 1976). The name "thin plate spline" refers to a physical analogy involving the bending of a thin sheet of metal. In the physical setting, the deflection is in the $z$ direction, orthogonal to the plane. In order to apply this idea to the problem of coordinate transformation, one interprets the lifting of the plate as a displacement of the $x$ or $y$ coordinates within the plane. In 2D cases, given a set of $K$ corresponding points, the TPS warp is described by $2\left(K+3\right)$ parameters which include 6 global affine motion parameters and $2K$ coefficients for correspondences of the control points. These parameters are computed by solving a linear system, in other words, TPS has closed-form solution.

"Smoothing TPS" is a regularized TPS. The model has a parameter $lambda$ to control how non-rigid is allowed for the deformation. When $lambda ightarrow infty$, TPS is equal to an affine transformation, as the roughest model for non-rigid deformation.

Given a set of control points $\left\{w_\left\{i\right\}, i = 1,2, ldots,K\right\}$, a radial basis function basically defines a spatial mapping which maps any location $x$ in space to a new location $f\left(x\right)$, represented by,:$f\left(x\right) = sum_\left\{i = 1\right\}^K c_\left\{i\right\}phi\left(left| x - w_\left\{i\right\} ight|\right)$where $left|cdot ight|$ denotes the usual Euclidean norm and $\left\{c_\left\{i\right\}\right\}$ is a set of mapping coefficients. One possible choice for the kernel function $phi$ is the thin plate spline $phi\left(r\right) = r^2 log r$. It has a more global nature than the Gaussian kernel $phi\left(r\right) = exp\left(-r^2/sigma^2\right)$, which is another common function -- a small perturbation of one of the control points always affects the coefficients corresponding to all the other points as well.

Thin plate spline

moothness measure

One of the simplest smoothness measures is the space integral of the square of the second order derivatives of the mapping function. This leads us to the thin plate spline (TPS). The TPS fits a mapping function $f\left(x\right)$ between corresponding point-sets $\left\{y_i\right\}$ and $\left\{x_i\right\}$ by minimizing the following energy function: :$E = iintleft \left[left\left(frac\left\{partial^2 f\right\}\left\{partial x^2\right\} ight\right)^2 + 2left\left(frac\left\{partial^2 f\right\}\left\{partial xy\right\} ight\right)^2 + left\left(frac\left\{partial^2 f\right\}\left\{partial y^2\right\} ight\right)^2 ight\right] extrm\left\{d\right\} x , extrm\left\{d\right\}y$And for a smoothing TPS, it is:$E_\left\{tps\right\} = sum_\left\{i=1\right\}^K |y_i - f\left(x_i\right) | + lambda iintleft \left[left\left(frac\left\{partial^2 f\right\}\left\{partial x^2\right\} ight\right)^2 + 2left\left(frac\left\{partial^2 f\right\}\left\{partial xy\right\} ight\right)^2 + left\left(frac\left\{partial^2 f\right\}\left\{partial y^2\right\} ight\right)^2 ight\right] extrm\left\{d\right\} x , extrm\left\{d\right\}y$Then smoothing TPS is defined as:$f_\left\{tps\right\} = argmin_f E_\left\{tps\right\}$For this variational problem, it can be shown that there exists a unique minimizer $f$ (Wahba,1990) with a fixed weight parameter $lambda$ which is presented in next section.

pline

Suppose the points are in 2D (D = 2). We use "homogeneous coordinates" for the point-set where a point $y_\left\{i\right\}$ represented as a vector $\left(1, y_\left\{ix\right\}, y_\left\{iy\right\}\right)$. The unique minimizer $f$ is parameterized by $alpha$ which comprises two matrices $d$ and $c$ ($alpha = \left\{d,c\right\}$).:$f_\left\{tps\right\}\left(z, alpha\right) = f_\left\{tps\right\}\left(z, d, c\right) = zcdot d + sum_\left\{i = 1\right\}^K phi\left(| z - x_i|\right)cdot c_i$where d is a $\left(D+1\right) imes\left(D+1\right)$ matrix representing the affine transformation and c is a $K imes\left(D+1\right)$ warping coefficient matrix representing the non-affine deformation. The kernel function $phi\left(|z- x_i|\right)$ is a $1 imes K$ vector for each point $z$, where each entry $phi_i\left(z\right) = |z - x_i|^2 log |z - x_i|$ for 2 dimensions. For the 3 dimension case, $phi_i\left(z\right) = |z - x_i|^3$. Note that for TPS, the control points $\left\{w_i\right\}$ are chosen to be the same as the set of points to be warped $\left\{x_i\right\}$, so we already use $\left\{x_i\right\}$ in the place of the control points.

If we substitute the solution for $f$, $E_\left\{tps\right\}$ becomes::$E_\left\{tps\right\}\left(d,c\right) = |Y - Xd - Phi c|^2 + lambda extrm\left\{trace\right\}\left(c^TPhi c\right)$where $Y$ and $X$ are just concatenated versions of the point coordinates $y_i$ and $x_i$, and $Phi$ is a $\left(K imes K\right)$ matrix formed from the $phi \left(|x_i - x_j|\right)$. Each row of each newly formed matrix comes from one of the original vectors. The matrix $Phi$ represents the TPS kernel. Loosely speaking, the TPS kernel contains the information about the point-set's internal structural relationships. When it is combined with the warping coefficients $c$, a non-rigid warping is generated.

A nice property of the TPS is that it can always be decomposed into a global affine and a local non-affine component. Consequently, the TPS smoothness term is solely dependent on the non-affine components. This is a desirable property, especially when compared to other splines, since the global pose parameters included in the affine transformation are not penalized.

olution

The separation of the affine and non-affine warping space is done through a QR decomposition (Wahba,1990). :where Q1 and Q2 are $K imes \left(D+1\right)$ and $K imes \left(K-D-1\right)$ orthonormal matrices, respectively. The matrix $R$ is upper triangular.With the QR decomposition in place, we have :$E_\left\{tps\right\}\left(gamma,d\right) = |Q_2^T Y - Q_2^TPhi Q_2 gamma|^2 + |Q_1^T Y -Rd - Q_1^TPhi Q_2 gamma|^2 + lambda gamma^T Q_2^T Phi Q_2 gamma$where $gamma$ is a $\left(K-D-1\right) imes \left(D+1\right)$ matrix. Setting $c=Q_2gamma$ (which in turn implies that $X^T c = 0$) enables us to cleanly separate the first term in last third equation into a non-affine term and an affine term (first and second terms last equation respectively).

The least-squares energy function in the last equation can be first minimized w.r.t $gamma$ and then w.r.t. $d$. By applying Tikhonov regularization we have:$hat\left\{c\right\} = Q_2\left(Q_2^TPhi Q_2 + lambda I_\left\{\left(k-D-1\right)\right\}\right)^\left\{-1\right\}Q_2^T Y$:$hat\left\{d\right\} = R^\left\{-1\right\}Q_1^T \left(Y - Phi hat\left\{c\right\}\right)$The minimum value of the TPS energy function obtained at the optimum $\left(hat\left\{c\right\},hat\left\{d\right\}\right)$ is:$E_\left\{bending\right\} = lambda, extrm\left\{trace\right\} \left[Q_2\left(Q_2^TPhi Q_2 + lambda I_\left\{\left(k-D-1\right)\right\}\right)^\left\{-1\right\}Q_2^T Y Y^T\right]$

Application

TPS has been widely used as the non-rigid transformation model in imagealignment and shape matching.

The popularity of TPS comes from a number of advantages: (1) the interpolation is smooth with derivatives of any order; (2) the model has no free parameters that need manual tuning; (3) it has closed-form solutions for both warping and parameter estimation; and (4) there is a physical explanation for its energy function.

References

*Haili Chui: Non-Rigid Point Matching: Algorithms, Extensions and Applications. PhD Thesis, Yale University, May 2001.
*G. Wahba, 1990,Spline models for observational data. Philadelphia: Society for Industrial and Applied Mathematics.
*J. Duchon, 1976, Splines minimizing rotation invariant seminorms in sobolev spaces, constructive theory of functions of several variables. vol 1, pp 85-100

ee also

*Subdivision surface (emerging alternative to spline-based surfaces)
*Spline
*Polyharmonic spline (the thin-plate-spline is a special case of a polyharmonic spline)

* [http://www-cse.ucsd.edu/classes/fa01/cse291/hhyu-presentation.pdf Explanation for a simplified variation problem]
* [http://mathworld.wolfram.com/ThinPlateSpline.html TPS at MathWorld]
* [http://elonen.iki.fi/code/tpsdemo/index.html TPS in C++]
* [http://ricanet.com/new/data/hw/vision/tps1.ppt TPS Powerpoint]

Wikimedia Foundation. 2010.

### Look at other dictionaries:

• Polyharmonic spline — In mathematics, polyharmonic splines are used for function approximation and data interpolation.They are very useful for interpolation of scattered datain many dimensions.Polyharmonic splines are a special case of radial basis functions andare… …   Wikipedia

• TPS — thin plate spline; time to peak shortening; topical skin protectant; treatment planning system; trypsin; tryptase; tumor polysaccharide substance …   Medical dictionary

• TPS — • thin plate spline; • time to peak shortening; • topical skin protectant; • treatment planning system; • trypsin; • tryptase; • tumor polysaccharide substance …   Dictionary of medical acronyms & abbreviations

• Shape context — is the term given by Serge Belongie and Jitendra Malik to the feature descriptor they first proposed in their paper Matching with Shape Contexts in 2000cite conference author = S. Belongie and J. Malik title = Matching with Shape Contexts url =… …   Wikipedia

• Multivariate interpolation — In numerical analysis, multivariate interpolation or spatial interpolation is interpolation on functions of more than one variable. The function to be interpolated is known at given points and the interpolation problem consist of yielding values… …   Wikipedia

• List of numerical analysis topics — This is a list of numerical analysis topics, by Wikipedia page. Contents 1 General 2 Error 3 Elementary and special functions 4 Numerical linear algebra …   Wikipedia

• Radial basis function — A radial basis function (RBF) is a real valued function whose value depends only on the distance from the origin, so that phi(mathbf{x}) = phi(||mathbf{x}||); or alternatively on the distance from some other point c , called a center , so that… …   Wikipedia

• List of mathematics articles (T) — NOTOC T T duality T group T group (mathematics) T integration T norm T norm fuzzy logics T schema T square (fractal) T symmetry T table T theory T.C. Mits T1 space Table of bases Table of Clebsch Gordan coefficients Table of divisors Table of Lie …   Wikipedia

• Falsche Progenie — Klassifikation nach ICD 10 K07.1 Anomalien des Kiefer Schädelbasis Verhältnisses …   Deutsch Wikipedia

• Maxilläre Retrognathie — Klassifikation nach ICD 10 K07.1 Anomalien des Kiefer Schädelbasis Verhältnisses …   Deutsch Wikipedia