| pixelcentres {spatstat} | R Documentation |
Given a pixel image or binary mask window, extract the centres of all pixels and return them as a point pattern.
pixelcentres(X, W = NULL, ...)
X |
Pixel image (object of class |
W |
Optional window to contain the resulting point pattern. |
... |
Optional arguments defining the pixel resolution. |
If the argument X is a pixel image, the result is a point
pattern, consisting of the centre of every pixel whose pixel value
is not NA.
If X is a window which is a binary mask, the result is a point
pattern consisting of the centre of every pixel inside the window
(i.e. every pixel for which the mask value is TRUE).
Otherwise, X is first converted to a window, then
converted to a mask using as.mask, then handled as
above.
A point pattern (object of class "ppp").
Adrian Baddeley Adrian.Baddeley@uwa.edu.au http://www.maths.uwa.edu.au/~adrian/, Rolf Turner r.turner@auckland.ac.nz and Ege Rubak
pixelcentres(letterR, dimyx=5)