I need to convert a JPEG image to a matrix. I want to run SVD on the matrix.
I had used
library(jpeg)
library(biOps)
myjpg <- readJpeg("Snapshot_1.jpg")
> dim(myjpg)
[1] 398 506 3
I want to get an image matrix of "myjpg" in grey scale preferably. Is there an R command which does that.
Thanks