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
+7 -1
View File
@@ -25,7 +25,7 @@ from common import splitfn
# built-in modules
import os
if __name__ == '__main__':
def main():
import sys
import getopt
from glob import glob
@@ -126,4 +126,10 @@ if __name__ == '__main__':
print('Undistorted image written to: %s' % outfile)
cv.imwrite(outfile, dst)
print('Done')
if __name__ == '__main__':
print(__doc__)
main()
cv.destroyAllWindows()