Learn R Programming

imager (version 0.45.8)

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

Description

Split a colour image into a list of separate channels

Usage

channels(im, index, drop = FALSE)

Value

a list of channels

Arguments

im

an image

index

which channels to extract (default all)

drop

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

See Also

frames

Examples

Run this code
cimg.limit.openmp()
channels(boats)
channels(boats,1:2)
channels(boats,1:2,drop=TRUE) %>% str #A list of 2D arrays

Run the code above in your browser using DataLab