Move the sources to trunk
[opencv] / docs / appPage / Kalman / Kalman.htm
1  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">\r
2 <HTML>\r
3   <HEAD>\r
4     <TITLE>Kalman Tracker</TITLE>\r
5     <!-- Changed by: Jean-Yves Bouguet, 31-Dec-1999 -->\r
6     <!-- Formatted and proofed in GNU Emacs by: Michael Chu, 00.06.05 -->\r
7     <META NAME="GENERATOR" CONTENT="Microsoft FrontPage 4.0">\r
8   </HEAD>\r
9   <BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000CC" VLINK="#0000FF" ALINK="#FF0000">\r
10     <a name="top">\r
11 \r
12     <CENTER>\r
13       <TABLE CELLSPACING=0 CELLPADDING=5 WIDTH="90%" BGCOLOR="#6A9BED" NOSAVE >\r
14         <TR NOSAVE>\r
15           <TD NOSAVE>\r
16             <CENTER><I><FONT COLOR="#000000"><FONT SIZE=+4> \r
17                     Kalman Tracker\r
18                   </FONT></FONT></I></CENTER>\r
19           </TD>\r
20         </TR>\r
21       </TABLE>\r
22     </CENTER>\r
23 \r
24 \r
25     <p align="center">\r
26 \r
27 \r
28       <BR>\r
29 \r
30     </a><img border="0" src="KalmanApp.jpg" width="709" height="275">\r
31       <a name="top">\r
32 \r
33         <BR><BR>\r
34 \r
35     <H1>Description</H1>\r
36 \r
37   </a>The library provides a Kalman engine for tracking purposes. In the\r
38     application described below, the CAMSHIFT color tracking algorithm is used\r
39     to provide measurements for the X-Y tracking of a face (or other colored\r
40     object). The CAMSHIFT algorithm implemented here just uses a simple 1-D Hue\r
41     histogram sampled from the object using an HSV color space. Therefore,\r
42     the color tracker may need some tuning as described below (see CAMSHIFT demo\r
43     description page for more details).\r
44     <br><br>\r
45       To test the filter you will need DirectShow SDK, that is a part of\r
46       DirectX SDK. Read <a href="../../faq.htm#DirectShow">FAQ</a> on how\r
47       to install it properly.\r
48     <h1>Kalman Color Tracker Demo</h1>\r
49     You should setup or launch the following DirectShow filter graph edit (of\r
50       course, your capture source will depend on your camera):\r
51     <br><br>\r
52     <center>\r
53       <img border="0" src="KalmanGraph.jpg" width="715" height="96">\r
54     </center>\r
55     <h2 align="left">Controls</h2>\r
56     <p align="left">The control panel for the filter (obtained by\r
57       right-clicking) the Kalman filter in the filter graph above looks like:\r
58     <p align="center"><img border="0" src="KalmanDialog.jpg" width="385" height="275">\r
59     <p align="left"><b><font size=+2>[1]</font></b> This controls move the\r
60       sample window around when you are not tracking.\r
61 \r
62       <br><b><font size=+2>[2]</font></b> This is the minimum saturation for a\r
63       Hue pixel to be accepted threshold.\r
64 \r
65       <br><b><font size=+2>[3]</font></b> This is the minimum brightness for a\r
66       Hue pixel to be accepted threshold.\r
67 \r
68       <br><b><font size=+2>[4]</font></b> This allows you to toggle between the\r
69       raw video image and the Hue histogram backprojected image.\r
70 \r
71       <br><b><font size=+2>[5]</font></b> Sample color under box [1] and start\r
72       Kalman tracking.\r
73 \r
74       <br><b><font size=+2>[6]</font></b> Stop Kalman tracking.\r
75 \r
76       <br>\r
77     <h2>\r
78       How to\r
79     </h2>\r
80     <h3>Start Tracking</h3>\r
81     1. Select Normal view [4].<br>\r
82     2. Set the thresholds to zero [2] &amp; [3].<br>\r
83     3. Move the sample box using [1] so that it covers the colored object to be tracked.<br>\r
84     4. Press &quot;Start Track&quot; [5].<br>\r
85     \r
86     <h3>Tuning the tracking:</h3>\r
87     1. Select Back Project view [4]. The goal is to have the image\r
88     such as on the left below to look like the cleaner image on\r
89     right below.<br>\r
90     <br>\r
91     <CENTER><img border="0" src="kalmanbackNClean.jpg" width="649" height="240"></CENTER>\r
92     <br>\r
93     2. Increase minimum saturation threshold [2] to clean up the image\r
94     without diminishing the object of interest too much.<br>\r
95     \r
96     3. Increase minimum brightness threshold [3] to finish the\r
97     &quot;clean up&quot; job. Don't turn too high or else bright\r
98     spots on the tracked object will become\r
99     &quot;holes&quot;.<br>\r
100 \r
101     4. Turn normal view back on [4].<br>\r
102 \r
103     <h2>Display</h2>\r
104     The meaning of the normal view display is as follows with\r
105       reference to the figure below:<br>\r
106     <br>\r
107     <center><img border="0" src="kalmanTrackShot.jpg" width="320" height="240"></center>\r
108     <br>\r
109     <font size=+2><b>[A]</b></font> Velocity direction and\r
110       magnitude estimation.<br>\r
111     <font size=+2><b>[B]</b></font> Sample window if not\r
112       tracking, tracking window if tracking.<br>\r
113     <font size=+2><b>[C]</b></font> Estimated location of\r
114       the object.\r
115 \r
116     <br><br>\r
117     <hr noshade size=2 width=100%>\r
118 \r
119   </BODY> </HTML>\r