The input rasters are first converted to equivalent matrices. If restricted
is set to FALSE (the default), the function computes cross-covariance between
the sub-grid of the first input raster and the entirety of the second input
raster and then uses the location of maximum cross-covariance to estimate
displacement in the vertical and horizontal directions from the centre of the
sub-grid.
If restricted is set to TRUE, the function uses cross-covariance between the
sub-grid of the first input raster and the equivalent sub-grid of the second
input raster to estimate vertical and horizontal displacement.
Reference coordinates and cell size are extracted from the first input raster
such that the locations from whence displacement is estimated as well as
displacement estimates can be expressed in the units of the projected
coordinates.
The coordinates are assumed to increase vertically and horizontally from the
lower left corner of the two-dimensional domain.
Caution is warranted when defining the bounding box because the function can
produce erroneous results when the bounding box is too small.