The Results

At first, our tracking box was only 30 by 30 pixels with each of the nine boxes with dimensions 10 by 10 pixels. This initial design was able to track light movement, but it could only track very slow movement. It was not able to track faster movement well because the size of each of the nine boxes was too small and thus the light can easily move out of each square. Therefore, we thought of two possible solutions. We could either increase the tracking box size or increase the number of square divisions inside the tracking box from 9 to 25.

After much thinking, we realized that increasing the number of square divisions from 9 to 25 would yield essentially the same results. It is the size of each square division and not the quantity of square divisions that affect how fast we can track light. The larger each square division is, the faster we can track light sources.

In the end, we chose to increase the tracking box size to 90 by 90 pixels with nine interior boxes. Since each of these nine interior boxes was larger, it was easier to keep track of the light source within the tracking box. Also, we increased the shift amount for the tracking box to account for faster movements. This is essentially a minor form of movement prediction. With this increased shift amount, the tracking box was able to follow light sources slightly faster than before. The main situation where the tracking box frequently loses track of the light source is when a moving light source suddenly changes direction. During a sudden change of direction, the camera frames have somewhat of a lag. In the camera frame following the sudden direction change, the light source will have moved significantly from the previous position and the camera does not capture the intermediate movement. This significant position difference is out of the bounds of the tracking box and thus the tracking box loses track of the light source. However, the tracking box has no difficulties in keeping track of slower and steadier direction changes. In addition, our light tracker works better at tracking larger sources of light. Light sources that are too small frequently do not meet our minimum threshold for identifying a valid light source and at times, light sources bent at an angle lose its intensity in the camera image and thus will not be detected.

Before we reached this conclusion, we investigated different aspects that might have created this bottleneck in our system. We looked into how fast the camera was being written into SDRAM; how fast it took to process the whole image to track the light; and how fast we could read out of SDRAM and into SRAM to be displayed onto the VGA. But all in all, it came out that the real bottleneck was in the camera. The camera just did not capture enough frames per second to accurately track a fast moving point on the screen. If the point was in the tracking box in one frame but by the next frame the point had already moved outside of the tracking box then it would lose lock on it.

The fastest time we achieved in moving a single dot across a 640*480 resolution screen was 5.35 seconds. Any faster and the camera would lose track of the the dot.

The Screenshots