Learn R Programming

Rbgs (version 0.2)

readvideoframe: Read the specified frames of a video.

Description

This function takes as input URL of the video. It reads only those frames of the video that have been specified by the user. It requires two more parameters 'start' and 'end', that defines the range of the videoframes to be retrieved.

Usage

readvideoframe(videoURL, start, end)

Arguments

videoURL

Path to the input video file

start

It indicates the first frame you wish to read.IT should be in range zero to frame count and smaller than end parameter.

end

It indicates the last frame you wish to read. It should be greater than start and should be in range 0 to frame count.

Value

A matrix of the grayscale frames.

Examples

Run this code
# NOT RUN {
##Save the URL of the video file into R session and then load the required videoframes
videoURL <- system.file("extdata","jog.mp4",package = "Rbgs")
frames <- readvideoframe(videoURL,213,233)
# }

Run the code above in your browser using DataLab