Stack Exchange Network

Stack Exchange network consists of 174 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

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
17 views

MFCC and DFT in signal processing [closed]

Can someone please briefly describe and if possible derive what are the MFCC coefficients of a signal? I've referred to this page here and there is a term called DCT. Can someone explain these two ...
0
votes
1answer
45 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
14 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
19 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
63 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
47 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
381 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
129 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
46 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
86 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
77 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
61 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
87 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
56 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 ...
0
votes
0answers
26 views

Does DCT Coefficients show similarity on images with color similarity?

Let's say we have two images that have color similarity. by color similarity i mean most of their pixels have the same RGB value, but those pixels with the same color are placed in different positions(...
2
votes
1answer
60 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
133 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
1answer
103 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
48 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
622 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
344 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
144 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
163 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
500 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
82 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
563 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
3k 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
726 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
203 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
169 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
260 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
267 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
139 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
174 views
1
vote
1answer
49 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
239 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
367 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
910 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
148 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
351 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
325 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
109 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
843 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
1k 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?
1
vote
1answer
72 views

Multiplier in digital signal processing?

whenever we start working on Discrete Cosine Transform(DCT), Loeffler algorithm a key role. Furthur if we approach hardware implementation of this algorithm, we find methods based on Distributed ...
0
votes
0answers
46 views

How to get cofficients in DFT?

In my recent study of signal processing I came to know that we can compress images/signal using DFT/DCT. If we consider the lossy compression of audio or any image then it follows the same steps: ...
0
votes
1answer
169 views

what is the differnence between 8x8 dct coefficients and 25 x 25 dct coefficients?

As I knkw the DCT is discrete cosine transform that mostly used in time domain analysis to frequency domain. Also 8x8 is used in nomaly in img processing. I don't know why that is defined by 8x8 ....
0
votes
0answers
2k views

How to use wavelet decomposition for feature extraction (of fMRI images)?

I have a dataset consisting of fMRI images (from mice) which are divided into 4 groups (different drug dose levels applied). Each fMRI image is 4D, that means each voxel is a time series. For each ...
1
vote
1answer
851 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 ...
2
votes
1answer
2k views

How to find first 25 coefficients of DCT in Matlab?

I need first $25 \times 25$ coefficients of DCT to encrypt an image in Matlab. How do I obtain them ? I used this code to compute DCT of an image : ...