diff scripts/undistort-video.py @ 998:933670761a57

updated code to python 3 (tests pass and scripts run, but non-executed parts of code are probably still not correct)
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Sun, 27 May 2018 23:22:48 -0400
parents c03d2c0a4c04
children acb4f6f6545d
line wrap: on
line diff
--- a/scripts/undistort-video.py	Fri May 25 18:15:18 2018 -0400
+++ b/scripts/undistort-video.py	Sun May 27 23:22:48 2018 -0400
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
 
 import sys, argparse
 
@@ -50,8 +50,7 @@
     frameNum = args.firstFrameNum
     capture.set(cv2.cv.CV_CAP_PROP_POS_FRAMES, args.firstFrameNum)
     if args.lastFrameNum is None:
-        from sys import maxint
-        lastFrameNum = maxint
+        lastFrameNum = float('inf')
     else:
         lastFrameNum = args.lastFrameNum
     nZerosFilename = int(ceil(log10(lastFrameNum)))