Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import cv2
- import datetime
- import time
- cap = cv2.VideoCapture(0)
- while(1):
- times = datetime.datetime.now()
- # get a frame
- ret, frame = cap.read()
- # show a frame
- #cv2.imshow("capture", frame)
- loca="/home/u/pic/"+str(times.year)+str(times.month)+str(times.day)+str(times.hour)+str(times.minute)+str(times.secon$ print(loca)
- cv2.imwrite(loca, frame)
- time.sleep(1)
- cv2.destroyAllWindows()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement