Skip to content

Instantly share code, notes, and snippets.

@GSE-UP
Last active September 11, 2019 16:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GSE-UP/97ffdc090491870bf379df3f16853743 to your computer and use it in GitHub Desktop.
Save GSE-UP/97ffdc090491870bf379df3f16853743 to your computer and use it in GitHub Desktop.
import numpy as np
import cv2
cap = cv2.VideoCapture(0)
# Capture frame-by-frame
ret, frame = cap.read()
# do what you want with frame
# and then save to file
cv2.imwrite('/home/marco/Soccer_Robot/colorfilters-master/image.jpg', frame)
# When everything done, release the capture
cap.release()
cv2.destroyAllWindows()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment