在Win 10 IoT上的UWP背景(无头)应用程序中从WebCam拍照 [英] Taking a photo from a WebCam in UWP Background (headless) App on Win 10 IoT

查看:164
本文介绍了在Win 10 IoT上的UWP背景(无头)应用程序中从WebCam拍照的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我编写了一个无头的UWP后台应用程序,并将其部署到运行Windows 10 IoT的Raspberry PI. Pi的USB端口之一插入了一个旧的Logitech网络摄像头,我希望能够从其中捕获静止图像.

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?

我已经检查了应用程序的清单,并已授予对麦克风和WebCam的访问权限.根据我发现的所有文章,应该这样做,但是我仍然没有运气.

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.

推荐答案

这可能是Logitech网络摄像头的兼容性问题.请参考此处.

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.

这篇关于在Win 10 IoT上的UWP背景(无头)应用程序中从WebCam拍照的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