Learn R Programming

spatstat (version 1.11-4)

dilate.owin: Dilate a Window

Description

Perform morphological dilation of a window

Usage

dilate.owin(w, r, ...)

Arguments

w
A window (object of class "owin".
r
positive number: the radius of dilation.
...
extra arguments to as.mask controlling the pixel resolution

Value

  • Another object of class "owin" representing the dilated window.

Details

The morphological dilation of a set $W$ by a distance $r > 0$ is the set consisting of all points lying at most $r$ units away from $W$. Effectively, dilation adds a margin of width $r$ onto the set $W$.

This function computes the dilation of the window w. If w is not a rectangle, it must be approximated by a binary pixel image, and the arguments "..." are passed to as.mask to determine the pixel resolution. There is a sensible default.

See Also

owin, as.owin

Examples

Run this code
w <- owin(c(0,1),c(0,1))
  v <- dilate.owin(w, 0.1) 
  # returns rectangle [-0.1, 1.1] x [-0.1, 1.1]

Run the code above in your browser using DataLab