readNext: Read Next Frame of an Object

View source: R/generic.R

readNext.Rcpp_QueueR Documentation

Read Next Frame of an Object

Description

Read the next frame of a Video, VideoStack, Stream, or Queue object and returns it as an Image object.

Usage

## S3 method for class 'Rcpp_Queue'
readNext(x, target = "new")

## S3 method for class 'Rcpp_Stream'
readNext(x, target = "new")

## S3 method for class 'Rcpp_Video'
readNext(x, target = "new")

## S3 method for class 'VideoStack'
readNext(x, target = "new")

readNext(x, target = "new")

Arguments

x

A Video, VideoStack, Stream, or Queue object.

target

The location where the results should be stored. It can take 2 values:

  • "new":a new Image object is created and the results are stored inside (the default).

  • An Image object:the results are stored in another existing Image object. This will replace the content of target. Note that target must have the same dimensions as x.

Value

If target="new", the function returns an Image object. If target is an Image object, the function returns nothing and modifies that Image object in place.

Author(s)

Simon Garnier, garnier@njit.edu

See Also

Video, VideoStack, Stream, Queue, Image, readFrame

Examples

balloon <- video(system.file("sample_vid/Balloon.mp4", package = "Rvision"))
frame_next <- readNext(balloon)


swarm-lab/Rvision documentation built on Feb. 7, 2024, 4:59 a.m.