Table of Contents

Method EnumerateDevices

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

EnumerateDevices(VideoCaptureAPIs)

Lists camera devices in backend priority order.

public static VideoDeviceInfo[] EnumerateDevices(VideoCaptureAPIs apiPreference = VideoCaptureAPIs.ANY)

Parameters

apiPreference VideoCaptureAPIs

The backend to query, or ANY to query all camera backends.

Returns

VideoDeviceInfo[]

The devices reported by backends that support enumeration. The array may be empty.

Remarks

Multiple backends can report the same physical camera. Pass each device's Index and Backend together to VideoCapture(int, VideoCaptureAPIs) to open it.