Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

imcov

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 "im".

Y

Optional. Another pixel image.

Details

The (uncentred, unnormalised) spatial covariance function of a pixel image X in the plane is the function C(v) defined for each vector v as

C(v) = integral of X(u) * X(u-v) du

where the integral is over all spatial locations u, and where X(u) denotes the pixel value at location u.

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 C(u) defined as

C(v) = integral of X(u) * Y(u-v) du.

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)

and Rolf Turner r.turner@auckland.ac.nz

See Also

Examples

X <- as.im(square(1))
  v <- imcov(X)
  plot(v)

spatstat.geom

Geometrical Functionality of the 'spatstat' Family

v2.1-0
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Tilman Davies [ctb], Ute Hahn [ctb], Abdollah Jalilian [ctb], Sebastian Meyer [ctb], Suman Rakshit [ctb], Dominic Schuhmacher [ctb], Rasmus Waagepetersen [ctb]
Initial release
2021-04-15

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.