doc
This commit is contained in:
parent
dafad280c1
commit
874976331e
|
|
@ -24,14 +24,13 @@ class LayerManager:
|
|||
self.tags = []
|
||||
print("LayerManager constructed")
|
||||
|
||||
def transformLayers(self):
|
||||
def cleanLayers(self):
|
||||
print("'Cleaning' Layers")
|
||||
print("Before deleting short layers ", len(self.layers))
|
||||
self.freeMin()
|
||||
print("Before deleting long layers ", len(self.layers))
|
||||
self.freeMax()
|
||||
self.sortLayers()
|
||||
self.calcStats()
|
||||
print("Before deleting sparse layers ", len(self.layers))
|
||||
self.deleteSparse()
|
||||
print("after deleting sparse layers ", len(self.layers))
|
||||
|
|
@ -47,10 +46,6 @@ class LayerManager:
|
|||
for i, id in enumerate(toDelete):
|
||||
del self.layers[id - i]
|
||||
|
||||
def calcStats(self):
|
||||
for layer in self.layers:
|
||||
layer.calcStats()
|
||||
|
||||
def freeMin(self):
|
||||
self.data.clear()
|
||||
layers = []
|
||||
|
|
|
|||
18
README.md
18
README.md
|
|
@ -24,7 +24,25 @@ On my configuration 1 minutes of of the original Video can be processed in about
|
|||
|
||||

|
||||
|
||||
### Configuration
|
||||
|
||||
./Appliucation/Config.py
|
||||
|
||||
"min_area": 100, min area in pixels
|
||||
"max_area": 9000000, max area in pixels
|
||||
"threashold": 6, luminance difference threashold
|
||||
"resizeWidth": 1000, video is scaled down internally
|
||||
"inputPath": None, overwritten in main.py
|
||||
"outputPath": None, overwritten in main.py
|
||||
"maxLayerLength": 5000, max langth of Layer
|
||||
"minLayerLength": 10, min langth of Layer
|
||||
"tolerance": 100, max distance between contours to be aggragated into layer
|
||||
"maxLength": None,
|
||||
"ttolerance": 60, number of frames movement can be apart until a new layer is created
|
||||
"videoBufferLength": 100, Buffer Length of Video Reader Componenent
|
||||
"LayersPerContour": 220, number of layers a single contour can belong to
|
||||
"avgNum": 10, number of images that should be averaged before calculating the difference
|
||||
|
||||
|
||||
### notes:
|
||||
optional:
|
||||
|
|
|
|||
6
main.py
6
main.py
|
|
@ -16,7 +16,7 @@ def main():
|
|||
startTotal = time.time()
|
||||
config = Config()
|
||||
|
||||
fileName = "x23.mp4"
|
||||
fileName = "./x23-1.mp4"
|
||||
outputPath = os.path.join(os.path.dirname(__file__), "output")
|
||||
dirName = os.path.join(os.path.dirname(__file__), "generate test footage")
|
||||
|
||||
|
|
@ -35,14 +35,14 @@ def main():
|
|||
layers = layerFactory.extractLayers(contours, masks)
|
||||
|
||||
layerManager = LayerManager(config, layers)
|
||||
layerManager.transformLayers()
|
||||
layerManager.cleanLayers()
|
||||
|
||||
# layerManager.tagLayers()
|
||||
layers = layerManager.layers
|
||||
if len(layers) == 0:
|
||||
exit(1)
|
||||
|
||||
heatmap = HeatMap(1920, 1088, [contour for layer in layers for contour in layer.bounds], 1920 / config["resizeWidth"])
|
||||
heatmap = HeatMap(config["w"], config["h"], [contour for layer in layers for contour in layer.bounds], 1920 / config["resizeWidth"])
|
||||
heatmap.showImage()
|
||||
|
||||
exporter = Exporter(config)
|
||||
|
|
|
|||
Loading…
Reference in New Issue