I wanted to prove to myself why the DCT is better than the DFT and heres a brief of what I understand so far.

The DTFT works with a finite sampled input signal, but the frequency response obtained is continuous and periodic. The DFT samples the DTFT since it is still not practical for real world applications. The DFT inherits this periodicity and X[k] can be shown to repeat from the definition itself. Taking the IDFT of the periodic spectrum, results in a periodic waveform, and this is why the DFT assumes x[n] is periodic. Now the reason the DCT is better because its periodicity is even and that eliminates any discontinuity.

Why does the DCT assume that x[n] is mirrored? Is this established in the derivation of the DCT beforehand? Furthermore we say that x[n] doesn't have any discontinuity because X[k] is mirrored for X[k+N], and taking the IDFT of that would result in a periodic x[n] mirrored with no discontinuity. Any answer is appreciated whether its descriptive or mathematically.

Just as the DFT assumes a periodic signal by construction, the DCT assumes an even signal by construction. We can think of taking a DFT of a non-periodic signal by extending it periodically, but restricting our "viewing window" to the original signal itself. Now, what happens when you take the DFT of an even signal? The DFT is then real (which means it can be constructed with only cosines as basis functions). So, in a similar spirit to the periodic extension, we can take an arbitrary non-periodic, non-even signal, mirror it, then extend it periodically. This results in a real, cosine-based DFT. Again, we restrict our "viewing window" to the original signal itself. Note that although we've doubled the length in the frequency domain, we only have real components. Effectively this means we store the same amount of information compared with the traditional DFT. The reason the DCT is useful in compression is that compared with the traditional DFT, there is more energy in the lower frequency components than in the higher frequency components (energy compaction), so we can compress those higher frequency components. This is true because, as you said, this extended mirrored periodic signal lacks the sharp discontinuities of the traditional DFT input and as a result is smoother.

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.