A Stream object contains an OpenCV
stream that originates from a camera connected to the computer.
Function for creating Stream objects from video
streams.
Arguments
- ...
Either:
- index:
An integer value corresponding to the index of the camera to read a stream from (default: 0; 0 is usually the default webcam on most computers). Or...
- stream_string:
...a character string corresponfing to the URL of video stream (eg. protocol://host:port/script_name?script_params|auth) or a GStreamer pipeline string in gst-launch tool format if GStreamer is used as backend API. Note that each video stream or IP camera feed has its own URL scheme. Please refer to the documentation of source stream to know the right URL format.
- api
A character string corresponding to the API to use for reading the stream from the camera (see Note; default: "ANY").
Slots
dim,ncol,nrowFunctions returning the dimensions of the object.
get,setFunctions to access and set internal properties of the object.
isOpenedFunction to check the status of the camera stream.
readNextFunctions to access the next frame in the stream.
releaseFunction to release the object from memory.
Note
Hereafter is a list of all supported APIs. Note that not all APIs will be available on your computer (actually most of them will not be).
- "ANY":
automatically select an API.
- "VFW":
Video For Windows.
- "V4L", "V4L2":
Video For Linux.
- "FIREWIRE", "FIREWARE", "IEEE1394", "DC1394", "CMU1394":
IEEE 1394 drivers.
- "QT":
Quicktime.
- "UNICAP":
Unicap drivers.
- "DSHOW":
DirectShow.
- "PVAPI":
PvAPI, Prosilica GigE SDK.
- "OPENNI":
OpenNI (for Kinect).
- "OPENNI_ASUS":
OpenNI (for Asus Xtion).
- "XIAPI":
XIMEA Camera API.
- "AVFOUNDATION":
AVFoundation framework for iOS and OSX > Lion.
- "GIGANETIX":
Smartek Giganetix GigEVisionSDK.
- "MSMF":
Microsoft Media Foundation.
- "WINRT":
Microsoft Windows Runtime using Media Foundation.
- "INTELPERC":
Intel Perceptual Computing SDK.
- "OPENNI2":
OpenNI2 (for Kinect).
- "OPENNI2_ASUS":
OpenNI2 (for Asus Xtion and Occipital Structure sensors).
- "GPHOTO2":
gPhoto2 connection.
- "GSTREAMER":
GStreamer.
- "FFMPEG":
FFMPEG library.
- "IMAGES":
OpenCV Image Sequence.
- "ARAVIS":
Aravis SDK.
- "OPENCV_MJPEG":
Built-in OpenCV MotionJPEG codec.
- "INTEL_MFX":
Intel MediaSDK.
See also
stream, queue
Author
Simon Garnier, garnier@njit.edu
Examples
if (FALSE) { # \dontrun{
live <- stream(0)
release(live)
} # }