delmottea / libCMT

c++ port of the python code from https://github.com/gnebehay/CMT
BSD 3-Clause "New" or "Revised" License
67 stars 45 forks source link

Slow framerate #13

Closed RikHuij closed 9 years ago

RikHuij commented 9 years ago

Hi, I just started with programming and C++ a few weeks back, so please bear with me if I have a stupid question.

I'm trying to use CMT in Visual Studio Community 2013 on Windows 7, in combination with OpenCV 2.4.11 (64 bit). I got the tracker working on 1280x720 images with a ROI of 156x87. The problem is that the tracker is extremely slow. The first frame is shown after about 5 seconds, and after that 5 seconds are needed for every frame. CMT.exe uses 50 % of the dual core 3.0 GHz CPU during this (so one full core I guess). About 30 points are tracked, so that shouldn't be too high.

The notes of this project advise to move two lines to the constructor, but I'm not sure were to put them. Please specify the instruction more if that might be the solution.

Tnx in advance, Rik.

I also tried openCV 3 (beta) 64 bit. This gives error C2664 at line 115 CMT.cpp: cv::Algorithm::getList(list);

EDIT: I've tested CMT some more and it seems it doesn't meet the requirements. I'm marking this issue as solved.

delmottea commented 9 years ago

Did you compile openCV by yourself or used a package? If compiled by yourself, did you use the flags to enable parallelism?

CMT uses mainly tracking by features so it needs to detect features on the whole image (and this depends on the type of image you have, but it's relatively fast in general (and could even be done on gpu by changing a few lines of code)).

CMT runs at more than 10 fps on my computer on a few tests I made