Ask Your Question
0

OpenCV: what() function is not implemented

asked 2013-08-06 19:32:28 -0500

bitopen gravatar image

updated 2013-08-06 19:37:59 -0500

I'm using opencv with Ubuntu 12.04, so GTK3. The problem is that if I execute my opencv program (taken from the documentation) it throws the following error:

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/bitliner/my-home/librerie/c/opencv-2.4.6.1/modules/highgui/src/window.cpp, line 483

terminate called after throwing an instance of 'cv::Exception' what(): /home/bitliner/my-home/librerie/c/opencv-2.4.6.1/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

Aborted (core dumped)

I cannot install the packet libgtk2.0-dev.

edit retag flag offensive close merge delete

Comments

Looking at the current openCV implementation index, this is not an openCV function. So it is normal that it isn't implemented. Could you provide code that calls it?

StevenPuttemans gravatar imageStevenPuttemans ( 2013-08-07 00:56:02 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
2

answered 2013-08-07 02:01:06 -0500

berak gravatar image

updated 2013-08-07 02:09:34 -0500

  • "I'm using opencv with Ubuntu 12.04, so GTK3"
  • "Rebuild the library with Windows, GTK+ 2.x "

you see the mismatch ? when building the opencv libs ( esp. highgui ), it did not find gtk2, so that module was built without gui support and throws a runtime exception, when you try to open a window. (anything else, like videocapture and imread, should still work fine, though)

so actually, imshow() (or namedWindow(), whatever you were trying to use from highgui) is the function, that is not implemented.

Exception::what() is just the function, that retrieves the message from the exception. please remove that part from your title, as it's totally misleading.

again, your problem is missing gtk2.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

Stats

Asked: 2013-08-06 19:32:28 -0500

Seen: 7,437 times

Last updated: Aug 07 '13