opencv-python icon indicating copy to clipboard operation
opencv-python copied to clipboard

Add GUI support (Qt)

Open esc opened this issue 10 years ago • 23 comments

Hi, I am having trouble with the library, I installed it and tried to use it on:

https://github.com/gliese581gg/YOLO_tensorflow

But the error I get when trying to run it is:

OpenCV Error: Unspecified error (The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script) in cvShowImage, file /io/opencv/modules/highgui/src/window.cpp, line 545
Traceback (most recent call last):
  File "YOLO_small_tf.py", line 250, in <module>
    main(sys.argv)
  File "YOLO_small_tf.py", line 245, in main
    yolo = YOLO_TF(argvs)
  File "YOLO_small_tf.py", line 30, in __init__
    if self.fromfile is not None: self.detect_from_file(self.fromfile)
  File "YOLO_small_tf.py", line 137, in detect_from_file
    self.detect_from_cvmat(img)
  File "YOLO_small_tf.py", line 129, in detect_from_cvmat
    self.show_results(img,self.result)
  File "YOLO_small_tf.py", line 225, in show_results
    cv2.imshow('YOLO_small detection',img_cp)
cv2.error: /io/opencv/modules/highgui/src/window.cpp:545: error: (-2) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon 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

esc avatar Oct 26 '16 14:10 esc

It's because of 'opencv-python-headless'. Uninstall it! pip uninstall opencv-python-headless

be42day avatar Jul 10 '21 14:07 be42day

This one work for me on facefusion installation

pip uninstall opencv-python-headless -y 

pip install opencv-python --upgrade

arafatx avatar Sep 28 '23 16:09 arafatx

uninstall opencv-python-headless doesn't work in my linux server

LinneLee avatar Oct 25 '24 10:10 LinneLee