【发布时间】:2017-09-30 02:08:16
【问题描述】:
尝试运行 python 脚本并抛出以下错误:
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 cvDestroyAllWindows, file /io/opencv/modules/highgui
/src/window.cpp, line 577
Traceback (most recent call last):
File "/home/ldsvm/PycharmProjects/tagging/C1_DrawBboxesOnImages.py", line
116, in <module> cv2.destroyAllWindows()
cv2.error: /io/opencv/modules/highgui/src/window.cpp:577: 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
cvDestroyAllWindows
我已经安装了libgtk2.0-dev 和pkg-config 并重新安装了opencv3,但仍然出现同样的错误。
我在 CentOS 上。
【问题讨论】:
-
一个快速(可能不安全)的解决方法是从您的代码中删除
destroyAllWindows。无论如何,当您的主退出时,所有opencv窗口都将关闭。