Issue
I'm trying to show images with cv2 library in my Jupiter Notebook with cv2.imshow(img)
and it shows as expected, but I can not use or don't know how to use cv2.waitKey(0)
, hence the cell will not stop executing.
cv2.waitKey(0)
works in script, but not in Notebook.
Here's a snippet:
cv2.imshow('Image', img)
cv2.waitKey(0)
cv2.destroyAllWindows()
How do I stop executing cell without restarting the whole kernel?
Solution
So, thanks to @Micka, here's the solution:
You must write cv2.startWindowThread()
first, explained here.
Answered By - primoz
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.