Mercurial Hosting > traffic-intelligence
diff python/cvutils.py @ 978:184f1dd307f9
corrected print and exception statements for Python 3
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Thu, 08 Feb 2018 05:53:50 -0500 |
parents | 5d788d2e8ffc |
children | c3e690c5536e |
line wrap: on
line diff
--- a/python/cvutils.py Tue Feb 06 11:50:43 2018 -0500 +++ b/python/cvutils.py Thu Feb 08 05:53:50 2018 -0500 @@ -16,7 +16,7 @@ print('Scikit-image library could not be loaded (HoG-based classification methods will not be available)') skimageAvailable = False -from sys import stdout, maxint +from sys import stdout from os import listdir from copy import deepcopy from math import floor, log10, ceil @@ -315,7 +315,7 @@ frameNum = firstFrameNum capture.set(cv2.cv.CV_CAP_PROP_POS_FRAMES, firstFrameNum) if lastFrameNumArg is None: - lastFrameNum = maxint + lastFrameNum = float("inf") else: lastFrameNum = lastFrameNumArg if nZerosFilenameArg is None: @@ -502,7 +502,7 @@ except NameError: return None savetxt('intrinsic-camera.txt', camera_matrix) - print 'error: {}'.format(ret) + print('error: {}'.format(ret)) return camera_matrix, dist_coeffs def undistortImage(img, intrinsicCameraMatrix = None, distortionCoefficients = None, undistortedImageMultiplication = 1., interpolation=cv2.INTER_LINEAR):