Git Product home page Git Product logo

colortracker's Introduction

This C++ code is an implementation of the visual tracking method proposed in [1]. The implementation is based on the Matlab code provided by the authors of the paper.
The implementation in C++ using openCV was done by Mostafa Izz.

Instructions:
The code is not provided as executable, you need to compile. It was created for integration with openCV.
There are two interfaces provided in the code in class "color_tracker"
1) cv::Rect track_frame(cv::Mat &current_frame)
Provided to track frame by frame
So, the parameters needed to be passed to the constructor are used for intializing the bounding box only.
2) void track_video(double start_second = 0, double end_second = 0)
Provided to track video
In the second case the video path should be provided in the parameters passed to the constructor.

There are examples on both interfaces in the file "source.cpp"
There is a simple example in the file "static.cpp" for usage with the VOT challenge.

The code was tested under two environments:

1- Windows 7 using visual studio 2013 with openCV 2.4.9
2- Ubuntu 14.04 with GCC 4.8.2 with openCV 2.4.9

-------------------------------
To test the code under ubuntu you need g++ and OpenCV installed:
to install g++ simply run:

sudo apt-get install g++

then to install opencv you can run the script in the following link:
https://github.com/jayrambhia/Install-OpenCV/blob/master/Ubuntu/2.4/opencv2_4_9.sh
it shall install opencv 2.4.9 for you (you can browse the repository https://github.com/jayrambhia/Install-OpenCV/blob/master/ if you need different version or different distribution)

then compile the sources for the Color Tracker code using the following command:
g++ -std=c++11 `pkg-config --cflags opencv` -O2 -o tracker_tester source.cpp color_tracker.cpp color_tracker_parameters.cpp `pkg-config --libs opencv`

This will give you binary file named "tracker_tester". Then, you can run it directly if you cloned the git repository:
./tracker_tester
And it will run four experiments (you need to press any key at the end of each experiment)

you can also test using vot_toolkit by compiling the Color Tracker Code using the following command:
g++ -std=c++11 `pkg-config --cflags opencv` -O2 -o vot_tester static.cpp color_tracker.cpp color_tracker_parameters.cpp `pkg-config --libs opencv`

This will give you binary file named "vot_tester".

Then you can follow the instructions in the VOT challenge website:
http://www.votchallenge.net/howto/perfeval.html

And in step 2:
- The tracker is binary executable and you need to provide the full path
example:
tracker_command = fullfile('/home/mostafaizz/ColorTracker/vot_tester');
- set variable tracker_trax to false

then you should be able to run the experiments from matlab/octave normally

-----------------------------------
Contact (for the c++ code):
Mostafa Izz
[email protected]

One should contact the paper authors in [1] if you need clarifications about the algorithm itself.

----
References:
[1] Martin Danelljan, Fahad Shahbaz Khan, Michael Felsberg and Joost van de Weijer.
    "Adaptive Color Attributes for Real-Time Visual Tracking".
    Proceedings of IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2014.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.