Kalman Tracker




Description

The library provides a Kalman engine for tracking purposes. In the application described below, the CAMSHIFT color tracking algorithm is used to provide measurements for the X-Y tracking of a face (or other colored object). The CAMSHIFT algorithm implemented here just uses a simple 1-D Hue histogram sampled from the object using an HSV color space. Therefore, the color tracker may need some tuning as described below (see CAMSHIFT demo description page for more details).

To test the filter you will need DirectShow SDK, that is a part of DirectX SDK. Read FAQ on how to install it properly.

Kalman Color Tracker Demo

You should setup or launch the following DirectShow filter graph edit (of course, your capture source will depend on your camera):

Controls

The control panel for the filter (obtained by right-clicking) the Kalman filter in the filter graph above looks like:

[1] This controls move the sample window around when you are not tracking.
[2] This is the minimum saturation for a Hue pixel to be accepted threshold.
[3] This is the minimum brightness for a Hue pixel to be accepted threshold.
[4] This allows you to toggle between the raw video image and the Hue histogram backprojected image.
[5] Sample color under box [1] and start Kalman tracking.
[6] Stop Kalman tracking.

How to

Start Tracking

1. Select Normal view [4].
2. Set the thresholds to zero [2] & [3].
3. Move the sample box using [1] so that it covers the colored object to be tracked.
4. Press "Start Track" [5].

Tuning the tracking:

1. Select Back Project view [4]. The goal is to have the image such as on the left below to look like the cleaner image on right below.


2. Increase minimum saturation threshold [2] to clean up the image without diminishing the object of interest too much.
3. Increase minimum brightness threshold [3] to finish the "clean up" job. Don't turn too high or else bright spots on the tracked object will become "holes".
4. Turn normal view back on [4].

Display

The meaning of the normal view display is as follows with reference to the figure below:


[A] Velocity direction and magnitude estimation.
[B] Sample window if not tracking, tracking window if tracking.
[C] Estimated location of the object.


nt> Estimated location of the object.