cvNamedWindow - function not implemented, unable to launch LibHand

7.8k views Asked by At

I'd like to use the LibHand hand gesture library, but I'm unable to launch it on Ubuntu 13.10.

I've compiled it successfully (after overcoming few issues related to the linker), but when running pose_designer, the OpenCV library logs that GUI support function is not implemented, instructing me to install libgtk2.0-dev and pkg-config. However, after the installation of these packages and rebuilding the OpenCV library, the issue persists. Inspired by the SO posts of people with comparable OpenCV problems (OpenCV error: the function is not implemented), I switched to libqt. Unfortunately, the issue persists.

An extract from the log file is attached below. What could be the reason for this error?

WARNING: the mesh 'hand.mesh' includes vertices with more than 4 bone
  assignments. The lowest weighted assignments beyond this limit have been
  removed, so your animation may look slightly different. To eliminate this,
  reduce the number of bone assignments per vertex on your mesh to 4.
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 cvNamedWindow, file /home/user/Downloads/opencv-2.4.8/modules/highgui
  /src/window.cpp, line 483
Exception: /home/user/Downloads/opencv-2.4.8/modules/highgui/src/window.cpp:483:
  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 cvNamedWindow
2

There are 2 answers

1
berak On BEST ANSWER

well, you have to go back at rebuilding opencv (the highgui module).

run cmake ( or cmake-gui ), and tweak settings, until it confirms gui support:

  GUI: 
    QT:                          NO
    Win32 UI:                    YES
    OpenGL support:              NO
    VTK support:                 NO

(well, that's for win here, but you'll have a GTK entry that should be 'on')

0
Dilshad PT On

Find CMakeLists.txt in extracted directory, where you can find options to enable and disable different supports.

  1. Windows WITH_VFW "Include Video for Windows support"
  2. Carbon WITH_CARBON "Use Carbon for UI instead of Cocoa"
  3. GTK+ 2.x WITH_GTK_2_X "Use GTK version 2"