Skip to main content

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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
64 views

Fast standardised DCT algorithms

I'm wondering if the industry has converged on a standard approach to implement fast, efficient DCT ? Seems like there are many algorithms out there, e.g.: 1 A Fast Computational Algorithm for the ...
William Gibbons's user avatar
0 votes
1 answer
67 views

Using DCT to create real-time "levels" animation from microphone input

For context: I'm trying to create a simple "level monitor" animation of audio data streaming from a microphone. I'm running this code on an iOS device and leaning heavily on the Accelerate ...
Joshua Sullivan's user avatar
0 votes
1 answer
33 views

Calculation of Compression Ratio after DCT

I am seeking information about the compression ratios achieved at each stage of DCT-based compression processes. Specifically, I'm interested in understanding the compression ratio immediately after ...
Sahil Sharma's user avatar
0 votes
1 answer
33 views

Why is the first DCT square black here for the DCT basis images?

I'm trying to understand the DCT, for this purpose I wanted to generate the image of all basis images of the DCT. And given the formula by matlab: $$ B_{pq} = \alpha_p \alpha_q \sum_{m=0}^{M-1} \sum_{...
Rainb's user avatar
  • 103
1 vote
0 answers
83 views

Insight behind DCT-III (Type 3)

Following the sketch from Wikipedia 1, I am able to carry out DCT-II with DFT by manipulating the input signal: ...
diegor's user avatar
  • 181
2 votes
0 answers
33 views

Why DCT-III is not used as forward transform for image compression applications?

DCT-II is the most widely used type for image compression. This is due to its "Energy Compaction" property. According to this property, a good enough reconstruction of a natural image can be ...
Sahil Sharma's user avatar
0 votes
0 answers
20 views

Use DFT twice for MFCC extraction engine or use both DFT and DCT?

I'm in the process of designing an MFC extraction engine on an FPGA using Verilog. My primary concern is whether I can implement the DFT twice in the MFCC calculation process: once before applying the ...
ALS's user avatar
  • 1
0 votes
1 answer
115 views

How to use DCT to compare images?

I want to compare 2 images X and Y, and I have the DCT results dct(X), ...
beantowel's user avatar
1 vote
0 answers
118 views

How can the DCT be used for bandlimited interpolation?

I know the discrete cosine transform (DCT) is used for compression, but can anyone give an example of how to use it for bandlimited interpolation? One way might be zero-padding in the DCT domain and ...
Gillespie's user avatar
  • 1,906
2 votes
1 answer
212 views

When computing the phash value for an image, why compare against the median?

The pHash algorithm for computing perceptual hashes of images is as follows: Convert the image to greyscale and scale to 32x32. Compute the discrete cosine transform of this scaled image. Discard all ...
Mark's user avatar
  • 123
3 votes
2 answers
162 views

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

The discrete cosine transform(DCT) is a popular choice for spectral analysis in audio, video, image compression algorithms. This is primarily due its efficient "spectral compaction" property ...
SakSath's user avatar
  • 653
0 votes
1 answer
116 views

Are the OFDM DC components subcarriers mandatory even when using real transforms?

In optical OFDM systems, called DCO-OFDM, we usually use the data with its flipped complex conjugate to produce real time-domain signal while the first and $N/2 +1$ subcarriers are kept null, $N$ is ...
Sajjad's user avatar
  • 187
1 vote
1 answer
170 views

Which DCT implementation is the correct one

I'm trying to compute the Discrete Cosine Transform via FFT in C, using a response to this question, but the recommended solution gives me wrong results. Function DCT in matlab: ...
Jailer's user avatar
  • 13
6 votes
1 answer
203 views

Discrete Cosine Transform (DCT) as the limit of Principal Component Analysis (PCA)

On the Wikipedia article about Discrete cosine transform it is said: For strongly correlated Markov processes, the DCT can approach the compaction efficiency of the Karhunen-Loève transform (which is ...
Weier's user avatar
  • 181
0 votes
0 answers
43 views

Discrete cosine transform and histogram equalisation

I found an image hash library for python and this blog In the block Getting Funky With pHash, the author writes: Further reduce the DCT. This is the magic step. Set the 64 hash bits to 0 or 1 ...
Albert Nagapetyan's user avatar
2 votes
0 answers
195 views

Fast DCT from DFT

I need to compute the DCT of a signal (in fact its a image). As I already have the DFT of that signal, I wonder if there is any cheap way to obtain the DCT in terms of the DFT. Note that I am not ...
Oier Lauzirika Zarrabeitia's user avatar
1 vote
0 answers
66 views

Why filter-bank energies coefficients are same through the frame?

I am trying to implement MFCC's from scratch in C++. In each frame, I am processing real-valued data to construct MFCC vectors. Although I think that my implementation is correct, the testing result ...
Yalçın Cenik's user avatar
0 votes
1 answer
22 views

Combine two 1D 16 band DCTs to one 32 band without converting to time-domain

Imagine someone had a signal of 32 samples. They cut it to two 16 sample pieces, converted to DCT frequencies, using DCT4. What I get is these two arrays. My goal is to get a x2 higher freq resolution ...
shal's user avatar
  • 111
0 votes
2 answers
89 views

Notation in two-dimensional DCT

In this DCT video isn't $X^c$ the input image and what does the superscript $c$ signify? Why do they call $X^c$ "DCT coefficients " although it's the input image?
Suvi's user avatar
  • 53
2 votes
1 answer
123 views

MFCC: Does the DCT discard the information on pitch?

Given that the pitch harmonics of speech, are higher frequency features than the spectral envelope (of the pitch harmonics), I had an idea that computing the DCT of a spectrogram and discarding the ...
Tom Huntington's user avatar
2 votes
3 answers
446 views

jpeg compression: necessity of dividing input image into 8x8 blocks

For jpeg compression, is it necessary to divide the input image into 8x8 blocks and perform a DCT on each of the 64 blocks? If your input image is mxn, could you just have 1 mxn DCT coefficient matrix?...
rg_bjj's user avatar
  • 21
0 votes
0 answers
39 views

Intuition for feeding output from 'row' DCT in to 'column' DCT for JPEG

This question is motivated by 23:00 in this video. It shows how the output from 'row' DCT is fed in to 'column' DCT for JPEG, and shows this image (highlights are mine): In the top 'Rows' row my ...
davetapley's user avatar
1 vote
0 answers
179 views

Is Discrete cosine transform Translational Invariant

I am using 2D Mellin-Cepstrum to extract features, If I use log-polar transform to get rotational invariance, the rotation is transformed to translation. Can I use DCT next to get translational ...
Radhika's user avatar
  • 11
0 votes
1 answer
778 views

What frequency does each bin of a Discrete Cosine Transform represent?

I have applied a DCT (type 2) to a vector of values acquired from a sensor, of length $N = 8$. I received a vector of DCT coefficients. How can I find out the frequency of each bin in Hz? The sampling ...
Azazel's user avatar
  • 9
2 votes
2 answers
2k views

Understanding gain of the DCT transform

I have been reading the guide from: JPEG Huffman Coding Tutorial I eventually reached the point where it states: Finally, we want to convert the DCT DC value to an RGB value. Assuming that the gain ...
malat's user avatar
  • 164
1 vote
1 answer
883 views

how to normalize DCT (or FFT) coefficients to compare different signals

I have signals that have a broad range of values. I want to compare them in a meaningful way. Just as an example, two of those signals might be: $$f(t)=100\cos(50t)+40\cos(60t) \quad g(t)=2\cos(50t)+0....
Schach21's user avatar
  • 162
5 votes
1 answer
536 views

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 ...
Fatima_Ali's user avatar
1 vote
1 answer
349 views

How can extract the cosine transform formula used for 2D by scipy.fft.dct

For the 1D cosine transform the documentation is clear in here, and I can reproduce it easily: The formula is: $$y_k= 2 \sum_{n=0}^{N-1}x_n \cos \left( \frac{\pi k(2n + 1)}{2N}\right)$$ and here it is ...
Antoni Parellada's user avatar
1 vote
1 answer
168 views

Retrieve DFT coefficients from DCT coefficients

A vector a is transformed via a discrete cosine transform (DCT) to give vector b. For example in Matlab ...
David C's user avatar
  • 13
1 vote
1 answer
912 views

Discrete Cosine Transform (DCT)

I need your help. My lecturer told me to do a study to finish the task that she gave us yesterday but the thing is there is no specific explaination on how to solve the question. Through the task, she ...
NURA's user avatar
  • 23
4 votes
1 answer
426 views

Phase shift of discrete cosine transform (DCT)

The most common type of discrete cosine transform (DCT-II) is defined as \begin{align} X_k&=\sum_{n=0}^{N-1}x_n\cdot \cos\left(\frac{\pi}{N}\left(n+\frac{1}{2}\right)\cdot k\right)&\text{where ...
chicken_game's user avatar
3 votes
1 answer
82 views

Where 2-D DFT is necessary in image processing applications instead of 2-D DCT?

As we know the 2-D DCT is a real-valued kernel and less computational complexity and it used in several image processing applications like image compression etc. 2-D DFT is a complex kernel and high ...
sukumar's user avatar
  • 31
1 vote
2 answers
671 views

Find the minimum number of arithmetic operations required for 2D Filters [closed]

Find the minimum number of arithmetic operations required for 2D Filters I could not understand the question 6 of Quiz-1. What is the number of operations (Multiplications and additions) per sample in ...
Ashley's user avatar
  • 47
0 votes
1 answer
1k views

Solve for minimum and maximum value of dct coefficient [closed]

Solve for minimum and maximum value of dct coefficient
Ashley's user avatar
  • 47
1 vote
2 answers
386 views

DCT with Matlab

I tried to create a Matlab/Octave code to implement this DCT formula. Is the code below correct? As a help I used the code from this site and modified it a bit ...
Suvi's user avatar
  • 53
2 votes
2 answers
314 views

Fast algorithm for n-dimensional DCT

I need to implement an encoder which compresses a 5-dimensional structure of 10 bits values. Each dimension has between 4 and 12 elements. If a dimension ever has more than 12 elements, it is ...
Cristian Maruan Bosin's user avatar
4 votes
1 answer
208 views

Apply the Discrete Fourier Transform as a Matrix Multiplication in MATLAB

0 I have a vector x of length N x 1, I need to perform the iDCT operation for it using MATALB. I performed that using the below method: ...
New_student's user avatar
6 votes
1 answer
518 views

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 ...
Kevinkeegan's user avatar
2 votes
0 answers
88 views

DCT and Convolution, [1994, Martucci]

I am really trying to digest this paper, but the more I read it again, the more I realize that I never fully understood it. Basically, I am trying to get an example where I can check the similarities ...
Eduardo Reis's user avatar
6 votes
1 answer
819 views

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:...
Nagabhushan S N's user avatar
2 votes
2 answers
1k views

1D DCT matlab code

I was writing MATLAB code to compute 1D DCT of sample y. On computing DCT for y=[0,1,2], code generates coefficient ...
Prabal Devkota's user avatar
0 votes
0 answers
52 views

Inverse DCT via DFT formula deduction

Context I am reading this book Discrete Cosine Transform [...]. K.R. Rao and P.YIP. 1990. Given That From Equation (2.4.11.a) $$ X^{C(2)}(m) = \left ( \frac{2}{...
Eduardo Reis's user avatar
1 vote
0 answers
79 views

Calculating DCT in reversed vector

I'm doing an exercise in which I need to show that the DCT of $\tilde{x} = (x_{N-1}, x_{N-2}, ..., x_1, x_0) $, with $\tilde x_m = x_{N-m-1}$, is equal to $ \tilde{X}_k = (-1)^{k}X_{k}$, but I have ...
Marcelo de Sousa's user avatar
1 vote
0 answers
82 views

On the performance of DCT-based OFDM

I am trying to understand the OFDM based on DCT instead of DFT in order to compare between their performance. In case of AWGN, the performance is logic, but when I perform channel equalization in DCT-...
New_student's user avatar
2 votes
1 answer
324 views

KLT vs DCT basis restriction error

I want to implement 8x8 DCT and 8x8 KLT matrices to the 8-length vectors of 256x256 Lena image (e.g. each row of image there is 32 vectors 256/8 = 32 and for all rows 256x32 = 8192). I do the eigen ...
sfw monster's user avatar
6 votes
1 answer
2k views

Convolution Theorem using DCT

I am trying to digest this paper. [2002] Anna Usakova. Using Of Discrete Orthogonal Transforms For Convolution So far, I've been successful with DFT and DHT. Could someone give a hand with DCT? I am ...
Eduardo Reis's user avatar
0 votes
1 answer
391 views

Can we use discrete cosine transform with imaginary part

I have been reading about the difference between the use of iFFT and iDCT with OFDM. What I understood that iDCT can only be used with one phase modulated symbol which is PAM/BPSK modulation. It ...
New_student's user avatar
1 vote
1 answer
2k views

Discrete Cosine Transform (DCT) Coefficient Distribution

I have two images : Original Image Binarize Image I have applied Discrete Cosine Transform to the two images by dividing the 256x256 image into 8x8 blocks. After, I want to compare their DCT ...
alyssaeliyah's user avatar
0 votes
0 answers
153 views

Why do we use the term "cepstral" in MFCCs, and how does it related to the cepstral domain?

As I know, we can get the cepstrum by taking the Inverse Discrete Fourier Transform (IDFT) of the log of the power spectrum. And we can get the Mel-frequency cepstral coefficients (MFCCs) by taking ...
Abdulkader's user avatar
3 votes
2 answers
440 views

When to Apply Circular Convolution Formulas?

Context I am studying the family of Discrete Trignometric Transforms (DTT): Discrete Cosine Transforms (DCT) and Discrete Sine Transforms (DST). And trying to understanding more their properties, I ...
Eduardo Reis's user avatar