Vertices of a Window
Finds the vertices of a window, or similar object.
## S3 method for class 'owin': vertices(w)
- A window (object of class
"owin") or similar object.
This function computes the vertices (`corners') of a spatial window or other object.
w should be a window (an object of class
owin.object for details).
w is a rectangle, the coordinates of the
four corner points are returned.
w is a polygonal window (consisting of one or more
polygons), the coordinates of the vertices of all polygons are
w is a binary mask, then a `boundary pixel' is defined to be
a pixel inside the window
which has at least one neighbour outside the window. The coordinates
of the centres of all boundary pixels are returned.
- A list with components
ygiving the coordinates of the vertices.
data(letterR) vert <- vertices(letterR) plot(letterR, main="Polygonal vertices") points(vert) plot(letterR, main="Boundary pixels") points(vertices(as.mask(letterR)))