Learn R Programming

videoplayR

videoplayR is an R package that provides a few functions (for now) to manipulate video and image files with R. It requires the installation of OpenCV.

>>> Package vignette: http://rpubs.com/sjmgarnier/videoplayR <<<

Package overview

This package uses the OpenCV C++ library to provide R users with some basic functions to read and manipulate video and image files. As of now, videoplayR can:

  • Load can access video and image files, as well as camera streams.
  • Grab frames from videos and camera streams, and convert them to images.
  • Convert images to R matrices and arrays.
  • Convert R matrices and arrays to images.
  • Display images in the default R graphics device.
  • Perform basic image processing operations such as thresholding, flattening, blending.
  • Perfom simple background reconstruction and blob detection.

General information

videoplayR requires the installation of the OpenCV library to compile and run. For the moment, the package can only be installed on Mac and Linux computers.

Installation instructions for OpenCV and videoplayR, as well as a brief tutorial for the different functions of the package are available on Rpubs at the following address: http://rpubs.com/sjmgarnier/videoplayR.

Issues and suggestions can be reported here: https://github.com/swarm-lab/videoplayR/issues

Pull requests can be submitted here: https://github.com/swarm-lab/videoplayR/pulls

Author(s)

Simon Garnier - @sjmgarnier - garnier@njit.edu

References

This package uses the OpenCV library to read and process video files. More information about OpenCV can be found at: http://opencv.org/

Copy Link

Version

Version

0.3.1

License

GPL-3

Maintainer

Last Published

February 15th, 2017

Functions in videoplayR (0.3.1)

d2ddd

Expand a 1-channel image to 3 channels
img2r

Convert a vpImage object to a matrix or an array
ddd2d

Flatten a 3-channels image to 1 channel
nextFrame

Grab the next frame from a video stream
blobDetector

Find blobs in binary image
getFrame

Grab a specific frame from a video
backgrounder

Generate a background image from a video
r2img

Convert a matrix or an array to a vpImage object
blend

Element-wise operations on image objects
imshow

Display vpImage object
vpStream

Video stream object.
thresholding

Convert image to binary image
vpVideo

Video object.
release

Release a video stream
vpImage

Image object.
readVid

Load video file in memory
readStream

Capture video stream from camera
videoplayR

videoplayR: A basic (for now) computer vision library for R.
vpSamples

Image and video samples
readImg

Load image file in memory
writeImg

Save image object to file