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.4.3

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Simon Garnier

Last Published

April 5th, 2021

Functions in Rvision (0.4.3)

Image-class

An S4 Class Containing an OpenCV Image
bilateralFilter

Edge-Preserving Noise Reduction with a Bilateral Filter
connectedComponents

Find Connected Components in a binary Image
colorspace

The Color Space of an Image
distanceTransform

Distance Transform
drawArrow

computeECC

Enhanced Correlation Coefficient Value
bitdepth

The Bit Depth of an Image
drawText

farneback

Optical Flow Using Farneback's Algorithm
Rvision

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

Adaptive Thresholding
blur

Blurs an Image Using a Normalized Box Filter
addWeighted

Weighted Sum of Two Images
histmatch

Histogram Matching/Specification
RvisionAck

Image and video samples
api

API of a Video Writer
as.array.Rcpp_Image

Convert Image to Array or Matrix
click

Detect Mouse Click on Image Display
drawCircle

cloneImage

Make a copy of an Image object
image

Create an Object of Class Image
drawEllipse

drawRectangle

isBlob

Test for a Blob Object
drawRotatedRectangle

frame

Video Reader Position
isStream

Test for a Stream object
isImage

Test for an Image Object
gaussianBlur

Blurs an Image Using a Gaussian Filter
border

Add Border to Image
flip

minAreaRect

Fit a Rectangle Around a Set of 2D Points
isVideo

Test for a Video object
minMaxLoc

Coordinates of the Maxima and Minima of an Image
rotateScale

Image Rotation and Scaling
stream

Create an Object of Class Stream
resize

zeros

Create a Zero-Filled Image
nrow.Rcpp_Video

The Number of Rows/Columns/Frames of a Video
nrow.Rcpp_VideoWriter

The Number of Rows/Columns of a Video Writer
nrow.Rcpp_Stream

The Number of Rows/Columns of a Stream
contourArea

Area of a Contour
merge

Merge Separate Channels into an Image
Video-class

An S4 Class Containing an OpenCV Video
changeBitDepth

Convert image bit depth
Stream-class

An S4 Class Containing an OpenCV Stream
fillPoly

Fill Polygon with Color in Image
display

fillConvexPoly

Fill Convex Polygon with Color in Image
dim.Rcpp_VideoWriter

Dimensions of a Video Writer
convexHull

Compute the Convex Hull of a Set of Points
changeColorSpace

Convert image between colorspaces
destroyDisplay

convexityDefects

Find the Convexity Defects of a Contour
fourcc

Codec Name to FOURCC Code
imhist

Multichannel Histogram of an Image
floodFill

Fills a Connected Component with a Given Color.
dim.Rcpp_Image

Dimensions of an Image
fps.Rcpp_Video

Framerate of a Video
inpaint

Reconstruct Image Region from Region Neighborhood
inRange

Range Thresholding
filter2D

Image Convolution with Kernel
findNonZero

Find Non-Zero Pixels in an Image
getPerspectiveTransform

Perspective Transform
findTransformECC

Enhanced Correlation Coefficient-based Geometric Transform
findContours

Find Contours in a Binary Image
laplacian

Calculates the Laplacian of an Image
isVideoWriter

Test for a VideoWriter object
plot.Image

Plot Rvision Images
getTextSize

Calculate the Height and Width of a Text String
pixelsInContour

Which Pixels are Inside a Contour
invert

Invert Colors
absdiff

Absolute Difference Between Two Images
VideoWriter-class

An S4 Class Containing an OpenCV Video Writer
boxFilter

Blurs an Image Using a Box Filter
mean.list

Mean of Images in a List
canny

Canny Edge Detector
setProp.Rcpp_Stream

Set/Get Video Properties
selectROI

Select a Region of Interest in an Image
scharr

Calculates an Image Derivatives Using a Scharr Operator
watershed

Image Segmentation Using the Watershed Algorithm
sepFilter2D

Image Filtering with a Separable Linear Filter
codec.Rcpp_Video

Codec of a Video
newDisplay

dim.Rcpp_Stream

Dimensions of a Stream
col2bgr

Color to BGR Conversion
dim.Rcpp_Video

Dimensions of a Video
medianBlur

Blurs an Image Using a Median Filter
pget

Return Pixel Value at Specified Location
ones

Create a One-Filled Image
[.Rcpp_Image

Extract or Replace Parts of an Image
write.Image

Image Output
mean.Rcpp_Image

Mean Value of the Pixels in an Image
fitEllipse

Fit an Ellipse Around a Set of 2D Points
drawPolyline

Draw Polygonal Lines on an Image
matchTemplate

Template Matching
drawLine

findTransformORB

ORB-based Geometric Transform
readFrame

Read Specific Video Frame
moments

Calculate the Moments of a Shape
morph

Morphological Operations
readMulti

Read a Multi-Page Image
subImage

Extract Subimage
plot.OF_array

Plot Optical Flow Arrays
nrow.Rcpp_Image

The Number of Rows/Columns/Channels of an Image
plot.blob

Plot Blobs
spatialGradient

First Order Derivatives of an Image with the Sobel Operator
sobel

Calculates an Image Derivatives Using an Extended Sobel Operator
release.Rcpp_Stream

Release Object from Memory
min.Rcpp_Image

Maxima and Minima of an Image
simpleBlobDetector

Simple Blob Detector
readNext.Rcpp_Stream

Read Next of an Object Frame
setTo

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

Split an Image into Separate Channels
sum

Sum Generic for Image objects
sqrBoxFilter

Blurs an Image Using a Square Box Filter
warpAffine

Affine Transformation
timelapse

Make Timelapse from Stream Object
video

Create an Object of Class Video
writeFrame

Write Frame to Output Video
writerOuput

Output File of a Video Writer
warpPerspective

Perspective Transformation
videoWriter

Create an object of class VideoWriter
LUT

Look-up Table Transform