2D Discrete Fourier Transform on an Image - Example with numbers (rgb)

1.7k Views Asked by At

I am trying to write my own function that takes an image, an pixel by pixel it calculates that pixel value that will produce a 2D Fourier Transform image.

I have no idea about signal processing, my background is CS.

I have been reading this,

http://matlabgeeks.com/tips-tutorials/how-to-do-a-2-d-fourier-transform-in-matlab/

and this

http://homepages.inf.ed.ac.uk/rbf/HIPR2/fourier.htm

and I saw the Fourier equation. It seems that I am going to need a simple nested loop, to go through all the pixels, but I do not know how to apply the equation. From the first link, M and N are the width and height of the image right? x and y are x and y of course.

But how do I interpret this: f(x,y)(e^-j2....) ?

So it is the value of the pixel, (let's say rgb grayscaled, 249) multiplied by the rest which is (e^-j2....)? I know j is the imaginary part, but if you have a look, it mentions a U and V unknowns aswell, which I do not know what value to assign to them.

Thanks.