Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

why DCT transform is preferred over other transforms in video/image compression

I went through how DCT (discrete cosine transform) is used in image and video compression standards.

But why DCT only is preferred over other transforms like dft or dst?

like image 566
mrsatish Avatar asked Apr 20 '13 10:04

mrsatish


1 Answers

Because cos(0) is 1, the first (0th) coefficient of DCT-II is the mean of the values being transformed. This makes the first coefficient of each 8x8 block represent the average tone of its constituent pixels, which is obviously a good start. Subsequent coefficients add increasing levels of detail, starting with sweeping gradients and continuing into increasingly fiddly patterns, and it just so happens that the first few coefficients capture most of the signal in photographic images.

Sin(0) is 0, so the DSTs start with an offset of 0.5 or 1, and the first coefficient is a gentle mound rather than a flat plain. That is unlikely to suit ordinary images, and the result is that DSTs require more coefficients than DCTs to encode most blocks.

The DCT just happens to suit. That is really all there is to it.

like image 153
Douglas Bagnall Avatar answered Mar 16 '23 12:03

Douglas Bagnall