在Windows中使用OpenCV-Python禁用网络摄像头的自动对焦 [英] Disable webcam's autofocus in Windows using opencv-python

查看:626
本文介绍了在Windows中使用OpenCV-Python禁用网络摄像头的自动对焦的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用python和opencv禁用便携式USB网络摄像头(型号:Trust Zyno Full HD视频网络摄像头)的自动对焦.按照此先前未回答的问题中的建议使用cap.set(cv.CAP_PROP_AUTOFOCUS, 0),不会为我工作.

I am trying to disable the autofocus on my portable USB webcam (model: Trust Zyno Full HD Video Webcam) using a python and opencv. Using cap.set(cv.CAP_PROP_AUTOFOCUS, 0) as proposed in this previous unanswered question, does not work for me.

我看到了另一个主题,它与Linux有关,而其他与C ++解决方案.

I saw another topic which is instead related to Linux, and others related to c++ solutions.

但是,我正在使用Python 3.6和opencv 3.4.0.12在Windows 10上进行工作.

However, I am working on Windows 10, using Python 3.6 and opencv 3.4.0.12.

任何人都可以帮忙吗?预先谢谢你.

Can anyone help? Thank you in advance.

推荐答案

尝试使用以下方法:

  // Turning off autofocus
  cap1.set( cv.CAP_PROP_SETTINGS, 1 );

);

这篇关于在Windows中使用OpenCV-Python禁用网络摄像头的自动对焦的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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