Various Python samples updated for Python 2/3 compatibility.
This commit is contained in:
@@ -21,6 +21,14 @@ Keys:
|
||||
http://www.cs.colostate.edu/~bolme/publications/Bolme2010Tracking.pdf
|
||||
'''
|
||||
|
||||
# Python 2/3 compatibility
|
||||
from __future__ import print_function
|
||||
import sys
|
||||
PY3 = sys.version_info[0] == 3
|
||||
|
||||
if PY3:
|
||||
xrange = range
|
||||
|
||||
import numpy as np
|
||||
import cv2
|
||||
from common import draw_str, RectSelector
|
||||
@@ -178,7 +186,7 @@ class App:
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
print __doc__
|
||||
print (__doc__)
|
||||
import sys, getopt
|
||||
opts, args = getopt.getopt(sys.argv[1:], '', ['pause'])
|
||||
opts = dict(opts)
|
||||
|
Reference in New Issue
Block a user