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
You are looking for:
imagedata(myjpg, type="grey")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With