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 -2
View File
@@ -106,9 +106,8 @@ def affine_detect(detector, img, mask=None, pool=None):
print()
return keypoints, np.array(descrs)
if __name__ == '__main__':
print(__doc__)
def main():
import sys, getopt
opts, args = getopt.getopt(sys.argv[1:], '', ['feature='])
opts = dict(opts)
@@ -160,4 +159,10 @@ if __name__ == '__main__':
match_and_draw('affine find_obj')
cv.waitKey()
print('Done')
if __name__ == '__main__':
print(__doc__)
main()
cv.destroyAllWindows()