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
+9 -1
View File
@@ -16,7 +16,7 @@ from __future__ import print_function
import numpy as np
import cv2 as cv
if __name__ == '__main__':
def main():
import sys
try:
fn = sys.argv[1]
@@ -45,3 +45,11 @@ if __name__ == '__main__':
cv.imshow('input', img)
cv.imshow('flow', vis)
cv.waitKey()
print('Done')
if __name__ == '__main__':
print(__doc__)
main()
cv.destroyAllWindows()