From 2960d4fc2ffe429e0b478fbbd79f644db3e62d20 Mon Sep 17 00:00:00 2001 From: sfop Date: Mon, 29 May 2017 12:04:38 +0200 Subject: [PATCH] Script execution --- script/Devices/ImageStats.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/script/Devices/ImageStats.py b/script/Devices/ImageStats.py index 0747d48..54bbd8e 100644 --- a/script/Devices/ImageStats.py +++ b/script/Devices/ImageStats.py @@ -171,7 +171,9 @@ class ImageStats(DeviceBase): def __init__(self, obj): self.obj=obj def process(self, image, data): - return sub(image, self.obj.background, True) if (self.obj.background is not None) else None + if self.obj.background is None: + return image + return sub(image, self.obj.background, True) self.source.filter = BackgroundSubtractor(self) if (value==True) else None def captureBackground(self, images):