mirror of
https://github.com/rendies/People-Counting-in-Real-Time.git
synced 2025-05-14 18:09:29 +07:00
fix: subprocess communicate
This commit is contained in:
parent
44e79862bf
commit
1c65521d25
|
@ -15,7 +15,6 @@ from flask import Flask
|
|||
from flask import jsonify
|
||||
from flask_cors import CORS, cross_origin
|
||||
import subprocess
|
||||
import ffmpeg
|
||||
|
||||
t0 = time.time()
|
||||
|
||||
|
@ -346,7 +345,6 @@ def PeopleCounter():
|
|||
# show the output frame
|
||||
# with lock:
|
||||
ffmpeg_process.stdin.write(frame.astype(np.uint8).tobytes())
|
||||
ffmpeg_process.communicate()
|
||||
|
||||
# outputFrame = frame.copy()
|
||||
# cv2.imshow("Real-Time Monitoring/Analysis Window", frame)
|
||||
|
@ -387,6 +385,8 @@ def PeopleCounter():
|
|||
vs.release()
|
||||
|
||||
# close any open windows
|
||||
ffmpeg_process.stdin.close()
|
||||
ffmpeg_process.wait()
|
||||
cv2.destroyAllWindows()
|
||||
|
||||
def generate():
|
||||
|
|
Loading…
Reference in New Issue
Block a user