mirror of
https://github.com/rendies/People-Counting-in-Real-Time.git
synced 2025-05-14 18:09:29 +07:00
issue 25
This commit is contained in:
parent
45445699ee
commit
a9661f5d59
5
Run.py
5
Run.py
|
@ -107,7 +107,7 @@ def run():
|
||||||
# if we are supposed to be writing a video to disk, initialize
|
# if we are supposed to be writing a video to disk, initialize
|
||||||
# the writer
|
# the writer
|
||||||
if args["output"] is not None and writer is None:
|
if args["output"] is not None and writer is None:
|
||||||
fourcc = cv2.VideoWriter_fourcc(*"MJPG")
|
fourcc = cv2.VideoWriter_fourcc(*"mp4v")
|
||||||
writer = cv2.VideoWriter(args["output"], fourcc, 30,
|
writer = cv2.VideoWriter(args["output"], fourcc, 30,
|
||||||
(W, H), True)
|
(W, H), True)
|
||||||
|
|
||||||
|
@ -293,6 +293,9 @@ def run():
|
||||||
wr.writerow(("End Time", "In", "Out", "Total Inside"))
|
wr.writerow(("End Time", "In", "Out", "Total Inside"))
|
||||||
wr.writerows(export_data)
|
wr.writerows(export_data)
|
||||||
|
|
||||||
|
# check to see if we should write the frame to disk
|
||||||
|
if writer is not None:
|
||||||
|
writer.write(frame)
|
||||||
|
|
||||||
# show the output frame
|
# show the output frame
|
||||||
cv2.imshow("Real-Time Monitoring/Analysis Window", frame)
|
cv2.imshow("Real-Time Monitoring/Analysis Window", frame)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user