DCT
Concept
Cosine transform
- fourier transform but only with the cosine component
- even signals can be represented with a linear combination of cosine fuctions
- used in:
- JPEG
- MPEG
similarly, the DFT of an even signal real, but the DFT of an odd signal is imaginary
Discrete Cosine Transform(DCT)
- like the DFT’s periodic assumption, but requiring symmetric extensions
- different variations of tiling

usually DCT-2 is used for compression
Even symmetry
- symmetry removes the need for phase
DCT-2
- tile by flipping
JPEG compression
- lossy compression
- 2D DCT and filtering out the high frequency components
Steps
- color space transform, RGB to YCbCr (Y = luminance, Cb = blue diff, Cr = red diff)
- image is divided into 8x8 chunks
- apply 2D DCT to each chunk
- which yields an 8x8 set of coefficients for the 8x8 basis functions

- which yields an 8x8 set of coefficients for the 8x8 basis functions
note the high frequency allow for the most detail, filtering them out causes a loss in detail
- the coefficients are divided by the values in the quantization table and rounded
- usually lowers the high frequencies until they are mostly 0
- RLE and huffman coding used to further compress the data
- having many consecutive 0s is good for RLE
Frequency values
pixels(samples) can be represented by and transformed into independent basis functions(frequencies)