opencv读取摄像头采集视频并保存
import cv2cap = cv2.VideoCapture(0)fourcc = cv2.VideoWriter_fourcc(*'XVID')out = cv2.VideoWriter('lianzheng.avi', fourcc, 20.0, (640, 480))while True: ret, frame = cap.read() print(frame.shape) out.write(frame) cv2.imshow('frame', fram
原创
2021-05-18 09:46:34 ·
104271 阅读 ·
0 评论