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

  • 1 - Installation instructions
  • 2 - Input/output operations
  • 3 - Basic operations [TODO]
  • 4 - Advanced operations on videos [TODO]
  • 5 - Advanced operations on streams [TODO]
  • 6 - Advanced operations on images [TODO]
    • 6.1 - Drawing operations [TODO]
    • 6.2 - Arithmetic operations [TODO]
    • 6.3 - Morphological operations [TODO]
    • 6.4 - Filtering operations [TODO]

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

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Simon Garnier

Last Published

April 5th, 2021

Functions in Rvision (0.3)

RvisionAck

Image and video samples
addWeighted

Weighted Sum of Two Images
VideoWriter-class

An S4 Class Containing an OpenCV Video Writer
Image-class

An S4 Class Containing an OpenCV Image
bilateralFilter

Edge-Preserving Noise Reduction with a Bilateral Filter
as.array.Rcpp_Image

Convert Image to Array or Matrix
codec

Codec of a Video
Video-class

An S4 Class Containing an OpenCV Video
absdiff

Absolute Difference Between Two Images
Stream-class

An S4 Class Containing an OpenCV Stream
Rvision

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

The Color Space of an Image
drawCircle

drawEllipse

blur

Blurs an Image Using a Normalized Box Filter
destroyDisplay

dim.Rcpp_Stream

Dimensions of a Stream
display

drawArrow

isBlob

Test for a Blob Object
dim.Rcpp_Image

Dimensions of an Image
changeColorSpace

Convert image between colorspaces
drawText

gaussianBlur

Blurs an Image Using a Gaussian Filter
cloneImage

Make a copy of an Image object
image

Create an Object of Class Image
drawLine

isStream

Test for a Stream object
isImage

Test for an Image Object
bitdepth

The Bit Depth of an Image
isVideoWriter

Test for a VideoWriter object
isVideo

Test for a Video object
getTextSize

Calculate the Height and Width of a Text String
medianBlur

Blurs an Image Using a Median Filter
boxFilter

Blurs an Image Using a Box Filter
laplacian

Calculates the Laplacian of an Image
filter2D

Image Convolution with Kernel
merge

Merge Separate Channels into an Image
changeBitDepth

Convert image bit depth
fps

Framerate of a Video
sepFilter2D

Image Filtering with a Separable Linear Filter
stream

Create an Object of Class Stream
frame

Video Reader Position
dim.Rcpp_Video

Dimensions of a Video
setProp.Rcpp_Stream

Set/Get Video Properties
sum

Sum Generic for additional arguments
plot.OF_array

Plot Optical Flow Arrays
farneback

Optical Flow Using Farneback's Algorithm
plot.blob

Plot Blobs
simpleBlobDetector

Simple Blob Detector
sqrBoxFilter

Blurs an Image Using a Square Box Filter
drawRectangle

write.Image

Image Output
nrow.Rcpp_Stream

The Number of Rows/Columns of a Stream
sobel

Calculates an Image Derivatives Using an Extended Sobel Operator
writeFrame

Write Frame to Output Video
nrow.Rcpp_Image

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

First Order Derivatives of an Image with the Sobel Operator
videoWriter

Create an object of class VideoWriter
plot.Image

Plot Rvision Images
split

Split an Image into Separate Channels
readFrame

Read Specific Video Frame
nrow.Rcpp_Video

The Number of Rows/Columns/Frames of a Video
readNext.Rcpp_Stream

Read Next of an Object Frame
readMulti

Read a Multi-Page Image
release.Rcpp_Stream

Release Object from Memory
scharr

Calculates an Image Derivatives Using a Scharr Operator
timelapse

Make Timelapse from Stream Object
morph

Morphological Operations
video

Create an Object of Class Video
newDisplay

resize

mean

Mean Generic for additional arguments
adaptiveThreshold

Adaptive Thresholding
findContours

Find Contours in a Binary Image
click

Detect Mouse Click on Image Display
fillPoly

Fill Polygon with Color in Image
inpaint

Reconstruct Image Region from Region Neighborhood
selectROI

Select a Region of Interest in an Image