as.cimg.raster | R Documentation |
R's native object for representing images is a "raster". This function converts raster objects to cimg objects.
## S3 method for class 'raster'
as.cimg(obj, ...)
obj |
a raster object |
... |
ignored |
a cimg object
Simon Barthelme
rst <- as.raster(matrix((1:4)/4,2,2))
as.cimg(rst) %>% plot(int=FALSE)
all.equal(rst,as.raster(as.cimg(rst)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.