-4
如何获得使用USB(WebCams)连接到我的电脑的所有相机设备的列表,以及笔记本电脑所具备的相机内置设备。如何从我的电脑获取相机设备列表C#
如何获得使用USB(WebCams)连接到我的电脑的所有相机设备的列表,以及笔记本电脑所具备的相机内置设备。如何从我的电脑获取相机设备列表C#
我这样做过 - 使用http://directshownet.sourceforge.net/给你一个体面的.NET接口DirectShow的,那么你可以使用下面的代码:
DsDevice[] captureDevices;
// Get the set of directshow devices that are video inputs.
captureDevices = DsDevice.GetDevicesOfCat(FilterCategory.VideoInputDevice);
for (int idx = 0; idx < captureDevices.Length; idx++)
{
// Do something with the device here...
}