Last chance! 50% off unlimited learning
Sale ends in
powered by
Converts a pixel image to a matrix.
# S3 method for owin as.matrix(x, ...)
A logical matrix.
A window (object of class "owin").
"owin"
Arguments passed to as.mask to control the pixel resolution.
as.mask
Adrian Baddeley Adrian.Baddeley@curtin.edu.au
and Rolf Turner rolfturner@posteo.net
The function as.matrix.owin converts a window to a logical matrux.
as.matrix.owin
It first converts the window x into a binary pixel mask using as.mask. It then extracts the pixel entries as a logical matrix.
x
The resulting matrix has entries that are TRUE if the corresponding pixel is inside the window, and FALSE if it is outside.
TRUE
FALSE
The function as.matrix is generic. The function as.matrix.owin is the method for windows (objects of class "owin").
as.matrix
Use as.im to convert a window to a pixel image.
as.im
as.matrix.im, as.im
as.matrix.im
m <- as.matrix(letterR)
Run the code above in your browser using DataLab