An accurate motion tracking technique is needed to compensate for subject motion during fMRI procedures. In this paper, a novel approach to motion metrology is discussed. A structured light pattern specifically coded for digital signal processing is positioned onto a fiduciary of the patient. As the patient undergoes spatial transformations in 6 DoF (degrees of freedom), a high-resolution CCD camera captures successive images for analysis on a DSP board. A high-speed image processing algorithm is used to calculate spatial transformations in a time frame commensurate with patient movements (10-100ms) and with precisions of at least 0.5 um for translations and 0.1 degrees for rotations.