Hacker News new | past | comments | ask | show | jobs | submit login
Introduction to the Fourier transform for image processing (2001) (unm.edu)
201 points by todsacerdoti on May 17, 2023 | hide | past | favorite | 30 comments



This is a bit out of context but nonetheless, it's inspiring: https://www.jezzamon.com/fourier/

Spectrograms and fourier transforms can also be applied to making music through diffuse AI. https://www.riffusion.com/about


Beautifully done. God I wish our fourier series lecturer in university motivated the class even a little with illustrations like this. It was 100% derivation and hard maths, no intuition at all


Fourier series are kinde of more graspable if they are taught in the context of signal processing --as a nerd I could understand what the frequency domain was, after all, and the maths made sense to me. But when it comes to Laplace Transform in control systems everything became impossible.


The day I realized Laplace transforms converted difficult linear differential equations into simple algebra problems was the day I began to appreciate Laplace transforms.


Brian Douglas produced a decent set of lectures on control systems, I found them to be quite useful during my degree: https://www.youtube.com/@ControlLectures


It’s definitely worth persisting with the Laplace transform.. you get a ton of stuff you can do when you have H(s)=Y(s)/X(s)


I love image FFT! Quite some time ago I implemented it (just a wrapped FFTW) as a plugin for the 'Shake' compositing software that we were using at the time at RSP. It was tricky but incredible fun and like a mini-superpower! People were hand-painting full-colour bokeh images for very fancy defocus effects, among other things. Then Apple bought Shake, and we swapped to Nuke, which also has an FFT built-in which is cool, although last time I looked it didn't do the complex-to-magnitude/phase transformation-and-back which is very handy when working with FTs of pixels.


Fourier Transform is one of my favourite topic in maths and computer science. I am anways happy to stumble upon new resources about it.

While taking courses in signal processing at university I built a collection of interactive visualiztations to provide a experimental and intuitive approach without much technical explanations.[1]

I already submitted a few of them to HN and received very motivating feedback.[2] I am sure some of you who like the OP article might also enjoy these.

The latest visualization is dedicated to the trade-off between time and frequency resolution/uncertainty priciple.

[1]: https://tools.laszlokorte.de/ [2]: https://news.ycombinator.com/item?id=29455894 [3]: https://static.laszlokorte.de/time-frequency/


Tangent since it is not exclusive to image processing, but When I was studying Fourier Transforms at university I recall that the book "Fourier Series" by Gerogi P. Tolstov helped me a lot. Just throwing it out there in case it helps anyone, including to refresh the definitions the article starts with.


I read this book too and it really drove things home. I remember after feeling a little bit unsure about the relevance of orthogonal systems, feeling the thrill of beginning to see and anticipate where the argument was going. It felt like I was discovering it for myself. I think there are lot of good math and physics books from the Soviet era.


>"MAGNITUDE VS. PHASE:

[...]

Note that f(x,y) is the image and is REAL, but F(u,v) (abbreviate as F) is the FT and is, in general, COMPLEX.

Generally, F is represented by its MAGNITUDE and PHASE rather that its REAL and IMAGINARY parts, where: MAGNITUDE(F) = SQRT( REAL(F)^2+IMAGINARY(F)^2 ) PHASE(F) = ATAN( IMAGINARY(F)/REAL(F) )

Briefly, the MAGNITUDE tells "how much" of a certain frequency component is present and the PHASE tells "where" the frequency component is in the image."

This is interesting... I've never thought of FT's in terms of Magnitude and Phase before.... I wonder if these two aspects of FT equations could have any correspondences with other "aspect pairs" (for lack of a better term) in Physics, for example, Amperage and Voltage, Speed and Acceleration, Space and Time, Wavelength and Frequency, etc., etc. (in other words, a thorough comparison would need to be done between Magnitude and Phase and other "aspect pairs" in Physics, and see what's the same, see what's different, etc.

There might be something to discover there... or at least (re)understand a little bit better...

Anyway, excellent article (I learned stuff I didn't know about the Fourier Transform) -- thanks to the author for writing it, upvoted and favorited!


Multiplying Mag/Phase representations is easy; adding them is hard. The opposite is true for the Re/Im representation.

So some of your representation choice depends on what you're doing. If you're multiplying two FTs (i.e. to perform convolution in the spatial or time domain) then Mag/Phase is easier. If you're adding signals together, Re/Im is easier.


Interesting! Sort of like Mag/Phase is the opposite of Re/Im -- where adding and multiplication are reversed in complexity in both systems...


A better way to eliminate image border effects isnt windowing, but mirrored periodic repetition.


But then this is equivalent to the cosine transform, isn't it? A much better trick than mirrored repetition seems to be the "periodic + smooth" decomposition: https://sbrisard.github.io/posts/20180212-on_the_periodic-pl...


Yeah, and its good at minimizing high frequencies, which is why the dct is used in image compression. There is no good general windowing, understanding is key, and where smoothing or windowing will hide the effect of the border, thus inhibiting understanding, mirroring helps understanding.


Every picture in this article is worth a million words. Well done!

I also used a lot of pictures when teaching Discrete Cosine Transform in a grad course back in the day:

http://rmarsh.cs.und.edu/CLASS/CS446/DiscreteCosineTransform...

Students loved it and could instantly relate to the theory because of these pictures. Embarrassingly, this continues to be my most cited publication to date :)


I always think most of mathematicians is genius. They can hold all concepts and relationships between thems in their mind.

The result is the way they explain concepts to broader audience mostly failed. Abstract nonsense for no purpose.

I'm fine with it... until i see the application to learn more about theory.


Are you asking what the practical application of 2D Fourier analysis is?

I use it every single day, to correct aberrations in electron microscope images that otherwise obliterates high spatial frequency features and information.


seems like a really bad introduction if you don't already know what a fourier transform is


Nice explanation, but do we still need to use Playboy for reference images?


We don't still, but people used to. The article is over 20 yrs old. https://web.archive.org/web/20010725011144/https://www.cs.un...


Conversely, where is the actual Lena reference image? 8-bit pixel depth, 512x512, uncompressed tiff format preferably. Is there a canonical persistent URI someplace?


https://web.archive.org/web/20160322020730/https://sipi.usc....

At this point archive services are the best bet for this kind of image.


Yes, the "Lenna Story" website: http://www.lenna.org/

A permanent link to the TIFF image itself is: http://www.lenna.org/lena_std.tif


Only sort of. Since the image has been in use since before web services etc., more than one different copy was used as "canonical" so it's sort of unsolvable if you want to reproduce work. There has been more recent efforts to pick a reference one, as linked in this thread.


Reply within a hour, thnx hn ;)

Intrigue. Looks like it was removed from the SIPI db?

https://sipi.usc.edu/database/database.php?volume=misc

World needs a new 600 DPI reference scan. To the Playboy Archives!


It's just a nude, grow up. And the image used in compression benchmarks only shows her face.


It's interesting that there's so much resistance to stop using this particular image when there are billions of alternatives out there. Lena Forsén herself has asked that people stop using it, which seems like a pretty reasonable request.


That is indeed a reasonable request. Do you have the source?




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: