Blob Tracker

Here i present an image real time blob segmentation algorithm for library/learning intention. It is compiled with OpenCV 2.3 and i run it on linux (ubuntu 11.04). It can use web camera or avi files as source.

Download OpenCv 2.3, unpack it and create release directory. After entering in it, use cmake ../ to rebuild. Put objdetect code in cpp opencv sample directory (with this compile script, modifying library path with absolute opencv library path) and write command './compile objdetect' to recompile it.

This code need further developing, but now is running and can do that:

  1. Image segmentation (Blob coloring)
  2. Image difference
  3. Color tracking
  4. Object Tracking (Face haar cascade is used in code)
  5. Dynamic background upgrade (or MOG2, switchable)
  6. Gray Histograms
  7. Color Histograms
  8. Distinction between still and moving objects
  9. Blob reallocation (unique id for each blob)
  10. Lost blob memory
  11. Still Frame and Live Frame counter
  12. Overlapped Blob Merging
  13. Region growing
  14. Real time
  15. C++ Class Structure
  16. Blob graphic trace (trajectory)

Algorithm is composed by follow steps

  1. Video capture/File read
  2. First background
  3. Absolute Image difference (or color segmentation or object segmentation)
  4. Thresholding (image difference or color segmentation if no object segmentation is selected) or MOG2
  5. Object segmentation (if is selected)
  6. Find contours (segmentation)
  7. Bounding box for each contour
  8. New blob creation
  9. Histogram evaluation for each blob (gray or color)
  10. Histogram compare between old blobs/lost blobs and actual blob
  11. Merging
  12. Old Blob list creation
  13. Lost Blob list creation
  14. Lost Blob deleting
  15. Show blobs on original image and trace trajectory
  16. Background masking (fast and slow update is marked here) (only for image difference or not MOG2)
  17. Background update with fast/slow behaviour (only for image difference or not MOG2)

In next releases there will be

  1. Blob Internal analisys
  2. Ip Camera support
  3. Shadow recognition (yes if MOG2 is used)
  4. Time for blob live/still counter
  5. Test report for standard sequences

The software is over GNU GPL Open source license. Dexmac may not be held liable for any damages in any form resulting from the use of this software or others files. You may use them at your own risk. By downloading any of the files contained on this page, you are agreeing to this statement.

Download source code (V 0.5.0)

Download source code (V 0.3.1)

Download source code (V 0.2.1)

Download source code (V 0.1.1)