-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Installation
Windows7 x 32bits:
Tested on: Matlab R2010a, MS Visual Studio 2010, Windows 7 (32-bit), OpenCV2.2.
You will need some extension toolboxes for Matlab, see below.
-
Install OpenCV2.2: compile OpenCV, set system PATH variable to link to OpenCV DLLs
-
Setup mex compiler in Matlab: run: mex -setup, select Visual Studio 2010 compiler from the list
-
Compilation of mex files: check paths in 'compile.m' file, run 'compile.m'
-
run 'run_TLD.m', TLD should track a motorbike
Windows7 x 64bits:
Matlab R2010b x 64bits
Win7 x 64
VS2010 x 64
-
download OpenCV2.2 source (normal binary installer is 32-bit, so you will need to recompile all from source)
-
configure CMake compiler for VS2010 64bit compiler
2.1) set opencv cmake build directory to OpenCV2.2/build64
2.2) configure & generate SLN file
2.3) open OpenCV.sln with VS2010
2.4) build entire solution
2.5) build INSTALL project (this puts include files in the appropriate places)
-
edit compile.m in TLD for the two openCV paths for include and lib; mine look like so:
include = ' -If:\dan\OpenCV-2.2.0\build64\include\opencv\ -If:\dan\OpenCV-2.2.0\build64\include' ;
libpath = 'f:\dan\OpenCV-2.2.0\build64\lib';
-
Add path to OpenCV2.2 dll's to the PATH environment variable: f:\dan\OpenCV-2.2.0\build64\bin'
-
In TLD source, comment out the following lines in lk.cpp, fern.cpp, and bb_overlap.cpp
#ifdef _CHAR16_T
#define CHAR16_T
#endif
Otherwise, you will get an error about int being undefined which is a no-no in 2010.
-
In Matlab, run compile.m
6.1) If you get include errors, see 2.5
- run run_TLD.m
7.1) If you get a 32-bit error, make sure your path points to the 64bit version of OpenCV dll's
Alternative setup for Windows 7 x64:
Matlab R2010a patched to work with Visual studio 2010
Patch download link: http://www.mathworks.com/support/solutions/en/data/1-D5W493/?solution=1-D5W493
Visual Studio 2010
OpenCV2.2 32 bit version
To make it work simply follow the windows 7 x32 bits step guide above
- Install Xcode
you can get the old version free at http://developer.apple.com/ (you will need to register a free developer account), alternatively get it from the Mac AppStore
2a) Install Matlab (>= R2009b) (>=R2011a for webcam support). You will need some extension toolboxes, see below.
2b) There are efforts underway to make TLD work with Octave, an open source alternative to Matlab. See the section Alternatives to Matlab below for more info.
- Install OpenCV (see Installing OpenCV for OS X for help)
4a) replace 'compile.m' in OpenTLD with the modified 'compile.m' at https://github.com/nemesit/OpenTLD/blob/master/compile.m
4b) run 'compile.m', (either in matlab or octave). If you get errors go to OpenTLD discussion group
4c) run 'run_TLD.m' it should track a Motorbike
- Optional:
if you want to track other things with you webcam/isight you have to edit 'initcamera.m' and change 'winvideo' to 'macvideo' or any other adapter you have installed (you can get a list of all installed adapter names by typing: imaqhwinfo
in matlab ). For the built in isight only source.vid = videoinput('macvideo', 1);
seems to work.
You also have to edit the line
opt.source = struct('camera',0,'input','_input/','bb0',[]);
in 'run_TLD.m' to
opt.source = struct('camera',1,'input','_input/','bb0',[]);
-
Install OpenCV
sudo apt-get install libcv-dev (this will most probably be 2.1)
2a) Install Matlab (>= R2009b). You will need some extension toolboxes, see below.
2b) There are efforts underway to make TLD work with Octave, an open source alternative to Matlab. See the section Alternatives to Matlab below for more info.
-
Check paths in 'compile.m' file
-
run 'compile.m', (either in matlab or octave). If you get errors go to OpenTLD discussion group
-
run 'run_TLD.m', TLD should track a motorbike
Image Acquisition Toolbox, Image Processing Toolbox, Signal Processing Toolbox, Statistics Toolbox
See the FAQ wiki page for more info about common errors and how to resolve them.
There is an active group of people from the Google Group working toward an implementation using Octave instead of Matlab.
To find information about how to install Octave on all three platforms, see Installing-Octave.
Until development with Octave is stable, you will find the most recent updates of the Octave compatible code at https://github.com/bilderbuchi/OpenTLD/.
This page is based in part on conversations on the OpenTLD discussion group at: http://groups.google.com/group/opentld/