Shape/Digit Matching using Fourier Descriptor
Library: Python 2.7.1, numpy, OpenCV
By setting "manually" flag true, you can crop the templete region by mouse; if false, "6" in upper region will be templete.
The decimal figures printed on the image is Euclidean distance between templete and testee, smaller distance means better match.