Learn R Programming

videoplayR (version 0.3.1)

readStream: Capture video stream from camera

Description

This function captures a video stream from a camera and return a vpVideo object that can be manipulated using the videoplayR image and video manipulation toolbox. This function should support most webcams and other cameras supported by OpenCV.

Usage

readStream(cam = 0L)

Arguments

cam
The camera id number (default: 0).

Value

This function returns a vpVideo object.

Details

The vpStream object created by the readStream function is not a persistent object, but a pointer to a C++ object that cannot be saved for reuse in a different session.

See Also

release, readImg, readVideo, nextFrame, vpStream

Examples

Run this code
stream <- readStream(0)
frame <- nextFrame(stream)
imshow(frame)
release(stream)

Run the code above in your browser using DataLab