2020-10-07 13:07:01 +00:00
|
|
|
|
|
|
|
|
class Config:
|
|
|
|
|
c = {
|
|
|
|
|
"min_area" : 500,
|
2020-10-17 22:02:05 +00:00
|
|
|
"max_area" : 20000,
|
|
|
|
|
"threashold" : 13,
|
2020-10-07 13:07:01 +00:00
|
|
|
"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-11 15:09:49 +00:00
|
|
|
"tolerance": 10,
|
2020-10-07 13:07:01 +00:00
|
|
|
"maxLength": None,
|
2020-10-11 15:09:49 +00:00
|
|
|
"ttolerance": 10,
|
2020-10-17 22:02:05 +00:00
|
|
|
"videoBufferLength": 1000
|
2020-10-13 22:16:39 +00:00
|
|
|
}
|
2020-10-11 15:09:49 +00:00
|
|
|
|
|
|
|
|
def __init__(self):
|
|
|
|
|
print("Current Config:", self.c)
|
2020-10-07 13:07:01 +00:00
|
|
|
|
|
|
|
|
def __getitem__(self, key):
|
2020-10-16 08:36:52 +00:00
|
|
|
if key not in self.c:
|
|
|
|
|
return None
|
2020-10-07 13:07:01 +00:00
|
|
|
return self.c[key]
|
|
|
|
|
|
|
|
|
|
def __setitem__(self, key, value):
|
2020-10-11 15:09:49 +00:00
|
|
|
self.c[key] = value
|