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
6
votes
1answer
126 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:...
2
votes
2answers
75 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 ...
0
votes
0answers
25 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}{...
1
vote
0answers
51 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 ...
0
votes
0answers
18 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. ...
1
vote
0answers
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-...
1
vote
1answer
76 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 ...
0
votes
0answers
30 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 ...
0
votes
0answers
41 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 ...
0
votes
1answer
75 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 ...
0
votes
1answer
289 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 ...
0
votes
0answers
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 ...
0
votes
0answers
31 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 ...
1
vote
2answers
76 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 ...
1
vote
2answers
232 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 ...
1
vote
2answers
301 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. ...
0
votes
1answer
73 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, ...
0
votes
0answers
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 ...
1
vote
2answers
245 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 ...
3
votes
1answer
263 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 ...
2
votes
1answer
104 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 ...
0
votes
0answers
192 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?...
0
votes
1answer
196 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: ...
0
votes
1answer
91 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 ...
0
votes
0answers
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 ...
0
votes
1answer
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 ...
-1
votes
1answer
89 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)?
2
votes
1answer
193 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 ...
0
votes
1answer
548 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 ...
2
votes
1answer
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 ...
1
vote
0answers
69 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 ...
1
vote
1answer
298 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 ...
0
votes
1answer
1k 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 ...
0
votes
1answer
303 views

taking FFT from DCT

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 ...
1
vote
2answers
67 views

number of cosine waves in DCT

Why is it $N\cdot N$ a sufficient number of cosine waves equal to the size of the image or to a portion of it to describe it (or a portion of it) completely without losing information applying the DCT....
2
votes
1answer
137 views

Which of DFT, DCT and DWT transforms is more robust to noise and geometric transformations in image processing [closed]

I am currently studying about image watermarking and I have been testing these 3 domains to embed the watermark at. My question is, how do these domains hold up to noise addition or geometric ...
1
vote
2answers
213 views

Zero Frequency Basis Equation for Discrete Sine Transform

So, I'm evaluating the Discrete Sine transform Basis functions and I found on the internet the following picture: So, I may be getting the point wrong, but, if the 2D DCT equation is: Then the ...
1
vote
1answer
373 views

Image not divisable by 8? (JPEG Compression)

I have learned that an image is to be divided by 8*8 blocks, and the 2D DCT is then applied to these blocks. My question is, what if the image is not divisible by 8? What should I do in this case?
3
votes
1answer
157 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: "...
2
votes
2answers
198 views

Data representation of largest DCT coefficients

In many examples of data compression, we take the S largest coefficients of a signal in a sparse basis (eg. 1% of largest DCT coefficients) and set the rest to zero. How do we practically represent ...
2
votes
1answer
101 views

How to zoom an image using DCT transform

I am familiar with zoom using fourrier transform on an Image. I am also aware that DCT is used mainly to compress images. Meanwhile, how can someone use this transform to zoom an image?
2
votes
1answer
226 views

Understanding the DCT

I have been trying to understand the definition of the DCT and found a really good website describing its definition. Here is the link DCT. What I don't understand is the part of the DFT. Why is the ...
0
votes
2answers
842 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 ...
1
vote
0answers
107 views

Compute hilbert transform from DCT- FFTW3 REDFT00

My problem is similar to this but not the same. Edit: Here is a description of Neumann boundary conditions for differential equations: Neumann-type boundary conditions means derivatives are ...
2
votes
1answer
2k views

discrete cosine transformation (dct-II) own implementation with loops

I want to implement the DCT-2, the dctmtx: $$X[k] = \sum_\limits{n=0}^{N-1} x[n] \,\cos \left(\frac{\pi}{N} \left(n+\tfrac12 \right)k \right) ~~~,~~ \;k=0,1, \dots N-1$$ ...
3
votes
2answers
833 views

Do DCT results contain phase spectrum?

I've been working much with numpy.fft lately where just like the documentation says: When the input a is a time-domain signal and ...
2
votes
1answer
283 views

In 1D DCT, why is the input a vector?

The question is specific to this document: Image Compression. It is chapter 6 from book "A First Course in Applied Mathematics" by Jorge Rebaza. It is, a to the point explaination of DCT that is ...
2
votes
1answer
267 views

Need help implementing DCT Type 4 algorithm

I'm trying to implement Algorithm 2 from this paper: Xuancheng Shao and Steven G. Johnson: Type-IV DCT, DST, and MDCT algorithms with reduced numbers of arithmetic operations, https://arxiv.org/...
2
votes
3answers
742 views

Difference between compressive sensing and DCT-based compression?

I am working on transmitting EEG signals over wireless body area network. I have applied two different compression techniques: DCT-based and compressive sensing (CS-based) approach. I noticed that the ...
3
votes
2answers
151 views

How to discard coefficients in the frequency domain without losing too much quality?

I was reading a text that shows that one can throw away 66% of the coefficients and gets an image that is still acceptable. I tried to replicate it using python (last example) and selectively ...