本文介绍了OpenCV错误:未实现WaitKey()函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在计算机上安装了ubuntu 14.04(64位).

I've ubuntu 14.04(64-bit) installed on my machine.

我已经安装了python 3.6和OpenCV 3.当我尝试运行以下代码行时,它将引发错误.

I've python 3.6 and OpenCV 3 installed on it. When I'm trying to run the following line of code it throws error.

key = cv2.waitKey(0)

错误如下:

我已经安装了libgtk2.0-dev软件包,但是没有解决.我还需要安装其他软件包吗?

I've installed the libgtk2.0-dev package but it doesn't got resolved.Do I need to install any other packages?

推荐答案

您缺少一些OpenCV依赖的库,在Linux上安装OpenCV非常容易,只需使用安装Shell脚本并执行它即可.它将安装所有依赖项并正确安装OpenCV,这是我过去使用的.sh:

You are missing a few libraries that OpenCV depends on, it is very easy to install OpenCV on Linux, just use an install shell script and execute it. It will install all the dependencies and install OpenCV correctly, here is a .sh that I have used in the past:

https://github.com/milq /milq/blob/master/scripts/bash/install-opencv.sh

这篇关于OpenCV错误:未实现WaitKey()函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 22:51