Edit : Array should be CvMat or IplImage
不是特定于此问题的错误消息,这是我收到的唯一最相关的错误消息。
我正在尝试使用 opencv 从应用程序中创建 *.exe。
我在用着Python 2.6 and 开放式CV 2.1.
我可以运行 *.exe 的一部分,我有一个菜单,可以从中选择处理来自 2 个不同来源(我的网络摄像头和静态图像)的一些图片。静态图像部分可以工作,但是当我选择网络摄像头时,这里是输出:
OpenCV Error: Bad argument (Array should be CvMat or IplImage) in unknown function, file ..\..\..\..\ocv\opencv\src\cxcore\cxarray.cpp,
line 1233
Traceback (most recent call last):
File "_ctypes/callbacks.c", line 295, in 'calling callback function'
File "game_ar\build\pyi.win32\game_ar\outPYZ1.pyz/pyglet.window.win32", line 849, in _wnd_proc
File "game_ar\build\pyi.win32\game_ar\outPYZ1.pyz/pyglet.window.win32", line 918, in _event_key
File "game_ar\build\pyi.win32\game_ar\outPYZ1.pyz/pyglet.window", line 1219, in dispatch_event
File "game_ar\build\pyi.win32\game_ar\outPYZ1.pyz/pyglet.event", line 340, in dispatch_event
File "", line 502, in on_key_press
File "", line 461, in dostart
File "", line 482, in getpoints
File "D:\Prog\Python\AugmentedR\src\pyar.py", line 40, in get_points
pilimage = Image.fromstring("RGB", cv.GetSize(image), image.tostring())
cv.error: Array should be CvMat or IplImage
Traceback (most recent call last):
File "", line 616, in
File "game_ar\build\pyi.win32\game_ar\outPYZ1.pyz/pyglet.app", line 264, in run
File "game_ar\build\pyi.win32\game_ar\outPYZ1.pyz/pyglet.app.win32", line 63, in run
File "game_ar\build\pyi.win32\game_ar\outPYZ1.pyz/pyglet.app.win32", line 84, in _timer_func
File "game_ar\build\pyi.win32\game_ar\outPYZ1.pyz/pyglet.app", line 193, in idle
File "game_ar\build\pyi.win32\game_ar\outPYZ1.pyz/pyglet.window", line 1219, in dispatch_event
File "game_ar\build\pyi.win32\game_ar\outPYZ1.pyz/pyglet.event", line 340, in dispatch_event
File "", line 546, in on_draw
AttributeError: Game instance has no attribute 'bg'
My pyar.py file.
使用 py2exe 构建 *.exe 给出了以下输出:
The following modules appear to be missing
['ICCProfile', '_imaging_gif', '_scproxy']
我不明白,这正在与我的消息来源合作。我尝试使用 py2exe 和 pyinstaller 打包我的应用程序,但输出是相同的。
我猜 *.exe 缺少一些东西,但我不知道什么,也不知道如何调试它。