Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
21 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
32 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
55 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
22 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
18 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
38 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)?
0
votes
0answers
53 views

Is discrete cosine transform differentiable?

Is DCT differentiable? I.e. is d(DCT(x))/dx defined? I've seen a few implementations in automatic differentiation software packages, so I suppose the answer is positive, but I'm still missing a ...
0
votes
1answer
79 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 ...
0
votes
1answer
438 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
30 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 ...
0
votes
0answers
59 views

What is the application of Walsh-Hadamard transform in interger discrete cosine transform?

I'm trying to understand and implement 3D DCT for video compression. An important part of that is the quantization of the coefficients and efficient implementation of the 3D DCT. So far I've been ...
0
votes
0answers
71 views

How many discrete fourier / cosine transform coefficients are needed to represent real signal in frequency domain?

I think I've gotten the answer correct but I need some clarification. The definition of the DFT is $$X[k] = \sum_{n=0}^{N-1}x[n] \, e^{-i2\pi nk/N},$$ and (one of) the definition of DCT is $$X[k] = ...
1
vote
1answer
111 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
648 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
198 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
54 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
114 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
120 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
100 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
117 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
107 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
79 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
162 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
294 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
65 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 ...
1
vote
1answer
1k 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$$ ...
4
votes
2answers
518 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
165 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 ...
3
votes
1answer
227 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
610 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
101 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 ...
0
votes
1answer
843 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 ...
0
votes
3answers
5k views

How to get a real signal from complex ifft values?

I am trying to understand the difference between DCT and FFT in the context of compression. There is a nice practical example given here. (near the end of the page) When I try it in matlab I am ...
3
votes
2answers
1k views

Online DFT Algorithm

I have a discrete audio stream $x$ that needs to be processed in real-time. Specifically, as the each new sample is received, I would like to compute a Fourier transform of the last $n$ samples of the ...
3
votes
2answers
244 views

DCT: Alternatives to quantization

When using the discrete cosine transform are there commonly used alternatives to quantization to decide which dct components to keep/are important? If not, how do people come up with quantization ...
1
vote
1answer
248 views

Why do we use scaling factors in DCT? Are they important?

I don't understand the use of scale factors, why do we need them? Can we not use them or are they essential? The wikipedia page on DCT II shows this: https://en.wikipedia.org/wiki/...
0
votes
1answer
324 views

How do I sum the discrete cosine transform cosine waves?

Sorry if this sounds like a stupid question, I'm new to DCT. I've implemented various types of DCT (like IV and II) and they all give vastly different coefficients. From what I've read, the DCT ...
0
votes
2answers
367 views

DCT and mean difference of an image

If we subtract the mean of image from the DCT coefficients of an image what does it signifies? and what type of distribution does it follow? Example in MATLAB: ...
3
votes
0answers
165 views

How to iplement fast DCT-III (for inverse of DCT-II) using FFT or iFFT

I have to implement DCT-II and its inverse which is equivalently given by a forward DCT-III. All from real to real. I have been checking some paper where it is specified how to do it. However, I ...
4
votes
1answer
248 views
1
vote
1answer
50 views

validation of a pseudo jpeg compression

I've done something which is not exactly the jpeg algorithm. What I've done is that given an image $I$ of $N\times N$ size, I have computed the DCT of individual $8\times 8$ blocks. Once this has ...
0
votes
1answer
296 views

MFCC extraction last step DCT or IDCT

I'm confused with the last step of extraction MFCC where we have to take DCT or IDCT. Cepstrum is defined as IDFT of log(power spectrum). Since MFCC are cepstral coefficients so I think we have to ...
1
vote
2answers
468 views

Why discrete cosine transform may not maintain locality

In paper Convolutional neural network for speech recognition, they say I didn't understand the highlighted sentence.
1
vote
1answer
1k views

Basis functions in DCT

I'm new to Discrete Cosine Transform (DCT) and I have a question relating to basis functions. In DCT, basis functions are defined by: $$\alpha_p\alpha_q\cos\frac{\pi \left(2m+1\right)p}{2M}\cos\frac{\...
1
vote
1answer
173 views

Real DFT Using DCT

In one of my projects I need to do a large number of real FFTs, so I'm looking for the most efficient algorithm. Is it possible to pre/process the N DCT in N operations to produce the real FFT - ...
2
votes
1answer
456 views

Why is the DFT used for spectrograms rather than the DCT?

Related to Could a DCT be used for an audio magnitude spectrum rather than DFT?, but more on the (audio) spectrogram side of things I've been reading about the DCT (such as from here) and it ...
0
votes
1answer
373 views

Extracting DCT coefficients from H.264/AVC bitstream

Is it possible to extract DCT coefficients from H.264/AVC bitstream without doing a full-decoding of the video? There are a lot of papers on compressed domain video processing which are based on the ...
1
vote
0answers
137 views

Implementation of DCT for MFCC

I am in the process of implementing MFCC and I'm unsure about the DCT part. This is how I implemented it (using DCT II). ...
6
votes
1answer
997 views

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....
1
vote
1answer
2k views

Is DCT (Discrete Cosine Transform) of Type-2 lossless or lossy?

As I know, in general, the DCT is lossless. But I'm not exactly sure about Type-2 of DCT. Is it lossless or lossy?