0
votes

I am trying to show the image using openCV, but I am getting this error, I have installed libgtk2.0-dev and pkg-config, but I don't know why still i am getting same error. I am using conda environment, python 2.7 enter image description here

error: /io/opencv/modules/highgui/src/window.cpp:583: 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 cvShowImage

1

1 Answers

1
votes

The sticking point here is the last bit of the message: once you've installed the libraries it depends on, you must also rebuild OpenCV. I suspect however, that you've installed OpenCV from a package manager (such as Anaconda's, or your distros).

In any case, imshow is used to spawn a window where the image you've passed is displayed. Does this make sense in a Jupyter notebook? I can't see how you would be able to spawn a Gtk window from the browser JS. This is probably why the function was not enabled and compiled into the library.

It might be worth looking at how to display images from OpenCV in the notebook specifically, rather than relying on the native display function that OpenCV provides.