在OpenCV和Python的帮助下,您可以非常轻松地完成这项工作:

    1. cap = cv2.VideoCapture(1)
    2. # my webcam
    3. cap.set(3, 1280)
    4. # set the resolution
    5. cap.set(4, 720)
    6. cap.set(cv2.CAP_PROP_AUTOFOCUS, 0)
    7. # turn the autofocus off

    我使用OpenCV 3.1.0-dev,Python 2.7.5和Logitech HD Pro网络摄像头C920

    ref
    https://oomake.com/question/339302