channels | R Documentation |
Split a colour image into a list of separate channels
channels(im, index, drop = FALSE)
im |
an image |
index |
which channels to extract (default all) |
drop |
if TRUE drop extra dimensions, returning normal arrays and not cimg objects |
a list of channels
frames
channels(boats)
channels(boats,1:2)
channels(boats,1:2,drop=TRUE) %>% str #A list of 2D arrays
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.