By clicking on the image below you can transform it
to and from it's Discrete Cosine Representation.
The DCT like the FFT is a separable transfrom.
This means that a 2-D transfrom can be realized by first
transfroming in the x direction, followed by a transforms in
the y direction.
The blocksize shown here is 8 by 8 pixels.
|
Notice how the transformed image is a uniform gray color. This is
indicative of a correlated image. In fact, most of the coefficients
in a DCT transform are typically very close to zero (shown as gray here
because these coefficients are signed values). Both JPEG and MPEG
take advantage of this property by applying a quantization to these
coefficents, which causes most values to be zero.
If we ignore floating point trucation errors, then the DCT transformation
is an entirely lossless transform. The loss incurred in JPEG and MPEG types
of compression is due to the quantization that is applied to each of the
cofficients after the DCT transform.
|