Hello,
i'm writting a program which detects the contors of the shape in the image, takes N poins from it by sertain lenght and does the fourier transformation, so that the shape becomes more rounded, as seen in the image bellow(red).

this is the formula i should use. Z(i) should be vectors, complex numbers of the pixel cordinates x+iy, i use complex(x,y). How should i use the fft command build in matlab to get the results as seen in the picture above?

from this site:
http://www.tsi.enst.fr/tsi/enseignement/ressources/mti/descript_fourier/Part1.html
Thank you for any help,