import os import cv2 cap = cv2.VideoCapture(0) frame_width = int(cap.get(3)) frame_height = int(cap.get(4)) while True: ret, image = cap.read()