Mercurial Hosting > traffic-intelligence
view scripts/create-bounding-boxes.py @ 1130:18e2c8cb9b09
Merged in etienne_beauchamp/trafficintelligence/Etienne-Beauchamp/added-d-optional-argument-1581358671588 (pull request #19)
Etienne Beauchamp/added d optional argument 1581358671588
Approved-by: Nicolas Saunier <nicolas.saunier@polymtl.ca>
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Tue, 11 Feb 2020 03:47:05 +0000 |
parents | cc5cb04b04b0 |
children |
line wrap: on
line source
#! /usr/bin/env python3 import argparse from numpy.linalg.linalg import inv from numpy import loadtxt from trafficintelligence import storage 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 is not None: homography = inv(loadtxt(args.homography)) storage.createBoundingBoxTable(args.databaseFilename, homography)