Split a colour image into a list of separate channels

Share:

Description

Split a colour image into a list of separate channels

Usage

1
channels(im, index, drop = FALSE)

Arguments

im

an image

index

which channels to extract (default all)

drop

if TRUE drop extra dimensions, returning normal arrays and not cimg objects

Value

a list of channels

See Also

frames

Examples

1
2
3
channels(boats)
channels(boats,1:2)
channels(boats,1:2,drop=TRUE) %>% str #A list of 2D arrays

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.