如果你遇到了如下问题:
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会出现这个问题