Mercurial > hg > nsaunier > traffic-intelligence
diff scripts/create-bounding-boxes.py @ 614:5e09583275a4
Merged Nicolas/trafficintelligence into default
| author | Mohamed Gomaa <eng.m.gom3a@gmail.com> |
|---|---|
| date | Fri, 05 Dec 2014 12:13:53 -0500 |
| parents | 6551a3cf1750 |
| children | 3058e00887bc |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/create-bounding-boxes.py Fri Dec 05 12:13:53 2014 -0500 @@ -0,0 +1,21 @@ +#! /usr/bin/env python + +import argparse + +import storage + +from numpy.linalg.linalg import inv +from numpy import loadtxt + +parser = argparse.ArgumentParser(description='The program creates bounding boxes in image space around all features (for display and for comparison to ground truth in the form of bouding boxes.') +parser.add_argument('-d', dest = 'databaseFilename', help = 'name of the Sqlite database file', required = True) +parser.add_argument('-o', dest = 'homography', help = 'name of the image to world homography') + +args = parser.parse_args() + +homography = None +if args.homography != None: + homography = inv(loadtxt(args.homography)) + +storage.createBoundingBoxTable(args.databaseFilename, homography) +
