OpenCV Python 和网络摄像头

发布于 2024-08-30 05:01:58 字数 794 浏览 5 评论 0原文

我正在 OpenCV 上使用 BeagleBoardUbuntu 和 OpenCV 1.1 通过 Python 连接。我正在尝试设置一些东西来捕获 UVC 兼容网络摄像头 (Logitech C250) 的信息。我已经用 luvcview 测试了网络摄像头,它可以工作,但前提是我将输入格式设置为 YUV。如果我在“正常”模式下运行它,我会返回 JPEG 帧和某些内容 - 某处不高兴!

我正在尝试连接 OpenCV 中的网络摄像头,因为我想从网络摄像头获取图像并对其进行一些分析。由于我的设备有限,这似乎是最有效的方法 - 但是我需要指示捕获系统以 YUV 而不是 JPEG 进行捕获。有没有办法做到这一点(例如 luvcview 允许我输入 luvcview -f YUVY)?

I'm working with OpenCV on a BeagleBoard with Ubuntu and OpenCV 1.1 interfaced via Python. I'm trying to set something up to capture a feed from a UVC compatible webcam (Logitech C250). I have tested the webcam with luvcview, and it works, but only if I set the input format to YUV. If I run it in 'normal' mode I am getting back JPEG frames and something - somewhere is not happy!

I'm trying to connect with the webcam in OpenCV as I want to get the image back from the webcam and run some analysis on it. As I have a limited device this seems to be the most efficient way of doing it - however I need to instruct the capturing system to capture in YUV and not JPEG. Is there a way of doing this (for example luvcview allow me to enter luvcview -f YUVY)?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

躲猫猫 2024-09-06 05:01:58

我已经部分破解了这个。如果您使用WITH_JPEG=OFF标志编译OpenCV,那么相机将不会尝试使用MJPEG。

I've cracked this partly. If you compile OpenCV with the flag WITH_JPEG=OFF then the camera will not try to use MJPEG.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文