Mercurial Hosting > traffic-intelligence
changeset 773:bf4a1790cfac dev
minor bug and improvements
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Mon, 01 Feb 2016 16:10:26 -0500 |
parents | e92a96f2bdd3 |
children | b6d3bf350789 |
files | python/storage.py scripts/compute-homography.py |
diffstat | 2 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/python/storage.py Fri Jan 29 17:43:57 2016 -0500 +++ b/python/storage.py Mon Feb 01 16:10:26 2016 -0500 @@ -511,7 +511,7 @@ try: cursor.execute('SELECT * from prototypes order by prototype_id, routeIDstart,routeIDend, nMatching') except sqlite3.OperationalError as error: - utils.printDBError(error) + printDBError(error) return [] for row in cursor: @@ -550,7 +550,7 @@ try: cursor.execute('SELECT * from labels order by object_id, routeIDstart,routeIDend, prototype_id') except sqlite3.OperationalError as error: - utils.printDBError(error) + printDBError(error) return [] for row in cursor: @@ -594,7 +594,7 @@ try: cursor.execute('SELECT * from speedprototypes order by spdprototype_id,prototype_id, routeID_start, routeID_end, nMatching') except sqlite3.OperationalError as error: - utils.printDBError(error) + printDBError(error) return [] for row in cursor: @@ -634,7 +634,7 @@ try: cursor.execute('SELECT * from routes order by object_id, routeIDstart,routeIDend') except sqlite3.OperationalError as error: - utils.printDBError(error) + printDBError(error) return [] for row in cursor:
--- a/scripts/compute-homography.py Fri Jan 29 17:43:57 2016 -0500 +++ b/scripts/compute-homography.py Mon Feb 01 16:10:26 2016 -0500 @@ -100,10 +100,12 @@ print('Click on {0} points in the video frame'.format(args.nPoints)) plt.figure() plt.imshow(videoImg) + plt.tight_layout() videoPts = np.array(plt.ginput(args.nPoints, timeout=3000)) print('Click on {0} points in the world image'.format(args.nPoints)) plt.figure() plt.imshow(worldImg) + plt.tight_layout() worldPts = args.unitsPerPixel*np.array(plt.ginput(args.nPoints, timeout=3000)) plt.close('all') homography, mask = cv2.findHomography(videoPts, worldPts)