I'm on Ubuntu 20.04, opencv4.5.2 (downloaded via pip3 install opencv-python).
When running python3 demo.py I was getting
Traceback (most recent call last):
File "demo.py", line 136, in <module>
main()
File "demo.py", line 128, in main
cv2.imshow("result", img)
cv2.error: OpenCV(4.5.2) /tmp/pip-req-build-itd46xp8/opencv/modules/highgui/src/window.cpp:679: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvShowImage'
I'm on Ubuntu 20.04, opencv4.5.2 (downloaded via pip3 install opencv-python). When running
python3 demo.py
I was gettingFollowing https://stackoverflow.com/a/14656610/4971151, I installed
opencv-contrib-python
and it solved the problem.