diff python/storage.py @ 203:e2f31813ade6

added code to display trajectories on videa
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Tue, 06 Mar 2012 18:10:19 -0500
parents 319a04ba9033
children 966c2cd2bd9f
line wrap: on
line diff
--- a/python/storage.py	Mon Mar 05 02:55:19 2012 -0500
+++ b/python/storage.py	Tue Mar 06 18:10:19 2012 -0500
@@ -48,6 +48,15 @@
     connection.close()
     return objects
 
+def loadObjectsFromSqlite(filename, objectNumbers = -1):
+    '''Loads objects as averages of feature trajectories
+    TODO: load features as well, other ways of averaging trajectories
+    need to provide table name(s) ?'''
+    # elect frame_number, avg(x_coordinate), avg(y_coordinate) from positions where trajectory_id in (select trajectory_id from objects_features where object_id=12) group by frame_number;
+
+
+
+
 def loadTrajectoriesFromNgsimFile(filename, nObjects = -1, sequenceNum = -1):
     '''Reads data from the trajectory data provided by NGSIM project 
     and returns the list of Feature objects'''