Advertisement
Guest User

Untitled

a guest
Nov 15th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. import requests
  2. import cv2
  3. import numpy as np
  4.  
  5. url = "http://192.168.1.11:8080/shot.jpg"
  6.  
  7. while True:
  8.  
  9. img_resp = requests.get(url)
  10. img_arr = np.array(bytearray(img_resp.content), dtype=np.uint8)
  11. img = cv2.imdecode(img_arr, -1)
  12.  
  13. cv2.imshow("AndroidCam", img)
  14.  
  15. if cv2.waitKey(1) == 27:
  16. break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement