comparison python/utils.py @ 405:a9e275b4ecb7

modification of the scene.cfg format
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Wed, 31 Jul 2013 02:54:18 -0400
parents 3399bd48cb40
children 4fce27946c60
comparison
equal deleted inserted replaced
404:4dd68b0765b1 405:a9e275b4ecb7
539 def __init__(self, config, sectionName): 539 def __init__(self, config, sectionName):
540 from ConfigParser import NoOptionError 540 from ConfigParser import NoOptionError
541 from ast import literal_eval 541 from ast import literal_eval
542 try: 542 try:
543 self.sitename = config.get(sectionName, 'sitename') 543 self.sitename = config.get(sectionName, 'sitename')
544 self.databaseFilename = config.get(sectionName, 'data_filename') 544 self.databaseFilename = config.get(sectionName, 'data-filename')
545 self.homographyFilename = config.get(sectionName, 'homography_filename') 545 self.homographyFilename = config.get(sectionName, 'homography-filename')
546 self.videoFilename = config.get(sectionName, 'video_filename') 546 self.calibrationFilename = config.get(sectionName, 'calibration-filename')
547 self.videoFilename = config.get(sectionName, 'video-filename')
548 self.frameRate = config.getfloat(sectionName, 'framerate')
547 self.date = datetime.strptime(config.get(sectionName, 'date'), "%Y-%m-%d %H:%M:%S") # 2011-06-22 11:00:39 549 self.date = datetime.strptime(config.get(sectionName, 'date'), "%Y-%m-%d %H:%M:%S") # 2011-06-22 11:00:39
548 self.translation = literal_eval(config.get(sectionName, 'translation')) # = [0.0, 0.0] 550 self.translation = literal_eval(config.get(sectionName, 'translation')) # = [0.0, 0.0]
549 self.rotation = config.getfloat(sectionName, 'rotation') 551 self.rotation = config.getfloat(sectionName, 'rotation')
550 self.duration = config.getint(sectionName, 'duration') 552 self.duration = config.getint(sectionName, 'duration')
551 except NoOptionError as e: 553 except NoOptionError as e: