构建OpenCV 3.0.0-beta Windows Python 3.4 [英] Building OpenCV 3.0.0-beta Windows Python 3.4

查看:101
本文介绍了构建OpenCV 3.0.0-beta Windows Python 3.4的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望让OpenCV在适用于Python 3.4的Windows 7 x64上运行. 即使OpenCV 3 Alpha页面指出有Python 3支持( http://opencv .org/opencv-3-0-alpha.html ),则预编译的软件包仅包含opencv/build/python/2.7,不包含3(.4).

I wish to get OpenCV working on my Windows 7 x64 for Python 3.4. Even though the OpenCV 3 Alpha page states that there is Python 3 support (http://opencv.org/opencv-3-0-alpha.html), the pre-compiled package only contains opencv/build/python/2.7 and no 3(.4).

因此,按照上的答案进行操作如何在Windows 7 x64上的python 3.4中使用OpenCV?,我正在尝试按照以下教程从源代码构建OpenCV 3.0.0:

So following the answer on How to use OpenCV in python 3.4 on windows 7 x64?, I'm trying to build OpenCV 3.0.0 from source following the following tutorial: http://docs.opencv.org/doc/tutorials/introduction/windows_install/windows_install.html.

但是,由于本教程有些过时,因此按照某些步骤操作会遇到一些问题.

However since this tutorial is a bit outdated, I've some problems following certain steps.

  • The OpenNI link is dead, so I installed KinectSDK-v1.6-Setup.exe (https://www.microsoft.com/en-us/download/details.aspx?id=34808) and OpenNI-Windows-x64-2.2.msi (http://structure.io/openni). Is this good enough?
  • The Qt framework link is dead. I have Visual Studio 2013, so do I need this? or how do I just get the required files without downloading the whole Qt development kit (http://www.qt.io/)?
  • CMake: I got the latest version from OpenCV from Github, but it doesn't have the folders "Source" and "Builds", so what do I select as folders in CMake (3.2.2)? Sorry I'm new to this.

非常感谢您提供任何帮助(或指向已编译的Python 3.4 cv2.pyd的链接)

Any help is greatly appreciated (or a link to a compiled Python 3.4 cv2.pyd)

opencv.org: http: //answers.opencv.org/question/60190/building-opencv-300-beta-windows-python-34/

opencv.org: http://answers.opencv.org/question/60190/building-opencv-300-beta-windows-python-34/

推荐答案

我正好分享您的挫败感.荒谬的一个主要程序包,要求它的用户跳过这么多圈,从源代码构建它,只是将其用作Python中的import cv2.我的其他软件包仅安装在pip

I share precisely your frustrations. Ridiculous of a major package to demand that its users jump through so many hoops, building it from source, simply to use it as an import cv2 in Python. My other packages I just install in one line from pip!

关于OpenCV错误跟踪程序的票证,其中记录了使用已编译的Python 3.4 cv2.pyd的进度OpenCV网站上的 OpenCV 3.0下载中包含的文件.截至2015年6月6日为止,还没有.

The ticket on the OpenCV bug tracker documenting progress on having a compiled Python 3.4 cv2.pyd file included in the OpenCV 3.0 download on the OpenCV site. As of 6 June 2015 it's not there yet.

但是,令人欣喜的是,Christoph Gohlke维护了许多Python软件包的Windows二进制文件,包括带有Python 3.x绑定的OpenCV 3.0!看到这里:

However, the great news is, Christoph Gohlke maintains Windows binaries for many Python packages, including OpenCV 3.0 with Python 3.x bindings! See here:

http://www.lfd.uci.edu/~gohlke/pythonlibs /#opencv

要安装,只需下载适合您系统的64位或32位.whl文件,然后运行pip install [filename].然后,指令import cv2应该可以在您的Python 3.x解释器中使用.

To install, just download the 64-bit or 32-bit .whl file appropriate for your system, then run pip install [filename]. Then the instruction import cv2 should work in your Python 3.x interpreter.

这篇关于构建OpenCV 3.0.0-beta Windows Python 3.4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