How to implement Fourier Descriptor of an image? I want to implement Fourier Descriptor of an object. I have read link. However, I have some questions about normalizing Fourier Descriptor. 

First, if I want to normalize the position of the starting point, according to the above link, This is done by subtracting the phase of the second Fourier descriptor $\phi_1$ from the phase of all Fourier descriptors and weighting by $k$; that is:

$a(k)=a(k)e^{-j \phi_1 k}$

Is the weight $k$ equal to the $k$ in $a(k)$ ?

Second, how could I do in order to achieve rotational invariance when I implement Fourier descriptor ? Thank you very much for your reply.
Yes, these k are the same. 

In the basic sense, the rotational invariance is obtained by only taking the magnitude of the descriptors. However, in practice this might lead to information loss and decreases discrimination power. For this reason it is typically prefered to augment the phase information with additional terms. There are many ways to do this but for a simple approach follow:

Invariant Fourier Descriptors Representation of Medieval Byzantine Neume Notation

Dimo Dimov, Lasko Laskov