Talk:Discrete cosine transform

message: Which mathematician (or group of mathematicians) coined this term?   What year was it?   Was it used before the year 1900?   The main page of this article could be improved by giving a brief history behind the term, and what alternative terms were used before this term stuck.   216.99.201.228 (talk) 06:50, 19 September 2010 (UTC)
thread_title: History behind the term

message: I have started converting the notation in this article to match the changes that have been made to Discrete Fourier transform .  The four changes are:
1.  n becomes N:  Change all instances of the symbol n to the new symbol N to represent the length of the sequences in both the time and frequency domains.
2.  k becomes n: Change all instances of the symbol k to the new symbol n to represent the index variable for the time domain sequence.
3.  j becomes k:  Change all instances of the symbol j to the new symbol k to represent the index variable for the frequency domain sequence.
4.  f becomes X:  Change all instances of the symbol f to the new symobl X to represent the transformation of the data sequence in the frequency domain.
For more information, see Talk:Discrete Fourier transform.
-- Metacomet 16:09, 6 January 2006 (UTC)
replies: text: Nope, you must have mistyped them, or have a bug in your program.  (To see that your proposed minus sign isn't correct, consider the simple case of a transform of all 1's.) —Steven G. Johnson 22:15, 1 September 2006 (UTC)
thread_title: Change in notation

message: Under the formal definition, it is not stated what k represents. Or have I missed something? --Sam Pablo Kuper 23:41, 4 April 2007 (UTC)
replies: text: Fixed.  —Steven G. Johnson 20:15, 5 April 2007 (UTC)
thread_title:  Formal definition 

message: Would be nice if someone added an example of how the DCT saves memory, by showing an 8x8 color block and going thru the math.  Thanks, Daniel.Cardenas 18:38, 5 April 2007 (UTC)
replies: text: See JPEG. —The preceding unsigned comment was added by Stevenj (talk • contribs) 20:12, 5 April 2007 (UTC)
thread_title: Would be nice if someone added an example

message: Great page, really helped me out.
The summation given in the formula for DCT-III starts at n=1, should this be n=0?
:No, the n=0 term is handled by a separate term since its normalization is different. —Steven G. Johnson 17:44, 11 April 2007 (UTC)
thread_title:  n=1? 

message: This page seems to mention changing scale factors to make the transform orthogonal.  I am fairly sure the transform is orthogonal without the scaling factors, and that the scaling is done to make the transform Orthonormal.  —Preceding unsigned comment added by 208.215.227.190 (talk) 18:48, 7 September 2007 (UTC)
replies: text: Whilst the transform is orthogonal with any scale factor, the matrix is only orthogonal (by the definition given at Orthogonal matrix) if each of its columns is of unit magnitude.  Oli Filth 19:17, 7 September 2007 (UTC)
thread_title:  Orthogonal 

message: unless I'm missing something, the figure that lists DCT I, II, III, and IV doesn't match with the text.  The text describes the DCT-II as
"...where the even-indexed elements are zero. That is, it is half of the DFT of the 4N inputs y_n, where y_{2n}=0 ... ".  This matches DCT-III in the figure.  Which is correct?  BTW, I like the figure a lot, very intuitive. Lavaka (talk) 03:14, 18 November 2007 (UTC)
replies: text: The part that says "y_{2n}=0" refers to the input that would have to be provided to do an equivalent DFT, whereas the diagram shows the way that the DCT's input is effectively interpreted.  Also, note that y_{2n}=0 means "every even element is zero", rather than "the element past the end of the sequence is zero", which is what can be see in the diagram of DCT-III's input (I am assuming that this was your interpretation).  My best guess is that the zeros are added in order to allow the mid-point to fall at an integer index.  This is required because the boundaries are fractional (n=-1/2 and n=N-1/2).  Note that the diagram for DCT-III clearly shows that the boundaries are not fractional - they are the first value of the sequence (n=0), and the value past the end of the sequence (n=N) which is set to zero. --82.18.14.143 (talk) 12:50, 3 June 2008 (UTC)
thread_title:  figure doesn't match text 

message: DCT should go to Discrete Cosine Transform and then mention up top DCT can also refer to DCT File Format.  —Preceding unsigned comment added by 203.129.33.32 (talk • contribs) 00:21, 15 April 2008  
:There are approximately 15 entries on the DCT disambiguation page.  There's no reason to suggest that this article is the most prominent or relevant.  Oli Filth(talk) 23:26, 14 April 2008 (UTC)
thread_title: Default DCT Page

