opencv.imshow will cause jupyter notebook crash

后端 未结 8 1470
借酒劲吻你
借酒劲吻你 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:27

    image = cv2.imread(file_path)
    while True:
        # Press 'q' for exit
        exit_key = ord('q')
        if cv2.waitKey(exit_key) & 255 == exit_key:
            cv2.destroyAllWindows()
            break
        cv2.imshow('Image_title', image)
    

提交回复
热议问题