mycobot_ros/mycobot_ai/aikit_280_pi/scripts/OpenVideo.py
2022-12-07 11:07:18 +08:00

13 lines
184 B
Python

import cv2
cap = cv2.VideoCapture(0)
cap.set(3,640)
cap.set(4,480)
while cv2.waitKey(1)<0:
ret, frame = cap.read()
if not ret:
break
cv2.imshow('', frame)