Learn R Programming

videoplayR (version 0.3.1)

nextFrame: Grab the next frame from a video stream

Description

This function grabs the next available frame from a vpStream object and returns a vpImage object that can be manipulated using the videoplayR image and video manipulation toolbox.

Usage

nextFrame(stream)

Arguments

stream
The vpStream object from which the frame should be grabbed.

Value

This function returns a vpImage object.

Details

The vpImage object created by the grabFrame 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

readStream, release, vpStream, vpImage

Examples

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

Run the code above in your browser using DataLab