Mercurial Hosting > traffic-intelligence
changeset 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 | e99f6c44a655 |
children | e508bb0cbb64 |
files | python/cvutils.py |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
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):