Skip to content
klahaag edited this page Jun 14, 2015 · 37 revisions

Build Tutorial

Windows 7

Xubuntu 14.04/15.04

Windows 7 Build

Simple steps to run the trackers on Windows 7, 8.1 using Visual Studio 2013, cmake and OpenCV 3.0. It is assumed that a 64bit Windows is installed. If you use a 32bit Windows, update to 64bit.

Download and Install

OpenCV 3

  • Download "OpenCV for Windows" from www.opencv.org.
  • Execute the file. It is a self-extracting archive. Throughout this tutorial, H:\opencv-3-0-0-release is used as install path for opencv: Extract
  • Setup the required OpenCV Paths:
    • Right-click on Computer -> Properties -> Advanced System Settings -> Environment Variables
    • On the System variables scroll list, select Path and click Edit. CAUTION: if you screw up your environment variables, you can break your system. Thus, ensure that you do not change anything else!: Prepend: H:\opencv-3-0-0-release\opencv\build\x64\vc12\bin; and click ok.
    • Click on new and create a system variable with name OPENCV_DIR and value H:\opencv-3-0-0-release\opencv\build\x64\vc12

Cmake

  • Download cmake Windows Installer from http://www.cmake.org/
  • Execute it. Install it anywhere on your system. Use default options for the rest of the dialogues.

Visual Studio 2013

Download and build the project

  • Download https://github.com/klahaag/cf_tracking/archive/master.zip to H:\

  • Extract the zip files to H:\cf_tracking-master

  • Create the directory H:\cf_tracking-master\build The directory H:\cf_tracking-master should look like this:

  • Run cmake-gui.

  • Enter the src and build folder in the cmake gui like it is shown in the screenshot:

  • Click on configure. A popup will open: Select Visual Studio 12 2013 Win64 from the generator dropdown.

  • Click on Finish.

  • You will see a couple of messages in the cmake-gui.

  • Click above the messages on Generate. This will create a CfTracking.sln Visual Studio solution file in the folder H:\cf_tracking-master\build\.

  • Open CfTracking.sln in Visual Studio.

  • Select Release and build.

  • The trackers are now located in H:\cf_tracking-master\build\Release.

  • Copy the contents of H:\cf_tracking-master\sample to H:\cf_tracking-master\build\Release.

  • `H:\cf_tracking-master\build\Release``should now look like this:

  • Execute KCFcpp_sample_image_sequence_windows.bat to test KCFcpp or DSSTcpp_sample_image_sequence_windows.batto test DSSTcpp.

  • Execute KCFcpp or DSSTcpp without arguments to use your webcam.

Xubuntu 14.04/15.04 Build

Install OpenCV 3.0

Guide based on http://docs.opencv.org/doc/tutorials/introduction/linux_install/linux_install.html:

  • sudo apt-get install build-essential cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
  • git clone https://github.com/Itseez/opencv.git
  • cd opencv
  • git checkout tags/3.0.0
  • mkdir build && cd build
  • cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ../
  • make -j 8
  • sudo make install

Download and and build trackers

  • cd ~ && mkdir trackers && cd trackers
  • git clone https://github.com/klahaag/cf_tracking.git
  • mkdir -p cf_tracking/build && cd cf_tracking/build
  • cmake -DCMAKE_BUILD_TYPE=Release -DWITH_OPENMP=ON ../
  • make -j 8
  • cp -r ../sample/* ./