Added cv.DestroyAllWindows() to file close
This commit is contained in:
parent
5878ab6a0f
commit
a4de511eb7
@ -10,3 +10,4 @@ while True:
|
|||||||
cv.ShowImage("camera", img)
|
cv.ShowImage("camera", img)
|
||||||
if cv.WaitKey(10) == 27:
|
if cv.WaitKey(10) == 27:
|
||||||
break
|
break
|
||||||
|
cv.DestroyAllWindows()
|
||||||
|
@ -113,3 +113,4 @@ class CamShiftDemo:
|
|||||||
if __name__=="__main__":
|
if __name__=="__main__":
|
||||||
demo = CamShiftDemo()
|
demo = CamShiftDemo()
|
||||||
demo.run()
|
demo.run()
|
||||||
|
cv.DestroyAllWindows()
|
||||||
|
@ -31,3 +31,4 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
cv.ShowImage("win", im3);
|
cv.ShowImage("win", im3);
|
||||||
cv.WaitKey()
|
cv.WaitKey()
|
||||||
|
cv.DestroyAllWindows()
|
||||||
|
@ -133,3 +133,4 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
# wait a key pressed to end
|
# wait a key pressed to end
|
||||||
cv.WaitKey (0)
|
cv.WaitKey (0)
|
||||||
|
cv.DestroyAllWindows()
|
||||||
|
@ -62,3 +62,4 @@ if __name__ == '__main__':
|
|||||||
if k == 27:
|
if k == 27:
|
||||||
# user has press the ESC key, so exit
|
# user has press the ESC key, so exit
|
||||||
break
|
break
|
||||||
|
cv.DestroyAllWindows()
|
||||||
|
@ -164,3 +164,4 @@ def main():
|
|||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
cv.DestroyAllWindows()
|
||||||
|
@ -77,3 +77,4 @@ if __name__ == "__main__":
|
|||||||
dh = DemHist(src_image)
|
dh = DemHist(src_image)
|
||||||
|
|
||||||
cv.WaitKey(0)
|
cv.WaitKey(0)
|
||||||
|
cv.DestroyAllWindows()
|
||||||
|
@ -111,3 +111,4 @@ if __name__ == "__main__":
|
|||||||
cv.ShowImage("magnitude", image_Re)
|
cv.ShowImage("magnitude", image_Re)
|
||||||
|
|
||||||
cv.WaitKey(0)
|
cv.WaitKey(0)
|
||||||
|
cv.DestroyAllWindows()
|
||||||
|
@ -69,3 +69,4 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
# Wait for a key stroke; the same function arranges events processing
|
# Wait for a key stroke; the same function arranges events processing
|
||||||
cv.WaitKey(0)
|
cv.WaitKey(0)
|
||||||
|
cv.DestroyAllWindows()
|
||||||
|
@ -5,6 +5,10 @@ import numpy
|
|||||||
import sys
|
import sys
|
||||||
import math
|
import math
|
||||||
|
|
||||||
|
'''
|
||||||
|
Find 2 D barcode based on up to 3 channel datamatrix
|
||||||
|
'''
|
||||||
|
|
||||||
def absnorm8(im, im8):
|
def absnorm8(im, im8):
|
||||||
""" im may be any single-channel image type. Return an 8-bit version, absolute value, normalized so that max is 255 """
|
""" im may be any single-channel image type. Return an 8-bit version, absolute value, normalized so that max is 255 """
|
||||||
(minVal, maxVal, _, _) = cv.MinMaxLoc(im)
|
(minVal, maxVal, _, _) = cv.MinMaxLoc(im)
|
||||||
@ -166,6 +170,7 @@ for (sym, coords) in df.find(bg).items():
|
|||||||
|
|
||||||
cv.ShowImage("results", scribble)
|
cv.ShowImage("results", scribble)
|
||||||
cv.WaitKey()
|
cv.WaitKey()
|
||||||
|
cv.DestroyAllWindows()
|
||||||
|
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
|
@ -159,3 +159,4 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
# wait some key to end
|
# wait some key to end
|
||||||
cv.WaitKey(0)
|
cv.WaitKey(0)
|
||||||
|
cv.DestroyAllWindows()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user