在 Raspberry Pi 中使用 OpenCv 设置网络摄像头焦点 [英] Set WebCamera focus with OpenCv in Raspberry Pi

查看:32
本文介绍了在 Raspberry Pi 中使用 OpenCv 设置网络摄像头焦点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个罗技 C920 网络摄像头.我能够按照这个 https://stackoverflow.com/a/42819965 关闭自动对焦并手动设置所需的在我的 Windows 10 电脑上运行 python 代码时集中注意力.此外,我可以在调整值时看到焦点的变化.但是,当我尝试将同一台相机连接到 Raspberry Pi (3 B+) 并运行相同的代码时,无论我设置的焦点值是多少,它都没有响应.始终相同的模糊图像.这可能是什么原因?

I have a logitech C920 Web camera. I was able to follow this https://stackoverflow.com/a/42819965 to get the autofocus turned off and manually set the desired focus while I ran the python code on My Windows 10 pc. Also, I could see the changes in focus when adjusting value. But when I tried to connect the same camera to Raspberry Pi (3 B+ ) and run the same code, for whatever the value of focus I set, it just doesn't respond. Same blurry images always. What could be the possible reason for this?

推荐答案

取决于 cv::VideoCapture 使用的驱动程序和/或视频后端.

Depends on the driver and/or video backend used by cv::VideoCapture.

您可以尝试使用 v4l2-ctl 直接设置焦点:https://www.christitus.com/logitech-c920-linux-driver/

You can try setting the focus directly with v4l2-ctl: https://www.christitus.com/logitech-c920-linux-driver/

这篇关于在 Raspberry Pi 中使用 OpenCv 设置网络摄像头焦点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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