如何在Google Colab中使用cap = cv2.VideoCapture(0) [英] How to use cap = cv2.VideoCapture(0) in Google Colab

查看:331
本文介绍了如何在Google Colab中使用cap = cv2.VideoCapture(0)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

cap = cv2.在Google Colab中执行命令时,VideoCapture(0)没有打开网络摄像机.

cap = cv2.VideoCapture(0) is not opening web camera when executing the command in Google Colab.

推荐答案

由于Colab在您的浏览器中运行,因此您需要使用Web API来访问本地硬件,例如摄像机.

Since Colab is running in your browser, you'll want to use web APIs to access local hardware like a camera.

这是一个示例,显示了如何从Colab中的本地网络摄像头捕获图像: https://colab.research.google.com/notebooks/snippets /advanced_outputs.ipynb#scrollTo=2viqYx97hPMi

Here's an example showing how to capture an image from your local webcam in Colab: https://colab.research.google.com/notebooks/snippets/advanced_outputs.ipynb#scrollTo=2viqYx97hPMi

这篇关于如何在Google Colab中使用cap = cv2.VideoCapture(0)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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