How to implement Fourier Descriptor of an image?
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