【发布时间】:2010-06-08 22:45:17
【问题描述】:
我正在使用这个 Python 脚本来显示我的网络摄像头:
from opencv.cv import *
from opencv.highgui import *
import sys
cvNamedWindow("w1", CV_WINDOW_AUTOSIZE)
camera_index = 0
capture = cvCreateCameraCapture(camera_index)
def repeat():
global capture #declare as globals since we are assigning to them now
global camera_index
frame = cvQueryFrame(capture)
cvShowImage("w1", frame)
c = cvWaitKey(10)
if c == "q":
sys.exit(0)
if __name__ == "__main__":
while True:
repeat()
它工作得很好,但我想在我的 Qt 应用程序中设置这个显示。
如何将IplImage OpenCV 图像用于 Qt VideoWidget?
【问题讨论】:
-
code.google.com/p/opencv-extension-library/wiki/QtOpenCV 看起来不错,但如何用 Python 做到这一点?
标签: python opencv webcam pyqt4 phonon