Mercurial Hosting > traffic-intelligence
changeset 224:37a434fb848e
added goto frame
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Tue, 26 Jun 2012 03:36:55 -0400 |
parents | c31722fcc9de |
children | d4d3b1e8a9f1 |
files | python/cvutils.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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: