Mercurial > hg > nsaunier > traffic-intelligence
comparison python/safety-analysis.py @ 333:c9201f6b143a
moved the config parser to utils
| author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
|---|---|
| date | Fri, 14 Jun 2013 10:25:00 -0400 |
| parents | 5e43b7389c25 |
| children |
comparison
equal
deleted
inserted
replaced
| 332:a6ca86107f27 | 333:c9201f6b143a |
|---|---|
| 20 sys.exit() | 20 sys.exit() |
| 21 | 21 |
| 22 # TODO work on the way to indicate an interaction definition | 22 # TODO work on the way to indicate an interaction definition |
| 23 | 23 |
| 24 if len(args)>0: # consider there is a configuration file | 24 if len(args)>0: # consider there is a configuration file |
| 25 config = ConfigParser() | 25 params = utils.TrackingParameters() |
| 26 config.readfp(FakeSecHead(open(args[0]))) | 26 params.loadConfigFile(args[0]) |
| 27 sectionHeader = config.sections()[0] | 27 |
| 28 videoFilename = config.get(sectionHeader, 'video-filename') | |
| 29 databaseFilename = config.get(sectionHeader, 'database-filename') | |
| 30 homography = inv(loadtxt(config.get(sectionHeader, 'homography-filename'))) | |
| 31 firstFrameNum = config.getint(sectionHeader, 'frame1') | |
| 32 | 28 |
| 33 | 29 |
