4 ms·
Speaking of 'original' formats. Why would one prefer the Discrete Cosine Transform to the Discrete Fourier Transform? I've only worked with the Fourier, and I'
by arianvanp 13y ago
Speaking of 'original' formats. Why would one prefer the Discrete Cosine Transform to the Discrete Fourier Transform? I've only worked with the Fourier, and I'm wondering if there are any benefits?
- 0x006A 13y agoOne property of the DCT that makes it quite suitable for compression is its high degree of "spectral compaction;" at a qualitative level, a signal's DCT representation tends to have more of its energy concentrated in a small number of coefficients when compared to other transforms like the DFT. This is desirable for a compression algorithm.
- arianvanp 13y agobut if you'd take the continous transform, my intuition says it doesnt matter. as it's both a time -> frequency/phase domain transformation. So they should store 'the same amount' of information. ??
- joeyo 13y agoKeep in mind that, in general, you need an infinite number of Fourier bases to represent an arbitrary waveform. But if you want to use a finite number of bases (and indeed as small of a number as you can get away with), and if the waveform you wish to represent has known structure, there can be more efficient representations.
- deleted 13y ago[deleted]
- 0x09 13y agoSince the DCT has an implicit even extent as opposed to the DFT which is strictly periodic it's much more resistant to removal of high frequencies. Most signals (especially image blocks) aren't periodic, so the DFT uses a lot of energy to represent the discontinuity at the edge of the signal. The DCT avoids this discontinuity by implicitly mirroring the signal at the edges. This is what is meant when the DCT is said to do better energy compaction. signal DFT DCT II v-nice and smooth, easy for cos() to fit \_ \_ \_ \_ _/\_ _/ \ \ \ \ / \/ ^sharp, high-frequency discontinuity this will make a large value at the top of our spectrum The other reason is that pixel data has no imaginary component, which obviates half the DFT's spectrum, with the DFT requiring complex math regardless. The DCT is purely real-valued so it's a matter of one real output per one real input. Since the DCT is just an even and real-valued special case of the DFT, those two make up the whole difference.