powered by
This function combines the output of pixel.grid with the actual values (stored in $value)
# S3 method for cimg as.data.frame(x, ..., wide = c(FALSE, "c", "d"))
an image of class cimg
arguments passed to pixel.grid
if "c" or "d" return a data.frame that is wide along colour or depth (for example with rgb values along columns). The default is FALSE, with each pixel forming a separate entry.
a data.frame
# NOT RUN { #First five pixels as.data.frame(boats) %>% head(5) #Wide format along colour axis as.data.frame(boats,wide="c") %>% head(5) # }
Run the code above in your browser using DataLab