density.psp {spatstat}R Documentation

Kernel Smoothing of Line Segment Pattern

Description

Compute a kernel smoothed intensity function from a line segment pattern.

Usage

  ## S3 method for class 'psp':
  density(x, sigma, ..., edge=TRUE)

Arguments

x Line segment pattern (object of class "psp") to be smoothed.
sigma Standard deviation of isotropic Gaussian smoothing kernel.
... Extra arguments passed to as.mask which determine the resolution of the resulting image.
edge Logical flag indicating whether to apply edge correction.

Details

This is a method for the generic function density.

A kernel estimate of the intensity of the line segment pattern is computed. The result is the convolution of the isotropic Gaussian kernel, of standard deviation sigma, with the line segments. Computation is performed analytically.

If edge=TRUE this result is adjusted for edge effects by dividing it by the convolution of the same Gaussian kernel with the observation window.

Value

A pixel image (object of class "im").

Author(s)

Adrian Baddeley adrian@maths.uwa.edu.au http://www.maths.uwa.edu.au/~adrian/ and Rolf Turner rolf@math.unb.ca http://www.math.unb.ca/~rolf

See Also

psp.object, im.object, density

Examples

  L <- psp(runif(20),runif(20),runif(20),runif(20), window=owin())
  D <- density(L, sigma=0.03)
  plot(D, main="density(L)")
  plot(L, add=TRUE)

[Package spatstat version 1.11-3 Index]