Mercurial Hosting > traffic-intelligence
diff scripts/compute-homography.py @ 572:9c429c7efe89
added script to generate undistorted images from video
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Tue, 12 Aug 2014 15:33:03 -0400 |
parents | bd1ad468e928 |
children | aded6c1c2ebd |
line wrap: on
line diff
--- a/scripts/compute-homography.py Thu Aug 07 00:05:14 2014 -0400 +++ b/scripts/compute-homography.py Tue Aug 12 15:33:03 2014 -0400 @@ -106,7 +106,7 @@ if args.displayPoints and args.videoFrameFilename != None and args.worldFilename != None and homography.size>0: worldImg = cv2.imread(args.worldFilename) videoImg = cv2.imread(args.videoFrameFilename) - if args.undistort: + if args.undistort: [map1, map2] = cvutils.computeUndistortMaps(videoImg.shape[1], videoImg.shape[0], args.undistortedImageMultiplication, np.loadtxt(args.intrinsicCameraMatrixFilename), args.distortionCoefficients) videoImg = cv2.remap(videoImg, map1, map2, interpolation=cv2.INTER_LINEAR) if args.saveImages: