如果你遇到了如下问题:
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 cvWaitKey, file /home/opennao/src/OpenCV-2.3.1/modules/highgui/src/window.cpp, line 354
terminate called after throwing an instance of ‘cv::Exception’
what(): /home/opennao/src/OpenCV-2.3.1/modules/highgui/src/window.cpp:354: 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 cvWaitKey
进入naoqi-sdk/lib目录下,删除所有libopencvxxx.so文件即可
产生该问题原因:
sdk中的opencv没有gtk,不会支持namewindow这样的函数,因为在nao端是没有必要的。在ubuntu上自己编译安装opencv并将sdk中lib下的libopen**.so的库全部替换,rebuild你的代码,就会ok了,ubuntu14.04会出现这个问题
本文详细介绍了在Ubuntu环境下,当尝试将OpenCV与NAOqi SDK集成时遇到的问题及解决方案。主要关注于OpenCV库与NAOqi SDK中缺少GTK支持导致的无法使用窗口相关函数的问题,并提供了在Ubuntu上自行编译安装OpenCV并替换SDK中相应库的方法来解决问题。
2839

被折叠的 条评论
为什么被折叠?



