【发布时间】:2018-06-20 12:47:42
【问题描述】:
我使用 anaconda3 并在 ipython notebook 中编写代码。这是我的代码:
import cv2
if __name__ == '__main__':
img1 = cv2.imread("./frame1.jpg")
cv2.imshow('show', img1)
我收到此错误:
error: OpenCV(3.4.1) /opt/conda/conda-bld/opencv-suite_1527005194613/work/modules/highgui/src/window.cpp:636: 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
我已经有libgtk2.0-dev 和pkg-config,我也有来自anaconda 的opencv。
后来我用 conda install 安装了opencv。但这没有帮助。
【问题讨论】:
-
你能详细解释一下你的情况吗?
-
我编辑我的问题。你可以看看,请
-
尝试使用 matplotlib.pyplot.imshow() 而不是 cv2.imshow()。