Image-class | R Documentation |
Image
objects are the base objects of the
Rvision package. They contain an
OpenCV image that can originate from an image
file, an array, a video file or a video stream. This image can be
manipulated using the functions of Rvision.
Function for creating Image
objects from arrays
and image files.
image(..., colorspace = "BGR")
... |
When created from an image file, |
colorspace |
A string indicating the desired color space for the image. |
An Image
object.
depth
A function returning the bit depth of the object.
dim,ncol,nrow,nchan
Functions returning the dimensions of the object.
space
A character string indicating the colorspace of the object.
pget,pset
Functions to get and set single pixel values.
toR
A function to convert the object to an R array.
fromGPU
A function retrieving the object from GPU memory.
toGPU
A function sending the object to GPU memory.
GPU
A boolean indicating whether the object is in GPU memory.
write
A function to write the object to a file.
Image
objects can be created from video files and video streams
using the following functions: video
, stream
.
Simon Garnier, garnier@njit.edu
image
Image
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)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.