What would be the easiest way to take a 2D Fourier Transform of an image, and draw the result? Currently I get the pixels from a black and white image in the following way:
TImage *img = TImage::Open("image.jpg");
TImage *img2 = (TImage*)img->Clone("img2");
TArrayD *arr = img2->GetArray(1024, 1024);
now I’m confused about what form the pixels should be in to tak e the fourier transform. I guess my choices are histogram, matrix, TArray or just a plain Double_t array, but there are problems with all of these formats. the FFTW3 package seems to need a Double_t array, so, for instance, right now I’m trying to do the following:
Double_t *in= new Double_t[1024][1024];
in=arr;
but if I try to convert back to a TArray (to draw the image after the transform) I get errors (like Error: Incorrect assignment to arr1, wrong type ‘Double_t*’).
Does anybody have any ideas? Thanks