diff scripts/display-trajectories.py @ 636:3058e00887bc

removed all issues because of tests with None, using is instead of == or !=
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Tue, 24 Mar 2015 18:11:28 +0100
parents ff4f0ce46ca6
children 95e7622b11be
line wrap: on
line diff
--- a/scripts/display-trajectories.py	Tue Mar 24 14:17:12 2015 +0100
+++ b/scripts/display-trajectories.py	Tue Mar 24 18:11:28 2015 +0100
@@ -29,7 +29,7 @@
     params = storage.ProcessParameters(args.configFilename)
     videoFilename = params.videoFilename
     databaseFilename = params.databaseFilename
-    if params.homography != None:
+    if params.homography is not None:
         homography = inv(params.homography)
     else:
         homography = None
@@ -46,19 +46,19 @@
     undistortedImageMultiplication = None
     firstFrameNum = 0
 
-if not args.configFilename and args.videoFilename != None:
+if not args.configFilename and args.videoFilename is not None:
     videoFilename = args.videoFilename
-if not args.configFilename and args.databaseFilename != None:
+if not args.configFilename and args.databaseFilename is not None:
     databaseFilename = args.databaseFilename
-if not args.configFilename and args.homographyFilename != None:
+if not args.configFilename and args.homographyFilename is not None:
     homography = inv(loadtxt(args.homographyFilename))            
-if not args.configFilename and args.intrinsicCameraMatrixFilename != None:
+if not args.configFilename and args.intrinsicCameraMatrixFilename is not None:
     intrinsicCameraMatrix = loadtxt(args.intrinsicCameraMatrixFilename)
-if not args.configFilename and args.distortionCoefficients != None:
+if not args.configFilename and args.distortionCoefficients is not None:
     distortionCoefficients = args.distortionCoefficients
-if not args.configFilename and args.undistortedImageMultiplication != None:
+if not args.configFilename and args.undistortedImageMultiplication is not None:
     undistortedImageMultiplication = args.undistortedImageMultiplication
-if args.firstFrameNum != None:
+if args.firstFrameNum is not None:
     firstFrameNum = args.firstFrameNum