I succeeded to 2d FFT of image. But

I succeeded to 2d FFT of image.

but, … not simple.

is there more simple version ?

using Images, Plots, TestImages, FFTW

methods(TestImages)

aa= testimage(“lighthouse”)

F= fftshift(fft(Float64.(Gray.(aa))))

heatmap(log.(abs.(F.*F)).+1)

You don’t need that line calling methods. Out of curiosity, what aspect do you find particularly complicated? Images tries not to guess your intentions; with a color image, fft(aa) would be ambiguous: do you want it of the grayscale-converted image like here, or perhaps you want the red color channel with fft(red.(aa)), or perhaps the u channel of an Luv-converted image with fft((c->Luv(c).u).(aa)). Or is it the fftshift that worries you?

5 Likes

Thank you.

I’m not familiar to too many dot operations.

It’s little complicated…