getFrame: Grab a specific frame from a video

Description Usage Arguments Details Value See Also Examples

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

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

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.

Value

This function returns a vpImage object.

See Also

readVid, vpVideo, vpImage

Examples

1
2
3
4
filename <- system.file("sample_vid/SampleVideo_1080x720_5mb.mp4", package = "videoplayR")
vid <- readVid(filename)
frame <- getFrame(vid, 1)
imshow(frame)

swarm-lab/videoplayR documentation built on May 30, 2019, 9:36 p.m.