Share Your Experience: Take the 2024 Developer Survey

# Tag Info

Accepted

### Convolution Theorem using DCT

I did it for the DCT-I and DCT-II. At first I thought it is about circular convolution, but it is not. After desperate attempts to do it by myself I found the article: Convolution Using Discrete Sine ...
• 366
Accepted

### Fast DCT implementation

Alright, after some days of staring at this problem I hope I can provide a bit of guidance to the next poor soul. Yes the scaling is different. Compared to ...
• 248
Accepted

Accepted

### How does DCT decorrelate images?

[EDIT] In 1991, Nasir Ahmed wrote: "How I Came Up with the Discrete Cosine Transform". Interesting to read, on how he was inspired by Chebyshev polynomials, and on how he didn't get funding,...
• 31.9k

### Is the DCT prone to spectral leakage like the DFT?

A window function other than rectangular can be applied to suppress sidelobes also with the discrete cosine transform (DCT). Window functions are also sometimes used together with some flavors of DCT ...
• 13.5k

### Illustration of time domain aliasing cancellation (TDAC, MDCT, lapped transform)

Edit: I have recently created two Jupyter Notebooks that illustrate this behaviour and let you play around with some actual matrices and actual signals. I find understanding MDCT easiest if we define ...
• 447

### Online DFT Algorithm

The algorithm for which you may be looking is called a "sliding DFT". For a small number of result bins, that number of "sliding Goertzel" filters can also be used. Here's one online description: ...
• 35.4k

### Do DCT results contain phase spectrum?

A DCT is equivalent to a DFT of real data that is doubled and mirrored, thus rendering it symmetric. The DFT of any symmetric real signal has a phase of zero (its all cosines, no antisymmetric sine ...
• 35.4k

• 31.9k

### 1D DCT matlab code

For clarity, I would write this DCT as: $$F(u) = \alpha(u)\sum_{i=0}^{N-1}f(i)\cos\left(\frac{\pi u}{2N}(2i+1)\right)$$ We note that, with this 1-indexing of Matlab: $$y[i+1] = f(i)\,.$$ Then I would ...
• 31.9k

• 2,383

### DCT - Measures of energy compaction gain achieved using DCT over FFT

In Discrete-Time Signal Processing by Oppenheim, chapter 8.5, there is a quantification of mean squared error by setting coefficients to 0 for both DCT and DFT: From this, you can of course calculate ...
• 11.1k

### Fast Cosine Transform via FFT

For true scientific computing, the amount of memory usage is important too. Therefore the N point FFT is more attractive to me. This is only possible due to Hermitian Symmetry of the signal. The ...
• 121

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

How about with a 50% overlap? From this question, I understand that you are thinking about performing localized, block processing, in the manner of sliding Fourier or spectrogram. Could the DCT be ...
• 31.9k
Accepted

### How to find first 25 coefficients of DCT in Matlab?

In JPEG compression, DCT coefficients are generally parsed not as sub-blocks, but in an order: corresponding to the entries in the top left corner This corresponds to a zigzag indexing: This can ...
• 31.9k