samples: fix python samples compatibility with demo.py

This commit is contained in:
Alexander Alekhin
2019-03-19 21:03:58 +03:00
parent f4c2c4412b
commit 04fad57fc1
48 changed files with 678 additions and 403 deletions
+8 -1
View File
@@ -27,7 +27,7 @@ USAGE: turing.py [-o <output.avi>]
Press ESC to stop.
'''
if __name__ == '__main__':
def main():
print(help_message)
w, h = 512, 512
@@ -71,4 +71,11 @@ if __name__ == '__main__':
cv.imshow('a', vis)
if cv.waitKey(5) == 27:
break
print('Done')
if __name__ == '__main__':
print(__doc__)
main()
cv.destroyAllWindows()