message: All the formulas confusingly use N to refer to both the length of the input and output vectors, but these are typically different. And so what, for example, does it mean to have " PI / N " in the formula??? Which N??? This is VERY confusing -- why not use n/N and k/K which is a much more standard kind of notation and is not confusing.
:For DCTs, the input and output vectors are always the same length; otherwise the transform would not be invertible.  There is only one N.  —Steven G. Johnson (talk) 04:43, 23 June 2009 (UTC)
thread_title:  N != N !!! 

message: Er. Do you realize that this article now has a ~1mbyte animated gif inline? Thats seriously not-nice to people with limited bandwidth. --96.241.226.166 (talk) 22:52, 3 April 2011 (UTC)
thread_title:  805 kbyte animated gif 

message: Whoever originally wrote and all those who helped improve the informal overview section, you know your stuff and you have a knack for explaining it well! Thank you very much.  — Preceding unsigned comment added by 2602:304:47EB:F9F9:21B:77FF:FEAD:46DE (talk) 15:50, 31 August 2012 (UTC)
replies: text: I'm not sure if this is the correct place to give feedback, but I'd just like to second this sentiment.  The "Informal Overview" section of this article is excellent.  It made me wish more Wikipedia articles on mathematical topics had a similar section.Adamlegumetaylor (talk) 16:28, 26 August 2016 (UTC)
thread_title:  THANK YOU! 

message: Cosine transform means : if we have signal on [0..T) and we add in interval [T..2T) mirror of this signal (I test, it is the same results if we mirror at zero, interval[-T..T) for -T the same as X0), next we apply _Fourier_transform_ we obtain: 
1) spectrum with zero phases (zero imaginary part on FFT), only amplitude elements.
2) if cosine function starting at zero, ending at T - cosine transform get us only one element, rank two times highest than Fourier. Moreover, if we have only cosines different ranks starting at 0, ending at T (no phases), we obtain in cosine transform this maplitudes in even spectrum elements, zero in odd. If no phases, cosine transform not litters on other frequencies.
If we have discrete transform, fo example 8 ssmples : x0..x7, x8 must be equal x0, and x9..x15 equal x7..x1. If I compute with plain Fourier this double samples I get 1) and 2) 
But formulas DCR I..DCT IV satisfy only 1), not 2) 
I derive formula:
:X_k=\delta(k)x_0 + \sum_{n=1}^{N-1}x_n cos( \frac{\pi n k}{N})
where \delta(k) is equal 1 for even k, 0 for odd k
To normalize with input amplitudes X_k should be divided by N for k=0 and by N/2 for k>0. Borneq (talk) 20:56, 15 November 2013 (UTC)
replies: text: See WP:OR: Wikipedia is not the right forum to promote changes in the DCT definitions. — Steven G. Johnson (talk) 21:23, 15 November 2013 (UTC)
replies: text:  Really, definition x_0 = x_N is not a discrete cosine transform definition. Borneq (talk) 20:45, 16 November 2013 (UTC)
thread_title:  My formula 

message: When I perform a DCT-II (aka "the DCT") and then perform its supposed inverse DCT-III (aka "the IDCT") I do NOT get back my original input. It's a HUGE output. If my input waveform (that is in the range of +/- 100) I then transform with a DCT-II, and then immediately transform it back with a DCT-III, I should get the exact waveform back (within rounding errors of the computer), but I don't instead I get a new waveform that is so big it goes out of the range of my waveform display (easily in 1000s or even 1000000s range)! And I made sure my implementation of DCT-II and DCT-III used the EXACT algorithms as shown on the DCT Wikipedia article here. I think something is wrong with your formulas here.
Benhut1 (talk) 01:58, 17 March 2014 (UTC)
thread_title:  DCT-III is NOT an inverse of DCT-II 

message: The DCT is more useful than the DFT only for non-complex. This is mentioned in the 2nd paragraph.  The DFT is efficient than the 2D DCT if the 2nd D is assigned to the complex line; i.e. let the 2D x,y data be x+i*y in the DFT and use eq 3 on the DFT page. The inclusion of the sin() in the DFT prevents the cos^2() in the 2D DCT which is computationally more efficient and the math equation appearance is simpler which allows a better fundamental understanding. I assume the FFT applied to the DFT comes out the same as using FFT applied to 2D DCT. The DFT allows a direct view of the effect of the FT phasors as in the youtube video of a 2D homer simpson line drawing reproduced from the phasors of the DFT. Ywaz (talk) 12:37, 12 March 2016 (UTC)
thread_title:  Fails to explain when DFT is better than DCT?  

