I am new in Signal Processing, specially on speech signal analysis. so need to know about the discrete fourier transform and discrete cosine transform easily.
There are a lot of inaccuracies in the answers above. Let me put things straight.
DFT is a linear transform which takes as input a complex signal x of length N and gives as output a complex signal X of length N, X=Wx. W is a complex NxN matrix with entiries W_k,n=exp(-2pi*k*n/N), where 0
DFT is the discretised version of the spectrum, preferably the same number of samples in the signal. FFT is also DFT, but the number of samples taken are as a power of 2 to accelerate computation. Fourier transform domain is complex, so in order to deal with a domain which is real, DCT is used for compression.
DFT is the discrete general version, slow. FFT is a super-accelerated version of the DFT algorithm but it produces the same result. The DCT convolutes the signal with cosine wave only, while the DFT/FFT convolutes with the complete complex wave e^ix = cos x + i sin x
Thanks so much Mr. David .. this document is really a good one :) but these documents are based on image analysis.. and I am working on speech signal analysis, so cannot make the real connect through it.
Long long ago, we dont have digital signal - all are analog. FT was invented to perceive signal in from a different angle - frequency spectrum. It is also called continuous time Fourier transform (CTFT).
Then people realized that there exist digital signals, thus the discrete time Fourier transform (DTFT) was invented for this kind of signals.
Digital processing is so powerful and efficient, hence people would like all forms of signals are discrete, induing those transformed ones. Note that, in a general case (signal not periodic), CTFT and DTFT map time domain continuous and digital signals into frequency domain continuous signals.
To make the frequency domain representations also discrete, we need to let time domain signal be periodic. Therefore, we replicate and concatenate a time domain discrete signal and make it periodic, and the corresponding DTFT of periodic signal becomes also discrete.
Now it is ready to come to DFT, which is the samples of above DTFT within a period of 2pi. Golden rule: discrete periodic time domain corresponds to discrete periodic frequency domain.
FFT is the fast algorithm of DFT.
Above is my understanding. Hope I am not confusing you. You may refer to John G. Proakis's "Digital Signal Processing: Principles, Algorithms, and Applications."
DFT is the discrete version of the Fourier Transform (implementable in a computer). DCT is the discrete cosine transform, that is, the DFT when taking only the real part. FFT is not a theoretical transform: it is just a fast algorithm to implement the transforms when N=2^k.
There are a lot of inaccuracies in the answers above. Let me put things straight.
DFT is a linear transform which takes as input a complex signal x of length N and gives as output a complex signal X of length N, X=Wx. W is a complex NxN matrix with entiries W_k,n=exp(-2pi*k*n/N), where 0
Don't be bothered by the image processing examples in the PPT I referenced. In audio processing, you are working with 1D data rather than 2D data, but the idea of achieving data compression by using a transform that yields a small number of significant coefficients is still valid.
If you are new to DSP, but know some linear algebra, transforms (whether discrete or continuous) can be viewed as determining the linear projection of the original signal on a chosen set of basis functions (here, trigonometric functions). We choose these basis functions so that the original signal can be approximated as a weighted sum of relatively few of them. Determining the proper weights (e.g. Fourier coefficients) is easy if the basis functions are orthogonal to one another: One calculates inner products between the original signal and each basis function. For discrete signals, the inner product is a "dot product", expressible as a sum of products of sample values. For continuous signals, the inner product requires an integral rather than a summation. Either way, this is the same as projecting the original signal on a set of orthogonal (perpendicular) basis vectors in a linear sub-space. The resulting projection yields the approximation of the original signal having minimum mean-squared error.
I agree with Raziel Haimi-Cohen and I should add that there are many algorithms to implement DCT as well and the ones based on FFT are slow in general.
Many Thanks to Guang Hua and Raziel Haimi-Cohen, for elaborating these things so easily and it would really help me a lot in my study. And, also thanks to others who answered as well. Your responses are amazing :)
In Discrete Fourier transform, it contains real and imaginary part. From that we consider real part only means , it is called DCT and We consider imaginary parts only means , it is called DST.
DCT is not real part of DFT (also, DST is not imaginary part). If you consider the real part or imaginary part alone, the transform is not orthogonal. However, DCT as well as DST has some relation with DFT. Kindly read the comment by Raziel Haimi-Cohen
So nice forum. I agree with Raziel Haimi-Cohen . It depends on what type of signal or image are to be considered. Also the basis function handling is important. We can say DCT is simpler and faster than DFT and also FFT.
DCT is suitable for periodically and symmetrically extended sequence whereas DFT is for periodically extended sequence. Therefore DCTs are equivalent to DFTs of roughly twice the length, operating on real data with even symmetry. So DCT is mostly preferred in compression.
FFT is an algorithm to compute DFT as well as DCT. There are many FFT algorithms. DFT of an even signal is same as DCT. DFT of an odd signal is discrete sine transform (DST). Based on boundary conditions, there are 8 types of DCTs and 8 types of DSTs, and in general when we say DCT, we are referring DCT type-2.
For more details, you can refer: https://www.researchgate.net/publication/324104310_Novel_Fourier_Quadrature_Transforms_and_Analytic_Signal_Representations_for_Nonlinear_and_Non-stationary_Time_Series_Analysis