I have spent countless hours trying to fix problems with openCV, specially when running cv2.imshow like this:
imshow has just the bad reputation of not working a lot of times.
Since I couldn’t find any solution online, I decided I will write this post, either for the George of the future or for anyone else that might face the same problem!
In my case I had it working for a long time, and all of the sudden after switching python versions and several virtual environments later it just stopped working despite I was using the same computer.
I’m aware of 2 possible problems that can happen to you: