Mercurial Hosting > traffic-intelligence
changeset 774:b6d3bf350789 dev
minor
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Wed, 03 Feb 2016 13:18:02 -0500 |
parents | bf4a1790cfac |
children | 56153d439f8c |
files | python/cvutils.py |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/python/cvutils.py Mon Feb 01 16:10:26 2016 -0500 +++ b/python/cvutils.py Wed Feb 03 13:18:02 2016 -0500 @@ -365,7 +365,7 @@ capture.set(cv2.CAP_PROP_POS_FRAMES, frameNum) cv2.destroyAllWindows() else: - print 'Cannot load file ' + videoFilename + print('Cannot load file ' + videoFilename) def computeHomographyFromPDTV(camera): '''Returns the homography matrix at ground level from PDTV camera @@ -400,7 +400,7 @@ if not isnan(res).any(): undistortedTrajectory.addPositionXY(res[0], res[1]) else: - print i,p,res + print('{} {} {}'.format(i,p,res)) return undistortedTrajectory def computeInverseMapping(originalImageSize, map1, map2): @@ -452,7 +452,7 @@ # If found, add object points, image points (after refining them) if ret: - print 'Found pattern in '+fname + print('Found pattern in '+fname) if secondPassSearch: corners = cv2.cornerSubPix(gray, corners, (11,11), (-1,-1), criteria) @@ -466,7 +466,8 @@ if img is not None: cv2.imshow('img',img) cv2.waitKey(0) - + else: + print('Pattern not found in '+fname) ## Close up image loading and calibrate cv2.destroyAllWindows() if len(objpoints) == 0 or len(imgpoints) == 0: