From 0d489e22aa5ef5f9a7db1119809a87b19164959e Mon Sep 17 00:00:00 2001 From: rendies Date: Thu, 12 Jan 2023 19:49:22 +0700 Subject: [PATCH] fix: issue program not running --- RunCounting.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/RunCounting.py b/RunCounting.py index 1cc8355..c5360ed 100644 --- a/RunCounting.py +++ b/RunCounting.py @@ -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