简体   繁体   中英

Disable webcam's autofocus in Windows using opencv-python

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.

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

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

Can anyone help? Thank you in advance.

try to use follows:

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

);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM