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
2 answers
28 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?...
user avatar
0 votes
0 answers
14 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 ...
user avatar
0 votes
0 answers
35 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 ...
user avatar
0 votes
1 answer
82 views

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

I have applied DCT, type 2 to a vector of values from a sensor. For example it has length N = 8. I received a vector of DCT coefficients. How can i find out the frequency of each bin in Hz? The ...
user avatar
  • 9
2 votes
2 answers
218 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 ...
user avatar
  • 164
0 votes
0 answers
21 views

Inverse DCT4 by using Inverse DFT

Say I have an inverse DFT function ready for use. I am struggling to find online or mathematically deduce the additional steps needed to compute an inverse DCT4 by using said inverse DFT function. If ...
user avatar
  • 43
1 vote
1 answer
200 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....
user avatar
  • 162
5 votes
1 answer
182 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 ...
user avatar
1 vote
1 answer
66 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 ...
user avatar
1 vote
1 answer
66 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 ...
user avatar
  • 13
1 vote
1 answer
211 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 ...
user avatar
  • 23
4 votes
1 answer
140 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 ...
user avatar
3 votes
1 answer
46 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 ...
user avatar
  • 31
3 votes
2 answers
365 views

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

Find the minimum number of arithmetic operations required for 2D Filters
user avatar
  • 59
0 votes
1 answer
440 views

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

Solve for minimum and maximum value of dct coefficient
user avatar
  • 59
1 vote
2 answers
161 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 ...
user avatar
  • 29
2 votes
2 answers
226 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 ...
user avatar
5 votes
1 answer
124 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: ...
user avatar
5 votes
1 answer
244 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 ...
user avatar
2 votes
0 answers
55 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 ...
user avatar
6 votes
1 answer
424 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:...
user avatar
2 votes
2 answers
695 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 ...
user avatar
0 votes
0 answers
44 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}{...
user avatar
1 vote
0 answers
61 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 ...
user avatar
1 vote
0 answers
52 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-...
user avatar
2 votes
1 answer
181 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 ...
user avatar
4 votes
1 answer
718 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 ...
user avatar
0 votes
1 answer
209 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 ...
user avatar
1 vote
1 answer
944 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 ...
user avatar
0 votes
0 answers
78 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 ...
user avatar
3 votes
2 answers
288 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 ...
user avatar
1 vote
2 answers
631 views

DC Coefficient of JPEG Block

Suppose I take a grayscale image and break it into 8x8 pixel blocks, then take the DCT of those blocks. What is the DC coefficient of the block in relation to the whole image? To simplify I'm ...
user avatar
2 votes
2 answers
906 views

DCT - Coefficients and Basis Function

I am trying to understand how the Discrete Cosine Transformation works but I am not sure if I am at the right road. Assuming that I have an $8\times8$ pixels image and I am applying the DCT to this ...
user avatar
  • 41
0 votes
1 answer
126 views

DFT and integer valued basis functions'sf requencies

In Matlab the function W=dftmtx(N) gives the DFT matrix of size N. Each row is computed for an integer frequency k. $W_{k,n} = e^{-i2\pi kn/N}$, k-th frequency, ...
user avatar
0 votes
0 answers
33 views

How to use a size N complex DFT to compute a size N/2 real DCT? [duplicate]

Can someone (maybe @hotpaw?) Explain How to use a size N complex DFT to compute a size N/2 real DCT? Also, I noticed that the DCT matrix (which can be obtained in Matlab by dctmtx(n)) contains dct ...
user avatar
1 vote
2 answers
793 views

DCT vs DFT why do we need/want phase?

Why do we use complex exponentials in the Fourier transform, why do we want the phase part? As opposed to in DCT where there is no phase and only magnitude? Moreover, what does this phase concretely ...
user avatar
3 votes
1 answer
577 views

Why is the Fourier (or cosine) transform decorrelating?

The discrete Fourier transform (DFT) and the discrete cosine transform (DCT) both decompose a signal into its frequency-domain spectrum. One property that I have seen praised across various domains ...
user avatar
  • 131
3 votes
1 answer
277 views

What are the cosine functions in JPEG's DCT-II table?

As I understand it from this video, in a JPEG image an 8x8-pixel block is made up of weighted cosine waves, calculated using DCT-II. There are lots of visualizations of these waves, such as this one ...
user avatar
0 votes
0 answers
472 views

What frequency each bin of a Discrete Cosine Transform represents?

A practical example: I perform a DCT on a time series of discrete values that are spaced in time by 1/30 of a second. What frequencies each bin of this DCT represents? What is the formula to find that?...
user avatar
  • 137
0 votes
1 answer
511 views

How do I find the frequency of a particular bin in a cosine transform, and two other questions

I have a discrete series of values and I have applied a Discrete Cosine Transform to it, obtaining values like: ...
user avatar
  • 137
0 votes
1 answer
114 views

How to get a heartbeat signal from this data?

I am giving my first steps in data analysis, gathering/cleaning. To learn, I am trying to create a simple code that can detect heartbeats from color variations from the image coming from the camera ...
user avatar
  • 137
0 votes
0 answers
29 views

DCT Based modelling

I have been reading this paper on MRI and I only do have novice level signal processing insight. I could not understand the following model: The displacement field (i.e. d) is modelled as a linear ...
user avatar
  • 11
0 votes
1 answer
37 views

Do I need equally paced values to do a Fourier Cosine Transform?

I am gathering data from a sensor, but the data gathering depends on a code running, so the timing is not precise to make it equally paced. What I mean is this, the time it takes to do measurement #1 ...
user avatar
  • 137
-1 votes
1 answer
162 views

How to keep low frequencies in DCT

How can I keep a percentage r of the low frequencies of a Nx1 signal x using the Discrete Cosine Transform of it? Is it simply zeroing all but the first rN elements of DCT(x)?
user avatar
  • 141
2 votes
1 answer
276 views

Is discrete cosine transform differentiable?

Is DCT differentiable? I.e. is $\frac{\mathrm{d}\mathrm{DCT}(x)}{\mathrm{d} x}$ defined? I've seen a few implementations in automatic differentiation software packages, so I suppose the answer is ...
user avatar
  • 141
1 vote
1 answer
2k views

How to determine a quantization table for image compression with DCT?

The quantization table is given on the JPEG Wiki page. How was this table derived? I'm currently doing a project where I have to come up with custom quantization table for an image, but I don't know ...
user avatar
7 votes
1 answer
2k views

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 ...
user avatar
1 vote
0 answers
97 views

What is wrong with my 3D DCT quantization?

I'm implementing 3D DCT quantization as in Quantization of 3D-DCT Coefficients and Scan Order for Video Compression (sorry about the paywall). They propose the following equation for generating the ...
user avatar
  • 228
2 votes
1 answer
524 views

Understanding the DCT even symmetry

I wanted to prove to myself why the DCT is better than the DFT and heres a brief of what I understand so far. The DTFT works with a finite sampled input signal, but the frequency response obtained is ...
user avatar
  • 89
1 vote
1 answer
3k views

DCT vs DST for image compression

I am doing a research project for DST (Discrete Sine Transform) versus DCT (Discrete Cosine Transform) image compression and for my conclusion, my supervisor told me to discuss why the differences ...
user avatar