How do I fix issue with no window opening with cv2.imshow?
I successfully use cv2.imread to read an image. I can display in the console using matplotlib.imshow. When I use cv2.imshow, nothing happens, no errors, no window opens. Script ends normally, but no image. I tried using different integers with cv2.waitKey() and leaving it empty, but no luck. Works great on Windows, but not on my Mac.
Using Python 2.7, Spyder 3.3.6, openCV 4.2.0.
import cv2
import numpy as np
import matplotlib.pyplot as plt
img =cv2.imread('/Users/Paul/Documents/Photos/F15.jpg',cv2.IMREAD_GRAYSCALE)
cv2.imshow('test',img)
cv2.waitKey()
cv2.destroyAllWindows()
You must check image after read :
Python 2 is dead :
The path is fine. As I said, the image displays properly using matplotlib.
The code is working on Python 2.7 and 3.7 on my personal computers. This appears to be Mac related.
Installed Python 3.7. This did not resolve my issue.
Ok it's mac so read this and may be you will find something to solve your problem
I read through the items and did additional searches. Nothing is crashing and there were no errors, so the threads didn't help.
Now getting a new error which I will research on my own. Several identical lines of:
[IPKernelApp] WARNING | No such comm: 7a6fd824656d11ea9fc0a45e60dd0c91
did you resolve it ??? Please help me even I am facing the same problem