message: Substituted at 02:00, 5 May 2016 (UTC)
thread_title: Assessment comment

message: Hello fellow Wikipedians,
I have just modified  on Discrete cosine transform. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:
*Added archive https://web.archive.org/web/20150711105353/http://wisnet.seecs.nust.edu.pk/publications/tech_reports/DCT_TR802.pdf to http://wisnet.seecs.nust.edu.pk/publications/tech_reports/DCT_TR802.pdf
When you have finished reviewing my changes, please set the checked parameter below to true or failed to let others know (documentation at ).
Cheers.—InternetArchiveBot (Report bug) 21:42, 13 December 2016 (UTC)
thread_title:  External links modified 

message: I believe there are several erroneous and exaggerated claims in the article.
The claim that "Wavelet coding, the use of wavelet transforms in image compression, began after the development of DCT coding.[35] The introduction of the DCT led to the development of wavelet coding, a variant of DCT coding that uses wavelets instead of DCT's block-based algorithm.[35]" is referenced by Hoffman. The problem is Hoffman does not say anything like this, that is that DCT led to wavelet. Moreover I suspect that is a typo or poorly worded sentence.
On next page Hoffman says that "Fractal coding provides yet another alternative to DCT -based transform coding". If you read the whole section in this book, it is pretty obviously that wavelets are alternative to DCT and not based on them. Similarly all sources that I've read like this , present wavelet as distinct from DCT. I am going to remove this claim, unless someone is going to provide reliable source that explain in details, how DCT led to wavelet compression.
Next the claim that "DCT data compression has been fundamental to the Digital Revolution.[8][41][42] ". First source  mentioned Digital revolution at the beginning but does not connect it to DCT. The second [] is a brief summary of relatively obscure article that says "While data compression has made significant contribution to the digital revolution in computer science and telecommunications..." It is simply not reliable source for such grandeur claim. And it does not mention DCT directly. Finally third source says nothing about Digital revolution.So again I am going  to delete this claim.
And finally the claim that "The wide adoption of DCT compression standards led to the emergence and proliferation of digital media technologies, such as digital images, digital photos,[43][44] digital video,[21][42] streaming media,[45] digital television, streaming television, video-on-demand (VOD),[8]" is also exaggerated. Most of these sources simply say that those technology use dct, but not that dct "led" to their emeregence.
For instance this article, referenced for digital photos  is about JPEG and only mention briefly DCT among other algorithms, while second source  does not even mention DCT at all. JPEG article on wikipedia also need to be towned down.
This sources ],  referenced for digital video again simply mention usage of DCT. The source for digital Cinema [], in fact mentions MDCT and not DCT.
I am going to tone down those claims. DMKR2005 (talk) 00:45, 15 October 2021 (UTC)
replies: text: thanks for your review here. We had some POV pushing on this topic a while ago and not all of it was backed out. ~Kvng (talk) 00:19, 18 October 2021 (UTC)
thread_title:  Exaggerations in the article.  

message: In the DCT-II section it says that it can be calculated in terms of a DFT like this:
This transform is exactly equivalent (up to an overall scale factor of 2) to a DFT of 4N real inputs of even symmetry where the even-indexed elements are zero. That is, it is half of the DFT of the 4N inputs  y_n , where  y_{2n} = 0 ,  y_{2n+1} = x_n  for  0 \leq n < N ,  y_{2N} = 0 , and  y_{4N-n} = y_n  for  0 < n < 2N .
However the section on the DCT-III shows no such DFT equivalent. Can someone here please fill in the information regarding calculating the DCT-III using a DFT?
Benhut1 (talk) 22:11, 12 June 2022 (UTC)
thread_title:  How is DCT-III calculated in terms of the DFT? 

message: Hey, I came here because I'm confused about the relation between DCT and DFT. It seems that they are closely related, but they are not quite the same (although for real signals they seem to be really closely related). DFT is conceptually simple. DCT is more complex, it suffices to look at the definition and also the fact that there are 8 slightly different variants. I have read in many places that DCT performs better in data compression, but I have never seen any quantification of this performance. Are there are some rigorous results showing that DCT performs better or is this always subject to our perception?
Also, the part in the informal overview that talks about reducing discontinuities I find a bit misleading. We are dealing with a digital (discretised) signal here, right? So talking about discontinuities seems a bit out of place. Jedreky (talk) 06:12, 3 June 2024 (UTC)
thread_title:  Explanation of how DCT is better than DFT