# HG changeset patch # User Nicolas Saunier # Date 1340696215 14400 # Node ID 37a434fb848eab8467f3231294124520821c67f0 # Parent c31722fcc9de12107c92f45909bbb83774a6ffaa added goto frame diff -r c31722fcc9de -r 37a434fb848e python/cvutils.py --- a/python/cvutils.py Tue Jun 26 03:29:57 2012 -0400 +++ b/python/cvutils.py Tue Jun 26 03:36:55 2012 -0400 @@ -92,11 +92,12 @@ for i in range(0, last-1): cv2.line(img, positions[i].asint().astuple(), positions[i+1].asint().astuple(), color) - def playVideo(filename): + def playVideo(filename, firstFrame = 0): '''Plays the video''' capture = cv2.VideoCapture(filename) if capture.isOpened(): key = -1 + capture.set(CV_CAP_PROP_POS_FRAMES, firstFrame) while key!= 113: # 'q' ret, img = capture.read() if ret: