opencv.imshow will cause jupyter notebook crash

后端 未结 8 1467
借酒劲吻你
借酒劲吻你 2021-01-31 07:46

I check other question on google or stackoverflow, they are talking about run cv2.imshow in script, but my code run in jupyter notebook.

Here is my configuration:

<
8条回答
  •  花落未央
    2021-01-31 08:38

    The new window that opens up from Jupyter uses the same kernel as notebook. Just add this below to the code and it would work fine.

    cv2.waitKey(0)
    cv2.destroyAllWindows()
    

提交回复
热议问题