使用Visual Studio 2013在Windows 10上使用contrib模块为Python编译OpenCV
Compile OpenCV for Python wit contrib modules on Windows 10 using Visual Studio 2013
我想在windows 10上安装带有contrib模块的OpenCV 3,并将其与Python 2.7(32位)一起使用。我认为在opencv中拥有contrib模块的唯一方法是编译它
我已经用contrib模块编译了OpenCV,没有任何问题。我使用过Visual Studio 2013,在发布模式下编译(针对Win32)。
编译OpenCV后,我可以在$PYTHON_HOME/Libs/site-packages
中看到"cv2.pyd"模块
问题是:
当我尝试在Python IDLE中使用import cv2
时,我会出现以下错误:
Python 2.7.9 (default, Dec 10 2014, 12:24:55) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: DLL load failed: The specified module could not be found.
正如你所看到的,我有一个32位的Python。此外,模块被"检测到"。
怎么了?
我发现了问题。
我不得不将OpenCV*.dll添加到PATH环境变量中。这个*.dll在中
$OPENCV_HOME/bin/release
相关文章:
- 尝试导入pybind-opencv模块时出现libgtk错误
- 为什么当我解模块化时,这个C++代代码"效率较低"?
- 如果C++对象的类在另一个boost模块中声明,如何使用boost将指向该对象的指针返回到python
- 内联如何影响模块接口中的成员函数
- C++返回 Numpy 数组的 Python 扩展模块
- 当我尝试加载内核模块时,如何修复C++中的这个 malloc() 错误?
- 如何从线程中的不同模块调用函数?
- 如何使用 soong 命名空间来有条件地编译模块
- asn1c 不会从 asn.1 模块中提取八位字节字符串的默认值
- CMake - 模块 + 库混淆
- 在Android原生C++中使用Facemark opencv contrib
- 特征 LLT 模块给出不正确的结果?
- 枚举进程模块在有效句柄上返回无效句柄
- 在 python 模块中导入子模块时PyImport_Import失败
- 将 PCL 链接到 Cython C++ 模块
- 即使直接从官方示例中复制,也找不到未知类型名称QML_ELEMENT和 QML 模块
- Visual Studio C++找不到 OpenCV-Contrib 模块
- OpenCV:无法从 contrib 存储库中找到模块(跟踪器,选择ROI)
- 基于cmake的项目中的OpenCV:检查contrib模块
- 使用Visual Studio 2013在Windows 10上使用contrib模块为Python编译OpenCV