added cv2.destroyAllWindows()
This commit is contained in:
parent
41d2a3c832
commit
dfaabd88fc
@ -45,3 +45,4 @@ if __name__ == '__main__':
|
||||
cv2.imshow('preview', small)
|
||||
cv2.setMouseCallback('preview', onmouse)
|
||||
cv2.waitKey()
|
||||
cv2.destroyAllWindows()
|
||||
|
@ -54,4 +54,5 @@ if __name__ == '__main__':
|
||||
print "RMS:", rms
|
||||
print "camera matrix:\n", camera_matrix
|
||||
print "distortion coefficients: ", dist_coefs.ravel()
|
||||
cv2.destroyAllWindows()
|
||||
|
||||
|
@ -106,6 +106,7 @@ class App(object):
|
||||
break
|
||||
if ch == ord('b'):
|
||||
self.show_backproj = not self.show_backproj
|
||||
cv2.destroyAllWindows()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
@ -70,3 +70,4 @@ if __name__ == '__main__':
|
||||
update()
|
||||
if ch == 27:
|
||||
break
|
||||
cv2.destroyAllWindows()
|
||||
|
@ -45,3 +45,4 @@ if __name__ == '__main__':
|
||||
ch = 0xFF & cv2.waitKey(1)
|
||||
if ch == 27:
|
||||
break
|
||||
cv2.destroyAllWindows()
|
||||
|
@ -46,3 +46,4 @@ if __name__ == '__main__':
|
||||
cv2.createTrackbar( "levels+3", "contours", 3, 7, update )
|
||||
cv2.imshow('image', img)
|
||||
0xFF & cv2.waitKey()
|
||||
cv2.destroyAllWindows()
|
||||
|
@ -149,3 +149,4 @@ class App:
|
||||
|
||||
if __name__ == '__main__':
|
||||
App().run()
|
||||
|
||||
|
@ -53,4 +53,5 @@ if __name__ == '__main__':
|
||||
update()
|
||||
if need_update:
|
||||
update()
|
||||
cv2.destroyAllWindows()
|
||||
|
||||
|
@ -27,4 +27,5 @@ if __name__ == '__main__':
|
||||
ch = cv2.waitKey(5)
|
||||
if ch == 27:
|
||||
break
|
||||
cv2.destroyAllWindows()
|
||||
|
||||
|
@ -56,4 +56,5 @@ if __name__ == '__main__':
|
||||
|
||||
if 0xFF & cv2.waitKey(5) == 27:
|
||||
break
|
||||
cv2.destroyAllWindows()
|
||||
|
||||
|
@ -93,3 +93,4 @@ if __name__ == '__main__':
|
||||
ref_img = img.copy()
|
||||
if ch == 27:
|
||||
break
|
||||
cv2.destroyAllWindows()
|
||||
|
@ -100,3 +100,4 @@ if __name__ == '__main__':
|
||||
cv2.imshow('find_obj SURF', vis_brute)
|
||||
cv2.imshow('find_obj SURF flann', vis_flann)
|
||||
0xFF & cv2.waitKey()
|
||||
cv2.destroyAllWindows()
|
||||
|
@ -62,3 +62,4 @@ if __name__ == '__main__':
|
||||
connectivity = 12-connectivity
|
||||
print 'connectivity =', connectivity
|
||||
update()
|
||||
cv2.destroyAllWindows()
|
||||
|
@ -65,3 +65,4 @@ if __name__ == '__main__':
|
||||
cv2.imshow('img', img)
|
||||
cv2.imshow('result', res2)
|
||||
cv2.waitKey()
|
||||
cv2.destroyAllWindows()
|
||||
|
@ -54,3 +54,4 @@ if __name__ == '__main__':
|
||||
ch = 0xFF & cv2.waitKey(0)
|
||||
if ch == 27:
|
||||
break
|
||||
cv2.destroyAllWindows()
|
||||
|
@ -106,4 +106,5 @@ if __name__ == '__main__':
|
||||
print 'ESC'
|
||||
cv2.destroyAllWindows()
|
||||
break
|
||||
cv2.destroyAllWindows()
|
||||
|
||||
|
@ -32,4 +32,5 @@ if __name__ == '__main__':
|
||||
img_mark[:] = img
|
||||
mark[:] = 0
|
||||
sketch.show()
|
||||
cv2.destroyAllWindows()
|
||||
|
||||
|
@ -154,3 +154,4 @@ if __name__ == '__main__':
|
||||
fn = args['--save']
|
||||
print 'saving model to %s ...' % fn
|
||||
model.save(fn)
|
||||
cv2.destroyAllWindows()
|
||||
|
@ -107,6 +107,7 @@ def main():
|
||||
|
||||
print __doc__
|
||||
App(video_src).run()
|
||||
cv2.destroyAllWindows()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
@ -92,6 +92,7 @@ def main():
|
||||
|
||||
print __doc__
|
||||
App(video_src).run()
|
||||
cv2.destroyAllWindows()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
@ -56,3 +56,4 @@ if __name__ == '__main__':
|
||||
if ch == ord('2'):
|
||||
cur_str_mode = str_modes.next()
|
||||
update()
|
||||
cv2.destroyAllWindows()
|
||||
|
@ -78,3 +78,4 @@ if __name__ == '__main__':
|
||||
prev_frame = frame.copy()
|
||||
if 0xFF & cv2.waitKey(5) == 27:
|
||||
break
|
||||
cv2.destroyAllWindows()
|
||||
|
@ -69,3 +69,4 @@ if __name__ == '__main__':
|
||||
cv.imshow("gray",gray)
|
||||
if (cv.waitKey() & 255) == 27:
|
||||
break
|
||||
cv2.destroyAllWindows()
|
||||
|
@ -35,3 +35,4 @@ if __name__ == '__main__':
|
||||
cv2.imshow('img', vis)
|
||||
if 0xFF & cv2.waitKey(5) == 27:
|
||||
break
|
||||
cv2.destroyAllWindows()
|
||||
|
@ -80,4 +80,5 @@ if __name__ == '__main__':
|
||||
if show_glitch:
|
||||
cur_glitch = img.copy()
|
||||
print 'glitch is', ['off', 'on'][show_glitch]
|
||||
cv2.destroyAllWindows()
|
||||
|
||||
|
@ -53,3 +53,4 @@ if __name__ == '__main__':
|
||||
ch = 0xFF & cv2.waitKey()
|
||||
if ch == 27:
|
||||
break
|
||||
cv2.destroyAllWindows()
|
||||
|
@ -37,3 +37,4 @@ if __name__ == '__main__':
|
||||
ch = 0xFF & cv2.waitKey()
|
||||
if ch == 27:
|
||||
break
|
||||
cv2.destroyAllWindows()
|
||||
|
@ -71,3 +71,4 @@ if __name__ == '__main__':
|
||||
cv2.imshow('left', imgL)
|
||||
cv2.imshow('disparity', (disp-min_disp)/num_disp)
|
||||
cv2.waitKey()
|
||||
cv2.destroyAllWindows()
|
||||
|
@ -62,3 +62,4 @@ if __name__ == '__main__':
|
||||
cv2.imshow('a', vis)
|
||||
if 0xFF & cv2.waitKey(5) == 27:
|
||||
break
|
||||
cv2.destroyAllWindows()
|
||||
|
@ -165,3 +165,4 @@ if __name__ == '__main__':
|
||||
cv2.imwrite(fn, img)
|
||||
print fn, 'saved'
|
||||
shot_idx += 1
|
||||
cv2.destroyAllWindows()
|
||||
|
@ -53,6 +53,7 @@ class App:
|
||||
self.markers[:] = 0
|
||||
self.markers_vis[:] = self.img
|
||||
self.sketch.show()
|
||||
cv2.destroyAllWindows()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
Loading…
x
Reference in New Issue
Block a user