Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is the meaning of DC and AC in jpeg file?

I am writing decompressor for jpeg files I know that it's very complex process but anyway I have read this tutorial http://www.impulseadventure.com/photo/jpeg-huffman-coding.html it was very useful until I reached this

The expectation is that image content is 3 components (Y, Cb, Cr). Within each component, the sequence is always one DC value followed by 63 AC values.

So what is the meaning of DC and AC?

like image 245
user1604573 Avatar asked Sep 08 '13 03:09

user1604573


1 Answers

Simply that the first element of a discrete cosine transform (DCT) is the DC or direct current term, which is the average of the pixel values. The remaining elements, the AC or alternating current terms, are independent of the average. So if you added the same number to all the pixel values, only the DC term of the DCT would change. The AC terms would be unchanged.

This is analogous to filtering out the DC component of a signal with a capacitor, allowing only the AC components through.

like image 186
Mark Adler Avatar answered Sep 22 '22 02:09

Mark Adler