Mercurial Hosting > traffic-intelligence
comparison python/storage.py @ 664:455f9b93819c
added capability to set a videofilename to movingobject and interaction, renames interactiontype to collision in interaction
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Wed, 20 May 2015 12:04:22 +0200 |
parents | 994dd644f6ab |
children | 15e244d2a1b5 |
comparison
equal
deleted
inserted
replaced
663:65a867942eee | 664:455f9b93819c |
---|---|
865 | 865 |
866 ######################### | 866 ######################### |
867 # Utils to read .ini type text files for configuration, meta data... | 867 # Utils to read .ini type text files for configuration, meta data... |
868 ######################### | 868 ######################### |
869 | 869 |
870 class ProcessParameters: | 870 class VideoFilenameAddable: |
871 'Base class with the capability to attach a video filename' | |
872 | |
873 def setVideoFilename(self, videoFilename): | |
874 self.videoFilename = videoFilename | |
875 | |
876 | |
877 class ProcessParameters(VideoFilenameAddable): | |
871 '''Class for all parameters controlling data processing: input, | 878 '''Class for all parameters controlling data processing: input, |
872 method parameters, etc. for tracking, classification and safety | 879 method parameters, etc. for tracking, classification and safety |
873 | 880 |
874 Note: framerate is already taken into account''' | 881 Note: framerate is already taken into account''' |
875 | 882 |
950 for sectionName in config.sections(): | 957 for sectionName in config.sections(): |
951 configDict[sectionName] = SceneParameters(config, sectionName) | 958 configDict[sectionName] = SceneParameters(config, sectionName) |
952 return configDict | 959 return configDict |
953 | 960 |
954 | 961 |
955 | |
956 if __name__ == "__main__": | 962 if __name__ == "__main__": |
957 import doctest | 963 import doctest |
958 import unittest | 964 import unittest |
959 suite = doctest.DocFileSuite('tests/storage.txt') | 965 suite = doctest.DocFileSuite('tests/storage.txt') |
960 unittest.TextTestRunner().run(suite) | 966 unittest.TextTestRunner().run(suite) |