7 ms·
Can someone explain how the frequency domain stuff works? I've never really understood that, and the article just waves it away with saying it's like converting
by john111 10y ago
Can someone explain how the frequency domain stuff works? I've never really understood that, and the article just waves it away with saying it's like converting from binary to hex.
- raverbashing 10y agoIt's the Fourier transform basically. There were even some past links on HN that explained it nicely so you might check those first (Though for images it's in 2D, not 1D which is more commonly done)
- jerf 10y agoThe search keyword to learn about it is Fourier Transform: https://en.wikipedia.org/wiki/Fourier_transform https://en.wikipedia.org/wiki/Fourier_transform Along with the Wikipedia article and the obvious Internet search, there's a lot of good stuff that has been on HN: https://hn.algolia.com/?query=fourier%20transform&sort=byPopularity&prefix&page=0&dateRange=all&type=story https://hn.algolia.com/?query=fourier%20transform&sort=byPop...
- rayiner 10y agoIt's a bad analogy. Binary and hex are just different formats for representing the same number. Spatial domain and frequency domain are different views of a complex data set. In the spatial domain, you are looking at the intensity of different points of the image. In the frequency domain, you are looking at the frequencies of intensity changes in patterns in the image. A good way to develop an intuition for the fourier space is to look at simple images and their DFT transforms: http://web.cs.wpi.edu/~emmanuel/courses/cs545/S14/slides/lecture10.pdf http://web.cs.wpi.edu/~emmanuel/courses/cs545/S14/slides/lec... (3/4 of the way through the slide deck). This analysis of a "bell pepper" image and its transform is also helpful: https://books.google.com/books?id=6TOUgytafmQC&pg=PA116&lpg=PA116&dq=dft+image+intensity+changes&source=bl&ots=m8lUh6N0ms&sig=dXNH4GYn39FVen9nZ7pv30zss5k&hl=en&sa=X&ved=0ahUKEwicnYfFpI_QAhWs6YMKHcoqBOIQ6AEIRjAG#v=onepage&q=dft%20image%20intensity%20changes&f=false https://books.google.com/books?id=6TOUgytafmQC&pg=PA116&lpg=.... As for why you want to do this: throwing away bits in the spatial domain eliminates distinctions between similar intensities, making things look blocky. In the frequency domain, however, you can throw away high-frequency information, which tends to soften patterns like the speaker grills in the MBP image that the human eye isn't that sensitive to to begin with.
- astrange 10y ago> Spatial domain and frequency domain are different views of a complex data set. Or in this case, a real data set.
- Koshkin 10y agoIn the most basic terms, not even talking about frequency, the mechanics of this is that one series of numbers (pixel values, audio samples, etc.) is replaced, according to some recipe or another, with a different series of numbers from which the original can be recovered (using a similar "inverse" recipe). The benefit of doing this comes from the discovery that this new series has more redundancy in it and can be compressed more efficiently than the original, and even if some of the data are thrown away at this point, the purpose of which is to make compression even more effective, the original can still be recovered with high fidelity.
- orting 10y agoBasically we can represent any signal as an infinite sum of sinusoids. If you know about Taylor expansion of a function, then you know that the first order term is the most important, then the second and so on. Same principle with the sinusoids. So if we remove the sinusoids with very high frequency we remove the terms with least information.
- TD-Linux 10y agoImage and video codecs don't actually use the fourier transform as presented in the article, they use the DCT. Check out the example section on Wikipedia: https://en.wikipedia.org/wiki/Discrete_cosine_transform https://en.wikipedia.org/wiki/Discrete_cosine_transform The JPEG article also has a very good, step by step example of the DCT, followed by quantization and entropy coding: https://en.wikipedia.org/wiki/JPEG https://en.wikipedia.org/wiki/JPEG