程序问答   发布时间:2022-06-02  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了OpenCV /数组应为CvMat或IplImage /释放捕获对象大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

如何解决OpenCV /数组应为CvMat或IplImage /释放捕获对象?

开发过程中遇到OpenCV /数组应为CvMat或IplImage /释放捕获对象的问题如何解决?下面主要结合日常开发的经验,给出你关于OpenCV /数组应为CvMat或IplImage /释放捕获对象的解决方法建议,希望对你解决OpenCV /数组应为CvMat或IplImage /释放捕获对象有所启发或帮助;

它与包装商无关。

问题是我没有关闭网络摄像头捕获,我的应用程序的多个进程实际上在后台运行。

该文档正在讨论,ReleaseCapture但是此函数显然不在python绑定中,调用:

del(self.cam)

做得很好,self.cam是我的CvCapture目标。

解决方法

编辑: Array should be CvMat or IplImage不是特定于此问题的错误消息,那是我得到的唯一最相关的错误消息


我正在尝试使用opencv从应用程序中制作* .exe。

我正在使用 Python 2.6openCV 2.1

我可以运行*
.exe的一部分,我有一个菜单,在这里我可以选择处理来自2种不同来源的一些图像,这些图像来自我的网络摄像头和静态图像。静态图像部分有效,但是当我选择网络摄像头时,输出为:

Opencv error: unknown function,file.. \ \.. \ \ OCV / opencv / SRC / cxcore\ cxarray.cpp Wrong parameter in (array should be cvmat or iplimagE),Line 1233
Retroactive (last call)
"Call callBACk function"_ Ctypes / callBACks. C ",line 295
In_ wnd_ Pro,the file "game"_ ar \ build \  pyi.win32  \ game_ ar \ outPYZ1.pyz /  pyglet.window.win32 ”,line 849
In_ event_ Line 918 in key,file "game"_ ar \ build \  pyi.win32  \ game_ ar \ outPYZ1.pyz /  pyglet.window.win32 ”
In dispatch_ The file "game" in event_ ar \ build \  pyi.win32  \ game_ ar \ outPYZ1.pyz /  pyglet.window ”,line 1219
In dispatch_ The file "game" in event_ ar \ build \  pyi.win32  \ game_ ar \ outPYZ1.pyz /  pyglet.event ”,line 340
on_ key_ File "" in press,line 502
File "" in dostart,line 461
Add file "" to get point,line 482
The file "D: \" prog \ "Python \" augmentedr \ "SRC\ pyar.py ”,line 40,at get_ In points
pilimage =  Image.fromString (“ RGB”, cv.GetSize (image), image.toString ())
cv.error : array should be cvmat or iplimage
Retroactive (last call)
In file '' on line 616
Running file "game"_ ar \ build \  pyi.win32  \ game_ ar \ outPYZ1.pyz /  pyglet.app ”,line 264
Running file "game"_ ar \ build \  pyi.win32  \ game_ ar \ outPYZ1.pyz /  pyglet.app.win32 ”,line 63
In_ timer_ In func,the file "game"_ ar \ build \  pyi.win32  \ game_ ar \ outPYZ1.pyz /  pyglet.app.win32 ”,line 84
File "game" in idle state_ ar \ build \  pyi.win32  \ game_ ar \ outPYZ1.pyz /  pyglet.app ”,line 193
In dispatch_ The file "game" in event_ ar \ build \  pyi.win32  \ game_ ar \ outPYZ1.pyz /  pyglet.window ”,line 340
On_ File "" in draw,line 546
Attributeerror: game instance has no attribute 'BG'

我的pyar.py文件。

用py2exe构建* .exe给了我这个输出:

以下模块似乎丢失
['ICCProfile','_ imaging_gif','_ scproxy']

我不明白,这与我的消息来源有关。我试图用py2exe和pyinstaller打包我的应用程序,但是输出是相同的。

我猜* .exe丢失了一些东西,但我不知道该怎么调试。

大佬总结

以上是大佬教程为你收集整理的OpenCV /数组应为CvMat或IplImage /释放捕获对象全部内容,希望文章能够帮你解决OpenCV /数组应为CvMat或IplImage /释放捕获对象所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。