Read Next Frame of an Object
Source:R/QueueClass.R
, R/StreamClass.R
, R/VideoClass.R
, and 2 more
readNext.Rd
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
, orQueue
object.- target
The location where the results should be stored. It can take 2 values:
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
Simon Garnier, garnier@njit.edu
Examples
balloon <- video(system.file("sample_vid/Balloon.mp4", package = "Rvision"))
#> Error: Could not open the video.
frame_next <- readNext(balloon)
#> Error in eval(expr, envir, enclos): object 'balloon' not found