2016-11-10 51 views
-1

我已經在Ubuntu上安裝了opencv。我正在嘗試使用函數imshow()。這是一個錯誤,請找到下面的內容。我在Ubuntu上安裝了opencv。我正在嘗試使用函數imshow()。它給出了一個錯誤

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 cvShowImage, file /io/opencv/modules/highgui/src/window.cpp, line 545

error Traceback (most recent call last) in() ----> 1 cv2.imshow('mask',img)

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

+0

_IF你在Ubuntu或Debian,請安裝libgtk2.0-dev的和pkg配置,然後重新運行cmake或配置script_ – Miki

+0

我已經alredy重新運行cmake仍然無法正常工作 –

回答

0

您可以嘗試使用此選項中的cmake WITH_GTK=ON

OpenCV needs to be compiled with GTK support (WITH_GTK=ON).

相關問題