Many neurological diseases such as stroke, traumatic body injury, spinal cord injury drastically decrease the patient's ability to walk without physical assistance. To re-establish normal gait, patients undergo extensive rehabilitation. At present, rehabilitation requires gait assessment by highly qualified experienced clinicians. To make rehabilitations easier to access and to decrease the rehabilitation cost, it is desirable to automate gait assessment. In precise terms, gait assessment means comparing the recorded patient's gait with a standard (average) gait of healthy people of the same body measurements. One of the problems in this comparison is that patients walk slower; so, to properly compare gaits, we must first appropriately "scale" the standard gait so that it best matches the speed with which the patient's walk. One possibility is to try all possible scalings but this is computationally very intensive. In this paper, we adjust the known fast image referencing techniques to design a fast algorithm that uses Fast Fourier Transform for finding the optimal scaling.