samples: fix python samples compatibility with demo.py
This commit is contained in:
@@ -21,9 +21,7 @@ import numpy as np
|
||||
import cv2 as cv
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
print(__doc__)
|
||||
|
||||
def main():
|
||||
import sys
|
||||
from itertools import cycle
|
||||
from common import draw_str
|
||||
@@ -93,4 +91,11 @@ if __name__ == '__main__':
|
||||
else:
|
||||
cur_str_mode = str_modes.next()
|
||||
update()
|
||||
|
||||
print('Done')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
print(__doc__)
|
||||
main()
|
||||
cv.destroyAllWindows()
|
||||
|
||||
Reference in New Issue
Block a user