Live data from Hacker News

Introduction to the Fourier transform for image processing (2001)

cs.unm.edu

21–30 of 34 posts

Re: Introduction to the Fourier transform for image processing (2001)

#21
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/

Re: Introduction to the Fourier transform for image processing (2001)

#22
post #16
post #12

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

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

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.

Re: Introduction to the Fourier transform for image processing (2001)

#23
>"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!

Re: Introduction to the Fourier transform for image processing (2001)

#24
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 :)

Re: Introduction to the Fourier transform for image processing (2001)

#25
post #5
post #3

Earlier quoted context omitted.

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.

Re: Introduction to the Fourier transform for image processing (2001)

#26

>"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…

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.

Re: Introduction to the Fourier transform for image processing (2001)

#27
post #22
post #16

Earlier quoted context omitted.

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

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!

Re: Introduction to the Fourier transform for image processing (2001)

#28

>"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…

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...

Re: Introduction to the Fourier transform for image processing (2001)

#30
post #7

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.
Post reply on HN