import cv2, time
cap = cv2.VideoCapture(0)
cap.set(cv2.CAP_PROP_FRAME_WIDTH,320/20)
cap.set(cv2.CAP_PROP_FRAME_HEIGHT,240/20)
while 1:
_, frame = cap.read()
cv2.imwrite("example.png", frame, [int(cv2.IMWRITE_JPEG_QUALITY),1])
time.sleep(.3)
cap.release()
cv2.destroyAllWindows()
相关文档
随便看看
畅言模块加载中