Learn R Programming

⚠️There's a newer version (0.6.0) of this package.Take me there.

Rvision - A computer vision library for R


Description

Rvision is a - small but growing - computer vision library for R. It is based on the powerful OpenCV library for C/C++, the state-of-the-art for computer vision in the open source world.

The ultimate goal of Rvision is to provide R users with all the necessary functions to read and manipulate images, videos and camera streams, with an emphasis on speed (thanks to OpenCV). In this respect, it is different from all the other image manipulations packages for R that either can not quickly and directly access frames from videos or camera streams or are limited in their processing speed and/or volume.


Quick start guides


FAQ

Can I take selfies with my webcam using Rvision?

You certainly can, but ask yourself first whether you should...

my_stream <- stream(0)   # 0 will start your default webcam in general. 
my_selfie <- readNext(my_stream)
plot(my_selfie)
release(my_stream)

Be careful, this will trigger the explosion of your camera if it detects that you are making a duck face ;-)

Copy Link

Version

Version

0.3.3

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Simon Garnier

Last Published

April 5th, 2021

Functions in Rvision (0.3.3)

Video-class

An S4 Class Containing an OpenCV Video
bitdepth

The Bit Depth of an Image
blur

Blurs an Image Using a Normalized Box Filter
dim.Rcpp_VideoWriter

Dimensions of a Video Writer
changeColorSpace

Convert image between colorspaces
click

Detect Mouse Click on Image Display
filter2D

Image Convolution with Kernel
display

findNonZero

Find Non-Zero Pixels in an Image
fps.Rcpp_Video

Framerate of a Video
findContours

Find Contours in a Binary Image
isImage

Test for an Image Object
isStream

Test for a Stream object
newDisplay

frame

Video Reader Position
nrow.Rcpp_Image

The Number of Rows/Columns/Channels of an Image
readMulti

Read a Multi-Page Image
readNext.Rcpp_Stream

Read Next of an Object Frame
gaussianBlur

Blurs an Image Using a Gaussian Filter
minMaxLoc

Coordinates of the Maxima and Minima of an Image
sqrBoxFilter

Blurs an Image Using a Square Box Filter
stream

Create an Object of Class Stream
subImage

Extract Subimage
morph

Morphological Operations
sum

Sum Generic for additional arguments
plot.blob

Plot Blobs
readFrame

Read Specific Video Frame
nrow.Rcpp_VideoWriter

The Number of Rows/Columns of a Video Writer
write.Image

Image Output
Image-class

An S4 Class Containing an OpenCV Image
Rvision

Rvision: A basic (for now) computer vision library for R.
addWeighted

Weighted Sum of Two Images
as.array.Rcpp_Image

Convert Image to Array or Matrix
bilateralFilter

Edge-Preserving Noise Reduction with a Bilateral Filter
drawArrow

drawCircle

api

API of a Video Writer
cloneImage

Make a copy of an Image object
codec.Rcpp_Video

Codec of a Video
dim.Rcpp_Stream

Dimensions of a Stream
isVideo

Test for a Video object
dim.Rcpp_Video

Dimensions of a Video
absdiff

Absolute Difference Between Two Images
isVideoWriter

Test for a VideoWriter object
adaptiveThreshold

Adaptive Thresholding
drawEllipse

colorspace

The Color Space of an Image
drawLine

inpaint

Reconstruct Image Region from Region Neighborhood
RvisionAck

Image and video samples
Stream-class

An S4 Class Containing an OpenCV Stream
isBlob

Test for a Blob Object
merge

Merge Separate Channels into an Image
boxFilter

Blurs an Image Using a Box Filter
connectedComponents

Find Connected Components in a binary Image
mean

Mean Generic for additional arguments
medianBlur

Blurs an Image Using a Median Filter
min.Rcpp_Image

Maxima and Minima of an Image
changeBitDepth

Convert image bit depth
farneback

Optical Flow Using Farneback's Algorithm
fillPoly

Fill Polygon with Color in Image
release.Rcpp_Stream

Release Object from Memory
plot.Image

Plot Rvision Images
resize

destroyDisplay

spatialGradient

First Order Derivatives of an Image with the Sobel Operator
split

Split an Image into Separate Channels
videoWriter

Create an object of class VideoWriter
plot.OF_array

Plot Optical Flow Arrays
dim.Rcpp_Image

Dimensions of an Image
nrow.Rcpp_Stream

The Number of Rows/Columns of a Stream
[.Rcpp_Image

Extract or Replace Parts of an Image
getTextSize

Calculate the Height and Width of a Text String
nrow.Rcpp_Video

The Number of Rows/Columns/Frames of a Video
drawRectangle

image

Create an Object of Class Image
laplacian

Calculates the Laplacian of an Image
drawText

scharr

Calculates an Image Derivatives Using a Scharr Operator
timelapse

Make Timelapse from Stream Object
selectROI

Select a Region of Interest in an Image
sepFilter2D

Image Filtering with a Separable Linear Filter
setProp.Rcpp_Stream

Set/Get Video Properties
video

Create an Object of Class Video
matchTemplate

Template Matching
simpleBlobDetector

Simple Blob Detector
sobel

Calculates an Image Derivatives Using an Extended Sobel Operator
writeFrame

Write Frame to Output Video
writerOuput

Output File of a Video Writer
VideoWriter-class

An S4 Class Containing an OpenCV Video Writer
col2bgr

Color to BGR Conversion
invert

Invert Colors