mirror of
https://github.com/rendies/People-Counting-in-Real-Time.git
synced 2025-05-14 09:59:29 +07:00
fix: issue program not running
This commit is contained in:
parent
e75a0b2c06
commit
0d489e22aa
|
@ -40,7 +40,7 @@ def video_feed():
|
|||
return Response(generate(),
|
||||
mimetype = "multipart/x-mixed-replace; boundary=frame")
|
||||
|
||||
def run(args):
|
||||
def PeopleCounter(args):
|
||||
global outputFrame, lock, people_count
|
||||
# construct the argument parse and parse the arguments
|
||||
# ap = argparse.ArgumentParser()
|
||||
|
@ -328,7 +328,7 @@ def run(args):
|
|||
# show the output frame
|
||||
with lock:
|
||||
outputFrame = frame.copy()
|
||||
# cv2.imshow("Real-Time Monitoring/Analysis Window", frame)
|
||||
cv2.imshow("Real-Time Monitoring/Analysis Window", frame)
|
||||
key = cv2.waitKey(1) & 0xFF
|
||||
|
||||
# if the `q` key was pressed, break from the loop
|
||||
|
@ -413,7 +413,7 @@ if __name__ == '__main__':
|
|||
help="# of skip frames between detections")
|
||||
args = vars(ap.parse_args())
|
||||
# start a thread that will perform motion detection
|
||||
t = threading.Thread(target=run, args=(args))
|
||||
t = threading.Thread(target=PeopleCounter, args=(args))
|
||||
t.daemon = True
|
||||
t.start()
|
||||
# start the flask app
|
||||
|
|
Loading…
Reference in New Issue
Block a user