changeset 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 fa64b2e3a64f
children 7b865f4174aa
files python/cvutils.py scripts/compute-homography.py
diffstat 2 files changed, 3 insertions(+), 0 deletions(-) [+]
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'''
--- a/scripts/compute-homography.py	Tue Jun 25 23:43:32 2013 -0400
+++ b/scripts/compute-homography.py	Wed Jun 26 15:42:45 2013 -0400
@@ -120,3 +120,4 @@
     if '-u' in options.keys():
         cv2.imshow('world image',worldImg)
     cv2.waitKey()
+    cv2.destroyAllWindows()