A background subtraction based tracking algorithm using OpenCV.
C++ C Makefile
Latest commit fe9afb7 Sep 14, 2016 @santhosh-kumar committed on GitHub Update README.md


A background subtraction based tracking algorithm using OpenCV. It depends on OpenCv (http://opencv.org/) and Boost libraries (http://www.boost.org/).


In order to run the tracker, use the following command:


BlobTracker.exe -d config.cfg


./BlobTracker -d config.cfg

Config Params

config.cfg has all the configurations for running the tracker, here are the few things that you would have to change.

  * "Input_Video_Directory"         ---> where the video files are stored
  * "Input_Video_Name_List"         ---> name of the video files (comma separated)
  * "Input_Camera_ID_List"          ---> camera id for internal usage( use sequential numbers)
  * "Start_Frame_Index"             ---> starting frame for the video to be processed (0 to start from the beginning)
  * "Number_Of_Frames"              ---> number of frames to be tracked (-1 for the entire video)

  * "OutPut_Video_Directory"        ---> where the output files will be stored (also the track outputs in text format)
  * "Log_File_Name"                 ---> name of the log file (log file will be generated in the output folder)
  * "Display_Intermediate_Result"   ---> whether to display intermediate output on the dialog box or not
  * "Save_Intermediate_Result"      ---> whether to save the intermediate results on the output directory

  * "Down_Scale_Image"              ---> whether to downscale the image by a factor or 2 or not (use it for speed)

  * "FG_Train_Frames"               ---> number of frames used for training the background model


Output videos will be created in the specified output folder ("OutPut_Video_Directory").

  * input_file_name.extension_BT.avi contains the learned background video
  * input_file_name.extension_FG.avi shows the foreground region

  * input_file_name.extension_record.txt stores the tracking results in the following format:[ frameNumber, xCentroid, yCentroid, width, height, objectId, timestamp(seconds) ]


[1] Santhoshkumar Sunderrajan( santhosh@ece.ucsb.edu) Website: http://vision.ece.ucsb.edu/~santhosh/


If you use the code in any of your research works, please cite the following papers:

  author={Sunderrajan, S. and Manjunath, B.S.}, 
  journal={Multimedia, IEEE Transactions on}, 
  title={Context-Aware Hypergraph Modeling for Re-identification and Summarization}, 
  keywords={Cameras;Clothing;Histograms;Image color analysis;Indexes;Topology;Training;Camera network;person re-identification;search;summarization}, 

  title={Context-Aware Graph Modeling for Object Search and Retrieval in a Wide Area Camera Network},
  author={Sunderrajan, Santhoshkumar and Xu, Jiejun and Manjunath, BS},
  booktitle={Proc. International Conference on Distributed Smart Cameras},

  title={Graph-Based Topic-Focused Retrieval in Distributed Camera Network},
  author={Xu, Jiejun and Jagadeesh, Vignesh and Ni, Zefeng and Sunderrajan, Santhoshkumar and Manjunath, BS},

  title={UCSB UCR VCG TRECVID 2012},
  author={Sunderrajan, Santhoshkumar and Hasan, Mahmudul and Pourian, Niloufar and Zhu, Yingying and Manjunath, BS and Chowdhury, Amit Roy}