Tuesday, March 27, 2018

Could a DCT be used for an audio magnitude spectrum rather than DFT?


From what I understand, the DCT has half the bin size as a DFT of the same size N. The DFT also includes phase information, but often this is not needed when only the magnitude spectrum is desired.




  • Could the DCT be used to provide a magnitude spectrum with twice the density (half the bin spacing) of the DFT or would out of phase information be lost?

  • How about with a 50% overlap?



Answer



Yes, DCT can be used to provide a magnitude spectrum with twice the density. I do not quite understand overlap, but I am assuming that since DCT covers less, you thought there would be an overlap. To provide an eligible answer to the question, let me make a quick review for usage of DCT in mainly image processing.


First, we need to make some assumptions. In order to use DCT, you need to have a real signal. This is by definition. While you are saying, DCT has half the bin size comparing to DFT in size N, you are assuming that the signal is low frequency signal. Otherwise, not so much.


For usage of DCT in compression, since DFT of image will be symmetric, it produces redundant information (one side mirror will be enough to reproduce the signal). Therefore, kernel of DCT is used in order to produce denser information comparing to DFT. This is also true for low frequency audio signals, it can be used in the same way. While it makes it denser, coefficients gets bigger, since kernel of DCT covers both sides(real and imaginary parts) of the signal.


My major is image processing, so I tried to map DCT and DFT concepts and explanations in image processing. One difference between image and audio could be sizes, though. In image processing, you know the sizes(row and columns for FFT and other purpose of processing). I guess that you need to divide the vector of audio data somehow in order to further process. Without knowing the data, this could be troublesome(I am not sure).


Here is an image taken from web, but I did not write it down where I took it, could be wikipedia.;


Image Processing



As you can see, transformed image is represented in DCT by magnitude spectrum with no problem. In a more compact and denser way, and look at the magnitude of coefficients. It is bigger than two times of DFT. DFT is symmetric, you could just divide it into two. One part is redundant. And one more thing, DCT can store the information is not just half of DFT but nearly quarter of DFT. That is generally the case of DCT overcoming to DFT in images.


No comments:

Post a Comment

digital communications - Understanding the Matched Filter

I have a question about matched filtering. Does the matched filter maximise the SNR at the moment of decision only? As far as I understand, ...