Update Run.py

issue 19
This commit is contained in:
Sai Subhakar T 2021-05-10 16:33:09 +02:00 committed by GitHub
parent 61eceaec01
commit 55fc6950f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

9
Run.py
View File

@ -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