Published online by Cambridge University Press: 23 November 2009
MORE ON THIN-PLATE SPLINES
A Fortran listing
The following code executes the thin-plate spline interpolation introduced in Section 2.2. The calling program first calls TPSOLV with arguments as follows:
IDIM – number of dimensions of the data: 1, 2, or 3
NPTS (passed in common /FORMS/) – number of landmarks
POINTS (passed in common /FORMS/) – Cartesian coordinates of the landmarks. First subscript is Cartesian coordinate, second landmark number, third the form (1 or 2). Here, dimensioned to a maximum count of 50.
The subroutine returns the coefficients wt and a1. ax,ayin entries TPCOEF (1 … NPTS) and TPCOEF (NPTS + 1 … NPTS + 3), separately for each coordinate of the data. The net integral bending energy is also returned in the value SCORE.
The subroutine TPSOLV is essentially a setup and loop over calls to a linear equation solver. That incorporated here is from the package LINPACK; one may substitute other matrix inversion routines as convenient.
Once the coefficients TPCOEF have been computed, the effect of the spline mapping on any point PT of the starting image is computed by calling TPEVAL with arguments IDIM and TPCOEF copied from TPSOLV and input point PT as shown. The image of the argument point is returned in EVAL.
Differential constraints and relaxation
The material in this section previously appeared in Bookstein (1989a). The landmarks of the scene analyzed in Figure 7.5.1 were extracted from the pair of simulated edge images (actually, doodles on a desk pad) shown in Figure A.1.1. (The width of the X's at each digitized point is presumed to encode the uncertainty of edge location.)
To save this book to your Kindle, first ensure no-reply@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.
Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.
Find out more about the Kindle Personal Document Service.
To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.
To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.