Questions tagged [dct]

The Discrete Cosine Transform expresses a sequence of finitely many data points in terms of a sum of cosine functions oscillating at different frequencies.

DCTs are important to numerous applications in science and engineering, from lossy compression of audio (e.g. MP3) and images (e.g. JPEG) (where small high-frequency components can be discarded), to spectral methods for the numerical solution of partial differential equations. The use of cosine rather than sine functions is critical in these applications: for compression, it turns out that cosine functions are much more efficient (as described below, fewer are needed to approximate a typical signal), whereas for differential equations the cosines express a particular choice of boundary conditions.

Source: wikipedia

127 questions
96
votes
4 answers

What is the difference between a Fourier transform and a cosine transform?

In speech recognition, the front end generally does signal processing to allow feature extraction from the audio stream. A discrete Fourier transform (DFT) is applied twice in this process. The first time is after windowing; after this Mel binning…
Nate Glenn
  • 1,077
  • 1
  • 8
  • 6
20
votes
4 answers

Fast Cosine Transform via FFT

I want to implement the Fast Cosine Transform. I read on wikipedia, that there is a fast version of the DCT which is similarly computed to the FFT. I tried to read the cited Makhoul* paper, for the FTPACK and FFTW implementations that are also used…
Framester
  • 301
  • 1
  • 2
  • 4
16
votes
2 answers

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…
Jacob
  • 351
  • 1
  • 12
12
votes
1 answer

Relationship between DCT and PCA

I have a basic implementation knowledge of the 2D 8x8 DCT used in image & video compression. Whilst reading about Principle Component Analysis, I can see a lot of similarity, albeit PCA is clearly more generic. When I've read about DCT previously it…
trican
  • 459
  • 1
  • 4
  • 10
10
votes
3 answers

Denoising by DCT and hard thresholding

If I have an image and I find the DCT and then apply hard thresholding on the coefficients and then IDCT then I have attenuated the noise. Can someone please explain in detail or point me to the answer as to why this works? I understand why a…
Dino
  • 101
  • 3
10
votes
3 answers

Is this a correct interpretation of the DCT step in MFCC calculation?

This is a continuation of the discussion here. I would comment there, but I don't have 50 rep so I'm asking a new question. Here's how I understand the DCT step in the MFCC calculation process: The rationale behind it is to separate the correlation…
acannon828
  • 235
  • 1
  • 2
  • 5
8
votes
1 answer

Fast DCT implementation

I'm having trouble figuring out how to follow the fast 8x8 DCT algorithm diagrams found in the following two papers: (1) A Fast Computational Algorithm for the Discrete Cosine Transform by Chen et al. and (2) Practical Fast 1-D DCT Algorithms With…
Mokosha
  • 203
  • 1
  • 5
7
votes
2 answers

JPEG steganography

Aside from Jsteg of Derek Upham, Outguess of Neils Provos, and F5 (improvement of F3 and F4) of Pfitzmann and Westfeld, What other methods can you use in information hiding in JPEG images? The methods I mentioned above hide the message in the DCT…
Frank Smith
  • 221
  • 1
  • 4
6
votes
1 answer

Can the Walsh Hadamard transform be computed for non power of 2 sizes?

Can the walsh hadamard transform be calculated for odd image block sizes such as 5x5 or 7x7? Most of the examples I've seen are for 4x4 and 8x8? I fear it probably can't from the description I read on Wikipedia ( though I'm still trying to fully…
trican
  • 459
  • 1
  • 4
  • 10
6
votes
1 answer

How does DCT decorrelate images?

I've read in multiple places that DCT decorrelates Toeplitz matrices and images usually have Toeplitz structure. Can you explain with an example how DCT decorrelates a Toeplitz matrix? Example for DFT: DFT decorrelates circular matrices. This is how…
6
votes
1 answer

Computation of the Inverse DCT (IDCT) Using DCT Or IFFT

Is there a way to compute the inverse discrete cosine transform (type-2) by leveraging either a DCT, FFT, or IFFT algorithm? I have seen ways to compute the DCT using FFTs, and I've seen ways to compute IFFT using FFT. I can't quite find a simple…
user2913869
  • 459
  • 4
  • 13
6
votes
1 answer

Non-orthogonal basis which offers better energy compaction in image compression

I am aware of image-independent basis, i.e. DCT, and image-dependent basis, i.e. Karhunen–Loève, which are used in compacting energies for image compression. These bases are orthorgonal. Are there any compression basis which are non-orthogonal that…
5
votes
1 answer

Is there mathematical relationship between the FFT and DCT transforms

I need to model the relationship between the DCT and DFT transforms (If it exists). I mean real signal $x \to y = \textrm{DCT}(x) \to z = \textrm{DFT}(y)$, so I need to get the relationship between the $x$ and $z$ if possible. For more…
Fatima_Ali
  • 526
  • 2
  • 11
5
votes
1 answer

Is the DCT prone to spectral leakage like the DFT?

My understanding is that the DCT assumes the input to be an even periodic signal. This avoids the discontinuity that can occur in the periodic extension assumed by the DFT (see image). Does this lack of discontinuity prevent spectral leakage from…
5
votes
1 answer

Why Wavelet based Transform Is More Suitable for Image Compression Compared to DCT?

Everyone knows that JPEG2000 can obtain much better compression result than JPEG. The fundamental transform behind JPEG2000 is wavelet while the basic transform in JPEG is DCT. So my question is why wavelet is more suitable for image compression…
feelfree
  • 517
  • 1
  • 4
  • 11
1
2 3
8 9