cv2.imshow() function is opening a window that always says not responding - python opencv

后端 未结 9 1043
长情又很酷
长情又很酷 2020-12-13 17:54

I am trying to run a very simple program. To open and jpg file and display it using the opencv library for python. Initially it all worked fine but now it just opens a windo

9条回答
  •  暖寄归人
    2020-12-13 18:22

    I was having this same error until I added the below lines of code. For the waitKey, you can input figures above 0(i.e 1, 100 and above). It serves as the delay time for the window and it is in milliseconds.

    ----> cv2 waitKey(0) ----> cv2 destroyAllWindows()

提交回复
热议问题