# 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.

116 questions
Filter by
Sorted by
Tagged with
72 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 ...
77 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 ...
60 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 ...
29 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: ...
77 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, ...
25 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 ...
158 views

### Recursive DCT implementation

I am trying to understand the recursive implementation of the DCT on the input signal (used for LMS filtering) according to the pictures below. The pictures and formulas are taken from the paper: "...
142 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:...
109 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 ...
337 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 8x8 pixels image and I am applying the DCT to this sample. ...
26 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}{...
52 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 ...
945 views

### DCT Steganograhy

I'm trying to implement a simple steganography algorithm (similar to JSteg algorithm) for hiding data in LSB of DCT coefficients in Matlab, and I ran into a problem. a. I apply DCT. b. modify LSB ...
21 views

### How do you apply DCT steganography on an RGB image?

I am working on a DCT-based steganography program in Python and I found a working model in Github. The program, however, can only encode on one of the RGB channels. Resulting in a discolored image. ...
377 views

### 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 ...
82 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 ...
39 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-...
31 views

### DFT vs DCT Discrete transform

The discrete Fourier transform transforms a sequence of $N$ complex numbers $x_n := x_0, x_1, . . . . x_{N-1}$ into another sequence of complex numbers $X_k := X_0, X_1, . . . . X_{N-1}$ , which is ...
67 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 ...
83 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 ...
624 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 ...
356 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 ...
11 views

### Image Transformation Functions to Identify if the Text in the Document Originally There or Just Synthetically Overlaid

I have a copy of scanned ancient dirty document and synthetically generated ancient dirty documents. I want to use Discrete Cosine Transform to characterize noise types existing in the document and ...
32 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 ...
9k views

### 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 ...
88 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 ...
253 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 ...
12k views

### Why zig zag manner scan is used in DCT for image compression?

I am not sure why zig zag manner scan is used in DCT. I can guess that might because it moves from low frequency component to high frequency component and as most of the energy is stored in low ...
28 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 ...
1k views

### Recovering an image using IDCT through DCT coefficients

I have computed the discrete cosine transform (DCT) of an image in MATLAB. I got a matrix of discrete cosine transform coefficients in the workspace. How can I recover the original image from its ...
286 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 ...
298 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 ...
126 views

### What are the cosine functions in JPEG's DCTII 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 DCTII. There are lots of visualizations of these waves, such as this one ...
203 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 ...
864 views

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

Can someone find or make a visual illustration of how time domain aliasing cancellation works in lapped transforms such as the MDCT? I think a graphic would make it a lot easier to understand, and I ...
222 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: ...
948 views

### What is the maximum value that can result from a 2D DCT?

Assuming that I have an 8x8 matrix of 8 bit unsigned values and carry out a 2D DCT on them, what is the biggest value that can result from it? This will help be decide how many bits to use. I am aware ...
218 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?...
93 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 ...
27 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 ...
29 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 ...
96 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)?
2k 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 ...
65k views

### 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 ...
71 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 ...
1k views

### 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 ...
1k views

### 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 ...
1k 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 ...
There is a speech signal, $y[n]$, in the time-domain. To take it to the frequency-domain, DCT has been got from $y[n]$ (w = dct(y) in MATLAB). After it, I applied ...