Mercurial > hg > nsaunier > traffic-intelligence
diff scripts/undistort-video.py @ 950:c03d2c0a4c04
corrected bugs
| author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
|---|---|
| date | Fri, 21 Jul 2017 18:18:02 -0400 |
| parents | dbd81710d515 |
| children | 933670761a57 |
line wrap: on
line diff
--- 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
