Code to track objects in video