OpenCV Error: Unspecified Error(The Function is not implemented)
ubuntu(双系统、虚拟机)+opencv打开摄像头,出现以下等错误:error: (-2: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
ubuntu(双系统、虚拟机)+opencv打开摄像头,出现以下等错误:
error: (-2: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 function ‘cvNamedWindow’
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
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
主要是GTK+ 2.x ,libgtk2.0-dev ,pkg-config这串关键字
解决办法:
终端输入:
sudo apt-get install libgtk2.0-dev pkg-config
安装完毕之后,将opencv卸载后重新编译。
ubuntu16.04 + opencv3.4.0
ubuntu18.04 + opencv4.1.0
例如上方两种环境下的不同版本的opencv编译,其中都存在
那么我们回到 build 这个目录文件下,打开终端输入:
make clean
cd ..
rm build -r
完毕,接着就是下图同样的操作,重新编译一次
具体教程可以点开上面的链接,最后运行示例代码验证:
如果识别不了USB设备,那么解决办法
最后大功告成!!!!
更多推荐
所有评论(0)