diff python/cvutils.py @ 346:5f75d6c23ed5

added opencv function to destroy OpenCV windows (seems to work only on Windows)
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Wed, 26 Jun 2013 15:42:45 -0400
parents 6b65b26c1e46
children 22ddb8f85495
line wrap: on
line diff
--- a/python/cvutils.py	Tue Jun 25 23:43:32 2013 -0400
+++ b/python/cvutils.py	Wed Jun 26 15:42:45 2013 -0400
@@ -109,6 +109,7 @@
                     frameNum+=1
                     cv2.imshow('frame', img)
                     key = cv2.waitKey(wait)
+            cv2.destroyAllWindows()
 
     def getImagesFromVideo(filename, nImages = 1, saveImage = False):
         '''Returns nImages images from the video sequence'''
@@ -162,6 +163,7 @@
                     if saveKey(key):
                         cv2.imwrite('image.png', img)
                     frameNum += 1
+            cv2.destroyAllWindows()
     
 def printCvMat(cvmat, out = stdout):
     '''Prints the cvmat to out'''