March 2020
Intermediate to advanced
366 pages
9h 8m
English
In order to pass the boundary boxes to the Kalman filter, we will have to define a transformation function from each boundary box to the observation model, and, in order to use the predicted boundary boxes for object tracking, we need to define a function from a state to a boundary box.
Let's start with a transformation function from a boundary box to an observation:
def bbox_to_observation(bbox): x, y = (bbox[0:2] + bbox[2:4]) / 2
w, h = bbox[2:4] - bbox[0:2]