OpenTLD Object tracking on Raspberry PI

OpenTLD (Tracking-Learning-Detection ) is an object tracking algorithm originally developed in MATLAB by Zdenek Kalal, the novel feature of the algorithm is the decoupling between the tracking and the detection algorithms unlike many algorithms where the tracking depends on the detected features of the object. This decoupling allowed the OpenTLD to outperform many algorithms.

You can find more info about the algorithm and Kalal here.

TLD has been released under GPL v3.0 allowing the open source community to invest more efforts in the algorithm, Georg Nebehay released a complete C++ implementation of OpenTLD relying on the powerful OpenCV library and based solely on open source libraries.

Find more info here and src code here.

What’s cool about Georg’s implementation is using cmake (cross-platform make) as a build system for the project allowing compiling over windows and linux easily, so here’s what you have to do to get OpenTLD working on the Raspberry Pi

  • Install the dependencies
    •  OpenCV
    • CMake
    • libconfig++ (optional)
    • Qt4 (optional)

$ sudo apt-get install libopencv-*

$ sudo apt-get install cmake

  • Download the OpenTLD source code and unzip it .
  • Generate the native linux makefile

$ cd $OPENTLD
$ mkdir ../build
$ cd ../build
$ cmake ../$OPENTLD -DBUILD_QOPENTLD=ON -DUSE_SYSTEM_LIBS=OFF

  • Navigate with the terminal to the build directory

 $ make  (builds the project)
 $ make install (builds and installs the project)

That’s it , you are good to go . You will find opentld executable in bin/

$ ./bin/opentld

Update [16/12/2013]

Just thought of posting some performance benchmarks ..

Tracking + learning : ~ 0.8 fps

Tracking only (switched off learning) : ~ 1.5 fps