Update the changelog
[opencv] / docs / appPage / ConDensation / condensation.htm
1  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">\r
2 <HTML>\r
3   <HEAD>\r
4     <TITLE>Condensation 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         <p align="center"><I><FONT SIZE=+4>Condensation Tracker\r
17                   </FONT></I></p>\r
18           </TD>\r
19         </TR>\r
20       </TABLE>\r
21     </CENTER>\r
22 \r
23 \r
24     <p align="center">\r
25 \r
26 \r
27     <BR>\r
28 \r
29     </a><img border="0" src="CondensationDemo.jpg" width="712" height="279">\r
30     <a name="top">\r
31 \r
32     <BR><BR>\r
33 \r
34     <H1>Description</H1>\r
35 \r
36     </a>The library provides a Condensation engine for tracking purposes.&nbsp; In the\r
37     application described below, the CAMSHIFT color tracking algorithm is used\r
38     to provide measurements for the X-Y tracking of a face (or other colored\r
39     object). The CAMSHIFT algorithm implemented here just uses a simple 1-D Hue\r
40     histogram sampled from the object using an HSV color space.&nbsp; Therefore,\r
41     the color tracker may need some tuning as described below (see CAMSHIFT demo\r
42     description page for more details).\r
43     <br><br>\r
44     Note that this filter requires that you have DirectShow 6.0 or greater installed\r
45     with <B>graphedt.exe&nbsp; </B>(DirectShow 6.0 for NT4.0, DirectShow 7.0 for\r
46     Win 98 or Win2000)\r
47     (<A HREF="http://www.microsoft.com/downloads/release.asp?ReleaseID=16927">http://www.microsoft.com/downloads/release.asp?ReleaseID=16927</A> ~128MB[!]).\r
48     You will also need a video camera source filter which should\r
49     be supplied by your USB camera vendor. <!-- except most don't support NT4.0. -->\r
50 <!-- %%Some friendly advice from Uncle Gary?? -->\r
51 <!--    Win2000 is your best bet for development, for just running the filter graph, Win98 will do.. An example filter graph is shown below (with the calibration filter processing a video source from a Matrox Meteor II card that we wrote ourselves) and then passing the output to a video renderer. -->\r
52 \r
53     Microsoft* Windows* 2000 may be the most suitable operating system\r
54     for development since many vendors do not supply filters for\r
55     Windows NT 4.0. However, Windows 98 will be adequate for just\r
56     running the filter graph.\r
57     <h1>Condensation Color Tracker Demo</h1>\r
58     You should setup or launch the following DirectShow filtergraph (of\r
59     course, your capture source will depend on your USB camera):<br><br>\r
60     <center><img border="0" src="CondensationGraph.jpg" width="655" height="91"></center>\r
61     <h2>Controls</h2>\r
62     The control panel (obtained by right-clicking) for the\r
63     Condensation filter in the filter graph above looks like:<br><br>\r
64 \r
65     <center><img border="0" src="CondensationDialog.jpg" width="386" height="280"></center>\r
66     <br>\r
67     <b><font size=+2>[1]</font></b> This control moves and\r
68     sizes the\r
69     sample window when you are not tracking.\r
70 \r
71     <br><b><font size=+2>[2]</font></b> This is the minimum saturation for a\r
72     Hue pixel to be accepted threshold.\r
73 \r
74     <br><b><font size=+2>[3]</font></b> This is the minimum brightness for a\r
75     Hue pixel to be accepted threshold.\r
76 \r
77     <br><b><font size=+2>[4]</font></b> This allows you to toggle between the\r
78     raw video image and the Hue histogram backprojected image.\r
79 \r
80     <br><b><font size=+2>[5]</font></b> Samples color under box [1] and starts Condensation\r
81     tracking.\r
82 \r
83     <br><b><font size=+2>[6]</font></b> Stop Condensation tracking.\r
84 \r
85 \r
86     <h2>How to...</h2>\r
87     <h3>Start Tracking</h3>\r
88     1. Select Normal view [4].<br>\r
89     2. Set the thresholds to zero [2] &amp; [3].<br>\r
90     3. Move the sample box using [1] so that it covers the colored object to be tracked.<br>\r
91     4. Press &quot;Start Track&quot; [5].<br>\r
92 \r
93     <h3>Tuning the tracking:</h3>\r
94     1.Select Back Project view [4]. The goal is to have\r
95         the image such as on the left below to look like the cleaner image on\r
96         right below.<br>\r
97     <br>\r
98     <center><img border="0" src="../Kalman/kalmanbackNClean.jpg" width="649" height="240"></center>\r
99     <br>\r
100     2. Increase minimum saturation threshold [2] to clean up\r
101     the image without diminishing the object of interest too much.<br>\r
102     3. Increase minimum brightness threshold [3] to finish the\r
103     &quot;clean up&quot; job.&nbsp; Don't turn too high or else bright spots\r
104     on the tracked object will become &quot;holes&quot;.<br>\r
105     4. Turn normal view back on [4].<br>\r
106     <h2>Display</h2>\r
107     The meaning of the normal view display is as follows with\r
108     reference to the figure below:<br><br>\r
109     <center><img border="0" src="../Kalman/kalmanTrackShot.jpg" width="320" height="240"></center>\r
110     <font size=+2><b>[A]</b></font> Velocity direction and\r
111     magnitude estimation.<br>\r
112     <font size=+2><b>[B]</b></font> Sample window if not\r
113     tracking, tracking window if tracking.<br>\r
114     <font size=+2><b>[C]</b></font> Estimated location of&nbsp;\r
115     the object.\r
116     <br>\r
117     <br>\r
118     <hr noshade size=2 width=100%>\r
119 \r
120   </BODY> </HTML>\r