# How to get cofficients in DFT?

In my recent study of signal processing I came to know that we can compress images/signal using DFT/DCT. If we consider the lossy compression of audio or any image then it follows the same steps:

1. Apply DCT/DFT on N samples of data.

2. Collect coefficients which contains most of the signal energy i.e., 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.

But I have doubt that how to get these coefficients. In DFT we have $${\tt ORIGINAL:}\ X(e^{jw})=\sum_{n=0}^{N-1} x[n]e^{-j2{\pi}/Nn}\\ {\tt CORRECTED:}\ X[k]=\sum_{n=0}^{N-1} x[n]e^{-j2{\pi}/Nnk}$$

Here, $\omega$ is a continuous variable. Then how to extract coefficients when $\omega$ is a continuous variable?

• Welcome to DSP.SE! What you have in your equation is the Discrete-Time Fourier Transform. That is not usually what is used: note that this requires infinite data... which is hard to store. The DFT is something else.
– Peter K.
Dec 2 '15 at 17:37
• sorry for that..I have edited it Dec 2 '15 at 17:41
• Well, let me correct what you've done and you'll see.
– Peter K.
Dec 2 '15 at 17:50
• Note that you missed out a $k$ (discrete frequency variable) in your edit.
– Peter K.
Dec 2 '15 at 17:51