In this section, we will see how to track an object in a video. The trackers available in OpenCV are:
- Lucas Kanade Tracker
In our code, we will use Kernelized Correlation Filter (KCF) to track an object. But you can use any of the aforementioned trackers. There are pros and cons to each of these. From experience, KCF works better for a general case. If you have a lot of occlusions, then you might be better off using the TLD tracker.