zk00006 / OpenTLD

OpenTLD is an open source library for real-time 2D tracking of a single object in video. This repository is no longer under development. For latest version see: http://www.tldvision.com/tld2.html
GNU General Public License v3.0
2.1k stars 1.27k forks source link

Merge of branches, integration of octave #5

Closed bilderbuchi closed 13 years ago

bilderbuchi commented 13 years ago

Hi Zdenek!

Could you take a look at this? This consolidates, afaik, all the relevant work currently on Github. The code should work on all 3 platforms, with Matlab and Octave (Octave only runs, with problems). I could only test on linux and opencv2.1, both Matlab and Octave. Windows and Mac compilation should be OK, but should be tested again (I can't). See the commit notes and comments in compile.m for some details.

I think now we can start to look for bugs while using octave (and maybe start work towards C++-only version) with lots of platform options.

I merged your master-HEAD into this branch, so it should apply cleanly without problems.

regards, Christoph

zk00006 commented 13 years ago

It seems to me that the transition to Octave is not straightforward and it generates a lot of if-then code. I propose to have two branches. One Matlab-based, second Octae-based.

TLD/Matlab/... /Octave/... /C/... (later)

So once you achieve to make the Octave branch stable, I will add it into the following structure.

Zdenek

bilderbuchi commented 13 years ago

Fair enough.

So far it was really straightforward. Octave is coded for matlab compatibility after all. Outside of compile.m (which is only executed once for a code version, and therefore not relevant performance-wise) I see 4 instances of such an if-then (commit #ba6deda96c8881e502d298319abbe4dfca9f2281), of which 1 is in the init_workspace.m (which is probably also only executed once per run), and 2 could probably be eliminated by adjusting the code slightly. One of those is most probably (but not yet confirmed) a capitalization problem (FSPECIAL should be fspecial), the other a matrix dimension mismatch matlab ignores/compensates for, but octave recognizes.

Of course it's your decision not to merge, but I don't think that the if/then statements alone will impact performance significantly; much more performance loss will come from algorithms/functions which are much slower in octave than in matlab (I think pdist() may be a candidate). Just one way to find out. Maybe I'm wrong :-)

So, do you want to make a TLD-octave branch, and merge the PR into that? Would make sense, I think, because yours is the "official" repo more people will see, and code for, and merge contributions into/from.

Christoph