Method WaitAny
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
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