changeColorSpace | R Documentation |
This function takes an Image
object and converts
it to another color space (e.g BGR to grayscale).
changeColorSpace(image, colorspace, target = "new", in_place = NULL)
image |
An |
colorspace |
A string corresponding to the color space the image should
be converted to. Not all conversions between color spaces are possible. All
available color space conversions can be found in |
target |
The location where the results should be stored. It can take 3 values:
|
in_place |
Deprecated. Use |
If target="new"
, the function returns an Image
object. If target="self"
, the function returns nothing and modifies
image
in place. If target
is an Image
object,
the function returns nothing and modifies that Image
object in
place.
Simon Garnier, garnier@njit.edu
Image
, changeBitDepth
balloon <- image(system.file("sample_img/balloon1.png", package = "Rvision"))
grey_balloon <- changeColorSpace(balloon, "GRAY")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.