Cosine Transform
The cosine transform is the expansion of a function on the interval [0, B] on the basis 1/sqrt(B) and sqrt(2/B) cos(π k x / B) [for k>0]. Thus the coefficients of the transform are,
where the integral is over the interval [0,B]. Ck has value 1/sqrt(2) if k=0, and 1 otherwise.
Discrete Cosine Transform
Let Fi,j a 2-dim function on the discrete set NxM. Its discrete cosine transform is
where the coefficients Cu have value 1/sqrt(2) if u=0, and 1 otherwise. The sum runs on i from 0 to N-1 and on j from 0 to M-1. The inverse transform is similar to the direct transform,
where the sum runs on v from 0 to N-1 and on w from 0 to M-1. The important point is that the kernel of the tranform is the same as that of the inverse transform,
Proof. The key to the discrete cosine transform is the identity
The sums in the first line run from 1 to N-1. That on the second line from -N+1 to N-1, but a term -N can be added, because it vanishes. The sums in the third line run from 0 to 2N-1. The first of them is zero because x+y+1 is always positive.
Marco Corvi - Page hosted by geocities.com.