From 55fc6950f24b0bde3c5f17e59b278f784e2969d9 Mon Sep 17 00:00:00 2001 From: Sai Subhakar T <36569367+saimj7@users.noreply.github.com> Date: Mon, 10 May 2021 16:33:09 +0200 Subject: [PATCH] Update Run.py issue 19 --- Run.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Run.py b/Run.py index cc3f991..b89cb32 100644 --- a/Run.py +++ b/Run.py @@ -235,10 +235,6 @@ def run(): totalDown += 1 empty1.append(totalDown) #print(empty1[-1]) - x = [] - # compute the sum of total people inside - x.append(len(empty1)-len(empty)) - #print("Total people inside:", x) # if the people limit exceeds over threshold, send an email alert if sum(x) >= config.Threshold: cv2.putText(frame, "-ALERT: People limit exceeded-", (10, frame.shape[0] - 80), @@ -249,6 +245,11 @@ def run(): print("[INFO] Alert sent") to.counted = True + + x = [] + # compute the sum of total people inside + x.append(len(empty1)-len(empty)) + #print("Total people inside:", x) # store the trackable object in our dictionary