mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 23:33:05 +04:00
samples: fix python samples compatibility with demo.py
This commit is contained in:
@@ -23,6 +23,7 @@ from __future__ import print_function
|
||||
|
||||
import numpy as np
|
||||
import cv2 as cv
|
||||
|
||||
import video
|
||||
from common import anorm2, draw_str
|
||||
from time import clock
|
||||
@@ -96,9 +97,11 @@ def main():
|
||||
except:
|
||||
video_src = 0
|
||||
|
||||
print(__doc__)
|
||||
App(video_src).run()
|
||||
cv.destroyAllWindows()
|
||||
print('Done')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
print(__doc__)
|
||||
main()
|
||||
cv.destroyAllWindows()
|
||||
|
||||
Reference in New Issue
Block a user