Learn R Programming

videoplayR (version 0.3.1)

getFrame: Grab a specific frame from a video

Description

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

Usage

getFrame(video, frame)

Arguments

video
The vpVideo object from which the frame should be grabbed.
frame
The position in the video of the frame to 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

readVid, vpVideo, vpImage

Examples

Run this code
filename <- system.file("sample_vid/SampleVideo_1080x720_5mb.mp4", package = "videoplayR")
vid <- readVid(filename)
frame <- getFrame(vid, 1)
imshow(frame)

Run the code above in your browser using DataLab