bg_sub = Bg_subtractor() # pedestrians detection model ped_det = Obj_detector() # ped_tr = Sort() # performance statistics stats = Statistics("../groundtruth.txt") cap = cv2.VideoCapture('../pedestrians.mp4') width = int(cap.get(3)) height = int(cap.get(4)) # rectifying model rect = Rectifier(width, height, shift=50, up=True, central_zoom=80) # create a named windows and move it cv2.namedWindow('video') cv2.moveWindow('video', 70, 30) next_frame, frame = cap.read() play = True # pedestrians tracking model ped_tr = Obj_tracker(width, height) def drawBboxes(bboxes, frame, color=(0, 0, 255), ids=None): if ids is not None and len(ids) > 0: for (bbox, id) in zip(bboxes, ids):