Class VideoCapture
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
Video capturing class
public class VideoCapture : DisposableCvObject, IDisposable, ICvPtrHolder
- Inheritance
-
VideoCapture
- Implements
- Inherited Members
Constructors
VideoCapture()
Initializes empty capture. To use this, you should call Open.
public VideoCapture()
VideoCapture(int, VideoCaptureAPIs)
Opens a camera for video capturing
public VideoCapture(int index, VideoCaptureAPIs apiPreference = VideoCaptureAPIs.ANY)
Parameters
indexintid of the video capturing device to open. To open default camera using default backend just pass 0. (to backward compatibility usage of camera_id + domain_offset (CAP_*) is valid when apiPreference is CAP_ANY)
apiPreferenceVideoCaptureAPIspreferred Capture API backends to use. Can be used to enforce a specific reader implementation if multiple are available: e.g. cv::CAP_DSHOW or cv::CAP_MSMF or cv::CAP_V4L.
VideoCapture(int, VideoCaptureAPIs, VideoCapturePara)
Opens a camera for video capturing with API Preference and parameters
public VideoCapture(int index, VideoCaptureAPIs apiPreference, VideoCapturePara prms)
Parameters
indexintid of the video capturing device to open. To open default camera using default backend just pass 0. (to backward compatibility usage of camera_id + domain_offset (CAP_*) is valid when apiPreference is CAP_ANY)
apiPreferenceVideoCaptureAPIspreferred Capture API backends to use. Can be used to enforce a specific reader implementation if multiple are available: e.g. cv::CAP_DSHOW or cv::CAP_MSMF or cv::CAP_V4L.
prmsVideoCaptureParaParameters of VideoCapture for hardware acceleration
VideoCapture(int, VideoCaptureAPIs, int[])
Opens a camera for video capturing with API Preference and parameters
public VideoCapture(int index, VideoCaptureAPIs apiPreference, int[] prms)
Parameters
indexintid of the video capturing device to open. To open default camera using default backend just pass 0. (to backward compatibility usage of camera_id + domain_offset (CAP_*) is valid when apiPreference is CAP_ANY)
apiPreferenceVideoCaptureAPIspreferred Capture API backends to use. Can be used to enforce a specific reader implementation if multiple are available: e.g. cv::CAP_DSHOW or cv::CAP_MSMF or cv::CAP_V4L.
prmsint[]The
paramsparameter allows to specify extra parameters encoded as pairs(paramId_1, paramValue_1, paramId_2, paramValue_2, ...). See cv::VideoCaptureProperties
VideoCapture(nint)
Initializes from native pointer
protected VideoCapture(nint ptr)
Parameters
ptrnintCvCapture*
VideoCapture(string, VideoCaptureAPIs)
Opens a video file or a capturing device or an IP video stream for video capturing with API Preference
public VideoCapture(string fileName, VideoCaptureAPIs apiPreference = VideoCaptureAPIs.ANY)
Parameters
fileNamestringit can be: - name of video file (e.g.
video.avi) - or image sequence (e.g.img_%02d.jpg, which will read samples likeimg_00.jpg, img_01.jpg, img_02.jpg, ...) - or URL of video stream (e.g.protocol://host:port/script_name?script_params|auth). 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.apiPreferenceVideoCaptureAPIsapiPreference preferred Capture API backends to use. Can be used to enforce a specific reader implementation if multiple are available: e.g. cv::CAP_FFMPEG or cv::CAP_IMAGES or cv::CAP_DSHOW.
VideoCapture(string, VideoCaptureAPIs, VideoCapturePara)
Opens a video file or a capturing device or an IP video stream for video capturing with API Preference
public VideoCapture(string fileName, VideoCaptureAPIs apiPreference, VideoCapturePara prms)
Parameters
fileNamestringit can be: - name of video file (e.g.
video.avi) - or image sequence (e.g.img_%02d.jpg, which will read samples likeimg_00.jpg, img_01.jpg, img_02.jpg, ...) - or URL of video stream (e.g.protocol://host:port/script_name?script_params|auth). 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.apiPreferenceVideoCaptureAPIsapiPreference preferred Capture API backends to use. Can be used to enforce a specific reader implementation if multiple are available: e.g. cv::CAP_FFMPEG or cv::CAP_IMAGES or cv::CAP_DSHOW.
prmsVideoCaptureParaParameters of VideoCature for hardware acceleration
VideoCapture(string, VideoCaptureAPIs, int[])
Opens a video file or a capturing device or an IP video stream for video capturing with API Preference
public VideoCapture(string fileName, VideoCaptureAPIs apiPreference, int[] prms)
Parameters
fileNamestringit can be: - name of video file (eg.
video.avi) - or image sequence (eg.img_%02d.jpg, which will read samples likeimg_00.jpg, img_01.jpg, img_02.jpg, ...) - or URL of video stream (eg.protocol://host:port/script_name?script_params|auth). 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.apiPreferenceVideoCaptureAPIsapiPreference preferred Capture API backends to use. Can be used to enforce a specific reader implementation if multiple are available: e.g. cv::CAP_FFMPEG or cv::CAP_IMAGES or cv::CAP_DSHOW.
prmsint[]The
paramsparameter allows to specify extra parameters encoded as pairs(paramId_1, paramValue_1, paramId_2, paramValue_2, ...). See cv::VideoCaptureProperties
Properties
AutoExposure
exposure control done by camera, user can adjust refernce level using this feature [CV_CAP_PROP_AUTO_EXPOSURE]
public double AutoExposure { get; set; }
Property Value
AutoFocus
public bool AutoFocus { get; set; }
Property Value
BackLight
public double BackLight { get; set; }
Property Value
Brightness
Gets or sets brightness of image (only for cameras)
public double Brightness { get; set; }
Property Value
BufferSize
public double BufferSize { get; set; }
Property Value
CaptureType
Gets the capture type (File or Camera)
public CaptureType CaptureType { get; }
Property Value
Contrast
Gets or sets contrast of image (only for cameras)
public double Contrast { get; set; }
Property Value
ConvertRgb
Boolean flags indicating whether images should be converted to RGB
public bool ConvertRgb { get; set; }
Property Value
Exposure
Exposure (only for cameras)
public double Exposure { get; set; }
Property Value
Focus
public double Focus { get; set; }
Property Value
Format
The format of the Mat objects returned by retrieve()
public int Format { get; set; }
Property Value
FourCC
Gets or sets 4-character code of codec
public string FourCC { get; set; }
Property Value
Fps
Gets or sets frame rate
public double Fps { get; set; }
Property Value
FrameCount
Gets number of frames in video file
public int FrameCount { get; }
Property Value
FrameHeight
Gets or sets height of frames in the video stream
public int FrameHeight { get; set; }
Property Value
FrameWidth
Gets or sets width of frames in the video stream
public int FrameWidth { get; set; }
Property Value
GStreamerQueueLength
default is 1 [CV_CAP_GSTREAMER_QUEUE_LENGTH]
public double GStreamerQueueLength { get; set; }
Property Value
Gain
Gain of the image (only for cameras)
public double Gain { get; set; }
Property Value
Gamma
public double Gamma { get; set; }
Property Value
Guid
public double Guid { get; set; }
Property Value
Hue
Gets or sets hue of image (only for cameras)
public double Hue { get; set; }
Property Value
Iris
public double Iris { get; set; }
Property Value
IsoSpeed
public double IsoSpeed { get; set; }
Property Value
Mode
A backend-specific value indicating the current capture mode
public int Mode { get; set; }
Property Value
Monocrome
public double Monocrome { get; set; }
Property Value
OpenNI_Baseline
in mm [CV_CAP_PROP_OPENNI_BASELINE]
public double OpenNI_Baseline { get; set; }
Property Value
OpenNI_DepthGeneratorBaseline
[CV_CAP_OPENNI_DEPTH_GENERATOR_BASELINE]
public double OpenNI_DepthGeneratorBaseline { get; set; }
Property Value
OpenNI_DepthGeneratorFocalLength
[CV_CAP_OPENNI_DEPTH_GENERATOR_FOCAL_LENGTH]
public double OpenNI_DepthGeneratorFocalLength { get; set; }
Property Value
OpenNI_DepthGeneratorRegistrationON
[CV_CAP_OPENNI_DEPTH_GENERATOR_REGISTRATION_ON]
public double OpenNI_DepthGeneratorRegistrationON { get; set; }
Property Value
OpenNI_FocalLength
in pixels [CV_CAP_PROP_OPENNI_FOCAL_LENGTH]
public double OpenNI_FocalLength { get; set; }
Property Value
OpenNI_FrameMaxDepth
in mm [CV_CAP_PROP_OPENNI_FRAME_MAX_DEPTH]
public double OpenNI_FrameMaxDepth { get; set; }
Property Value
OpenNI_ImageGeneratorOutputMode
[CV_CAP_OPENNI_IMAGE_GENERATOR_OUTPUT_MODE]
public double OpenNI_ImageGeneratorOutputMode { get; set; }
Property Value
OpenNI_OutputMode
[CV_CAP_PROP_OPENNI_OUTPUT_MODE]
public double OpenNI_OutputMode { get; set; }
Property Value
OpenNI_Registration
flag that synchronizes the remapping depth map to image map by changing depth generator's view point (if the flag is "on") or sets this view point to its normal one (if the flag is "off"). [CV_CAP_PROP_OPENNI_REGISTRATION]
public double OpenNI_Registration { get; set; }
Property Value
Pan
public double Pan { get; set; }
Property Value
PosAviRatio
Gets or sets relative position of video file
public CapturePosAviRatio PosAviRatio { get; set; }
Property Value
PosFrames
Gets or sets 0-based index of the frame to be decoded/captured next
public int PosFrames { get; set; }
Property Value
PosMsec
Gets or sets film current position in milliseconds or video capture timestamp
public int PosMsec { get; set; }
Property Value
PvAPIMulticastIP
ip for anable multicast master mode. 0 for disable multicast [CV_CAP_PROP_PVAPI_MULTICASTIP]
public double PvAPIMulticastIP { get; set; }
Property Value
Rectification
TOWRITE (note: only supported by DC1394 v 2.x backend currently)
public double Rectification { get; set; }
Property Value
Roll
public double Roll { get; set; }
Property Value
Saturation
Gets or sets saturation of image (only for cameras)
public double Saturation { get; set; }
Property Value
Settings
public double Settings { get; set; }
Property Value
Sharpness
public double Sharpness { get; set; }
Property Value
Temperature
[CV_CAP_PROP_TEMPERATURE]
public double Temperature { get; set; }
Property Value
Tilt
public double Tilt { get; set; }
Property Value
Trigger
public double Trigger { get; set; }
Property Value
TriggerDelay
public double TriggerDelay { get; set; }
Property Value
WhiteBalanceBlueU
public double WhiteBalanceBlueU { get; set; }
Property Value
WhiteBalanceRedV
public double WhiteBalanceRedV { get; set; }
Property Value
XI_AEAG
Automatic exposure/gain [CV_CAP_PROP_XI_AEAG]
public double XI_AEAG { get; set; }
Property Value
XI_AEAGLevel
default is 1 [CV_CAP_PROP_XI_AEAG_LEVEL]
public double XI_AEAGLevel { get; set; }
Property Value
XI_AEMaxLimit
Maximum limit of exposure in AEAG procedure [CV_CAP_PROP_XI_AE_MAX_LIMIT]
public double XI_AEMaxLimit { get; set; }
Property Value
XI_AGMaxLimit
Maximum limit of gain in AEAG procedure [CV_CAP_PROP_XI_AG_MAX_LIMIT]
public double XI_AGMaxLimit { get; set; }
Property Value
XI_AutoWB
Automatic white balance [CV_CAP_PROP_XI_AUTO_WB]
public double XI_AutoWB { get; set; }
Property Value
XI_DataFormat
Output data format. [CV_CAP_PROP_XI_DATA_FORMAT]
public double XI_DataFormat { get; }
Property Value
XI_Downsampling
Change image resolution by binning or skipping.
[CV_CAP_PROP_XI_DOWNSAMPLING]
public double XI_Downsampling { get; set; }
Property Value
XI_ExpPriority
Exposure priority (0.5 - exposure 50%, gain 50%). [CV_CAP_PROP_XI_EXP_PRIORITY]
public double XI_ExpPriority { get; set; }
Property Value
XI_GpiLevel
Get general purpose level [CV_CAP_PROP_XI_GPI_LEVEL]
public double XI_GpiLevel { get; set; }
Property Value
XI_GpiMode
Set general purpose input mode [CV_CAP_PROP_XI_GPI_MODE]
public double XI_GpiMode { get; set; }
Property Value
XI_GpiSelector
Selects general purpose input [CV_CAP_PROP_XI_GPI_SELECTOR]
public double XI_GpiSelector { get; set; }
Property Value
XI_GpoMode
Set general purpose output mode [CV_CAP_PROP_XI_GPO_MODE]
public double XI_GpoMode { get; set; }
Property Value
XI_GpoSelector
Selects general purpose output [CV_CAP_PROP_XI_GPO_SELECTOR]
public double XI_GpoSelector { get; set; }
Property Value
XI_LedMode
Define camera signalling LED functionality [CV_CAP_PROP_XI_LED_MODE]
public double XI_LedMode { get; set; }
Property Value
XI_LedSelector
Selects camera signalling LED [CV_CAP_PROP_XI_LED_SELECTOR]
public double XI_LedSelector { get; set; }
Property Value
XI_ManualWB
Calculates White Balance(must be called during acquisition) [CV_CAP_PROP_XI_MANUAL_WB]
public double XI_ManualWB { get; set; }
Property Value
XI_OffsetX
Horizontal offset from the origin to the area of interest (in pixels). [CV_CAP_PROP_XI_OFFSET_X]
public double XI_OffsetX { get; set; }
Property Value
XI_OffsetY
Vertical offset from the origin to the area of interest (in pixels). [CV_CAP_PROP_XI_OFFSET_Y]
public double XI_OffsetY { get; set; }
Property Value
XI_Timeout
default is 1 [CV_CAP_PROP_XI_TIMEOUT]
public double XI_Timeout { get; set; }
Property Value
XI_TrgSoftware
Generates an internal trigger. PRM_TRG_SOURCE must be set to TRG_SOFTWARE. [CV_CAP_PROP_XI_TRG_SOFTWARE]
public double XI_TrgSoftware { get; set; }
Property Value
XI_TrgSource
Defines source of trigger. [CV_CAP_PROP_XI_TRG_SOURCE]
public double XI_TrgSource { get; set; }
Property Value
Zoom
public double Zoom { get; set; }
Property Value
Methods
DisposeUnmanaged()
Releases unmanaged resources
protected override void DisposeUnmanaged()
FromCamera(int, VideoCaptureAPIs)
Opens a camera for video capturing
public static VideoCapture FromCamera(int index, VideoCaptureAPIs apiPreference = VideoCaptureAPIs.ANY)
Parameters
indexintid of the video capturing device to open. To open default camera using default backend just pass 0. (to backward compatibility usage of camera_id + domain_offset (CAP_*) is valid when apiPreference is CAP_ANY)
apiPreferenceVideoCaptureAPIspreferred Capture API backends to use. Can be used to enforce a specific reader implementation if multiple are available: e.g. cv::CAP_DSHOW or cv::CAP_MSMF or cv::CAP_V4L.
Returns
FromFile(string, VideoCaptureAPIs)
Opens a video file or a capturing device or an IP video stream for video capturing with API Preference
public static VideoCapture FromFile(string fileName, VideoCaptureAPIs apiPreference = VideoCaptureAPIs.ANY)
Parameters
fileNamestringit can be: - name of video file (e.g.
video.avi) - or image sequence (e.g.img_%02d.jpg, which will read samples likeimg_00.jpg, img_01.jpg, img_02.jpg, ...) - or URL of video stream (e.g.protocol://host:port/script_name?script_params|auth). 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.apiPreferenceVideoCaptureAPIsapiPreference preferred Capture API backends to use. Can be used to enforce a specific reader implementation if multiple are available: e.g. cv::CAP_FFMPEG or cv::CAP_IMAGES or cv::CAP_DSHOW.
Returns
Get(VideoCaptureProperties)
Returns the specified VideoCapture property
public double Get(VideoCaptureProperties propertyId)
Parameters
propertyIdVideoCapturePropertiesProperty identifier from cv::VideoCaptureProperties (eg. cv::CAP_PROP_POS_MSEC, cv::CAP_PROP_POS_FRAMES, ...) or one from @ref videoio_flags_others
Returns
- double
Value for the specified property. Value 0 is returned when querying a property that is not supported by the backend used by the VideoCapture instance.
Get(int)
Returns the specified VideoCapture property
public double Get(int propertyId)
Parameters
propertyIdintProperty identifier from cv::VideoCaptureProperties (eg. cv::CAP_PROP_POS_MSEC, cv::CAP_PROP_POS_FRAMES, ...) or one from @ref videoio_flags_others
Returns
- double
Value for the specified property. Value 0 is returned when querying a property that is not supported by the backend used by the VideoCapture instance.
GetBackendName()
Returns used backend API name. Note that stream should be opened.
public string GetBackendName()
Returns
GetExceptionMode()
query if exception mode is active
public bool GetExceptionMode()
Returns
Grab()
Grabs the next frame from video file or capturing device.
The method/function grabs the next frame from video file or camera and returns true (non-zero) in the case of success.
The primary use of the function is in multi-camera environments, especially when the cameras do not have hardware synchronization. That is, you call VideoCapture::grab() for each camera and after that call the slower method VideoCapture::retrieve() to decode and get frame from each camera. This way the overhead on demosaicing or motion jpeg decompression etc. is eliminated and the retrieved frames from different cameras will be closer in time.
Also, when a connected camera is multi-head (for example, a stereo camera or a Kinect device), the correct way of retrieving data from it is to call VideoCapture::grab() first and then call VideoCapture::retrieve() one or more times with different values of the channel parameter.
public bool Grab()
Returns
- bool
true(non-zero) in the case of success.
IsOpened()
Returns true if video capturing has been initialized already.
public bool IsOpened()
Returns
Open(int, VideoCaptureAPIs)
Opens a camera for video capturing
public bool Open(int index, VideoCaptureAPIs apiPreference = VideoCaptureAPIs.ANY)
Parameters
indexintid of the video capturing device to open. To open default camera using default backend just pass 0. (to backward compatibility usage of camera_id + domain_offset (CAP_*) is valid when apiPreference is CAP_ANY)
apiPreferenceVideoCaptureAPIspreferred Capture API backends to use. Can be used to enforce a specific reader implementation if multiple are available: e.g. cv::CAP_DSHOW or cv::CAP_MSMF or cv::CAP_V4L.
Returns
- bool
trueif the file has been successfully opened
Open(string, VideoCaptureAPIs)
Opens a video file or a capturing device or an IP video stream for video capturing.
public bool Open(string fileName, VideoCaptureAPIs apiPreference = VideoCaptureAPIs.ANY)
Parameters
fileNamestringit can be: - name of video file (eg.
video.avi) - or image sequence (eg.img_%02d.jpg, which will read samples likeimg_00.jpg, img_01.jpg, img_02.jpg, ...) - or URL of video stream (eg.protocol://host:port/script_name?script_params|auth). 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.apiPreferenceVideoCaptureAPIsapiPreference preferred Capture API backends to use. Can be used to enforce a specific reader implementation if multiple are available: e.g. cv::CAP_FFMPEG or cv::CAP_IMAGES or cv::CAP_DSHOW.
Returns
- bool
trueif the file has been successfully opened
Read(Mat)
Grabs, decodes and returns the next video frame.
The method/function combines VideoCapture::grab() and VideoCapture::retrieve() in one call. This is the most convenient method for reading video files or capturing data from decode and returns the just grabbed frame. If no frames has been grabbed (camera has been disconnected, or there are no more frames in video file), the method returns false and the function returns empty image (with %cv::Mat, test it with Mat::empty()).
public bool Read(Mat image)
Parameters
imageMat
Returns
- bool
falseif no frames has been grabbed
Read(OutputArray)
Grabs, decodes and returns the next video frame.
The method/function combines VideoCapture::grab() and VideoCapture::retrieve() in one call. This is the most convenient method for reading video files or capturing data from decode and returns the just grabbed frame. If no frames has been grabbed (camera has been disconnected, or there are no more frames in video file), the method returns false and the function returns empty image (with %cv::Mat, test it with Mat::empty()).
public bool Read(OutputArray image)
Parameters
imageOutputArray
Returns
- bool
falseif no frames has been grabbed
Release()
Closes video file or capturing device.
public void Release()
Retrieve(Mat, CameraChannels)
Decodes and returns the grabbed video frame.
The method decodes and returns the just grabbed frame. If no frames has been grabbed (camera has been disconnected, or there are no more frames in video file), the method returns false and the function returns an empty image (with %cv::Mat, test it with Mat::empty()).
public bool Retrieve(Mat image, CameraChannels streamIdx)
Parameters
imageMatthe video frame is returned here. If no frames has been grabbed the image will be empty.
streamIdxCameraChannelsnon-zero streamIdx is only valid for multi-head camera live streams
Returns
Retrieve(Mat, int)
Decodes and returns the grabbed video frame.
The method decodes and returns the just grabbed frame. If no frames has been grabbed (camera has been disconnected, or there are no more frames in video file), the method returns false and the function returns an empty image (with %cv::Mat, test it with Mat::empty()).
public bool Retrieve(Mat image, int flag = 0)
Parameters
imageMatthe video frame is returned here. If no frames has been grabbed the image will be empty.
flagintit could be a frame index or a driver specific flag
Returns
Retrieve(OutputArray, CameraChannels)
Decodes and returns the grabbed video frame.
The method decodes and returns the just grabbed frame. If no frames has been grabbed (camera has been disconnected, or there are no more frames in video file), the method returns false and the function returns an empty image (with %cv::Mat, test it with Mat::empty()).
public bool Retrieve(OutputArray image, CameraChannels streamIdx)
Parameters
imageOutputArraythe video frame is returned here. If no frames has been grabbed the image will be empty.
streamIdxCameraChannelsnon-zero streamIdx is only valid for multi-head camera live streams
Returns
Retrieve(OutputArray, int)
Decodes and returns the grabbed video frame.
The method decodes and returns the just grabbed frame. If no frames has been grabbed (camera has been disconnected, or there are no more frames in video file), the method returns false and the function returns an empty image (with %cv::Mat, test it with Mat::empty()).
public bool Retrieve(OutputArray image, int flag = 0)
Parameters
imageOutputArraythe video frame is returned here. If no frames has been grabbed the image will be empty.
flagintit could be a frame index or a driver specific flag
Returns
RetrieveMat()
Decodes and returns the grabbed video frame.
The method decodes and returns the just grabbed frame. If no frames has been grabbed (camera has been disconnected, or there are no more frames in video file), the method returns false and the function returns an empty image (with %cv::Mat, test it with Mat::empty()).
public Mat RetrieveMat()
Returns
- Mat
the video frame is returned here. If no frames has been grabbed the image will be empty.
Set(VideoCaptureProperties, double)
Sets a property in the VideoCapture.
public bool Set(VideoCaptureProperties propertyId, double value)
Parameters
propertyIdVideoCapturePropertiesProperty identifier from cv::VideoCaptureProperties (eg. cv::CAP_PROP_POS_MSEC, cv::CAP_PROP_POS_FRAMES, ...) or one from @ref videoio_flags_others
valuedoubleValue of the property.
Returns
- bool
trueif the property is supported by backend used by the VideoCapture instance.
Set(int, double)
Sets a property in the VideoCapture.
public bool Set(int propertyId, double value)
Parameters
propertyIdintProperty identifier from cv::VideoCaptureProperties (eg. cv::CAP_PROP_POS_MSEC, cv::CAP_PROP_POS_FRAMES, ...) or one from @ref videoio_flags_others
valuedoubleValue of the property.
Returns
- bool
trueif the property is supported by backend used by the VideoCapture instance.
SetExceptionMode(bool)
Switches exceptions mode. methods raise exceptions if not successful instead of returning an error code
public void SetExceptionMode(bool enable)
Parameters
enablebool
WaitAny(IEnumerable<VideoCapture>, out int[], long)
Wait for ready frames from VideoCapture.
The primary use of the function is in multi-camera environments. The method fills the ready state vector, grabs video frame, if camera is ready.
After this call use VideoCapture::retrieve() to decode and fetch frame data.
public static bool WaitAny(IEnumerable<VideoCapture> streams, out int[] readyIndex, long timeoutNs = 0)
Parameters
streamsIEnumerable<VideoCapture>input video streams
readyIndexint[]stream indexes with grabbed frames (ready to use .retrieve() to fetch actual frame)
timeoutNslongnumber of nanoseconds (0 - infinite)
Returns
- bool
`true if streamReady is not empty
Exceptions
- OpenCVException
Exception %Exception on stream errors (check .isOpened() to filter out malformed streams) or VideoCapture type is not supported