Advertisement
Guest User

Untitled

a guest
Nov 17th, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. import time
  2. import numpy as np
  3. import cv2
  4.  
  5. vcap = cv2.VideoCapture('rtsp://10.100.43.15:554/stander/livestream/0/0')
  6. n = 10
  7. ret, frame = vcap.read()
  8. images = np.array([frame])
  9. count = 0
  10. while(count / n < 31):
  11. ret, frame = vcap.read()
  12. if ret == False:
  13. print("no Frames")
  14. break
  15. if(count % n == 0):
  16. images = np.append(images, np.array([frame]), axis = 0)
  17. count += 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement