changeset 829:0ddcc41663f5

renaming
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Wed, 29 Jun 2016 13:50:21 -0400
parents 14e4ad7c7420
children 2a5856961933
files python/storage.py scripts/merge-features.py
diffstat 2 files changed, 11 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/python/storage.py	Tue Jun 28 17:18:45 2016 -0400
+++ b/python/storage.py	Wed Jun 29 13:50:21 2016 -0400
@@ -283,7 +283,7 @@
         print('List of missing objects to attach corresponding curvilinear trajectories: {}'.format(missingObjectNumbers))
 
 def saveTrajectoriesToSqlite(outputFilename, objects, trajectoryType, withFeatures = False):
-    '''Writes features, ie the trajectories positions (and velocities if exist)
+    '''Writes features, ie the trajectory positions (and velocities if exist)
     with their instants to a specified sqlite file
     Either feature positions (and velocities if they exist)
     or curvilinear positions will be saved at a time
@@ -793,7 +793,7 @@
         s = readline(f, commentCharacters)
     return dataStrings
 
-def writeList(filename, l):
+def saveList(filename, l):
     f = openCheck(filename, 'w')
     for x in l:
         f.write('{}\n'.format(x))
@@ -1108,7 +1108,7 @@
         
     out.close()
 
-def writePositionsToCsv(f, obj):
+def savePositionsToCsv(f, obj):
     timeInterval = obj.getTimeInterval()
     positions = obj.getPositions()
     curvilinearPositions = obj.getCurvilinearPositions()
@@ -1120,10 +1120,10 @@
             s += ',{},{}'.format(p2[0],p2[1])
         f.write(s+'\n')
 
-def writeTrajectoriesToCsv(filename, objects):
+def saveTrajectoriesToCsv(filename, objects):
     f = openCheck(filename, 'w')
     for i,obj in enumerate(objects):
-        writePositionsToCsv(f, obj)
+        savePositionsToCsv(f, obj)
     f.close()
 
 
--- a/scripts/merge-features.py	Tue Jun 28 17:18:45 2016 -0400
+++ b/scripts/merge-features.py	Wed Jun 29 13:50:21 2016 -0400
@@ -40,6 +40,12 @@
     commonTimeInterval = moving.TimeInterval.intersection(commonTimeInterval, inter)
 commonTimeInterval = moving.TimeInterval.intersection(commonTimeInterval, processInterval)
 
+if len(set([cv.cameraType.frameRate for cv in cameraViews])) > 1:
+    print('Different framerates of the cameras ({}) are not handled yet. Exiting'.format([cv.cameraType.frameRate for cv in cameraViews]))
+
+for cv, v in videoSequences.iteritems():
+    
+
 # for all camera view, for all video, select from positions and velocities where frame_number is in the right range and insert in new database
 
 # should we save the information of the new "sequence" in the metadata?