dilation(w, r, ...)
 ## S3 method for class 'owin':
dilation(w, r, \dots, polygonal=NULL, tight=TRUE)
 ## S3 method for class 'ppp':
dilation(w, r, \dots, polygonal=TRUE, tight=TRUE)
 ## S3 method for class 'psp':
dilation(w, r, \dots, polygonal=TRUE, tight=TRUE)"owin"
    or a line segment pattern (object of class "psp")
    or a point pattern (object of class "ppp").as.mask
    controlling the pixel resolution, if the pixel approximation is
    used.polygonal=TRUE) or
    a pixel grid approximation (polygonal=FALSE).tight=TRUE), or should be the
    dilation of the bounding frame of w (tight=Fr > 0, an object of class "owin" representing the
  dilated region. If r=0, the result is identical to w.  If polygonal=TRUE then a polygonal approximation
  to the dilation is computed.
  If polygonal=FALSE then a pixel approximation
  to the dilation is computed from the distance map of w.
  The arguments "..." are passed to as.mask
  to control the pixel resolution.
  When w is a window, the default (when polygonal=NULL)
  is to compute a polygonal approximation if
  w is a rectangle or polygonal window, and to compute a
  pixel approximation if w is a window of type "mask".
erosion for the opposite operation.
  
  owin,
  as.owinw <- owin(c(0,1),c(0,1))
  v <- dilation(w, 0.1, polygonal=interactive())Run the code above in your browser using DataLab