Learn R Programming

Rvision (version 0.6.0)

image: Create an Object of Class Image

Description

Function for creating Image objects from arrays and image files.

Usage

image(..., colorspace = "BGR")

Arguments

...

When created from an image file, image takes one argument that is a character string indicating the path to the image file. When created from an array (e.g. a matrix), it takes this array as its single argument. An Image object can also be created without any argument, in which case it is empty and can be populated with an image later.

colorspace

A string indicating the desired color space for the image.

Value

An Image object.

See Also

Image

Examples

Run this code
# NOT RUN {
balloon <- image(system.file("sample_img/balloon1.png", package = "Rvision"))
noise <- image(array(sample(0:255, 100 * 100 * 3, replace = TRUE), dim = c(100, 100, 3)))

# }

Run the code above in your browser using DataLab