changeset 492:30fb60428e09

corrected bug
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Wed, 23 Apr 2014 16:20:40 -0400
parents 343cfd185ca6
children 850ed17c7b2f
files scripts/display-trajectories.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/display-trajectories.py	Wed Apr 16 17:43:53 2014 -0400
+++ b/scripts/display-trajectories.py	Wed Apr 23 16:20:40 2014 -0400
@@ -12,7 +12,7 @@
 parser.add_argument('-d', dest = 'databaseFilename', help = 'name of the Sqlite database file')
 parser.add_argument('-i', dest = 'videoFilename', help = 'name of the video file')
 parser.add_argument('-t', dest = 'trajectoryType', help = 'type of trajectories to display', choices = ['feature', 'object'], default = 'feature')
-parser.add_argument('-o', dest = 'homography', help = 'name of the image to world homography')
+parser.add_argument('-o', dest = 'homographyFilename', help = 'name of the image to world homography file')
 parser.add_argument('-f', dest = 'firstFrameNum', help = 'number of first frame number to display', default = 0, type = int)
 parser.add_argument('-r', dest = 'rescale', help = 'rescaling factor for the displayed image', default = 1., type = float)
 parser.add_argument('-s', dest = 'nFramesStep', help = 'number of frames between each display', default = 1, type = int)
@@ -27,15 +27,15 @@
     params.loadConfigFile(args.configFilename)
     videoFilename = params.videoFilename
     databaseFilename = params.databaseFilename
-    homography = inv(params.homography)
+    homography = inv(loadtxt(params.homographyFilename))
     firstFrameNum = params.firstFrameNum
 
 if args.videoFilename != None:
     videoFilename = args.videoFilename
 if args.databaseFilename != None:
     databaseFilename = args.databaseFilename
-if args.homography != None:
-    homography = inv(loadtxt(args.homography))            
+if args.homographyFilename != None:
+    homography = inv(loadtxt(args.homographyFilename))            
 if args.firstFrameNum != None:
     firstFrameNum = args.firstFrameNum