img2r: Convert a vpImage object to a matrix or an array
Description
This function converts a vpImage object to a 2D matrix or a 3D array that can
be used in R. Binary, grayscale, and 2D numeric vpImage objects will be
converted to 2D matrices. RGB and 3D numeric vpImage objects will be
converted to 3D arrays.
Usage
img2r(image)
Arguments
image
The vpImage object to convert.
Value
This function returns either a 2D matrix or a 3D arrays depending on
the input vpImage object.