text: a schematic of the system is shown in fig1 . the imaging hardware includes a color camera 102 and a digitizer . the sequence of images of the scene is then fed to a computer 104 which runs tracking software according to the invention . the tracking algorithm is independent of the imaging system hardware . the tracking system has a graphical user interface ( gui ) to initialize the target and show the tracking result on the screen 106 . the gui for the rots displays a live color image from the camera on the computer screen . the user can initialize the target manually or automatically . once initialized , the rots will then track the target in real - time . the flow chart of the tracking algorithm is shown in fig2 . the program captures live images from the camera and displays them on the screen . it then allows the user to select the target manually using the mouse or automatically by moving the target to a predetermined position in the scene . at the point of initialization , the color , the shape and location of the target are computed and stored . once the target is initialized , we compute an estimate of the target location using target dynamics . we then compute the actual location using the color , shape and motion information with respect to a region centered at the estimated location . the input to the rots is a sequence of color images , preferably in the standard rgb24 format . hence , the hardware can be a camera with an image grabbing board or a usb camera connected to the usb port of the computer . a preferred gui is shown in fig3 . fig4 shows a series of drawings which show the use of color to track a target or feature . once the user clicks on the target in the image , we compute the median color of a small region around this point in the image . this will be the color of the target region being tracked in the scene until it is reinitialized . we also store the shape of the target by segmenting the object using its color . once tracking begins , we compute the center of the target region in the image using a combination of three aspects of the target . the three aspects are the color , the shape and the motion . this results in a very robust tracking system which can withstand a variety of noise , occlusion and rapid motion . the color of a pixel in a color image is determined by the values of the red , green and blue bytes corresponding to the pixel in the image buffer . this color value will form a point in the three - dimensional rgb color space . when we compute the color of the target , we assume that the target is fairly evenly colored and the illumination stays relatively the same . the color of the target is then the median rgb value of a sample set of pixels constituting the target . when the target moves and the illumination changes the color of the target is likely to change . we use a computationally efficient color matching function which allows us to compute whether a pixel color matches the target color within limits . when the illumination on the target changes , the intensity of the color will change . this will appear as a movement along the rgb color vector as shown in fig5 . in order to account for slight variations in the color , we further allow the point in color space to lie within a small - truncated cone as shown in fig5 . the two thresholds will decide the shape of the matching color cone . a threshold on the angle of the color cone and another threshold on the minimum length of the color vector decides the matching color space . thus , any pixel whose color lies within the truncated cone in color space will be considered as having the same color as the target . given a colored pixel , we quantitatively define the match between it and a reference color pixel as follows . let ( r , g , b ) be the values of the rgb vector of the first pixel . let ( r r , g r , b r ) be the rgb vector for the reference color . the value of d m is related to the length of the projection of the given color vector onto the reference vector . the value of d a is related to the angle between the two vectors . if we set two threshold bands for d m and d a , we can filter out those pixels which lie within the truncated cone around the reference vector . their product will indicate the goodness of the match . the parameters d m and d a are chosen to be computationally simple to implement which becomes important when all the pixels in a region have to be compared to the reference color in each new image . once we have the target color and a color matching algorithm , we can find all the pixels in any given region of the image which match the target color . we use the quantitative measure of the match to find a weighted average of these pixel positions . this gives us the most likely center of the target based on color alone . if ( i , j ) are the row and column coordinates of the pixel p c ( i , j ), then for a given rectangular region the most likely target center based on color alone will be given as follows . p c ⁡ ( i , j , t ) = colormatch ⁡ ( r ⁡ ( i , j , t ) , g ⁡ ( i , j , t ) , b ⁡ ( i , j , t ) ) center color = [ r c c c ] = [ ∑ 1 i * j ⁢ p c ⁡ ( i , j , t ) * i ∑ 1 i * j ⁢ p c ⁡ ( i , j , t ) ∑ 1 i * j ⁢ p c ⁡ ( i , j , t ) * j ∑ 1 i * j ⁢ p c ⁡ ( i , j , t ) ] note that the centroid of the target is computed as a weighted sum . the weights are the color matching measure of the pixel . this weighting of the pixel contrasts with the usual practice of weighting all matching pixels the same makes our algorithm less prone to creep . we also keep track of the sum of the matched pixel weights . if this sum is less than a threshold we assume that the target is not in the region . once the target is initialized , we compute a two - dimensional template of the target . we use this dynamic template which is updated every frame to measure the closeness of pixels at the estimated location to the target shape . given the color of the object being tracked and the color matching function we segment all the pixels in a region around the estimated location . the resulting segmented image is the shape of the object and forms the template . with each new image of the scene , the template of the target in the previous frame is used to compute the new center of the target in the new image . the advantage of using templates instead of any assumed shape such as an ellipse is that the tracking and localization of the target is much more robust to shape change and hence more accurate . p ⁡ ( i , j , t ) = colormatch ⁡ ( r ⁡ ( i , j , t ) , g ⁡ ( i , j , t ) , b ⁡ ( i , j , t ) ) ⁢ ⁢ for ⁢ ⁢ time = t m ⁡ ( i , j , t - 1 ) = { 1 if ⁢ ⁢ ( p ⁡ ( i , j , t - 1 ) & gt ; 0 ) 0 otherwise ⁢ ⁢ s ⁡ ( i , j , t ) = p ⁡ ( i , j , t ) ⁢ m ⁡ ( i , j , t - 1 ) ⁢ ⁢ center shape = [ r s c s ] = [ ∑ 1 i * j ⁢ s ⁡ ( i , j , t ) * i ∑ 1 i * j ⁢ s ⁡ ( i , j , t ) ∑ 1 i * j ⁢ s ⁡ ( i , j , t ) * j ∑ 1 i * j ⁢ s ⁡ ( i , j , t ) ] the closeness of the shape is a summation of the product of the pixel color match p ( i , j ) with the target template m ( i , j ). note again that the color matching measure is used to weight the shape measure . this makes our algorithm robust to creep . once the region s is obtained , we can compute the centroid of s . this is the probable location of the target based solely on the shape of the target . the algorithm checks for motion in a region near the estimated target position using a motion detecting function . this function computes the difference between the current image and the previous image , which is stored in memory . if motion has occurred , there will be sufficient change in the intensities in the region . the motion detection function will trigger if a sufficient number of pixels change intensity by a certain threshold value . this detection phase eliminates unnecessary computation when the object is stationary . if the motion detection function detects motion , the next step is to locate the target . this is done using the difference image and the target color . when an object moves between frames in a relatively stationary background , the color of the pixels changes between frames near the target ( unless the target and the background are of the same color ). we compute the color change between frames for pixels near the target location . the pixels whose color changes beyond a threshold make up the difference image . note that the difference image will have areas , which are complementary . the pixels where the object used to be will complement those pixels where the object is at now . if we separate these pixels using the color of the target , we can compute the new location of the target . the set of pixels in the difference image , which has the color of the target in the new image , will correspond to the leading edge of the target in the new image . if we assume that the shape of the target changes negligibly between frames , we can use the shape of the target from the previous image to compute the position of the center of the target from this difference image . let d be the difference sub - image between the previous target and the estimated target location in the new image . if we threshold the difference image , we end up with a binary image . if we intersect this binary image d with the shape of the target in the new image m we get the moving edge of the target as the region v . we then weight this region by the color matching measure p . d ⁡ ( i , j , t ) = { 1 if ⁢ ⁢  p ⁡ ( i , j , t ) - p ⁡ ( i , j , t - 1 )  & gt ; τ m 0 otherwise ⁢ ⁢ m ⁡ ( i , j , t ) = { 1 if ⁢ ⁢ ( p ⁡ ( i , j , t ) & gt ; τ c ) 0 otherwise ⁢ ⁢ v ⁡ ( i , j , t ) = ( d ⁡ ( i , j , t ) ⋂ m ⁡ ( i , j , t ) ) * p ⁡ ( i , j , t ) ⁢ ⁢ center motion = [ r m c m ] = [ ∑ 1 i * j ⁢ v ⁡ ( i , j , t ) * i ∑ 1 i * j ⁢ v ⁡ ( i , j , t ) ∑ 1 i * j ⁢ v ⁡ ( i , j , t ) * j ∑ 1 i * j ⁢ v ⁡ ( i , j , t ) ] the centroid of the region v is then computed as the probable location of the target based on motion alone . this weighting of the intersection region by the color matching measure makes our tracking less prone to jitter . in a physically implemented system , the image capture board is capable of providing us with a 480 × 640 - pixel color image at 30 frames per second . processing such a large image will slow down the program . fortunately , the nature of the tracking task is such that , only a fraction of the image is of interest . this region called the window of interest lies around the estimated position of the target in the new image . we can compute the location of the target in the new image from the location of the target in the previous image and its dynamics . we have used prediction based on velocity computation between frames . this technique is able to keep track of the target even when the target moves rapidly . we have found that the window of interest is typically one one - hundredth the area of the original image . this speeds up the computation of the new target location considerably . if we are given an estimated target location as ( rc , cc ) in the new image and the size of the area to be searched is given by ( rs , cs ), then the algorithm can be written in pseudo code as shown in fig6 . note that the color matching weight c is being used to weight all the three centers . this weighting makes this algorithm smoother and more robust . the velocity computed at the end of the tracking algorithm is used to compute the estimated position of the target in the next frame . extensions of the system are possible in accordance with the described algorithm herein . one is a tracking system which can track multiple targets in the same image . another uses the tracking in two stereo images to track the target in 3d .