Creates a penalty matrix for use by
laplacian(size, compose) laplacian(size = 16, compose = FALSE)
dimension of the image is
size x size; default is 16.
compose=FALSE, which means the
penalty is returned as an eigen-decomposition. If
compose=TRUE, a penalty matrix is returned.
compose=FALSE, an eigen-decomposition object is
vectors component is a
size^2 x size^2
orthogonal matrix, and the
$values component is a
vector of non-negative eigen-values. If
compose=TRUE, these are
multiplied together to form a single matrix.
Formulas are used to construct a laplacian for smoothing a square image.
Here we follow very closely the material on page 635 in JASA 1991 of O'Sullivan's article on discretized Laplacian Smoothing