
Last chance! 50% off unlimited learning
Sale ends in
## S3 method for class 'im':
as.matrix(x)
"im"
).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.
# 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)))
Run the code above in your browser using DataLab