Mercurial Hosting > traffic-intelligence
changeset 950:c03d2c0a4c04
corrected bugs
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Fri, 21 Jul 2017 18:18:02 -0400 |
parents | d6c1c05d11f5 |
children | 2a4f174879dd |
files | python/cvutils.py scripts/undistort-video.py |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/python/cvutils.py Fri Jul 21 17:52:56 2017 -0400 +++ b/python/cvutils.py Fri Jul 21 18:18:02 2017 -0400 @@ -477,7 +477,7 @@ # Draw and display the corners if display: - img = cv2.drawChessboardCorners(img, (checkerBoardSize[1],checkerBoardSize[0]), corners, ret) + cv2.drawChessboardCorners(img, (checkerBoardSize[1],checkerBoardSize[0]), corners, ret) if img is not None: cv2.imshow('img',img) cv2.waitKey(0)
--- a/scripts/undistort-video.py Fri Jul 21 17:52:56 2017 -0400 +++ b/scripts/undistort-video.py Fri Jul 21 18:18:02 2017 -0400 @@ -40,7 +40,7 @@ capture = cv2.VideoCapture(args.videoFilename) width = int(capture.get(cv2.cv.CV_CAP_PROP_FRAME_WIDTH)) height = int(capture.get(cv2.cv.CV_CAP_PROP_FRAME_HEIGHT)) -[map1, map2] = cvutils.computeUndistortMaps(width, height, args.undistortedImageMultiplication, intrinsicCameraMatrix, args.distortionCoefficients) +[map1, map2], newCameraMatrix = cvutils.computeUndistortMaps(width, height, args.undistortedImageMultiplication, intrinsicCameraMatrix, args.distortionCoefficients) if args.maskFilename is not None: mask = cv2.imread(args.maskFilename) undistortedMask = cv2.remap(mask, map1, map2, interpolation=cv2.INTER_LINEAR)/255