Taking a photo from a WebCam in UWP Background (he

2019-08-17 10:51发布

I've written a headless UWP Background Application and deployed it to a Raspberry PI running Windows 10 IoT. The Pi has an old Logitech webcam plugged into one of the USB ports and I'd like to be able to capture still images from it.

I've lifted code from a Microsoft Blog on the subject (albeit aimed at UWP on the Xbox), but my app seems unable to detect any cameras at all. The following call comes back with no results:

var allVideoDevices = await DeviceInformation.FindAllAsync(DeviceClass.VideoCapture);

As you can see from this screenshot of the remote client, the device recognises that there's a camera attached, so why can't I access it in code?

enter image description here

I've checked the app's manifest, and I've granted access to both the Microphone and WebCam. According to all the articles I've found, that should do it, but I'm still not having any luck.

1条回答
爷的心禁止访问
2楼-- · 2019-08-17 11:08

It may be compatibility issue of your Logitech webcam.Please reference Hardware compatibility list.You can try to install the driver of your Logitech webcam manually, or choose a compatibility webcam and then try again.How to install usb webcam drivers please see here.

查看更多
登录 后发表回答