Building tracker examples on Windows using Visual Studio
Visual Studio is a popular Windows-only IDE for C++/C# and other languages. Follow the steps below to compile the example trackers in Visual Studio. The steps were created using Visual Studio 2010 Express edition. Other versions may require different steps.
TraX protocol
This example explains how to prepare a Visual Studio project using the VOT C/C++ wrapper. It is however recommended that you integrate support for TraX protocol directly as the tracker will also work with the toolkit but also with other TraX clients. Follow the official TraX tutorial for more information.
- To build tracker tracker examples in Microsoft Visual Studio, create an empty C/C++ project (if you are on a 64-bit machine, you have to create a 64-bit project).
- Import one of the three trackers that you find in
vot-toolkit/tracker/examples/native
directory into the project (in case of the NCC tracker you will also have to link against OpenCV library, but this is out of our scope). - Import the
vot.h
header as a header file. This file contains all the necessary code required for the communication with the toolkit. - What you have to do to enable trax is to compile with
TRAX
variable defined, provide path totrax.h
header, and link againstlibtrax.dll
. When running the tracker you have to make sure thatlibtrax.dll
is visible by adding the directory to systemPATH
or by copying the library to the direcory that contains the executable of a tracker. To enable TraX support in Visual Studio you have to do the following steps:- Initialize workspace so that precompiled binaries are downloaded to
vot-toolkit/native
directory. - Go to
Project properties > Configuration properties > C/C++ > General
and addvot-toolkit/native
path toAdditional Include Directories
. - Go to
Project properties > Configuration properties > C/C++ > Preprocessor
and addTRAX
symbol toPreprocessor Definitions
. - Go to
Project properties > Configuration properties > Linker > General
and addvot-toolkit/native
path toAdditional Library Directories
. - Go to
Project properties > Configuration properties > Linker > Input
and addlibtrax.dll.a
path toAdditional Dependencies
.
- Initialize workspace so that precompiled binaries are downloaded to