We will implement one helper method, _draw_object_axes, to draw a visualization of the tracked object's X, Y, and Z axes. We will also implement another helper method, _make_and_draw_object_mask, to project the object's vertices from 3D to 2D, create a mask based on the object's silhouette, and tint this masked region yellow as a visualization.
Let's start with the implementation of _draw_object_axes. We can consider it in three stages:
- First, we want to take a set of 3D points located along the axes, and project these points to the 2D image space. Remember that we defined the 3D axis points in our __init__ method, in the Initializing the tracker section. They will simply serve ...