as.matrix.owin | R Documentation |
Converts a pixel image to a matrix.
## S3 method for class 'owin'
as.matrix(x, ...)
x |
A window (object of class |
... |
Arguments passed to |
The function as.matrix.owin
converts a window to a
logical matrux.
It first converts the window x
into a binary pixel mask
using as.mask
. It then extracts the pixel entries
as a logical matrix.
The resulting matrix has entries that are
TRUE
if the corresponding pixel is inside the window,
and FALSE
if it is outside.
The function as.matrix
is generic. The function
as.matrix.owin
is the method for windows (objects of class "owin"
).
Use as.im
to convert a window to a pixel image.
A logical matrix.
and \rolf
as.matrix.im
,
as.im
m <- as.matrix(letterR)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.