J'utilise ce script Python pour afficher ma webcam:Afficher un flux de webcam PyQt4 utilisant Camera Capture OpenCV
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()
Il fonctionne très bien, mais je voudrais mettre cet affichage dans mon application Qt. Comment utiliser l'image OpenCV IplImage
dans un Qt VideoWidget
?
http://code.google.com/p/opencv-extension-library/wiki/QtOpenCV est superbe, mais comment le faire avec Python? – Natim