我想使用OpenCV库运行python脚本,但是它不起作用。
import requests as rq
import numpy as np
import cv2 as cv
url = "http://10.100.18.151:8080/shot.jpg"
while True:
pic_resp = rq.get(url)
pic_array = np.array(bytearray(pic_resp.content),dtype=np.uint8)
img = cv.imdecode(pic_array, -1)
cv.imshow("camera",img)
但我收到此错误:
SP:我安装了gtk2.0-dev和pkg-config