I have extracted chain code from a contour using the old-C Api, now I want to feed it into a fourier descriptor as length of chain code is too long and i am unable to know how to classify it. I have seen some of the people uses fourier descriptor after extracting chain code. How to use fourier descriptor? Does anyone has an example of it? And is it translation and scale invariant?