Estimate an image warp
warper(Im0, Im1, p0, init, s, imethod = "bicubic", lossfun = "Q",
lossfun.args = list(beta = 0, Cmat = NULL), grlossfun = "defaultQ",
lower, upper, verbose = FALSE, ...)
A list object of class “warped” is returned with components:
Matrices giving the zero- and one-energy images and the deformed one-energy image, resp.
zero- and one-energy control points, resp.
Estimated standard error of the mean difference between the zero-energy and deformed one-energy images.
"warped.locations" "init"
Same as input arguments.
The matrices defining the image warp, L, iL and B, where the last is the bending energy, and the first two are nc + 3 by nc + 3 matrices describing the control points and inverse control-point matrices.
Any arguments passed via ...
The output from nlminb.
The process time.
Numeric matrices giving the zero- and one-energy images. The Im1
image is ultimately warped into the Im0
image.
nc by 2 matrix giving the zero-energy control points.
nc by 2 matrix giving an initial estimate of the one-energy control points.
Two-column matrix giving the full set of locations. Works best if these are integer-valued coordinate indices.
character giving he interpolation method to use. May be one of "round", "bilinear" or "bicubic".
Function giving the loss function over which to optimize the warp. Default is Q
, see args{Q}
to see the required arguments for this function.
A list giving optional arguments to lossfun
.
(optional) function giving the gradient of the loss function given by lossfun
.
(optional) arguments to the nlminb
function which is used to optimize the loss function.
logical, should progress information be printed to the screen?
Optional arguments to nlminb
.
Eric Gilleland
A pair-of-thin-plate-splines image warp is estimated by optimizing a loss function using nlminb. It can be very difficult to get a good estimate. It is suggested, therefore, to obtain good initial estimates for the one-energy control points. The function iwarper
can be useful in this context.
Dryden, I. L. and K. V. Mardia (1998) Statistical Shape Analysis. Wiley, New York, NY, 347pp.
iwarper