changeset 625:9202628a4130

saving image when playing video
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Fri, 13 Feb 2015 09:10:29 -0500
parents bac66bd536c5
children 35155ac2a294
files python/cvutils.py tracking.cfg
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/python/cvutils.py	Fri Jan 09 00:14:13 2015 -0500
+++ b/python/cvutils.py	Fri Feb 13 09:10:29 2015 -0500
@@ -144,6 +144,8 @@
                        cv2.putText(img, text, (10,50), cv2.cv.CV_FONT_HERSHEY_PLAIN, 1, cvRed) 
                     cvImshow(windowName, img, rescale)
                     key = cv2.waitKey(wait)
+                    if saveKey(key):
+                        cv2.imwrite('image-{}.png'.format(frameNum), img)
             cv2.destroyAllWindows()
         else:
             print('Video capture for {} failed'.format(filename))
--- a/tracking.cfg	Fri Jan 09 00:14:13 2015 -0500
+++ b/tracking.cfg	Fri Feb 13 09:10:29 2015 -0500
@@ -4,7 +4,7 @@
 database-filename = laurier.sqlite
 # filename of the homography matrix
 homography-filename = laurier-homography.txt
-# filename of the homography matrix
+# filename of the camera intrinsic matrix
 intrinsic-camera-filename = intrinsic-camera.txt
 # -0.11759321 0.0148536 0.00030756 -0.00020578 -0.00091816
 distortion-coefficients = -0.11759321