我正在尝试实现以下代码:
#coding=utf8
from opencv.cv import *
from opencv.highgui import *
# Avame kaamera
capture = cvCreateCameraCapture(0)
while True:
frame = cvQueryFrame(capture)
cvShowImage("Aken", frame)
char = cvWaitKey(33)
但我得到了某种蒙图错误。有人能告诉我代码中可能出现的问题的方向吗?在
mmap: Invalid argument munmap: Invalid argument munmap: Invalid argument munmap: Invalid argument munmap: Invalid argument Unable to stop the stream.: Bad file descriptor munmap: Invalid argument munmap: Invalid argument munmap: Invalid argument munmap: Invalid argument
(Aken:2782): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
(Aken:2782): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
(Aken:2782): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
(Aken:2782): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
你能用更新的接口来试试这段代码吗?这样你就不用担心发布和其他细节了吗?我假设你有足够新的版本来使用cv2。下面的代码来自another SO answer I made。在
捕获过程可能失败,因此最好检查调用的返回:
相关问题 更多 >
编程相关推荐