channel {EBImage} | R Documentation |
channel
handles color space conversions between image modes.
rgbImage
combines Grayscale
images into a Color
one.
channel(x, mode) rgbImage(red, green, blue)
x |
An Image object or an array. |
mode |
A character value specifying the target mode for conversion. See Details. |
red, green, blue |
Image objects in Grayscale
color mode or arrays of the same dimension. If missing, a
black image will be used. |
Conversion modes:
rgb
Grayscale
image or an array
into a Color
image, replicating RGB channels.gray, grey
Color
image into a
Grayscale
image, using uniform 1/3 RGB weights.red, green, blue
red
, green
or
blue
channel from a Color
image. Returns a
Grayscale
image.asred, asgreen, asblue
Grayscale
image or an array into a Color
image of the specified hue.
channel
changes the pixel intensities, unlike colorMode
which just changes the way that EBImage should render an image,
An Image
object or an array.
Oleg Sklyar, osklyar@ebi.ac.uk
x = readImage(system.file("images", "shapes.png", package="EBImage")) if (interactive()) display(x) y = channel(x, 'asgreen') if (interactive()) display(y) ## rgbImage x = readImage(system.file('images', 'nuclei.tif', package='EBImage')) y = readImage(system.file('images', 'cells.tif', package='EBImage')) if (interactive()) display(x, title='Cell nuclei') if (interactive()) display(y, title='Cell bodies') cells = rgbImage(green=1.5*y, blue=x) if (interactive()) display(cells, title='Cells')