mirror of
https://github.com/rendies/People-Counting-in-Real-Time.git
synced 2025-05-14 18:09:29 +07:00
Update Run.py
issue 19
This commit is contained in:
parent
61eceaec01
commit
55fc6950f2
9
Run.py
9
Run.py
|
@ -235,10 +235,6 @@ def run():
|
||||||
totalDown += 1
|
totalDown += 1
|
||||||
empty1.append(totalDown)
|
empty1.append(totalDown)
|
||||||
#print(empty1[-1])
|
#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 the people limit exceeds over threshold, send an email alert
|
||||||
if sum(x) >= config.Threshold:
|
if sum(x) >= config.Threshold:
|
||||||
cv2.putText(frame, "-ALERT: People limit exceeded-", (10, frame.shape[0] - 80),
|
cv2.putText(frame, "-ALERT: People limit exceeded-", (10, frame.shape[0] - 80),
|
||||||
|
@ -249,6 +245,11 @@ def run():
|
||||||
print("[INFO] Alert sent")
|
print("[INFO] Alert sent")
|
||||||
|
|
||||||
to.counted = True
|
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
|
# store the trackable object in our dictionary
|
||||||
|
|
Loading…
Reference in New Issue
Block a user