powered by
## S3 method for class 'im': as.matrix(x, ...)
"im"
x
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