Answers for "how to access camera in python"

1

accessing camera with python

import cv2

vid = cv2.VideoCapture(0)

while True:

    ret, frame = vid.read()

    cv2.imshow('Controlling my computer camera', frame)

    if cv2.waitKey(4) & 0xFF == ord('q'):
        break


vid.release()
cv2.destroyAllWindows()
Posted by: Guest on June-30-2021

Code answers related to "how to access camera in python"

Python Answers by Framework

Browse Popular Code Answers by Language