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
43d69f3bfd
commit
44e79862bf
|
@ -15,6 +15,7 @@ from flask import Flask
|
||||||
from flask import jsonify
|
from flask import jsonify
|
||||||
from flask_cors import CORS, cross_origin
|
from flask_cors import CORS, cross_origin
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import ffmpeg
|
||||||
|
|
||||||
t0 = time.time()
|
t0 = time.time()
|
||||||
|
|
||||||
|
@ -345,6 +346,7 @@ def PeopleCounter():
|
||||||
# show the output frame
|
# show the output frame
|
||||||
# with lock:
|
# with lock:
|
||||||
ffmpeg_process.stdin.write(frame.astype(np.uint8).tobytes())
|
ffmpeg_process.stdin.write(frame.astype(np.uint8).tobytes())
|
||||||
|
ffmpeg_process.communicate()
|
||||||
|
|
||||||
# outputFrame = frame.copy()
|
# outputFrame = frame.copy()
|
||||||
# cv2.imshow("Real-Time Monitoring/Analysis Window", frame)
|
# cv2.imshow("Real-Time Monitoring/Analysis Window", frame)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user