From 31731f2dc35276ee8f2f04cb3fe514fc07638c28 Mon Sep 17 00:00:00 2001 From: Askill Date: Sun, 11 Sep 2022 11:25:36 +0200 Subject: [PATCH 1/2] manager().queue() --- Application/ContourExctractor.py | 1 - Application/VideoReader.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Application/ContourExctractor.py b/Application/ContourExctractor.py index d00570e..593b8de 100644 --- a/Application/ContourExctractor.py +++ b/Application/ContourExctractor.py @@ -110,7 +110,6 @@ class ContourExtractor: return gray def computeMovingAverage(self, frames): - avg = [] averageFrames = self.config["avgNum"] if frames[0][0] < averageFrames: diff --git a/Application/VideoReader.py b/Application/VideoReader.py index 126324d..8b4759d 100644 --- a/Application/VideoReader.py +++ b/Application/VideoReader.py @@ -21,7 +21,7 @@ class VideoReader: # buffer = Queue([(frameNumber, frame), ]) self.multiprocess = multiprocess if multiprocess: - self.buffer = multiprocessing.Queue(config["videoBufferLength"]) + self.buffer = multiprocessing.Manager().Queue(config["videoBufferLength"]) else: self.buffer = queue.Queue(config["videoBufferLength"]) self.stopped = False From ee535ccb4ce3812839360034f2a9ce62f9e92344 Mon Sep 17 00:00:00 2001 From: Patrice Matz Date: Thu, 6 Oct 2022 10:30:25 +0200 Subject: [PATCH 2/2] Update README.md --- README.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 3d0278b..b0fc05b 100644 --- a/README.md +++ b/README.md @@ -28,20 +28,21 @@ On my configuration 1 minutes of of the original Video can be processed in about ./Application/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 + "min_area": 100, min area in pixels, of a single contour, smaller is ignored + "max_area": 9000000, max area in pixels, of a single contour, larger is ignored + "threashold": 6, luminance difference threashold, sensitivity of movement detection + "resizeWidth": 600, 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 + "maxLayerLength": 5000, max length of Layer in frames + "minLayerLength": 10, min length of Layer in frames + "tolerance": 100, max distance (in pixels) 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 + "LayersPerContour": 2, number of layers a single contour can belong to + "avgNum": 10, number of images that should be averaged before calculating the difference + (computationally expensive, needed in outdoor scenarios due to clouds, leaves moving in the wind ...) ### notes: