Taking a photo from a WebCam in UWP Background (headless) App on Win 10 IoT

旧城冷巷雨未停 提交于 2019-12-13 08:48:37

问题


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?

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:


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.



来源:https://stackoverflow.com/questions/46457505/taking-a-photo-from-a-webcam-in-uwp-background-headless-app-on-win-10-iot

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!