Learn R Programming

spatstat.explore (version 3.3-3)

blurHeat: Diffusion Blur

Description

Blur a Pixel Image by Applying Diffusion

Usage

blurHeat(X, ...)

# S3 method for im blurHeat(X, sigma, ..., connect = 8, symmetric = FALSE, k= 1, show = FALSE)

# S3 method for im SmoothHeat(X, sigma, ...)

Value

A pixel image on the same raster as X.

Arguments

X

Pixel image (object of class "im").

sigma

Smoothing bandwidth. A numeric value, a pixel image or a function(x,y).

...

Ignored by blurHeat.im.

connect

Grid connectivity: either 4 or 8.

symmetric

Logical value indicating whether to force the algorithm to use a symmetric random walk.

k

Integer. Calculations will be performed by repeatedly multiplying the current state by the k-step transition matrix.

show

Logical value indicating whether to plot successive iterations.

Author

Adrian Baddeley Adrian.Baddeley@curtin.edu.au.

Details

The function blurHeat is generic.

This help file documents the method blurHeat.im for pixel images (objects of class "im"). This is currently equivalent to SmoothHeat.im, which is also documented here.

If sigma is a numeric value, then the classical time-dependent heat equation is solved up to time t = sigma^2 starting with the initial condition given by the image X. This has the effect of blurring the input image X.

If sigma is a function or a pixel image, then it is treated as a spatially-variable diffusion rate, and the corresponding heat equation is solved.

This command can be used to calculate the expected value of the diffusion estimator of intensity (densityHeat) when the true intensity is known.

See Also

densityHeat, blur.

Examples

Run this code
  Z <- as.im(function(x,y) { sin(10*x) + sin(9*y) }, letterR)
  ZZ <- blurHeat(Z, 0.2)
  plot(solist(original=Z, blurred=ZZ), main="")

Run the code above in your browser using DataLab