@@ -62,15 +62,8 @@ differ = None | |||
now = '' | |||
framecounter = 0 | |||
trackeron = 0 | |||
people_count_total = 0 | |||
cv2.namedWindow('Video stream', cv2.WINDOW_NORMAL) | |||
if VISUAL_DEBUG: | |||
cv2.namedWindow('debug image', cv2.WINDOW_NORMAL) | |||
while True: | |||
if VISUAL_DEBUG: | |||
print("Frame {}".format(framecounter)) | |||
people_count_per_frame = 0 | |||
frame = vs.read() | |||
frame = frame if args.get("video", None) is None else frame[1] |
@@ -16,8 +16,11 @@ sender = imagezmq.ImageSender(connect_to="tcp://{}:5555".format( | |||
args["server_ip"])) | |||
rpi_name = socket.gethostname() # send RPi hostname with each image | |||
video_file = FileVideoStream("../run.mp4").start() | |||
video_file = FileVideoStream("run.mp4").start() | |||
time.sleep(2.0) # allow camera sensor to warm up | |||
while video_file.more(): | |||
while True: | |||
image = video_file.read() | |||
if image is None: | |||
break | |||
sender.send_image(rpi_name, image) |