在Blender中使用OpenCV

时间:2013-12-19 17:33:32

标签: python opencv blender

我正在尝试执行使用OpenCV库的Python绑定的python脚本,但是当我在blender中单击“Run Script”时,我在控制台中遇到以下错误:

ImportError: No module named 'cv2'
Error: Python script fail, look in the console for now...

首先,我已将文件cv2.pydC:\opencv\build\python\2.7复制粘贴到:C:\Program Files\Blender Foundation\Blender\2.66\python\lib,新错误为:

ImportError: Module use of python27.dll conflicts with this version of Python.have
Error: Python script fail, look in the console for now...

然后我复制粘贴了同名但来自C:\opencv\build\python\2.6的文件和新输出:

ImportError: DLL load failed: Le module spécifié est introuvable.
Error: Python script fail, look in the console for now...

我的配置:

Win7 32bit
OpenCV 2.4.6
Both Python 3.3 and 2.7 
Blender 2.66
问:我怎样才能制作Blender& OpenCV的朋友?

1 个答案:

答案 0 :(得分:2)

你有这个想法,但是你需要在你尝试过的python 3.3而不是python 2.7版本的基础上构建opencv模块。

blender使用python 3.x自2.50以来使用2.65及更高版本使用python 3.3

当配置为opencv构建python模块时,你会想要启用python 3或3.3支持可能被称为py3k,也许只是指向你的python 3.3安装而不是2.7