Learn R Programming

Rvision - A computer vision library for R

Description

Rvision is a 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 and 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.6.0

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Simon Garnier

Last Published

April 5th, 2021

Functions in Rvision (0.6.0)

RvisionAck

Image and video samples
addWeighted

Weighted Sum of Two Images
Queue-class

An S4 Class Containing a Queue of Images
Rvision

Rvision: Computer vision library for R
adaptiveThreshold

Adaptive Thresholding
LUT

Look-up Table Transform
Stream-class

An S4 Class Containing an OpenCV Stream
Image-class

An S4 Class Containing an OpenCV Image
VideoWriter-class

An S4 Class Containing an OpenCV Video Writer
Video-class

An S4 Class Containing an OpenCV Video
api

API of a Video Writer
as.array.Rcpp_Image

Convert Image to Array or Matrix
blur

Blurs an Image Using a Normalized Box Filter
bilateralFilter

Edge-Preserving Noise Reduction with a Bilateral Filter
capacity

Capacity of a Queue
compare

Comparison between Images
dim.Rcpp_VideoWriter

Dimensions of a Video Writer
colorspace

The Color Space of an Image
dim.Rcpp_Video

Dimensions of a Video
dim.Rcpp_Queue

Dimensions of a Queue
border

Add Border to Image
codec.Rcpp_Video

Codec of a Video
col2bgr

Color to BGR Conversion
cc_table

Table of Color Space Conversions
boxFilter

Blurs an Image Using a Box Filter
destroyDisplay

click

Detect Mouse Click on Image Display
fillPoly

Fill Polygon with Color in Image
dim.Rcpp_Stream

Dimensions of a Stream
drawArrow

fitEllipse

Fit an Ellipse Around a Set of 2D Points
drawCircle

cloneImage

Make a copy of an Image object
drawRotatedRectangle

changeBitDepth

Convert Image to New Bit Depth
changeColorSpace

Convert Image to New Color Space
convexHull

Compute the Convex Hull of a Set of Points
canny

Canny Edge Detector
contourArea

Area of a Contour
dim.Rcpp_Image

Dimensions of an Image
flip

drawEllipse

filter2D

Image Convolution with Kernel
histEq

Histogram Equalization
drawText

display

distanceTransform

Distance Transform
imageLogic

Logical Functions for Images
histmatch

Histogram Matching/Specification
full

Test for a Full/Empty Queue Object
imageMinMax

Element-Wise Minimums and Maximums
gaussianBlur

Blurs an Image Using a Gaussian Filter
isImage

Test for an Image Object
drawLine

inPlaceLogical

In Place Logical Operators for Images
inPlaceComparison

In Place Comparison Operators for Images
findTransformECC

Enhanced Correlation Coefficient-based Geometric Transform
invert

Invert Colors
getPerspectiveTransform

Perspective Transform
getTextSize

Calculate the Height and Width of a Text String
isBlob

Test for a Blob Object
findTransformORB

ORB-based Geometric Transform
isQueue

Test for a Queue object
merge

Merge Separate Channels into an Image
bitdepth

The Bit Depth of an Image
moments

Calculate the Moments of a Shape
computeECC

Enhanced Correlation Coefficient Value
connectedComponents

Find Connected Components in a binary Image
countNonZero

Count Non-Zero Pixels
drawPolyline

Draw Polygonal Lines on an Image
convexityDefects

Find the Convexity Defects of a Contour
morph

Morphological Operations
findNonZero

Find Non-Zero Pixels in an Image
drawRectangle

findContours

Find Contours in a Binary Image
fillConvexPoly

Fill Convex Polygon with Color in Image
farneback

Optical Flow Using Farneback's Algorithm
isVideoWriter

Test for a VideoWriter Object
laplacian

Calculates the Laplacian of an Image
resize

rotateScale

Image Rotation and Scaling
image

Create an Object of Class Image
stream

Create an Object of Class Stream
[.Rcpp_Image

Extract or Replace Parts of an Image
nrow.Rcpp_Stream

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

Maxima and Minima of an Image
imageArithmetic

Arithmetic Functions for Images
fps.Rcpp_Video

Frame Rate of a Video
pset

Set Pixel Value at Specified Locations
isStream

Test for a Stream Object
isVideo

Test for a Video Object
subImage

Extract Subimage
newDisplay

ones

Create a One-Filled Image
nrow.Rcpp_Image

The Number of Rows/Columns/Channels of an Image
frame.Rcpp_Queue

Reader Head Position
plot.blob

Plot Blobs
plotOF

Plot Optical Flow Arrays
medianBlur

Blurs an Image Using a Median Filter
mean.list

Mean of Images in a List
scharr

Calculates an Image Derivatives Using a Scharr Operator
zeros

Create a Zero-Filled Image
watershed

Image Segmentation Using the Watershed Algorithm
setProp.Rcpp_Stream

Set/Get Video Properties
sepFilter2D

Image Filtering with a Separable Linear Filter
queue

Create an Object of Class Queue
write.Image

Image Output
nrow.Rcpp_Video

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

Blurs an Image Using a Square Box Filter
split

Split an Image into Separate Channels
selectROI

Select a Region of Interest in an Image
floodFill

Fills a Connected Component with a Given Color.
pget

Return Pixel Value at Specified Locations
imhist

Multichannel Histogram of an Image
inPlaceArithmetic

In Place Arithmetic Operators for Images
writeFrame

Write Frame to Output Video
nrow.Rcpp_VideoWriter

The Number of Rows/Columns of a Video Writer
matchTemplate

Template Matching
nrow.Rcpp_Queue

The Number of Rows/Columns and Length of a Queue
mean.Rcpp_Image

Mean Value of the Pixels in an Image
randn

Random Normal Image
writerOuput

Output File of a Video Writer
inRange

Range Thresholding
fourcc

Codec Name to FOURCC Code
minAreaRect

Fit a Rectangle Around a Set of 2D Points
minMaxLoc

Coordinates of the Maxima and Minima of an Image
inpaint

Reconstruct Image Region from Region Neighborhood
readMulti

Read a Multi-Page Image
readNext.Rcpp_Queue

Read Next Frame of an Object
plot.Image

Plot Rvision Images
pixelsInContour

Which Pixels are Inside a Contour
sobel

Calculates an Image Derivatives Using an Extended Sobel Operator
spatialGradient

First Order Derivatives of an Image with the Sobel Operator
sum

Sum Generic for Image objects
readFrame

Read Specific Video Frame
randu

Random Uniform Image
setTo

Set All or Some of an Image to the Specified Value
video

Create an Object of Class Video
simpleBlobDetector

Simple Blob Detector
release.Rcpp_Queue

Release Object from Memory
reset

Reset a Queue
warpAffine

Affine Transformation
warpPerspective

Perspective Transformation
timelapse

Make Timelapse from Stream Object
videoWriter

Create an object of class VideoWriter