This seems like a very simple question, but I could not find any documentation for this.
I have an image in Numpy and I want to imshow FFT.
In matlab, I can just do
F = fft(myimg) imshow(F)
I can't do the same in Numpy, because F is complex-valued. Trying to make imshow(real(F)) gives me the whole black image - I suppose because in [0,1] instead of 0..255. Multiplying by 255 also does not fix the problem.
Any ideas on how to get my plot?
Update:
Well, Nathan pointed out how I improperly simplified this problem. Let me back off a bit. I have a video matrix of sizes (200, 30, 30, 3). 200 frames, 30x30 pixels, 3 color channels. For each color channel of each pixel, I want to calculate the fft of this pixel over time in a series. This should give me a new matrix, which is (200,30,30,3). For each pixel, for each color channel, a 200-dimensional temporal Fourier transform of each pixel. Then I must be able to watch, for example. an image created by the values โโof the first Fourier transform coefficient in each pixel.
Note that matlab fft works with the first non-singular dimension, so F = fft(video) does what I need.
source share