Mercurial Hosting > traffic-intelligence
diff python/cvutils.py @ 171:8e7b354666ec
corrected bug in to get images from video
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Mon, 17 Oct 2011 14:16:50 -0400 |
parents | b0719b3ad3db |
children | e2f31813ade6 |
line wrap: on
line diff
--- a/python/cvutils.py Mon Oct 17 00:07:18 2011 -0400 +++ b/python/cvutils.py Mon Oct 17 14:16:50 2011 -0400 @@ -103,10 +103,11 @@ if capture.isOpened(): ret = False while len(images)<nImages: + ret, img = capture.read() while not ret: ret, img = capture.read() - if img.size>0: - images.append(img) + if img.size>0: + images.append(img) return images def printCvMat(cvmat, out = stdout):