2011-02-28 2 views
1

편집 :Array should be CvMat or IplImage이 문제와 관련된 유일한 오류 메시지는 아니며 가장 관련있는 오류 메시지입니다.OpenCV/Array는 CvMat 또는 IplImage/캡처 객체 해제


opencv를 사용하여 응용 프로그램에서 * .exe를 만들려고합니다.

저는 파이썬 2.6openCV 2.1을 사용하고 있습니다.

* .exe의 일부를 실행할 수 있습니다. 2 개의 다른 소스에서 일부 사진을 처리하도록 선택할 수있는 메뉴가 있습니다. 내 웹캠 & 정적 이미지. 정적 이미지 부분은 작동하지만 내가 여기에 웹캠을 chosing있을 때하면 출력 :

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' 

pyar.py 파일. 이 내 소스와 협력,

 
The following modules appear to be missing 
['ICCProfile', '_imaging_gif', '_scproxy'] 

내가 그것을 얻을하지 않습니다 py2exe에와 * .exe를 구축

나에게이 출력을 주었다. py2exe & pyinstaller로 응용 프로그램을 꾸리려고했으나 결과는 같습니다.

* .exe에 뭔가 빠져있는 것 같지만 디버깅 방법을 모르겠습니다.

답변

4

패키지 관리자와 관련이 없습니다.

문제는 내가 웹캠 캡처를 닫지 않아서, 내 앱의 여러 프로세스가 백그라운드에서 실제로 실행되고 있다는 것이 었습니다. 전화,

doc

은 약 ReleaseCapture을 이야기하지만,이 기능은 파이썬 바인딩에 분명히되지 않습니다 : del(self.cam)

그냥 일을 잘했다, self.camCvCapture 객체 인.