powered by
R's native object for representing images is a "raster". This function converts raster objects to cimg objects.
# S3 method for raster as.cimg(obj, ...)
a cimg object
a raster object
ignored
Simon Barthelme
cimg.limit.openmp() rst <- as.raster(matrix((1:4)/4,2,2)) as.cimg(rst) %>% plot(int=FALSE) all.equal(rst,as.raster(as.cimg(rst)))
Run the code above in your browser using DataLab