imcov {spatstat.geom} | R Documentation |
Spatial Covariance of a Pixel Image
Description
Computes the unnormalised spatial covariance function of a pixel image.
Usage
imcov(X, Y=X)
Arguments
X |
A pixel image (object of class |
Y |
Optional. Another pixel image. |
Details
The (uncentred, unnormalised)
spatial covariance function of a pixel image in the plane
is the function
defined for each vector
as
where the integral is
over all spatial locations , and where
denotes the
pixel value at location
.
This command computes a discretised approximation to
the spatial covariance function, using the Fast Fourier Transform.
The return value is
another pixel image (object of class "im"
) whose greyscale values
are values of the spatial covariance function.
If the argument Y
is present, then imcov(X,Y)
computes the set cross-covariance function
defined as
Note that imcov(X,Y)
is equivalent to
convolve.im(X,Y,reflectY=TRUE)
.
Value
A pixel image (an object of class "im"
) representing the
spatial covariance function of X
,
or the cross-covariance of X
and Y
.
Author(s)
Adrian Baddeley Adrian.Baddeley@curtin.edu.au
and Rolf Turner rolfturner@posteo.net
See Also
setcov
,
convolve.im
,
owin
,
as.owin
,
erosion
Examples
X <- as.im(square(1))
v <- imcov(X)
plot(v)