1

I am new to openCV and installed it from this link and it compiled and installed with no error. after that when i open an ipython and run these commands:

import cv2
import numpy as np
# create an image matrix using nimpy called img
cv2.imshow("image", img)

I get this error message:

/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

I do what said in this and this links but my problem didn't solve.

2 Answers2

0

Your link is not working, so I can't be more specific. But what's happening is that your self-compiled OpenCV didn't pick up on any necessary development-packages to chose a rendering backend (Qt or whatever it uses).

You should check the cmake output for lines stating what libraries were searched for and not found, and install *-dev packages of the respective libraries.

deets
  • 6,285
  • 29
  • 28
  • I edited the link, I remove all openCV packages and install it from anaconda but still the problem remains. –  Oct 09 '17 at 18:06
  • I don't know much about the anaconda build, but the underlying problem needs to be solved - remove the C++ library and re-build it. Please post the output of cmake. – deets Oct 10 '17 at 08:50
0

From your error log, you have missed out on a few dependencies while compiling the code.

install libgtk2.0-dev and pkg-config.

Install these to make sure OpenCV works as it should

init_27
  • 16
  • 3