I am trying to do a 2D FFT of an image:
using AbstractFFT
img=[sin(2*pi*x*10/256) for x in 1:256, y in 1:256];
fft(img)
but this gives:
julia> fft(img)
ERROR: MethodError: no method matching plan_fft(::Matrix{ComplexF64}, ::UnitRange{Int64})
Closest candidates are:
plan_fft(::AbstractArray{var"#s6", N} where {var"#s6"<:Real, N}, ::Any; kws...) at /Users/burke/.julia/packages/AbstractFFTs/JebmH/src/definitions.jl:199
plan_fft(::AbstractArray{var"#s15", N} where {var"#s15"<:(Complex{var"#s16"} where var"#s16"<:Union{Integer, Rational}), N}, ::Any; kws...) at /Users/burke/.julia/packages/AbstractFFTs/JebmH/src/definitions.jl:201
plan_fft(::AbstractArray; kws...) at /Users/burke/.julia/packages/AbstractFFTs/JebmH/src/definitions.jl:52
Stacktrace:
[1] fft(x::Matrix{ComplexF64}, region::UnitRange{Int64})
@ AbstractFFTs ~/.julia/packages/AbstractFFTs/JebmH/src/definitions.jl:51
[2] fft(x::Matrix{Float64}, region::UnitRange{Int64}) (repeats 2 times)
@ AbstractFFTs ~/.julia/packages/AbstractFFTs/JebmH/src/definitions.jl:198
[3] top-level scope
@ REPL[27]:1
what am i missing?