Mercurial Hosting > traffic-intelligence
changeset 586:ff4f0ce46ca6
modified name for loading bounding boxes (only for display)
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Thu, 04 Dec 2014 17:21:45 -0500 |
parents | aab2242ea88c |
children | cf578ba866da |
files | python/storage.py scripts/display-trajectories.py |
diffstat | 2 files changed, 2 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/python/storage.py Thu Dec 04 17:04:56 2014 -0500 +++ b/python/storage.py Thu Dec 04 17:21:45 2014 -0500 @@ -480,7 +480,7 @@ connection.commit() connection.close() -def loadBoundingBoxTable(filename): +def loadBoundingBoxTableForDisplay(filename): connection = sqlite3.connect(filename) cursor = connection.cursor() boundingBoxes = {} # list of bounding boxes for each instant @@ -489,9 +489,7 @@ result = [row for row in cursor] if len(result) > 0: cursor.execute('SELECT * FROM bounding_boxes') - #objId = -1 for row in cursor: - #if row[0] != objId: boundingBoxes.setdefault(row[1], []).append([moving.Point(row[2], row[3]), moving.Point(row[4], row[5])]) except sqlite3.OperationalError as error: printDBError(error)
--- a/scripts/display-trajectories.py Thu Dec 04 17:04:56 2014 -0500 +++ b/scripts/display-trajectories.py Thu Dec 04 17:21:45 2014 -0500 @@ -63,5 +63,5 @@ objects = storage.loadTrajectoriesFromSqlite(databaseFilename, args.trajectoryType) -boundingBoxes = storage.loadBoundingBoxTable(databaseFilename) +boundingBoxes = storage.loadBoundingBoxTableForDisplay(databaseFilename) cvutils.displayTrajectories(videoFilename, objects, boundingBoxes, homography, firstFrameNum, args.lastFrameNum, rescale = args.rescale, nFramesStep = args.nFramesStep, saveAllImages = args.saveAllImages, undistort = (undistort or args.undistort), intrinsicCameraMatrix = intrinsicCameraMatrix, distortionCoefficients = distortionCoefficients, undistortedImageMultiplication = undistortedImageMultiplication)