天天看点

python调用c++回调图片

dll = CDLL(r"./dllt1.dll")
dll.teststring.restype = c_void_p
a=dll.teststring(35435)

b=string_at(a,98863)
# print(b)
nparr = np.fromstring(b, np.uint8)
# print(nparr[-10:-1],min(nparr),max(nparr))
img_decode = cv2.imdecode(nparr, cv2.IMREAD_COLOR)
# if img_decode:

cv2.imshow("sadf", img_decode)

# cv2.imwrite(str(index)+".jpg", img_decode)