O'Reilly logo

Computer Vision with Python 3 by Saurabh Kapur

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Object tracking

In this section, we will see how to track an object in a video. The trackers available in OpenCV  are:

  • KCF
  • Lucas Kanade Tracker
  • MIL
  • BOOSTING
  • MEDIANFLOW
  • TLD

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.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required