Video-Summary/Application/Config.py

33 lines
826 B
Python
Raw Normal View History

class Config:
c = {
"min_area" : 500,
2020-10-18 17:24:55 +00:00
"max_area" : 40000,
2020-10-23 22:14:43 +00:00
"threashold" : 5,
"resizeWidth" : 512,
2020-10-11 15:09:49 +00:00
"inputPath" : None,
"outputPath": None,
"maxLayerLength": 900,
2020-10-17 22:02:05 +00:00
"minLayerLength": 20,
2020-10-18 17:24:55 +00:00
"tolerance": 20,
"maxLength": None,
2020-10-18 17:24:55 +00:00
"ttolerance": 60,
2020-10-31 19:36:43 +00:00
"videoBufferLength": 16,
2020-11-01 16:43:05 +00:00
"noiseThreashold": 0.3,
2020-10-20 20:25:23 +00:00
"noiseSensitivity": 3/4,
2020-10-21 19:56:00 +00:00
"LayersPerContour": 5,
"averageFrames": 10
2020-10-13 22:16:39 +00:00
}
2020-10-11 15:09:49 +00:00
def __init__(self):
2020-10-31 19:36:43 +00:00
'''This is basically just a wrapper for a json / python dict'''
2020-10-11 15:09:49 +00:00
print("Current Config:", self.c)
def __getitem__(self, key):
2020-10-16 08:36:52 +00:00
if key not in self.c:
return None
return self.c[key]
def __setitem__(self, key, value):
2020-10-11 15:09:49 +00:00
self.c[key] = value