as.matrix.im
From spatstat v1.19-2
by Adrian Baddeley
Convert Pixel Image to Matrix
Convert a pixel image to a matrix
Usage
## S3 method for class 'im':
as.matrix(x, ...)
Arguments
- x
- A pixel image (object of class
"im"
). - ...
- Ignored.
Details
This function takes the pixel image x
and returns a matrix containing the pixel values.
It is handy when you want to extract a summary of the pixel values. See the Examples.
Value
- A matrix.
Examples
# artificial image
Z <- setcov(square(1))
M <- as.matrix(Z)
median(M)
# plot the cumulative distribution function of pixel values
plot(ecdf(as.matrix(Z)))
Community examples
Looks like there are no examples yet.