Since the DCT is basically a fourier transform which mirrors the original sequence and then does a DFT, leaving only the cosine outputs (since no sine waves now exist in the signal), shouldn't the output for the DCT have one more entry in the output array than the input? (Since the real component has N/2 + 1 entries, and the input is doubled)? TIA
I was under the impression that the real output had N entries, but only the first N/2 + 1 were required to rebuild the signal (the rest being redundant). I think that the answer may rely on the fact that since the DCT is a DFT on the input next to its mirror, that two of the terms aren't required to rebuild it (but all this would be in the time domain).
--------------------- Clear Corners and Tires are not considered a modification.
Mathematically you are correct, DCT can be done by mirroring the input data and DFTing it. The output is N length and if the innput signal is real then the first n/2 coefs are the same as the last ones. In image processing, the input is real and the DCT exploits several mathematical properties of the mirror+dft and dose it all at once. Usually the input signal is real 8x8 . The DCT is usually done over rows and cols. The output is 8x8 DCT coefficients which are real as well.
For all kinds of information about DFT's and the like you may check . FFTW is a really fast and free set of DFT routines written in C. The documentation maybe interesting to you. Regards, tiki4