A Queue object contains a self-filling, asynchronous
queue of images retrieved from a Video or Stream
object. Retrieving an image from a video or camera stream is generally fast
but it still comes with a time penalty that can become significant when
processing large numbers of images and/or videos. A Queue object can
help save some of that lost time by reading and storing images from a video
or stream in parallel of the main R thread, for instance while other
operations are being performed by R on previously read images. These
pre-loaded frames are, therefore, immediately available when needed,
effectively eliminating the wait time between two frame reads (as long as
the queue reads and stores new frames faster than R can process them).
QueueAn object of class C++Class of length 1.
dim,ncol,nrowFunctions returning the dimensions of the frames in the queue.
lengthFunction returning the number of frames in the queue.
capacityFunction returning the maximum number of frames that the queue can hold at any one time.
frameFunction returning the index of the frame to be read next.
full,emptyFunction returning the state of the queue (full or empty or neither).
readNextFunction to access the next frame in the queue.
resetFunction to empty the queue and start collecting new frames.