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

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Simon Garnier

Last Published

April 5th, 2021

Functions in Rvision (0.4.2)

Image-class

An S4 Class Containing an OpenCV Image
bitdepth

The Bit Depth of an Image
col2bgr

Color to BGR Conversion
blur

Blurs an Image Using a Normalized Box Filter
colorspace

The Color Space of an Image
drawRotatedRectangle

fitEllipse

Fit an Ellipse Around a Set of 2D Points
drawRectangle

findTransformORB

ORB-based Geometric Transform
readFrame

Read Specific Video Frame
Stream-class

An S4 Class Containing an OpenCV Stream
RvisionAck

Image and video samples
readMulti

Read a Multi-Page Image
changeColorSpace

Convert image between colorspaces
convexityDefects

Find the Convexity Defects of a Contour
destroyDisplay

click

Detect Mouse Click on Image Display
display

as.array.Rcpp_Image

Convert Image to Array or Matrix
adaptiveThreshold

Adaptive Thresholding
absdiff

Absolute Difference Between Two Images
bilateralFilter

Edge-Preserving Noise Reduction with a Bilateral Filter
readNext.Rcpp_Stream

Read Next of an Object Frame
warpAffine

Affine Transformation
release.Rcpp_Stream

Release Object from Memory
distanceTransform

Distance Transform
addWeighted

Weighted Sum of Two Images
findContours

Find Contours in a Binary Image
flip

filter2D

Image Convolution with Kernel
cloneImage

Make a copy of an Image object
codec.Rcpp_Video

Codec of a Video
drawCircle

drawArrow

border

Add Border to Image
api

API of a Video Writer
boxFilter

Blurs an Image Using a Box Filter
findNonZero

Find Non-Zero Pixels in an Image
isBlob

Test for a Blob Object
merge

Merge Separate Channels into an Image
floodFill

Fills a Connected Component with a Given Color.
isImage

Test for an Image Object
contourArea

Area of a Contour
convexHull

Compute the Convex Hull of a Set of Points
warpPerspective

Perspective Transformation
dim.Rcpp_VideoWriter

Dimensions of a Video Writer
dim.Rcpp_Video

Dimensions of a Video
fillConvexPoly

Fill Convex Polygon with Color in Image
getPerspectiveTransform

Perspective Transform
findTransformECC

Enhanced Correlation Coefficient-based Geometric Transform
getTextSize

Calculate the Height and Width of a Text String
inRange

Range Thresholding
mean.Rcpp_Image

Mean Value of the Pixels in an Image
matchTemplate

Template Matching
image

Create an Object of Class Image
sepFilter2D

Image Filtering with a Separable Linear Filter
setProp.Rcpp_Stream

Set/Get Video Properties
drawEllipse

drawLine

fillPoly

Fill Polygon with Color in Image
frame

Video Reader Position
min.Rcpp_Image

Maxima and Minima of an Image
gaussianBlur

Blurs an Image Using a Gaussian Filter
pixelsInContour

Which Pixels are Inside a Contour
plot.Image

Plot Rvision Images
fourcc

Codec Name to FOURCC Code
fps.Rcpp_Video

Framerate of a Video
stream

Create an Object of Class Stream
selectROI

Select a Region of Interest in an Image
nrow.Rcpp_Stream

The Number of Rows/Columns of a Stream
scharr

Calculates an Image Derivatives Using a Scharr Operator
[.Rcpp_Image

Extract or Replace Parts of an Image
subImage

Extract Subimage
nrow.Rcpp_Video

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

Test for a Stream object
isVideo

Test for a Video object
minAreaRect

Fit a Rectangle Around a Set of 2D Points
minMaxLoc

Coordinates of the Maxima and Minima of an Image
writerOuput

Output File of a Video Writer
writeFrame

Write Frame to Output Video
watershed

Image Segmentation Using the Watershed Algorithm
ones

Create a One-Filled Image
sobel

Calculates an Image Derivatives Using an Extended Sobel Operator
resize

pget

Return Pixel Value at Specified Location
spatialGradient

First Order Derivatives of an Image with the Sobel Operator
rotateScale

Image Rotation and Scaling
nrow.Rcpp_VideoWriter

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

Image Output
moments

Calculate the Moments of a Shape
inpaint

Reconstruct Image Region from Region Neighborhood
invert

Invert Colors
video

Create an Object of Class Video
newDisplay

morph

Morphological Operations
sum

Sum Generic for Image objects
timelapse

Make Timelapse from Stream Object
nrow.Rcpp_Image

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

Create an object of class VideoWriter
Video-class

An S4 Class Containing an OpenCV Video
computeECC

Enhanced Correlation Coefficient Value
canny

Canny Edge Detector
changeBitDepth

Convert image bit depth
connectedComponents

Find Connected Components in a binary Image
dim.Rcpp_Stream

Dimensions of a Stream
dim.Rcpp_Image

Dimensions of an Image
drawText

VideoWriter-class

An S4 Class Containing an OpenCV Video Writer
farneback

Optical Flow Using Farneback's Algorithm
isVideoWriter

Test for a VideoWriter object
split

Split an Image into Separate Channels
mean.list

Mean of Images in a List
plot.OF_array

Plot Optical Flow Arrays
setTo

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

Blurs an Image Using a Median Filter
plot.blob

Plot Blobs
simpleBlobDetector

Simple Blob Detector
laplacian

Calculates the Laplacian of an Image
sqrBoxFilter

Blurs an Image Using a Square Box Filter
zeros

Create a Zero-Filled Image
Rvision

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