JPEG DCT, Discrete Cosine Transform (JPEG Pt2)- Computerphile

630,718
0
Published 2015-05-22
DCT is the secret to JPEG's compression. Image Analyst Mike Pound explains how the compression works.

Colourspaces:    • Colourspaces (JPEG Pt0)- Computerphile  
JPEG 'files' & Colour:    • JPEG 'files' & Colour (JPEG Pt1)- Com...  
Computer That Changed Everything (Altair 8800):    • Computer That Changed Everything (Alt...  
Problems with JPEG: COMING SOON
Upside Down Trees (Huffman Encoding):    • How Huffman Trees Work - Computerphile  

Colourspaces:    • Colourspaces (JPEG Pt0)- Computerphile  
JPEG isn't a file format - JPEG pt1:    • JPEG 'files' & Colour (JPEG Pt1)- Com...  
Upside Down Trees (Huffman Encoding):    • How Huffman Trees Work - Computerphile  
Problems with JPEG: COMING SOON!
Computer That Changed Everything (Altair 8800):    • Computer That Changed Everything (Alt...  


www.facebook.com/computerphile
twitter.com/computer_phile

This video was filmed and edited by Sean Riley.

Computer Science at the University of Nottingham: bit.ly/nottscomputer

Computerphile is a sister project to Brady Haran's Numberphile. More at www.bradyharan.com/

All Comments (21)
  • @joshhyyym
    1:24 that is the best freehand sine wave I've ever seen.
  • @jawtheshark
    18 years after university, I finally understand what my prof tried to explain....
  • @GtaRockt
    I love it when I procrastinate and notice "hey, I need the stuff this guy's explaining in my exam!" double win
  • @doemaeries
    6:11 nice how he did the trick with the pen without even stopping to talk
  • For anyone interested: this is roughly how the fourier transform on images works. The main 3 differences is that you don't do it on 8x8 blocks but on the image as a whole, you consider 'waves' with lots of different angles and not just vertically and horizontally and you also add in sine waves and not just cosine waves.
  • @askmiller
    There's a few steps that he skipped. as many of you might realize, images aren't all going to make those nice blocks of 8, so you need to pad the edges with a few pixels most of the time. second, he never actually talked about how the DCT is mathematically performed.  Basically it's matrix multiplication between your shifted values and a DCT matrix that's generated as basically a sum of a bunch of cosine saves.   third, i'm not sure if this is included with their huffman video or not, but the values are actually stored in 1's complement, which is interesting because they completely ignore 0's.  In coding, there's basically a skip code which could mean either skip every remaining coefficient or skip a chain of several.   fourth, the DC value (top left) isn't just stored separately, but it also needs to be encoded in a separate way.  Because the values are typically so much larger than the others, you don't actually store the DC value itself, but the comparison to the previous value.  For instance, if the first value is 84 and the second is 85, you store 84 for the first block, then 1 for the second. This is by far the best video I've ever seen for explaining jpeg, and all of the above isn't really necessary for anyone just curious about how jpeg works, but it's still cool stuff to know imo.
  • This young gentleman uses paper and pen to explain something so well, much better than many others using fancy cartoons and movies. Thanks!
  • @EdEditz
    I'd love to experiment with changing the quantization numbers and see what weird images that would produce. Like glitch art maybe. :)
  • These series are fantastic for three reasons: 1) high quality information 2)organized, sequential presentation with examples 3) no youtube fluff
  • Okay so during my university course we learned this in 90 minutes. And there are still some bits in this video that we never learned. This is so much better explained than anything we learned or that I could find on the topic online. Very awesome video!
  • @ViltsuV
    Tried to understand this around a year ago, but Mike really put it in words better than any book I read. Thanks!
  • @Sleeperknot
    I am so glad that I clicked on this video out of the search results to learn something about DCT. I have to say that the quality of teaching in this video is simply top-notch. Many other videos out there simply explains how to calculate DCT, without ever relating to any practical usage at all. Some of them dwell only in the dark regions of the textbook filled with a lot of formulas.
  • @Loatroll
    Very well done! I've been meaning to learn more about JPEG, and here you come along and explain it very coherently. Thanks for that!
  • @AnuragSyal
    This is by far the best video I have seen on JPEG compression. He explained the process thoroughly.
  • OMG! Mike just drew the most perfect sine curve I've ever seen drawn by hand! Impressive. Most impressive.
  • @Chakaramba
    After an online university lecture about JPEG compression, that video sets all the stuff in my head to the right places! Thanks for such a great example of tables with their input/output performed
  • this is just awesome. Thank you for explaining JPEG in a compressed form
  • @RobinWootton
    Brilliant – I've wondered this for 25 years (since meeting the .jpg format in 1996). Another well prepared lecture by Dr Pound