SHARE
TWEET

Untitled

a guest Sep 20th, 2019 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import cv2
  2. import datetime
  3. import time
  4. cap = cv2.VideoCapture(0)
  5. while(1):
  6.     times = datetime.datetime.now()
  7.  
  8.     # get a frame
  9.     ret, frame = cap.read()
  10.     # show a frame
  11.     #cv2.imshow("capture", frame)
  12.  
  13.     loca="/home/u/pic/"+str(times.year)+str(times.month)+str(times.day)+str(times.hour)+str(times.minute)+str(times.secon$    print(loca)
  14.     cv2.imwrite(loca, frame)
  15.     time.sleep(1)
  16. cv2.destroyAllWindows()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top