Advertisement
y2kbug

Untitled

Aug 3rd, 2022
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. import cv2
  2. import urllib.request
  3. import numpy as np
  4.  
  5. url_response = urllib.request.urlopen("http://192.168.50.61/cgi-bin/get_jpeg.cgi")
  6. img_array = np.array(bytearray(url_response.read()), dtype=np.uint8)
  7. image = cv2.imdecode(img_array, cv2.IMREAD_COLOR)
  8. cv2.imshow('Test', image)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement