Sunday, May 1, 2011

Plan B

My next step was going to be creating a C++ wrapper for OpenTLD by compiling it and generating a shared library with the Matlab compiler, mcc. The standard way to call C/C++ functions from Matlab is via mex files, which is what OpenTLD does. I incorrectly assumed that mcc came with my student version of Matlab. After prepping the environment I was disappointed (understatement) to find out that mcc is not only unavailable with the current student version of Matlab but that it is actually incompatible with it. Since Matlab is not designed for multithreading  I will continue looking for a pre-compiled C++ wrapper, but in the meantime I've decided to interleave the two trackers within a single thread. This will involve switching between updating the two different trackers, which are both running on the same frame, and updating the bounding boxes on the common frame.

In case I have access to mcc in the future, creating C/C++ wrappers for Matlab functions would be pretty cool. Here's an example of how to do it:
http://www.codeproject.com/KB/DLL/MatlabSharedLib.aspx

2 comments:

  1. Hey this is exactly what I'm stuck on. It seems like you've figured out some stuff. can I ask you to show me how to do this tomorrow?

    ReplyDelete
  2. Yes, I would like to know how it is going as well.

    ReplyDelete