# I succeeded to 2d FFT of image. But

**URL:** <https://discourse.julialang.org/t/i-succeeded-to-2d-fft-of-image-but/22404>\
**Category:** New to Julia\
**Created:** [March 27, 2019, 12:27pm UTC](https://discourse.julialang.org/t/i-succeeded-to-2d-fft-of-image-but/22404 "2019-03-27T12:27:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bemorejul](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bemorejul/32/7643_2.png) [@bemorejul](https://discourse.julialang.org/u/bemorejul)\
**Post date:** [March 27, 2019, 12:27pm UTC](https://discourse.julialang.org/t/i-succeeded-to-2d-fft-of-image-but/22404/1 "2019-03-27T12:27:49Z")

</div>

I succeeded to 2d FFT of image.

but, … not simple.

is there more simple version ?

 ![56](https://global.discourse-cdn.com/julialang/original/3X/d/5/d56127eb44392c8e83c9ef6b732dcc793800f42b.jpeg)

using Images, Plots, TestImages, FFTW

methods(TestImages)

aa= testimage(“lighthouse”)

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

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

---

<div class="post-metadata">

**Author:** ![tim.holy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tim.holy/32/52_2.png) [@tim.holy](https://discourse.julialang.org/u/tim.holy)\
**Post date:** [March 27, 2019, 3:24pm UTC](https://discourse.julialang.org/t/i-succeeded-to-2d-fft-of-image-but/22404/2 "2019-03-27T15:24:51Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![bemorejul](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bemorejul/32/7643_2.png) [@bemorejul](https://discourse.julialang.org/u/bemorejul)\
**Post date:** [March 28, 2019, 5:47am UTC](https://discourse.julialang.org/t/i-succeeded-to-2d-fft-of-image-but/22404/3 "2019-03-28T05:47:19Z")

</div>

Thank you.

I’m not familiar to too many dot operations.

It’s little complicated…
