as.matrix.im

0th

Percentile

Convert Pixel Image to Matrix

Convert a pixel image to a matrix

Keywords
methods, spatial
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.

Aliases
  • as.matrix.im
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)))
Documentation reproduced from package spatstat, version 1.21-0, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.