Learn R Programming

Rvision (version 0.6.0)

as.array.Rcpp_Image: Convert Image to Array or Matrix

Description

Attempts to turn its argument into a matrix or an array.

Usage

# S3 method for Rcpp_Image
as.array(x, ...)

Arguments

x

An Image object.

...

Ignored.

Value

A matrix or array of the same dimensions as the Image object.

See Also

Image, matrix, array

Examples

Run this code
# NOT RUN {
balloon <- image(system.file("sample_img/balloon1.png", package = "Rvision"))
balloon_mat <- as.matrix(balloon)

# }

Run the code above in your browser using DataLab