cv2.namedWindow("image",0)
img=cv2.imread("autojump.png")
while 1:
img=cv2.imread("autojump.png")
cv2.imshow("image",img)
k=cv2.waitKey(0) & 0XFF
if k== 27 :
break
cv2.destroyAllWindows()
The image file autojump.png
's content will change along with time(rewrited by with open("autojump.png","w" as f : f.write(some_other_bytes_stream)
of another part of program.), so I reload it during the while
loop, but it seems that the window never refresh.Just always the same image. What's wrong?