我在发行版archlinux中运行opencv时遇到一些问题。
我遇到以下错误:
Warning: unable to open video source: 0
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 583
Traceback (most recent call last):
File "video.py", line 219, in <module>
cv2.imshow('capture %d' % i, img)
cv2.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
我正在尝试在opencv的文件夹示例中将Python示例作为video.py运行。
我使用yaourt安装了这个库:
core/pkg-config 0.29.2-1 (base-devel) [installed]
A system for managing library compile/link flags
extra/gtk2 2.24.31-1 [installed]
GObject-based multi-platform GUI toolkit (legacy)