channels: Split a colour image into a list of separate channels

Description Usage Arguments Value See Also Examples

View source: R/cimg_class.R

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


imager documentation built on May 19, 2017, 7:04 p.m.
Search within the imager package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.