tracking phase includes two steps that are as yet unimplemented. These are the ROI size modification and the centroid quality calculation.
The segmentation phase is based around using ROIs. Every frame is searched for new markers. When a marker is found, a new ROI is created. The ROI is positioned so that it contains the marker image. Using the ROI and a signal intensity threshold2, the marker image is crudely segmented from the background.
The motivation for using ROIs is that they greatly reduce the computation required.
illustrate this, suppose ROIs were not used. Every pixel of each frame would need to be analysed to determine whether it belonged to a marker. Further analysis would then be required to determine which marker the pixel belonged to. brief calculation of required computing power in instructions per second shows this to be undesirable on a small em- bedded system. centroid operation was written in C and compiled using GNU GCC for the Blackfin BF533 DSP . By counting the instructions in the inner loop a value of ap- proximately 25 instructions per pixel was calculated. While this figure will vary depending on the target processor and factors such as compiler optimisation, it probably represents a lower bound. Suppose that to determine whether a pixel belongs to a marker and if so which marker it belongs to requires at least the same number of instructions per pixel as
the centroid calculation. For the wide VG
frame of 752 × 480 pixels used in this research
(see Chapter 5), this results in a requirement of approximately
= 752 × 480 × 25 × 60 = 541 M instructions/s (Mips)
at 60 frames/s (fps).
gain, it should be stressed that this is an absolute minimum.
Using ROIs, the subpixel phase involves the calculation of the centroid of the ROI. The ROI size is much smaller than the frame size so it is possible to implement efficiently on a small embedded system. Suppose there are 27 ROIs of size 32 x 32 and that each pixel requires 25 instructions to process. This results in
= 25 × 32 × 32 × 27 × 60 = 41.5 Mips
at 60 fps and is, therefore, a fraction of the computation required to analyse each pixel of every frame. These figures are rough estimates but, regardless of the actual number of operations required per pixel, using ROIs will result in fewer operations per frame purely because there are fewer pixels to analyse.
The tracking phase consists of moving the ROIs so that they surround the marker in the next frame. Using the position in the current frame and the previous frame, the position of
2This is the threshold above which pixels are assumed to belong to a marker image.