Real Time Tracking is a native implementation based in Mean Shift framework using LIBAV and SDL libraries (don't use OpenCV Library).
Mean shift is a non-parametric feature-space analysis technique for locating the maxima of a density function, a so-called mode-seeking algorithm. Application domains include (computer vision and image processing area):
- Clustering;
- Tracking;
- Smoothing;
Mean shift is a procedure for locating the max point of a density function given discrete data sampled from that function. It is useful for detecting the modes of this density. This is an iterative method, and we start with an initial estimate. For more information, see the article on Wikipedia.
- Mean shift is an application-independent tool suitable for real data analysis.
- Does not assume any predefined shape on data clusters.
- It is capable of handling arbitrary feature spaces.
- The procedure relies on choice of a single parameter: bandwidth.
- The bandwidth/window size 'h' has a physical meaning, unlike k-means.
- The selection of a window size is not trivial.
- Inappropriate window size can cause modes to be merged, or generate additional “shallow” modes.
- Often requires using adaptive window size.
Libav is a friendly and community-driven effort to provide its users with a set of portable, functional and high-performance libraries for dealing with multimedia formats of all sorts. It originates from the FFmpeg codebase, but goes its own way these days, providing its users with reliable releases and a clear vision how to go forward.
Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D. It is used by video playback software, emulators, and popular games including Valve's award winning catalog and many Humble Bundle games.
The implementation is based on the algorithm described on this paper (page 4).
- LIBAV (less than or equal 0.8.16);
- SDL (less than or equal 1.2);
- 1 webcam (In this case, I have used the playstation eye);
In shell console, enter in directory:
$ cd ffmean-shift/src
To compile the application:
$ make
To run application:
$ ./ffmean-shift /dev/video0
You can view the results in these videos
This software is licensed under MIT.