The basic operation for a digital desk application is tracking some pointing device, such as a finger, a pencil or an eraser. The tracking problem can be expressed as: ``Given an observation of an object at time t, determine the most likely location of the same object at time ''. The pointing device can be modelled as a reference template. The reference template is a small neighbourhood, i.e., a window w(n, m) of a picture p(i, j) obtained at some prior time, t. The reference template is compared to the image by computing a sum of squared differences (SSD) at each pixel with a MxM search region :
A perfect match gives a value of 0. Implementing cross-correlation by SSD requires solving practical problems such as determining the sizes of the reference template and of the search region, triggering and breaking tracking, and updating the reference template.