Median Flow Tracker using SimpleCV/OpenCV – GSoC week 1 and 2

Work in the first two weeks of my Google Summer of Code had been quite slow. I couldn’t find much time as I was busy with travel and some college stuff.
I have finished making a Median Flow Tracker for OpenTLD. I am trying to port OpenTLD to python. I am working with George Nebehay’s version of OpenTLD. .

Finished Tasks:

I have tweaked gnebehay’s OpenTLD to version to make it compatible with OpenCV 2.3.1 and higher (only Linux, I guess)

Median Flow Tracker ->

I will add a file soon. Meanwhile, If you want to test this, try this example. . I have put all the files from MF Tracker in this one file. I’ll add documentation soon.

Task List for next week:

  • Improve MF Tracker
  • Learn more about “Learning” of OpenTLD
  • Implement “Learning” part

P.S. Back home. Having fun with OpenCV/SimpleCV.

I have added file. Now it’s a complete package. Download

9 thoughts on “Median Flow Tracker using SimpleCV/OpenCV – GSoC week 1 and 2

  1. Hi,

    I tried compiling your version of OpenTLD on Ubuntu 12.04 (with Opencv 2.3.1) and got the following error:

    /home/varun/OpenTLD/src/imacq/imAcq.cpp:21:23: fatal error: opencv/cv.h: No such file or directory
    compilation terminated.

    I have added OpenCV to the search path of linux. Any idea why I am getting this?


  2. Hi! I just wanted to say this is a great work! I was wondering if you are planning to migrate this TLD tracker to C++ OpenCV as well. Do you think it would be worthy? or the python solution is efficient enough? Thanks!

    • Hey,
      I apologize for that. I had actually forgot to remove . It’s kind of broken. And drawBB() was not added in SimpleCV, so I had to change it.
      I have added a new example.

      git clone git://
      # or wget -o MFTracker
      # tar -xvf MFTracker.tar.gz
      cd MFTracker
      sudo python install
      cd mftracker/examples
      import mftracker
      • So mftrack() works the same way? you need to give a bb right?
        Plus,does the OpenTLD work for images grabbed from kinect. I am currently doing a thesis project at CAIR and searching various methods for head tracking. I need to work with Visual Studio so is there a way I could get my hands on the algo or someway to import the whole thing there?

    • Yes, mftrack() works the same way but I have added getBB() function so there’s no problem with that now.
      You can connect kinnect with OpenCV as well as SimpleCV. In SimpleCV, it’s a lot easier. I can’t say about Windows though as I have never used SimpleCV/OpenCV on Windows.

      This is just a Median Flow Tracker. If you want the completer OpenTLD python port, it’s on my GitHub. It’s very slow (as it’s python) and detection is not that good.
      If you are allowed to use C++, I would suggest you try George Nebehay‘s C++ OpenCV port of OpenTLD. It works with Visual Studio too. You can tweak the source code and add Kinnect support. If you’re going to work on OpenTLD, I would suggest you should join the google group. It’s kind of informative and very helpful.

      I found this link regarding OpenCV with kinnect on Windows, which might be useful.


  3. hmm … i’ve already seen the OpenCV support for OpenNI …. searching for something that is more robust … felt OpenTLD was good. so i’ll try the openCV port.
    You’ve written everything from scratch right … some way i could get find the algo and make the whole code myself … cause i have to integrate it to a OpenSceneGraph program that they have already made.
    Thanks 🙂

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s